Page rendering method and device, computer equipment and computer readable storage medium

By dynamically cutting and alternating the rendering of text content, the problem of uneven protection and insufficient security in existing technologies is solved, thereby improving information security without affecting user experience.

CN121832941APending Publication Date: 2026-04-10KANG JIAN INFORMATION TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-12
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing technologies rely on the implementation logic of browsers and operating systems to prevent the malicious copying of sensitive content, resulting in inconsistent protection effectiveness. Furthermore, simply 'hiding' or 'interfering' with the interaction process cannot build a true copying barrier, leading to poor security.

Method used

By constructing a dynamic rendering container, the text content is segmented according to its layout to generate first page data and second page data. During rendering, the data is rendered alternately according to a preset switching interval. The automatic completion function of human vision is utilized so that users can only obtain a portion of the content at a time.

Benefits of technology

It effectively prevents users from taking screenshots or copying the complete content, improving information security without affecting the user's normal browsing experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121832941A_ABST
    Figure CN121832941A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of Internet, can be applied to the field of medical treatment and finance, and discloses a page rendering method and device, computer equipment and a computer readable storage medium, and the method comprises the steps: determining a to-be-rendered target page, and constructing a dynamic rendering container rendered with text content according to the layout of the text content on the target page; cutting the dynamic rendering container according to a preset cutting rule to obtain first page data and second page data; and when the target page is rendered, alternately rendering the first page data and the second page data according to a preset switching interval so as to render the target page. By dynamically cutting and alternately rendering the text content, only partial content can be obtained and complete content cannot be obtained when a user performs screenshot or copying every time, and the human vision has an automatic supplementing function, so that the normal browsing of the text content by the user is not influenced, and the user experience is improved. User screenshots or copies to critical confidential information can be prevented in the medical or financial field.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of Internet, and can be applied to the fields of medical treatment and finance, and particularly relates to a page rendering method and device, a computer device and a computer readable storage medium. BACKGROUND

[0002] With the rapid development of Internet technology, various online platforms carry a large amount of information, some of which involve sensitive content such as business secrets, user privacy or copyright protection. For example, paid course materials in online education platforms, core data documents in enterprise internal systems, and user transaction information on financial platforms all need to be strictly restricted from illegal copying and dissemination to protect data security, maintain business interests and user rights and interests. However, with the increasing demand for information acquisition and use convenience of users, how to effectively prevent sensitive text content from being maliciously copied without affecting the normal reading experience has become a technical problem to be solved in daily business development.

[0003] In related technologies, three types of technical means are mainly used to restrict user copying of text: first, system-level restriction based on CSS style, which prohibits the user from selecting text through mouse or touch operation by setting user-select: none and related browser prefix attributes; second, dynamic interception by listening to browser events, such as capturing the copy event and preventing the default behavior, or disabling the contextmenu event to shield the copy option in the right-click menu; and third, using the clipboard API (such as navigator.clipboard.writeText) provided by modern browsers to actively clear the clipboard content when the copy behavior is triggered, thereby destroying the copy result.

[0004] However, the applicant realizes that the security of related technologies depends on the implementation logic of the browser and operating system, but the support level, event triggering mechanism of different browsers or devices differ, resulting in uneven protection effect; moreover, related technologies only achieve surface protection by "hiding" or "interfering" with the interaction process, and fail to build a real copy barrier, with poor security. SUMMARY

[0005] The present application provides a page rendering method, device, computer device and computer readable storage medium to solve the technical problem that only "hiding" or "interfering" with the interaction process achieves surface protection, fails to build a real copy barrier, and has poor security.

[0006] In a first aspect, a page rendering method is provided, comprising: determining a target page to be rendered, and constructing a dynamic rendering container with text content according to the layout of the text content on the target page; The dynamic rendering container is cut according to a preset cutting rule to obtain first page data and second page data; When rendering the target page, the first page data and the second page data are rendered alternately according to a preset switching interval to achieve the rendering of the target page.

[0007] Secondly, a page rendering apparatus is provided, comprising: The construction module is used to determine the target page to be rendered and, based on the layout of the text content on the target page, construct a dynamic rendering container that renders the text content. The cutting module is used to cut the dynamic rendering container according to a preset cutting rule to obtain the first page data and the second page data; The rendering module is used to render the first page data and the second page data alternately according to a preset switching interval when rendering the target page, so as to realize the rendering of the target page.

[0008] Thirdly, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the steps of the page rendering method as described in any of the first aspects above.

[0009] Fourthly, a computer-readable storage medium is provided, the computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the page rendering method as described in any of the first aspects above.

[0010] In the above-mentioned page rendering method, apparatus, computer equipment, and computer-readable storage medium, the target page to be rendered can be determined. Based on the layout of the text content on the target page, a dynamic rendering container containing the text content is constructed. The dynamic rendering container is then segmented according to preset segmentation rules to obtain first page data and second page data. When rendering the target page, the first page data and second page data are rendered alternately according to a preset switching interval to achieve the rendering of the target page. Through dynamic segmentation and alternating rendering of the text content, each time a user takes a screenshot or copies it, only a portion of the content is obtained, and the complete content cannot be obtained. Although each rendering does not present the complete text content, the human eye has an automatic completion function, which will not affect the user's normal browsing of the text content. Therefore, by utilizing the dynamic processing of text content, it is possible to prevent users from taking screenshots or copying critical confidential information in the medical or financial fields, thereby protecting information and improving information security. Attached Figure Description

[0011] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0012] Figure 1 This is a schematic diagram of an application environment for a page rendering method according to an embodiment of the present invention; Figure 2 This is a flowchart illustrating a page rendering method according to an embodiment of the present invention; Figure 3 This is a flowchart illustrating a specific implementation of step S10; Figure 4 This is a flowchart illustrating a specific implementation of step S20; Figure 5 This is a flowchart illustrating a specific implementation of step S30; Figure 6 This is another flowchart illustrating the page rendering method in one embodiment of the present invention; Figure 7 This is a schematic diagram of a page rendering device in one embodiment of the present invention; Figure 8 This is a schematic diagram of the structure of a computer device according to an embodiment of the present invention; Figure 9 This is another structural schematic diagram of a computer device according to one embodiment of the present invention. Detailed Implementation

[0013] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0014] The page rendering method provided in this embodiment of the invention can be applied to, for example, Figure 1In this application environment, the client communicates with the server via a network. The server can determine the page requested by the user as the target page to be rendered through the client, and construct a dynamic rendering container containing the text content based on the layout of the text content on the target page. Referring to a preset segmentation rule, the dynamic rendering container is segmented to obtain first page data and second page data. When rendering the target page, the first page data and the second page data are rendered alternately according to a preset switching interval to achieve the rendering of the target page. In this invention, by dynamically segmenting and alternately rendering the text content, each time the user takes a screenshot or copies it, only a portion of the content can be obtained, not the complete content. Although each rendering does not present the complete text content, the human eye has an automatic completion function, which will not affect the user's normal browsing of the text content. Therefore, by using dynamic processing of text content, it is possible to prevent users from taking screenshots or copying critical confidential information in the medical or financial fields, thereby protecting information and improving information security. The client can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. The server can be implemented using a standalone server or a server cluster composed of multiple servers. The present invention will now be described in detail through specific embodiments.

[0015] Please see Figure 2 As shown, Figure 2 A flowchart illustrating a page rendering method provided in an embodiment of the present invention includes the following steps: S10: Determine the target page to be rendered, and construct a dynamic rendering container that contains the text content based on the layout of the text content on the target page.

[0016] The page rendering method provided by this invention can be applied to online service platforms in various application scenarios. Online service platforms are typically implemented through a server-side architecture, which can render pages in real time according to user needs, allowing users to browse the corresponding pages. For example, in the insurance application field, a user can request to view transaction information, and the online service platform will then render and display a page containing the transaction information for the user to view.

[0017] When determining the target page to be rendered, the online service platform first receives a page access request from the user. This request contains the page identifier information that the user wants to view. Based on this identifier information, the platform locates the target page from among the numerous pages stored on the server. Next, the layout of the text content on the target page is analyzed. This layout includes information such as the text arrangement, font size, color, and the location of the text. Based on this layout information, the online service platform constructs a dynamic rendering container. This container is a virtual, flexibly adjustable storage and rendering area that can change its attributes and structure in real time according to changes in the text content and layout requirements. It is specifically designed to hold and render the text content on the target page, providing a basic framework for subsequent text content processing. This ensures that subsequent text content processing is based on the actual situation of the target page, providing an accurate basis for dynamically segmenting and alternately rendering text content, and enabling information protection measures to accurately target the text content.

[0018] For example, in the medical field, such as an online medical consultation platform, if a user requests to view the detailed instructions page for a certain drug, the online service platform, upon receiving the request, identifies that drug instructions page as the target page. It analyzes the layout of the text content on the page, such as the drug name, ingredients, usage, and dosage, and constructs a dynamic rendering container to hold this text content for subsequent processing. In the financial field, for example, in an online banking service platform, if a user wants to view the introduction page of a wealth management product, the online service platform identifies that wealth management product introduction page as the target page. It analyzes the layout of the text content on the page, such as product features, returns, and risk levels, and constructs a dynamic rendering container to hold this text information, preparing for subsequent operations.

[0019] Among them, such as Figure 3 As shown, in step S10, that is, determining the target page to be rendered and constructing a dynamic rendering container that renders the text content according to the layout of the text content on the target page, the following steps are included: S11: Use the page currently requested by the user as the target page to be rendered, and identify the text content on the target page.

[0020] The online service platform first receives a page access request from a user. This request explicitly includes the page identifier information the user wants to view, such as a page URL or a specific page number. Based on this identifier information, the online service platform locates and determines the page currently requested by the user from a large number of page resources stored on the server as the target page to be rendered. After determining the target page, the online service platform can use Optical Character Recognition (OCR) technology or predefined text tags on the page to recognize all the text content on the target page. OCR technology is a technology that can convert text in an image into editable text, extracting text information by analyzing and processing the page image; while predefined text tags are specific identifiers set for text content during page development, directly obtaining text content from the page code.

[0021] In this way, through the above process, the online service platform can accurately identify the target page and recognize its text content. This text content serves as the basis for subsequent text information processing, enabling targeted operations such as coordinate generation and rendering container construction, ensuring the accuracy and effectiveness of the entire information protection process. For example, on an online medical service platform, if a user wants to view a treatment plan page for a rare disease, the user sends a page access request by entering the disease name or clicking a relevant link on the platform. Upon receiving the request, the online service platform, based on the page identifier information carried in the request, finds the rare disease treatment plan page from its database as the target page. Then, the online service platform uses OCR technology to analyze the page image, recognizing text content on the page regarding disease symptoms, treatment methods, medication dosages, etc., preparing for subsequent processing. As another example, on an online insurance trading platform, if a user requests to view an analysis report page for a certain insurance product, the online service platform locates the insurance product analysis report page based on the page number in the user's request. Then, using predefined text tags on the page, it extracts text content from the page code regarding basic insurance product information, product sales data analysis, product purchase recommendations, etc.

[0022] S12: Generate text coordinates for the text content based on its position relative to the target page.

[0023] After identifying the text content on the target page, the online service platform generates text coordinates for each character or paragraph, based on the text's position relative to the target page. Text coordinates are parameters used to determine the specific position of text on the page, and can be represented using a two-dimensional coordinate system, with the top-left corner of the page as the origin, the horizontal direction as the x-axis, and the vertical direction as the y-axis. The online service platform analyzes the pixel positions of the text on the page to calculate the start and end coordinates of each character or paragraph, thus accurately determining its position on the page. For example, a paragraph with start coordinates (100, 200) and end coordinates (300, 250) indicates that the text on the page starts at position 100 pixels on the x-axis and 200 pixels on the y-axis, and ends at position 300 pixels on the x-axis and 250 pixels on the y-axis.

[0024] In this way, by generating text coordinates, we can accurately describe the position information of the text on the page, providing a key basis for accurately rendering the text content into the dynamic rendering container, ensuring that the text will not have positional deviations during the rendering process, and guaranteeing the accuracy and consistency of the page display.

[0025] For example, in the medical field, for text content on a rare disease treatment plan page, the online service platform analyzes the pixel position of each character in the page image. For the title "Disease Symptoms," it generates coordinates (150, 100), indicating that the title will begin displaying on the page at position 150 pixels x-axis and 100 pixels y-axis. For a section of text related to treatment methods, it generates starting coordinates (120, 180) and ending coordinates (400, 280), clearly defining the display range of this text on the page. Similarly, in the financial field, for text on an insurance product analysis report page, the online service platform generates coordinates (200, 80) for the title "Basic Information Analysis of Insurance Products," and starting coordinates (180, 150) and ending coordinates (450, 250) for a section of text analyzing product sales data, thus accurately determining the text's position on the page.

[0026] S13: Construct a Canvas as a dynamic rendering container, and render the text content onto the Canvas according to the text coordinates to obtain a dynamic rendering container with the rendered text content.

[0027] In this embodiment of the invention, the online service platform constructs a Canvas as a dynamic rendering container. Canvas, an element provided by HTML5, allows drawing graphics, images, and text on a webpage. It features high performance, high flexibility, and the ability to modify and update the drawn content in real time. After constructing the Canvas, the online service platform renders the identified text content one by one onto the Canvas according to the previously generated text coordinates. During the rendering process, the online service platform accurately draws the text at the corresponding positions on the Canvas based on its font, size, color, and other attribute information, ultimately resulting in a dynamic rendering container displaying the text content.

[0028] In this way, using the Canvas as a dynamic rendering container can flexibly hold and render text content, and the content on the canvas can be dynamically adjusted and updated according to subsequent needs, providing a stable foundation for subsequent dynamic cutting and alternating rendering operations, so that the entire information protection solution can be implemented smoothly.

[0029] For example, in the medical field, an online service platform constructs a Canvas of an appropriate size, its dimensions set according to the display area of ​​the target page. Then, based on the coordinates previously generated for the rare disease treatment plan page, text content such as "disease symptoms" and "treatment methods" is accurately drawn on the Canvas according to the corresponding font, size, and color. For instance, the title "disease symptoms" is drawn in black, 16-point font at coordinates (150, 100), forming a dynamic rendering container with the text content for subsequent information protection processing. Similarly, in the financial field, after constructing the Canvas, the online service platform, based on the coordinates of the text on the insurance product analysis report page, draws the title "basic information analysis of insurance products" and related text content on the canvas according to a preset style. For example, the title is drawn in blue, 18-point font at coordinates (200, 80), ensuring the text content is accurately presented in a dynamic rendering container, preparing for subsequent operations.

[0030] S20: According to the preset cutting rules, the dynamic rendering container is cut to obtain the first page data and the second page data.

[0031] In this embodiment of the invention, the online service platform segments the dynamic rendering container according to preset segmentation rules. These preset segmentation rules are a set of pre-defined standards that can be flexibly configured according to different needs and scenarios, such as determining the segmentation point based on a single character or string. The online service platform divides the text content in the dynamic rendering container into multiple parts according to the preset segmentation rules, thus forming first page data and second page data. The first page data and second page data are two independent data sets obtained after segmentation; each contains a portion of the text content, and the two parts combined constitute the complete original text content. This segmentation method disperses the text content for storage and processing, increasing the difficulty for users to obtain complete information through screenshots or copying. It provides a data foundation for subsequent alternating rendering, ensuring that each rendering only presents a portion of the content to the user, effectively preventing users from obtaining complete text information at once and enhancing information security.

[0032] For example, in the medical field, for drug instruction leaflets, the preset segmentation rules can be set to segment the leaflet from left to right according to the percentage ranges of 0-10%, 20%-30%, 40%-50%, 60%-70%, and 80-90%, forming the first page of data. Then, the leaflet can be segmented again from left to right according to the percentage ranges of 10-20%, 30-40%, 50-60%, 70%-80%, and 90-100%, forming the second page of data. After this segmentation, the two parts of data contain different text content. In the financial field, the same process applies to the product introduction page; the page is segmented according to different percentage ranges to form the first and second pages of data.

[0033] Among them, such as Figure 4 As shown, in step S20, that is, according to the preset cutting rules, the dynamic rendering container is cut to obtain the first page data and the second page data, including the following steps: S21: Determine multiple ratio ranges according to preset cutting rules.

[0034] The online service platform first queries the preset segmentation rules. There are two ways to determine multiple ratio ranges using these preset segmentation rules. One method is to directly query the multiple fixed ratio ranges indicated by the preset segmentation rules. These fixed ratio ranges are pre-defined, such as 30%-40%, 50%-60%, etc., providing a clear range for subsequent segmentation operations. The other method is to map the preset minimum segmentation unit to the text content when the preset segmentation rules indicate segmentation according to a preset minimum segmentation unit. The minimum segmentation unit can be a single character or string, such as a single Chinese character, an English word, or a specific phrase. The online service platform will then map the minimum segmentation unit to the text content based on the distribution of the text content in the dynamic rendering container, and then determine multiple ratio ranges according to the mapping result. For example, if the minimum segmentation unit is a single Chinese character, by analyzing the position of each Chinese character in the text content, a suitable ratio range is determined, such as 20%-40%, 60%-80%, etc.

[0035] In this way, by using a flexible method to determine the proportion range, either a fixed proportion range can be used, or the proportion range can be dynamically determined based on the smallest cutting unit. This can adapt to different types and layouts of text content, ensuring the accuracy and rationality of the cutting operation.

[0036] For example, in the medical field, assuming the preset segmentation rule is to segment according to a fixed percentage range, in the reply page of an online medical consultation platform, the dynamically rendered container contains the doctor's diagnostic advice for the patient. The preset segmentation rule indicates a fixed percentage range of 30%-40%, 50%-60%, etc. The online service platform will directly query these fixed percentage ranges for subsequent segmentation operations. If the preset segmentation rule is to segment according to the smallest segmentation unit, and the smallest segmentation unit is set to a single disease name phrase, such as "hypertension" or "diabetes," the online service platform will map these phrases to the diagnostic advice text content, determining a percentage range such as 30%-45% or 60%-75% based on the phrase's position and font size. As another example, in the financial field, for a dynamically rendered container displaying insurance product analysis reports, if the preset segmentation rule is a fixed percentage range, it might be set to 30%-40% or 50%-60%, etc. The online service platform queries these ranges for subsequent processing. If the segmentation is based on the smallest unit of financial terminology, such as "product line analysis" or "marketing strategy analysis," the online service platform maps these terms into the report text to determine appropriate percentage ranges, such as 30%-45% or 60%-75%.

[0037] S22: The dynamic rendering container is divided twice according to multiple ratio ranges, and the page data obtained from the two divisions are used as the first page data and the second page data, respectively.

[0038] In this embodiment of the invention, the online service platform divides the dynamic rendering container twice according to multiple proportional intervals. First, the dynamic rendering container is divided into the first segment according to the determined proportional intervals, and the result of the segmentation is used as the first page data. For example, if the proportional intervals are 0-10%, 20%-30%, 40%-50%, 60%-70%, and 80-90%, the online service platform will extract the content and related rendering information of the 0-10%, 20%-30%, 40%-50%, 60%-70%, and 80-90% positions in the dynamic rendering container from the leftmost position as the first page data. Then, multiple other proportional intervals besides the above-mentioned proportional intervals are determined within the standard proportional interval, which can typically be set to 0%-100%. For example, if the previously used ratio ranges were 0-10%, 20%-30%, 40%-50%, 60%-70%, and 80-90%, then other ratio ranges would be 10-20%, 30-40%, 50-60%, 70%-80%, and 90-100%. The dynamic rendering container is then segmented a second time according to these other ratio ranges, and the resulting segmentation is used as the second page data. In this way, the first page data and the second page data contain the text content of different parts of the dynamic rendering container, achieving the segmentation of the dynamic rendering container.

[0039] By splitting the data twice to obtain different page data, a foundation is laid for subsequent alternating rendering and display. This allows information to be presented in a dispersed manner, increasing the difficulty of information acquisition and effectively protecting information security. At the same time, it ensures that users can see complete information normally during the alternating rendering process.

[0040] For example, in the medical field, let's continue with the example of the dynamically rendered container for doctor's diagnostic suggestions. If the first segmentation is done according to the proportion ranges of 0-10%, 20%-30%, 40%-50%, 60%-70%, and 80-90%, the online service platform extracts the text content and rendered information within these ranges as the first page data, which may include some symptom descriptions and preliminary diagnosis content. Then, other proportion ranges are determined as 10-20%, 30-40%, 50-60%, 70%-80%, and 90-100%, and the second segmentation is done according to these ranges to obtain the second page data, which may include basic patient information and detailed treatment suggestions. For example, in the financial field, for a dynamic rendering container of an insurance product analysis report, if the first segmentation is based on the proportion ranges of 0-10%, 20%-30%, 40%-50%, 60%-70%, and 80-90%, the resulting first page of data may include some basic information about the insurance product, some product line analysis, and some marketing strategy analysis. If other proportion ranges are determined to be 10-20%, 30-40%, 50-60%, 70%-80%, and 90-100%, the resulting second page of data may include the remaining basic information, remaining product line analysis, and remaining marketing strategy analysis.

[0041] S30: When rendering the target page, the first page data and the second page data are rendered alternately according to the preset switching interval to achieve the rendering of the target page.

[0042] In this embodiment of the invention, when rendering the target page, the online service platform alternately renders the first page data and the second page data according to a preset switching interval. The preset switching interval is a pre-set time value that determines the frequency at which the first page data and the second page data are displayed alternately. This time value can be adjusted according to actual needs to achieve the best visual effect and information protection effect; specifically, it can be 150ms. The online service platform will render the first page data first, and after displaying it for a period of time, switch to rendering the second page data, and so on, repeating this cycle to render the target page.

[0043] Because the human eye has an automatic completion function, although only a portion of the text content is rendered each time, users will not visually perceive any significant loss and can browse and understand the page information normally. By utilizing the characteristics of human vision, without affecting the user's normal browsing, it ensures that users can only obtain partial content each time they take a screenshot or copy, and cannot obtain complete text information, effectively preventing information leakage and improving information security.

[0044] For example, in the medical field, when a user views a drug instruction leaflet page, the online service platform switches between the first and second pages of data at preset intervals, such as every 150ms. The user visually completes the information and understands the drug correctly, but screenshots or copies only capture partial content. Similarly, in the financial field, when a user views a financial product introduction page, the online service platform switches between the first and second pages of data at 150ms intervals. This allows the user to obtain key product information without obtaining complete information for inappropriate purposes.

[0045] Among them, such as Figure 5 As shown, in step S30, that is, when rendering the target page, the first page data and the second page data are rendered alternately according to the preset switching interval, including the following steps: S31: Query the preset switching interval.

[0046] The online service platform first queries the preset switching interval. The preset switching interval is a pre-defined time length, such as 150ms or 100ms. It is a key parameter controlling the frequency of alternating rendering of the first and second page data. The online service platform can obtain this preset switching interval value from a preset configuration file, database, or through a specific interface from the server. Furthermore, different application scenarios can set different preset switching intervals according to actual needs. For example, in scenarios requiring rapid information display and with less stringent security requirements, a longer switching interval can be set; while in scenarios with higher information security requirements, a shorter switching interval can be set. This invention does not limit the specific value of the preset switching interval. In this way, the preset switching interval provides a clear time basis for subsequent alternating rendering, enabling the alternating rendering process to proceed in an orderly manner according to a predetermined rhythm, meeting the needs of information display and security protection in different scenarios.

[0047] For example, in the medical field, suppose an online service platform, when preparing to render the target page (i.e., the medical report page), will query the preset switching interval. Since medical reports may contain sensitive patient information, to ensure sufficient security during information display without affecting the user experience, the preset switching interval is set to 150ms. The online service platform can read this 150ms preset switching interval value from a pre-configured parameter file, preparing for the subsequent alternating rendering of the first and second page data. Similarly, in the financial field, for a webpage analyzing insurance products, the online service platform will also query the preset switching interval when preparing to render the page. Considering that insurance product analysis involves many technical terms and key data, to prevent the information from being quickly and completely obtained, the preset switching interval is set to 100ms. The online service platform can obtain this 100ms preset switching interval value from the configuration information returned by the server through communication.

[0048] S32: When rendering the target page, the data of the first page and the data of the second page are rendered alternately at preset switching intervals.

[0049] When rendering the target page, the online service platform alternates between rendering the first page data and the second page data according to the preset switching interval. The specific process is as follows: First, the online service platform renders the first page data. After rendering, it records the first time point of completion, which serves as the starting reference point for subsequent time interval calculations. Next, the online service platform continuously calculates the first time interval between the current time point and the first time point. The current time point is continuously updated as the online service platform's time progresses. When the first time interval reaches the preset switching interval, the online service platform immediately cancels the rendering of the first page data and starts rendering the second page data. After the second page data is rendered, it records the second time point of completion. Then, the online service platform recalculates the second time interval between the current time point and the second time point. Similarly, when the second time interval reaches the preset switching interval, it cancels the rendering of the second page data, re-renders the first page data, and records the third time point of completion. Then, the third time interval between the current time point and the third time point is recalculated. When the third time interval reaches the preset switching interval, the rendering of the first page data is canceled, and the second page data is re-rendered. This process is repeated until a user request to end the display of the target page is detected.

[0050] In this way, by strictly following the preset switching interval for alternating rendering, information is displayed in an orderly and step-by-step manner, which greatly increases the difficulty of obtaining information completely at once, effectively protecting sensitive information. At the same time, it can also ensure that when users browse the page, their eyes can see the complete information content based on the automatic completion function, thereby improving the security of information display and user experience.

[0051] For example, in the medical field, after an online service platform begins rendering the target page of a medical report, it first renders the data for the first page. Assuming this rendering is completed and recorded at 10:00:00, with a preset switching interval of 150ms, the online service platform continuously tracks the time interval. When 150ms have elapsed since 10:00:00, the first time interval reaches the preset switching interval. The online service platform then cancels the rendering of the first page data and begins rendering the data for the second page, re-recording the second rendering completion time. Next, it tracks the time interval between the current time and the second time point. When 150ms have elapsed since the second time point, the online service platform cancels the rendering of the second page data and re-renders the data for the first page. This cycle continues until the user closes the medical report page. For example, in the financial sector, when an online service platform renders an insurance product analysis page, it first renders the data for the first page. If the rendering is completed and recorded at 11:00:00, the preset switching interval is 100ms. When 100ms have passed since 11:00:00, the online service platform cancels the rendering of the first page data, starts rendering the data for the second page, and re-records the second rendering completion time. Then, it continues to alternate rendering at 100ms intervals until the user finishes viewing the page.

[0052] In summary, the technical solution of this invention is summarized as follows: See Figure 6 When rendering a page, the text portion is first extracted and its corresponding page position is recorded. Then, the acquired data is divided into two sets, each divided in half according to a percentage, resulting in the first page data and the second page data. Finally, the two sets of data are rendered alternately at 150 millisecond intervals to achieve page rendering.

[0053] As can be seen, in the above solution, by dynamically segmenting and alternately rendering the text content, only a portion of the content can be obtained each time a user takes a screenshot or copies it, and the complete content cannot be obtained. Although the complete text content is not presented in each rendering, the human eye has an automatic completion function, which will not affect the user's normal browsing of the text content. Thus, by using dynamic processing of text content, it is possible to prevent users from taking screenshots or copying critical confidential information in the medical or financial fields, thereby protecting information and improving information security.

[0054] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0055] In one embodiment, a page rendering apparatus is provided, which corresponds one-to-one with the page rendering methods described in the above embodiments. For example... Figure 7 As shown, the page rendering device includes a construction module 701, a slicing module 702, and a rendering module 703. Detailed descriptions of each functional module are as follows: The construction module 701 is used to determine the target page to be rendered and construct a dynamic rendering container that renders the text content according to the layout of the text content on the target page. The cutting module 702 is used to cut the dynamic rendering container according to a preset cutting rule to obtain first page data and second page data. The rendering module 703 is used to render the first page data and the second page data alternately according to a preset switching interval when rendering the target page, so as to realize the rendering of the target page.

[0056] In one embodiment, the construction module 701 is configured to use the page currently requested by the user as the target page to be rendered, and to identify the text content on the target page; generate text coordinates for the text content with reference to the position of the text content relative to the target page; construct a Canvas as the dynamic rendering container, and render the text content onto the Canvas according to the text coordinates to obtain the dynamic rendering container with the text content rendered.

[0057] In one embodiment, the cutting module 702 is used to determine multiple ratio ranges according to the preset cutting rules; and to cut the dynamic rendering container twice according to the multiple ratio ranges, and to use the page data obtained from the two cuts as the first page data and the second page data, respectively.

[0058] In one embodiment, the cutting module 702 is used to query a plurality of fixed ratio intervals indicated by the preset cutting rule as the plurality of ratio intervals; or, when the preset cutting rule indicates that cutting should be performed according to a preset minimum cutting unit, the preset minimum cutting unit is mapped to the text content, and the plurality of ratio intervals are determined according to the mapping result, wherein the minimum cutting unit is a single character or string.

[0059] In one embodiment, the cutting module 702 is configured to perform a first cutting of the dynamic rendering container according to the plurality of ratio intervals, and use the cutting result as the first page data; determine a plurality of other ratio intervals besides the plurality of ratio intervals in the standard ratio interval, perform a second cutting of the dynamic rendering container according to the plurality of other ratio intervals, and use the cutting result as the second page data.

[0060] In one embodiment, the rendering module 703 is used to query the preset switching interval; when rendering the target page, the first page data and the second page data are rendered alternately every preset switching interval.

[0061] In one embodiment, the rendering module 703 is configured to render the first page data and record a first time point at which the rendering of the first page data is completed; continuously calculate a first time interval between the current time point and the first time point, and when the first time interval reaches the preset switching interval, cancel the rendering of the first page data, render the second page data, and record a second time point at which the rendering of the second page data is completed; recalculate a second time interval between the current time point and the second time point, and when the second time interval reaches the preset switching interval, cancel the rendering of the second page data, render the first page data, and record a third time point at which the rendering of the first page data is completed; recalculate a third time interval between the current time point and the third time point, and when the third time interval reaches the preset switching interval, cancel the rendering of the first page data and re-render the second page data, until a user request to end the display of the target page is detected.

[0062] This invention provides a page rendering device. It determines a target page to be rendered, constructs a dynamic rendering container containing the text content based on the layout of the text content on the target page, and segments the dynamic rendering container according to a preset segmentation rule to obtain first page data and second page data. During the rendering of the target page, the first page data and second page data are rendered alternately according to a preset switching interval to achieve the rendering of the target page. By dynamically segmenting and alternately rendering the text content, each time a user takes a screenshot or copies it, only a portion of the content can be obtained, not the complete content. Although each rendering does not present the complete text content, the human eye has an automatic completion function, so it will not affect the user's normal browsing of the text content. Therefore, by utilizing the dynamic processing of text content, it is possible to prevent users from taking screenshots or copying critical confidential information in the medical or financial fields, thereby protecting information and improving information security.

[0063] For specific limitations regarding the page rendering apparatus, please refer to the limitations on the page rendering method above, which will not be repeated here. Each module in the aforementioned page rendering apparatus can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0064] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 8 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with external clients via a network connection. When executed by the processor, the computer program implements the functions or steps of a page rendering method on the server side.

[0065] In one embodiment, a computer device is provided, which may be a client, and its internal structure diagram may be as follows: Figure 9 As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with an external server via a network connection. When the computer program is executed by the processor, it implements the client-side functions or steps of a page rendering method.

[0066] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps: Determine the target page to be rendered, and construct a dynamic rendering container that renders the text content based on the layout of the text content on the target page. The dynamic rendering container is cut according to a preset cutting rule to obtain first page data and second page data; When rendering the target page, the first page data and the second page data are rendered alternately according to a preset switching interval to achieve the rendering of the target page.

[0067] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor: Determine the target page to be rendered, and construct a dynamic rendering container that renders the text content based on the layout of the text content on the target page. The dynamic rendering container is cut according to a preset cutting rule to obtain first page data and second page data; When rendering the target page, the first page data and the second page data are rendered alternately according to a preset switching interval to achieve the rendering of the target page.

[0068] It should be noted that the functions or steps that can be implemented by the computer-readable storage medium or computer device described above can be referred to the relevant descriptions on the server side and client side in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.

[0069] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0070] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

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

Claims

1. A page rendering method, characterized in that, include: Determine the target page to be rendered, and construct a dynamic rendering container that renders the text content based on the layout of the text content on the target page. The dynamic rendering container is cut according to a preset cutting rule to obtain first page data and second page data; When rendering the target page, the first page data and the second page data are rendered alternately according to a preset switching interval to achieve the rendering of the target page.

2. The method according to claim 1, characterized in that, The process of determining the target page to be rendered and constructing a dynamic rendering container containing the text content based on the layout of the text content on the target page includes: The page currently requested by the user is used as the target page to be rendered, and the text content on the target page is identified; Generate text coordinates for the text content based on its position relative to the target page; A Canvas is constructed as the dynamic rendering container, and the text content is rendered onto the Canvas according to the text coordinates, thus obtaining the dynamic rendering container with the rendered text content.

3. The method according to claim 1, characterized in that, The process of segmenting the dynamic rendering container according to a preset segmentation rule to obtain first page data and second page data includes: Based on the preset cutting rules, multiple ratio ranges are determined; The dynamic rendering container is divided twice according to the multiple ratio ranges, and the page data obtained from the two divisions are used as the first page data and the second page data, respectively.

4. The method according to claim 3, characterized in that, The step of determining multiple ratio ranges according to the preset cutting rules includes: The multiple fixed ratio ranges indicated by the preset cutting rules are used as the multiple ratio ranges; or, When the preset cutting rule indicates that cutting should be performed according to the preset minimum cutting unit, the preset minimum cutting unit is mapped to the text content, and the multiple ratio ranges are determined according to the mapping result, wherein the minimum cutting unit is a single character or string.

5. The method according to claim 3, characterized in that, The step of dividing the dynamic rendering container twice according to the multiple ratio intervals, and using the page data obtained from the two divisions as the first page data and the second page data respectively, includes: The dynamic rendering container is first cut according to the multiple ratio ranges, and the cut result is used as the first page data. In the standard ratio range, determine a plurality of other ratio ranges besides the plurality of ratio ranges, perform a second segmentation on the dynamic rendering container according to the plurality of other ratio ranges, and use the segmentation result as the second page data.

6. The method according to claim 1, characterized in that, The step of alternately rendering the first page data and the second page data according to a preset switching interval when rendering the target page includes: Query the preset switching interval; When rendering the target page, the first page data and the second page data are rendered alternately at each preset switching interval.

7. The method according to claim 6, characterized in that, The step of alternately rendering the first page data and the second page data at each preset switching interval includes: Render the data on the first page and record the first time point at which the rendering of the data on the first page is completed; The first time interval between the current time point and the first time point is continuously counted, and when the first time interval reaches the preset switching interval, the rendering of the first page data is canceled, the second page data is rendered, and the second time point when the rendering of the second page data is completed is recorded. The second time interval between the current time point and the second time point is recalculated. When the second time interval reaches the preset switching interval, the rendering of the second page data is canceled, the first page data is rendered, and the third time point at which the first page data completes rendering is recorded. The third time interval between the current time point and the third time point is recalculated. When the third time interval reaches the preset switching interval, the rendering of the first page data is canceled, and the second page data is re-rendered, until a user request to end the display of the target page is detected.

8. A page rendering apparatus, characterized in that, include: The construction module is used to determine the target page to be rendered and, based on the layout of the text content on the target page, construct a dynamic rendering container that renders the text content. The cutting module is used to cut the dynamic rendering container according to a preset cutting rule to obtain the first page data and the second page data; The rendering module is used to render the first page data and the second page data alternately according to a preset switching interval when rendering the target page, so as to realize the rendering of the target page.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the page rendering method as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the page rendering method as described in any one of claims 1 to 7.