WO2023155712A1 - 页面生成方法、显示方法、装置、电子设备和存储介质 - Google Patents

页面生成方法、显示方法、装置、电子设备和存储介质 Download PDF

Info

Publication number
WO2023155712A1
WO2023155712A1 PCT/CN2023/074824 CN2023074824W WO2023155712A1 WO 2023155712 A1 WO2023155712 A1 WO 2023155712A1 CN 2023074824 W CN2023074824 W CN 2023074824W WO 2023155712 A1 WO2023155712 A1 WO 2023155712A1
Authority
WO
WIPO (PCT)
Prior art keywords
page
target
user
watermark
font
Prior art date
Application number
PCT/CN2023/074824
Other languages
English (en)
French (fr)
Inventor
连一汉
梁任杰
练坤梅
Original Assignee
北京字节跳动网络技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京字节跳动网络技术有限公司 filed Critical 北京字节跳动网络技术有限公司
Publication of WO2023155712A1 publication Critical patent/WO2023155712A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/16Program or content traceability, e.g. by watermarking

Definitions

  • Embodiments of the present disclosure relate to a page generation method, a page display method, a page generation device, a page display device, electronic equipment, and a readable storage medium.
  • watermarks are embedded in webpages.
  • Most of the watermarks currently used in webpages are background watermarks or watermarks embedded in real time according to xml attributes.
  • the watermark information embedded in the webpage is easy to be deleted, resulting in low security of the webpage information.
  • Embodiments of the present disclosure provide a page generation method, a page display method, a page generation device, a page display device, an electronic device, and a readable storage medium, which can solve the problem of low security of web page information in related technologies.
  • an embodiment of the present disclosure provides a method for generating a page, and the method for generating a page includes:
  • the target watermark font file corresponding to the target user ID from the watermark font library, and embed the target watermark font file in the target page to obtain the target page embedded with the watermark font, and the watermark font library is used to maintain at least one watermark font file corresponding to the user , the watermark font file is used to change the web font encoding;
  • the target page embedded with the watermark font is fed back to the first user.
  • an embodiment of the present disclosure provides a method for displaying a page, and the method for displaying a page includes:
  • the page browsing request carries the target user ID of the first user and the page ID of the target page, and the page browsing request is used to instruct the server to embed the target watermark font file corresponding to the target user ID in the target page to obtain Target pages embedded with watermarked fonts;
  • an embodiment of the present disclosure provides a page generation device, the page generation device includes:
  • the receiving module is configured to receive the page browsing request of the first user, where the page browsing request carries the target user ID of the first user and the page ID of the target page;
  • the obtaining module is used to obtain the target page according to the page identification, and obtain the target watermark font file corresponding to the target user identification from the watermark font library.
  • the watermark font library is used to maintain at least one watermark font file corresponding to the user.
  • the watermark font file is used for Change the webpage font encoding;
  • the processing module is used to embed the target watermark font file in the target page to obtain the target page embedded with the watermark font;
  • the sending module is configured to, in response to the page browsing request, feed back the target page embedded with the watermark font to the first user.
  • an embodiment of the present disclosure provides a page display device, which includes:
  • the sending module is configured to send a page browsing request to the server, where the page browsing request carries the target user ID of the first user and the page ID of the target page, and the page browsing request is used to instruct the server to embed in the target page a page corresponding to the target user ID
  • the target watermark font file obtains the target page embedded with the watermark font
  • the receiving module is used to receive the target page embedded with the watermark font from the server;
  • the display module is used to display the target page embedded with the watermark font.
  • embodiments of the present disclosure provide a page display system, the page display system It includes: the page generation device according to the third aspect; and the page display device according to the fourth aspect.
  • the embodiments of the present disclosure provide an electronic device, the electronic device includes a processor, a memory, and a program or instruction stored in the memory and operable on the processor.
  • the program or instruction is executed by the processor, the The steps of the method of the first aspect or the second aspect.
  • embodiments of the present disclosure provide a readable storage medium, on which programs or instructions are stored, and when the programs or instructions are executed by a processor, the steps of the method in the first aspect or the second aspect are implemented.
  • embodiments of the present disclosure provide a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the method of the first aspect or the second aspect.
  • the server receives the page browsing request of the first user, and obtains the target user ID of the first user and the page ID of the target page carried in the page browsing request, where the target user ID is used to indicate the first
  • the page identifier may refer to the page link of the target page.
  • the target page According to the page identifier, and search whether there is a target watermark font file associated with the target user identifier of the first user in the watermark font library, and if so, embed the target watermark font file in the target page,
  • the font code of the target webpage is changed to obtain the target page embedded with the watermark font, that is, the text on the target page is at least part of the text in the target watermark font file.
  • the target page embedded with the watermark font is displayed to the first user.
  • the watermark font corresponding to the user identity is embedded in the browsed target page, so that the font displayed on the page is different for each user when browsing the page, and the corresponding user can be located according to the page font. Enhance the correlation between pages and users, provide traceability basis for page information, and improve the security of page information.
  • FIG. 1 is one of the schematic flow charts of the page generation method of the present disclosure
  • Fig. 2 is one of the display schematic diagrams of the text of the target font of the present disclosure
  • Fig. 3 is the second schematic diagram of displaying text in the target font of the present disclosure
  • FIG. 4 is a logical schematic diagram of a page browsed by a user of the present disclosure
  • FIG. 5 is the second schematic flow diagram of the page generation method of the present disclosure.
  • FIG. 6 is a schematic flowchart of a page display method of the present disclosure.
  • Fig. 7 is a schematic block diagram of a page generation device according to an embodiment of the present disclosure.
  • FIG. 8 is a schematic block diagram of a page display device according to an embodiment of the present disclosure.
  • FIG. 9 is a schematic block diagram of an electronic device according to an embodiment of the present disclosure.
  • the present disclosure provides a method for generating a page, as shown in FIG. 1 , the method for generating a page includes:
  • Step 102 receiving a page browsing request from the first user, where the page browsing request carries the target user ID of the first user and the page ID of the target page;
  • Step 104 obtaining the target page according to the page identifier
  • Step 106 obtain the target watermark font file corresponding to the target user ID from the watermark font library, and embed the target watermark font file in the target page to obtain the target page embedded with the watermark font, and the watermark font library is used to maintain at least one user corresponding Watermark font file, the watermark font file is used to change the font code of the webpage;
  • Step 108 in response to the page browsing request, feed back the target page embedded with the watermark font to the first user.
  • the server receives the page browsing request of the first user, and obtains the target user ID of the first user and the page ID of the target page carried in the page browsing request, wherein the target user ID is used to indicate the first user's Identity, the page identity may refer to the page link of the target page.
  • the first user clicks a page link of a certain page on the user equipment a page browsing request carrying the target user ID of the first user and the page ID of the target page is sent to the server.
  • the target page According to the page identifier, then search whether there is a target watermark font file associated with the target user identifier of the first user in the watermark font library, and if so, embed the target watermark font file in the target page,
  • the font code of the target webpage is changed to obtain the target page embedded with the watermark font, that is, the text on the target page is at least part of the text in the target watermark font file.
  • the target page embedded with the watermark font is displayed to the first user.
  • the watermark font corresponding to the user identity is embedded in the browsed target page, so that the font displayed on the page is different for each user when browsing the page, and the corresponding user can be located according to the page font , enhance the correlation between the page and the user, provide the traceability basis of the page information, and improve the security of the page information.
  • the entire page generation process is transparent to the user device, that is, the watermark font can be embedded when the user browses a page (such as a cloud document) without installing a font file on the user device.
  • the watermark font can be embedded when the user browses a page (such as a cloud document) without installing a font file on the user device.
  • instead of adding an obviously visible watermark on the page background it is difficult for users to perceive the text fonts of the page, so users will not automatically configure it, reducing the risk of users avoiding it and improving the ability to resist attacks .
  • the target page may be a hypertext markup language (Hyper Text Markup Language, HTML) web page
  • HTML is a standard markup language used to create web pages, often combined with Cascading Style Sheets (Cascading Style Sheets, CSS), JavaScript It is used together to design the user interface of web pages, web applications, and applications, and specifies the font of HTML web pages through the font-family attribute.
  • the server reads the HTML file according to the identification information, and uses the watermark font included in the target watermark font file to render it into a visual webpage for viewing by the user.
  • the implementation code for using the font-family attribute to refer to fonts is as follows:
  • the page generation method before receiving the page browsing request of the first user, the page generation method further includes: generating a plurality of watermark font files; establishing a correspondence between the watermark font files and the user ID of the user relationship, and store multiple watermark font files in the watermark font library; wherein, the fonts of the same text in different watermark font files are different.
  • each watermark font file has a different font design, that is, the fonts (or font shapes) of the same text in each watermark font file are all different, for example, as shown in FIG.
  • the fonts of the word " ⁇ " in the two watermark font files are different, specifically, the characters beside the word " ⁇ " are different, and the characters include numbers, English letters and Chinese characters.
  • a watermark font file is matched for each user, that is, an association relationship between the user identifier and the watermark font file is established.
  • font editing software such as fontforge
  • the glyphs of commonly used characters are modified, and two sets of each character are modified, so that two sets of font files can be generated.
  • construct a word list there are multiple words in the list, and the order of words is fixed, for example: " ⁇ , ⁇ , ⁇ , order, order, commodity, product”.
  • the font list is aligned as follows: 0, use 0, yes 0, order 1, order 0, business 1, product 1, 0 indicates the first set of fonts, and 1 indicates the second set of fonts. After aligning and encoding, count the words marked with 1, and then use the fontforge script to replace the corresponding words in the basic font file with the words in the second set of fonts, so that the watermark font of the Nth user is generated by the script.
  • the watermark font files can be Wed open font format (Web Open Font Format, WOFF), which is a type that can be used by browsers.
  • WOFF Web Open Font Format
  • the target watermark font file corresponding to the target user ID of the first user who initiated the page browsing request is stored in advance, then when the first user needs to browse the target page, the target watermark font file can be directly obtained in the watermark font library , use the target watermark font file to render the page.
  • the text font seen by the first user when browsing the target page is unique, which is equivalent to embedding the identity information of the first user in the target page, thereby enhancing the relevance between the target page and the first user.
  • the watermark font file 1, the watermark font file 2, and the watermark font file 3 are stored in the watermark font library, and the text fonts of each watermark font file are different, and the watermark font file 1 is A number The text in the font, the text in the font size B in the watermark font file 2, and the text in the font size C in the watermark font file 3.
  • User a, user b and user c respectively request to browse the page, then select the corresponding watermark font file according to the user ID of each user, for example, determine the corresponding watermark font file 1 according to the user ID of user a, and determine the corresponding watermark font file 1 according to the The user ID determines its corresponding watermark font file 3, determines its corresponding watermark font file 4 according to the user ID of user c, and then performs page rendering according to the watermark font file, and finally, the text provided to user a on the page is number A font, the text on the page provided to user b is in font size B, and the text on the page provided to user c is in font size C.
  • the page generation method includes:
  • Step 502 receiving a page browsing request from the first user, where the page browsing request carries the target user ID of the first user and the page ID of the target page;
  • Step 504 obtaining the target page according to the page identifier
  • Step 506 judging whether there is a target watermark font file corresponding to the target user ID in the watermark font library, and if there is a target watermark font file corresponding to the target user ID in the watermark font library, enter step 508, in the watermark font library When there is no target watermark font file corresponding to the target user identifier, go to step 510;
  • Step 508 acquire the target corresponding to the target user ID of the first user from the watermark font library watermark font file, and embed the target watermark font file in the target page to obtain the target page embedded with the watermark font;
  • Step 510 in response to the page browsing request, feed back the target page to the first user.
  • the watermark font library is used to maintain at least one watermark font file corresponding to the user, and the watermark font file is used to change the font code of the web page.
  • the target watermark font file if there is no target watermark font file corresponding to the user identity information in the watermark font library, it indicates that no watermark font file associated with the target user ID of the first user has been set in advance, and the target page is obtained according to the page ID , and feed back the target page to the first user, that is to say, the watermark text rendering of the target page is not performed, so that the text font in the target page is the default font and can be displayed directly.
  • the target page will be generated according to a default text file, so as to ensure that the user's page browsing request can be realized.
  • the page generation method further includes: in the case that there is no target watermark font file corresponding to the target user identifier of the first user in the watermark font library, generating the The target user identifies the corresponding target watermark font file, and stores the target watermark font file in the watermark font library.
  • the watermark font file corresponding to the target user ID in the watermark font database if there is no target watermark font file corresponding to the target user ID in the watermark font database, it indicates that no watermark font file associated with the target user ID of the first user has been set in advance, that is, the first user may for new users. Then, when a new user joins, the watermark font file corresponding to the user ID of the new user is added and stored in the watermark font library.
  • the embodiment of the present disclosure supports real-time expansion of the watermark font library, increases the probability of obtaining the watermark font file corresponding to the user identification, and further improves the information security of the page that the user applies to browse.
  • the target watermark font file corresponding to the target user identifier is obtained from the watermark font library, and the target watermark font file is embedded in the target page to obtain the target page embedded with the watermark font, including: According to the target user identification and/or the page content of the target page, determine whether to embed the watermark font in the target page; if it is determined to embed the watermark font in the target page, obtain the target watermark corresponding to the target user identification from the watermark font library font file, and embed the target watermark font file in the target page to obtain the target page embedded with the watermark font.
  • the rendered watermark font can be added to the page requested by the specified user without affecting all relevant pages of the user, or the watermark text rendering can be performed on the specified page or a specified area of the page without affecting all pages, or, The watermark text rendering can be performed on the specified page or the specified area of the page that the specified user requests to browse.
  • determining to embed the watermark font into the target page includes: determining to embed the watermark font into the target page when it is determined according to the target user identifier that the first user is a confidentiality object.
  • the rendered watermark font can be added to the target page requested by a specified user, without affecting relevant pages of all users. Specifically, according to the target user identifier, it is judged whether the user is a confidential object, and if the user is a confidential object, it is determined that the watermark font needs to be embedded into the target page.
  • the watermark text rendering of the page is not performed, so that the text font on the page is the default font and can be displayed directly.
  • the embodiment of the present disclosure supports directional watermark text rendering for a page according to whether the user is a confidential object, so as to avoid affecting browsing pages of all users.
  • determining to embed the watermark font into the target page includes: determining to embed the watermark font into the target page when it is determined according to the content of the page that the target page includes confidential information.
  • the watermark text rendering can be performed on the specified target page or the specified content of the target page without affecting all pages. Specifically, according to the page content of the target page, it is judged whether the target page includes confidential information, and if so, it is determined that the watermark font needs to be embedded into the target page. And, if the overall content of the target page needs to be kept secret, all the text of the target page is set as the text of the target watermark font, and if part of the content of the target page needs to be kept secret, then the text of the part of the content is set to The text in the font of the target watermark.
  • the watermark text rendering of the page is not performed, so that the text font on the page is the default font and can be displayed directly.
  • the embodiment of the present disclosure supports whether the target page browsed according to the user's request includes confidential information, Perform watermark text rendering for pages in a targeted manner to avoid affecting all pages browsed by users.
  • the present disclosure provides a page display method, as shown in FIG. 6 , the page display method includes:
  • Step 602 send a page browsing request to the server, the page browsing request carries the target user ID of the first user and the page ID of the target page, and the page browsing request is used to instruct the server to embed a target watermark corresponding to the target user ID in the target page
  • the font file gets the target page embedded with the watermark font
  • Step 604 receiving the target page embedded with the watermark font from the server;
  • Step 606 displaying the target page embedded with the watermark font.
  • the first user sends a page browsing request carrying the target user ID and the page ID of the target page to the server, and after receiving the page browsing request, the server obtains the target user ID and the page ID carried by it, wherein
  • the target user identifier is used to indicate the identity of the first user, and the page identifier may refer to a page link of the target page.
  • the server obtains the target page according to the page ID, and searches in the watermark font library whether there is a target watermark font file associated with the target user ID, and if so, embeds the target watermark font file in the target page, thereby changing the target web page Font encoding, to obtain the target page embedded with the watermark font, that is, the text on the target page is at least part of the text in the target watermark font file. Finally, the user equipment receives and displays the target page embedded with the watermark font sent by the server.
  • the watermark font corresponding to the user identity is embedded in the browsed target page, so that the font displayed on the page is different for each user when browsing the page, and the corresponding user can be located according to the page font , enhance the correlation between the page and the user, provide the traceability basis of the page information, and improve the security of the page information.
  • the text with the watermark font includes at least one of the following: numbers, English letters, and Chinese characters.
  • fonts are differentiated by keywords such as numbers, English letters, or Chinese characters, which can improve the accuracy of locating corresponding users according to page fonts, and enhance the relevance between pages and users.
  • the execution subject may be the page generation device, or the control module in the page generation device for executing the page generation method piece.
  • the page generating device provided in the embodiment of the present disclosure is described by taking the page generating device executing the page generating method as an example.
  • the page generation device 700 includes:
  • the receiving module 702 is configured to receive a page browsing request of the first user, where the page browsing request carries the target user ID of the first user and the page ID of the target page;
  • the obtaining module 704 is used to obtain the target page according to the page identification, and obtain the target watermark font file corresponding to the target user identification from the watermark font library.
  • the watermark font library is used to maintain at least one watermark font file corresponding to the user. To change the font code of the web page;
  • a processing module 706, configured to embed a target watermark font file in the target page to obtain a target page embedded with a watermark font
  • the sending module 708 is configured to, in response to the page browsing request, feed back the target page embedded with the watermark font to the first user.
  • the server receives the page browsing request of the first user, and obtains the target user ID of the first user and the page ID of the target page carried in the page browsing request, wherein the target user ID is used to indicate the first user's Identity, the page identity may refer to the page link of the target page.
  • the first user clicks a page link of a certain page on the user equipment a page browsing request carrying the target user ID of the first user and the page ID of the target page is sent to the server.
  • the target page According to the page identifier, and search whether there is a target watermark font file associated with the target user identifier of the first user in the watermark font library, and if so, embed the target watermark font file in the target page,
  • the font code of the target webpage is changed to obtain the target page embedded with the watermark font, that is, the text on the target page is at least part of the text in the target watermark font file.
  • the target page embedded with the watermark font is displayed to the first user.
  • the watermark font corresponding to the user identity is embedded in the browsed target page, so that the font displayed on the page is different for each user when browsing the page, and the corresponding user can be located according to the page font. Enhance the correlation between pages and users, provide traceability basis for page information, and improve the security of page information.
  • the page generating device 700 further includes: a generating module, configured to generate a plurality of watermark font files, and establish a relationship between the watermark font files and the user logo of the user. The corresponding relationship between recognition; the processing module 706 is also used to store multiple watermark font files in the watermark font library; wherein, the fonts of the same text in different watermark font files are different.
  • the page generation device 700 further includes: a judgment module, configured to judge whether to embed a watermark font into the target page according to the target user ID and/or the page content of the target page; an acquisition module 704. Specifically, when it is determined to embed the watermark font into the target page, acquire the target watermark font file corresponding to the target user identifier from the watermark font library.
  • the judging module is specifically configured to judge to embed the watermark font into the target page when it is determined according to the target user identifier that the first user is a confidential object.
  • the judging module is specifically configured to judge to embed a watermark font into the target page when it is determined according to the content of the page that the target page includes confidential information.
  • the page display method provided by the embodiments of the present disclosure may be executed by a page display device, or a control module in the page display device for executing the page display method.
  • the page display device provided by the embodiment of the present disclosure is described by taking the page display device executing the page display method as an example.
  • the page display device 800 includes:
  • the sending module 802 is configured to send a page browsing request to the server, where the page browsing request carries the target user ID of the first user and the page ID of the target page, and the page browsing request is used to instruct the server to embed a page corresponding to the target user ID in the target page
  • the target watermark font file to get the target page embedded with the watermark font
  • a display module 806, configured to display the target page embedded with the watermark font.
  • the first user sends a page browsing request carrying the target user ID and the page ID of the target page to the server, and after receiving the page browsing request, the server obtains the target user ID and the page ID carried by it, wherein
  • the target user identifier is used to indicate the identity of the first user, and the page identifier may refer to a page link of the target page.
  • the target user ID and the target user ID carrying the first user are sent to the server.
  • the server obtains the target page according to the page ID, and searches in the watermark font library whether there is a target watermark font file associated with the target user ID, and if so, embeds the target watermark font file in the target page, thereby changing the target web page Font encoding, to obtain the target page embedded with the watermark font, that is, the text on the target page is at least part of the text in the target watermark font file. Finally, the user equipment receives and displays the target page embedded with the watermark font sent by the server.
  • the watermark font corresponding to the user identity is embedded in the browsed target page, so that the font displayed on the page is different for each user when browsing the page, and the corresponding user can be located according to the page font , enhance the correlation between the page and the user, provide the traceability basis of the page information, and improve the security of the page information.
  • the page generating device or the page displaying device in the embodiments of the present disclosure may be a device, or a component, an integrated circuit or a chip in a terminal.
  • the device may be a mobile electronic device or a non-mobile electronic device.
  • the mobile electronic device can be a mobile phone, a tablet computer, a notebook computer, a handheld computer, a vehicle electronic device, a wearable device, an ultra-mobile personal computer (Ultra-Mobile Personal Computer, UMPC), a netbook or a personal digital assistant (Personal Digital Assistant).
  • non-mobile electronic devices can be servers, network attached storage (Network Attached Storage, NAS), personal computers (Personal Computer, PC), televisions (Television, TV), teller machines or self-service machines, etc., this disclosure
  • NAS Network Attached Storage
  • PC Personal Computer
  • TV Television
  • teller machines teller machines or self-service machines, etc.
  • this disclosure The embodiment is not specifically limited.
  • the page generation device or the page display device in the embodiments of the present disclosure may be a device with an operating system.
  • the operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, which are not specifically limited in the embodiments of the present disclosure.
  • the page generation device provided by the embodiment of the present disclosure can realize the various processes realized in the method embodiments of FIG. 1 and FIG. 5
  • the page display device provided by the embodiment of the present disclosure can realize the various processes realized in the method embodiment of FIG. 6 , to avoid repetition, it will not be repeated here.
  • Embodiments of the present disclosure also provide a page display system, which includes: the page generation device in the above embodiment; and the page display device in the above embodiment.
  • an embodiment of the present disclosure further provides an electronic device 900, including a processor 902, a memory 904, and programs or instructions stored in the memory 904 and executable on the processor 902, the When the program or instructions are executed by the processor 902, the above-mentioned page generation method or page Each process of the method embodiment is shown above, and the same technical effect can be achieved, so in order to avoid repetition, details are not repeated here.
  • the electronic devices in the embodiments of the present disclosure include the above-mentioned mobile electronic devices and non-mobile electronic devices.
  • Embodiments of the present disclosure also provide a readable storage medium, on which a program or an instruction is stored, and when the program or instruction is executed by a processor, each process of the above-mentioned page generation method or page display method embodiment is implemented, and The same technical effect can be achieved, so in order to avoid repetition, details will not be repeated here.
  • a readable storage medium includes a computer-readable storage medium, such as a computer read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and the like.
  • ROM computer read-only memory
  • RAM random access memory
  • magnetic disk or an optical disk and the like.
  • Embodiments of the present disclosure further provide a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above page generation method or page display method embodiment, And can achieve the same technical effect, in order to avoid repetition, no more details here.
  • the chips mentioned in the embodiments of the present disclosure may also be referred to as system-on-chip, system-on-chip, system-on-a-chip, or system-on-chip.
  • the term “comprising”, “comprising” or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article or apparatus comprising a set of elements includes not only those elements, It also includes other elements not expressly listed, or elements inherent in the process, method, article, or device. Without further limitations, an element defined by the phrase “comprising a " does not preclude the presence of additional identical elements in the process, method, article, or apparatus comprising that element.
  • the scope of the methods and apparatus in the embodiments of the present disclosure is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved. To perform functions, for example, the described methods may be performed in an order different from that described, and various steps may also be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Multimedia (AREA)
  • Technology Law (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Document Processing Apparatus (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

一种页面生成方法、显示方法、装置、电子设备和存储介质。包括:接收第一用户的页面浏览请求,页面浏览请求中携带有第一用户的目标用户标识和目标页面的页面标识(102);根据页面标识获取目标页面(104);从水印字体库中获取与第一用户的目标用户标识对应的目标水印字体文件,并在目标页面中嵌入目标水印字体文件得到嵌入有水印字体的目标页面,水印字体库用于维护至少一个用户对应的水印字体文件,水印字体文件用于改变网页字体编码(106);响应于页面浏览请求,向第一用户反馈嵌入有水印字体的目标页面(108)。

Description

页面生成方法、显示方法、装置、电子设备和存储介质
本申请要求于2022年2月21日递交的中国专利申请第202210155627.9号的优先权,在此全文引用上述中国专利申请公开的内容以作为本申请的一部分。
技术领域
本公开的实施例涉及一种页面生成方法、页面显示方法、页面生成装置、页面显示装置、电子设备和可读存储介质。
背景技术
相关技术中,为了保护网页信息在网页中嵌入水印,目前网页中使用的水印多是背景水印或者根据xml属性来实时嵌入的水印。然而,网页中嵌入的水印信息容易被删除,导致网页信息的安全性较低。
发明内容
本公开的实施例提供一种页面生成方法、页面显示方法、页面生成装置、页面显示装置、电子设备和可读存储介质,能够解决相关技术中网页信息的安全性较低的问题。
第一方面,本公开的实施例提供了一种页面生成方法,该页面生成方法包括:
接收第一用户的页面浏览请求,页面浏览请求中携带有第一用户的目标用户标识和目标页面的页面标识;
根据页面标识获取目标页面;
从水印字体库中获取与目标用户标识对应的目标水印字体文件,并在目标页面中嵌入目标水印字体文件得到嵌入有水印字体的目标页面,水印字体库用于维护至少一个用户对应的水印字体文件,水印字体文件用于改变网页字体编码;
响应于页面浏览请求,向第一用户反馈嵌入有水印字体的目标页面。
第二方面,本公开的实施例提供了一种页面显示方法,该页面显示方法包括:
向服务器发送页面浏览请求,页面浏览请求中携带有第一用户的目标用户标识和目标页面的页面标识,页面浏览请求用于指示服务器在目标页面中嵌入与目标用户标识对应的目标水印字体文件得到嵌入有水印字体的目标页面;
接收来自服务器的嵌入有水印字体的目标页面;
显示嵌入有水印字体的目标页面。
第三方面,本公开的实施例提供了一种页面生成装置,该页面生成装置包括:
接收模块,用于接收第一用户的页面浏览请求,页面浏览请求中携带有第一用户的目标用户标识和目标页面的页面标识;
获取模块,用于根据页面标识获取目标页面,以及从水印字体库中获取与目标用户标识对应的目标水印字体文件,水印字体库用于维护至少一个用户对应的水印字体文件,水印字体文件用于改变网页字体编码;
处理模块,用于在目标页面中嵌入目标水印字体文件得到嵌入有水印字体的目标页面;
发送模块,用于响应于页面浏览请求,向第一用户反馈嵌入有水印字体的目标页面。
第四方面,本公开的实施例提供了一种页面显示装置,该页面显示装置包括:
发送模块,用于向服务器发送页面浏览请求,页面浏览请求中携带有第一用户的目标用户标识和目标页面的页面标识,页面浏览请求用于指示服务器在目标页面中嵌入与目标用户标识对应的目标水印字体文件得到嵌入有水印字体的目标页面;
接收模块,用于接收来自服务器的嵌入有水印字体的目标页面;
显示模块,用于显示嵌入有水印字体的目标页面。
第五方面,本公开的实施例提供了一种页面显示系统,该页面显示系统 包括:如第三方面的页面生成装置;以及如第四方面的页面显示装置。
第六方面,本公开的实施例提供了一种电子设备,该电子设备包括处理器、存储器及存储在存储器上并可在处理器上运行的程序或指令,程序或指令被处理器执行时实现如第一方面或第二方面的方法的步骤。
第七方面,本公开的实施例提供了一种可读存储介质,可读存储介质上存储程序或指令,程序或指令被处理器执行时实现如第一方面或第二方面的方法的步骤。
第八方面,本公开的实施例提供了一种芯片,芯片包括处理器和通信接口,通信接口和处理器耦合,处理器用于运行程序或指令,实现如第一方面或第二方面的方法。
在本公开的实施例中,服务器接收第一用户的页面浏览请求,获取该页面浏览请求中所携带的第一用户的目标用户标识和目标页面的页面标识,其中目标用户标识用于指示第一用户的身份,页面标识可指目标页面的页面链接。第一用户在用户设备上点击某个页面的页面链接时,则向服务器发送携带有第一用户的目标用户标识和目标页面的页面标识的页面浏览请求。进一步地,根据页面标识获取目标页面,以及在水印字体库中查找是否存在与第一用户的目标用户标识具有关联关系的目标水印字体文件,若存在,则在目标页面中嵌入目标水印字体文件,从而改变目标网页的字体编码,得到嵌入有水印字体的目标页面,也即,目标页面上的文字为目标水印字体文件中的至少部分文字。最后,将嵌入有水印字体的目标页面展示给第一用户。本公开的实施例中,实现在浏览的目标页面中嵌入与用户身份对应的水印字体,使得每个用户在浏览页面时页面中显示的字体都是不同的,能够根据页面字体定位到对应用户,增强页面与用户的关联性,提供页面信息追溯依据,提高页面信息的安全性。
附图说明
图1是本公开的页面生成方法的流程示意图之一;
图2是本公开的目标字体的文字的显示示意图之一;
图3是本公开的目标字体的文字的显示示意图之二;
图4是本公开的用户浏览页面的逻辑示意图;
图5是本公开的页面生成方法的流程示意图之二;
图6是本公开的页面显示方法的流程示意图;
图7是本公开的实施例的页面生成装置的示意框图;
图8是本公开的实施例的页面显示装置的示意框图;以及
图9是本公开的实施例的电子设备的示意框图。
具体实施方式
下面将结合本公开的实施例中的附图,对本公开的实施例中的技术方案进行清楚地描述,显然,所描述的实施例是本公开的一部分实施例,而不是全部的实施例。基于本公开中的实施例,本领域普通技术人员获得的所有其他实施例,都属于本公开的保护的范围。
本公开的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本公开的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”,一般表示前后关联对象是一种“或”的关系。
下面结合附图,通过具体的实施例及其应用场景对本公开的实施例提供的页面生成方法、页面显示方法、页面生成装置、页面显示装置、电子设备和可读存储介质进行详细地说明。
本公开提供了一种页面生成方法,如图1所示,该页面生成方法包括:
步骤102,接收第一用户的页面浏览请求,页面浏览请求中携带有第一用户的目标用户标识和目标页面的页面标识;
步骤104,根据页面标识获取目标页面;
步骤106,从水印字体库中获取与目标用户标识对应的目标水印字体文件,并在目标页面中嵌入目标水印字体文件得到嵌入有水印字体的目标页面,水印字体库用于维护至少一个用户对应的水印字体文件,水印字体文件用于改变网页字体编码;
步骤108,响应于页面浏览请求,向第一用户反馈嵌入有水印字体的目标页面。
在该实施例中,服务器接收第一用户的页面浏览请求,获取该页面浏览请求中所携带的第一用户的目标用户标识和目标页面的页面标识,其中目标用户标识用于指示第一用户的身份,页面标识可指目标页面的页面链接。第一用户在用户设备上点击某个页面的页面链接时,则向服务器发送携带有第一用户的目标用户标识和目标页面的页面标识的页面浏览请求。
进一步地,根据页面标识获取目标页面,然后在水印字体库中查找是否存在与第一用户的目标用户标识具有关联关系的目标水印字体文件,若存在,则在目标页面中嵌入目标水印字体文件,从而改变目标网页的字体编码,得到嵌入有水印字体的目标页面,也即,目标页面上的文字为目标水印字体文件中的至少部分文字。最后,将嵌入有水印字体的目标页面展示给第一用户。
在本公开的实施例中,实现在浏览的目标页面中嵌入与用户身份对应的水印字体,使得每个用户在浏览页面时页面中显示的字体都是不同的,能够根据页面字体定位到对应用户,增强页面与用户的关联性,提供页面信息追溯依据,提高页面信息的安全性。
另外,整个页面生成过程对用户设备透明,也即,无需在用户设备安装字体文件,在用户浏览页面(例如云文档)时即可嵌入水印字体。并且,由于并非在页面背景上加入明显可见的水印,而是对页面的文字字体进行区别,用户较难感知,所以用户不会自动进行配置,降低了用户进行规避的风险,提高了抗攻击能力。
示例性地,目标页面可以为超文本标记语言(Hyper Text Markup Language,HTML)网页,HTML是一种用于创建网页的标准标记语言,常与叠层样式表(Cascading Style Sheets,CSS)、JavaScript一起用于设计网页、网页应用程序以及应用程序的用户界面,通过font-family属性来指定HTML网页的字体。服务器根据标识信息读取HTML文件,并利用目标水印字体文件中包括的水印字体将其渲染成可视化网页,以供用户查看。其中,使用font-family属性来引用字体的实现代码如下:

进一步地,在本公开的一个实施例中,在接收第一用户的页面浏览请求之前,该页面生成方法还包括:生成多个水印字体文件;建立水印字体文件与用户的用户标识之间的对应关系,并将多个水印字体文件存储至水印字体库;其中,不同水印字体文件中相同文字的字体不同。
在该实施例中,预先生成多个水印字体文件,每个水印字体文件具有不同的字体设计,也即每个水印字体文件中的相同文字的字体(或字形)均不相同,例如,如图2和图3所示,两个水印字体文件中“的”字的字体不同,具体为“白”字旁不同,文字包括数字、英文字母和汉字等。并且,为每位用户匹配一个水印字体文件,也即,建立用户标识与水印字体文件的关联关系。
示例性地,通过fontforge之类的字体编辑软件,修改常用字的字形,每个字修改2套,这样可以生成2套字体文件。然后构造一个文字列表,列表中有多个字,字的排序是固定的,比如:“的、用、是、订、单、商、品”。需要生成第一个用户的字体时,使用fontforge脚本,以2套字体中的第一套为基础字体,然后用第二套字体中的“品”替换基础字体中的“品”字即可。在生成第N个用户的字体时,只需要计算出N的二进制编码,然后将二进制编码对齐到文字列表中,根据编码的值来确定列表中的字对应哪套字体。比如,编码为1011,字体列表对齐后如下:的0、用0、是0、订1、单0、商1、品1,0表示第一套字体,1表示第二套字体。对齐编码后,统计标有1的字,然后用fontforge脚本,把基础字体文件中的对应字用第二套字体中的字替换,这样就用脚本生成了第N个用户的水印字体。
最后,将多个水印字体文件存储至水印字体库中等待拉取,水印字体文件可以为Wed开放字体格式(Web Open Font Format,WOFF),是可被浏览器所使用的类型。
所以,如果预先存储有与上述发起页面浏览请求的第一用户的目标用户标识对应的目标水印字体文件,则在第一用户需要浏览目标页面时,在水印字体库中直接获取该目标水印字体文件,利用该目标水印字体文件进行页面渲染。这样,第一用户在浏览目标页面时看到的文字字体是独一无二的,就相当于在目标页面中嵌入了第一用户的身份信息,增强目标页面与第一用户的关联性。
示例性地,如图4所示,水印字体库中存储有水印字体文件1、水印字体文件2以及水印字体文件3,每个水印字体文件的文字字体均不同,水印字体文件1中为A号字体的文字、水印字体文件2中为B号字体的文字、水印字体文件3中为C号字体的文字。用户a、用户b以及用户c分别请求浏览页面,则根据每个用户的用户标识分别选择对应的水印字体文件,例如,根据用户a的用户标识确定其对应的水印字体文件1,根据用户b的用户标识确定其对应的水印字体文件3,根据用户c的用户标识确定其对应的水印字体文件4,进而根据水印字体文件分别进行页面渲染,最终,提供给用户a的页面中的文字为A号字体、提供给用户b的页面中的文字为B号字体、提供给用户c的页面中的文字为C号字体。
进一步地,在本公开的一个实施例中,如图5所示,该页面生成方法包括:
步骤502,接收第一用户的页面浏览请求,页面浏览请求中携带有第一用户的目标用户标识和目标页面的页面标识;
步骤504,根据页面标识获取目标页面;
步骤506,判断水印字体库中是否存在与目标用户标识对应的目标水印字体文件,在水印字体库中存在与目标用户标识对应的目标水印字体文件的情况下,进入步骤508,在水印字体库中不存在与目标用户标识对应的目标水印字体文件的情况下,进入步骤510;
步骤508,从水印字体库中获取与第一用户的目标用户标识对应的目标 水印字体文件,并在目标页面中嵌入目标水印字体文件得到嵌入有水印字体的目标页面;
步骤510,响应于页面浏览请求,向第一用户反馈目标页面。
其中,水印字体库用于维护至少一个用户对应的水印字体文件,水印字体文件用于改变网页字体编码。
在该实施例中,如果水印字体库中不存在与用户身份信息对应的目标水印字体文件,表明预先没有设置与第一用户的目标用户标识相关联的水印字体文件,则根据页面标识获取目标页面,并向第一用户反馈该目标页面,也就是说,不进行目标页面的水印文字渲染,使得目标页面中的文字字体为默认字体,直接展示即可。
在本公开的实施例中,即便是查询不同与用户标识对应的目标水印字体文件,也会按照一种默认的文字文件生成目标页面,以从而保证用户浏览页面请求能够实现。
进一步地,在本公开的一个实施例中,该页面生成方法还包括:在水印字体库中不存在与第一用户的目标用户标识对应的目标水印字体文件的情况下,生成与第一用户的目标用户标识对应的目标水印字体文件,并将目标水印字体文件存储至水印字体库。
在该实施例中,如果水印字体库中不存在与目标用户标识对应的目标水印字体文件,表明预先没有设置与第一用户的目标用户标识相关联的水印字体文件,也即,第一用户可能为新用户。则在有新用户加入时,追加新用户的用户标识对应的水印字体文件并存储至水印字体库。
本公开的实施例,支持实时扩容水印字体库,提高了获取到与用户标识对应的水印字体文件的概率,进而提高了用户申请浏览的页面的信息安全性。
进一步地,在本公开的一个实施例中,从水印字体库中获取与目标用户标识对应的目标水印字体文件,并在目标页面中嵌入目标水印字体文件得到嵌入有水印字体的目标页,包括:根据目标用户标识和/或目标页面的页面内容,判断是否向目标页面中嵌入水印字体;在判定向目标页面中嵌入水印字体的情况下,从水印字体库中获取与目标用户标识对应的目标水印字体文件,并在目标页面中嵌入目标水印字体文件得到嵌入有水印字体的目标页面。
在该实施例中,可对指定用户请求浏览的页面添加渲染水印字体,无需影响全部用户的相关页面,或者,可对指定页面或页面的指定区域进行水印文字渲染,无需影响所有页面,或者,可对指定用户请求浏览的指定页面或页面的指定区域进行水印文字渲染。
通过上述方式,实现定向地为页面进行水印文字渲染,避免影响全部用户或全部页面的浏览,提高了生成页面的灵活性。
进一步地,在本公开的一个实施例中,判定向目标页面中嵌入水印字体,包括:在根据目标用户标识确定第一用户为保密对象的情况下,判定向目标页面中嵌入水印字体。
在该实施例中,可对指定用户请求浏览的目标页面添加渲染水印字体,无需影响全部用户的相关页面。具体地,根据目标用户标识,判断用户是否为保密对象,如果该用户为保密对象,则确定需要向目标页面中嵌入水印字体。
在判定用户不为保密对象的情况下,不进行页面的水印文字渲染,使得页面中的文字字体为默认字体,直接展示即可。
本公开的实施例,支持根据用户是否为保密对象,定向地为页面进行水印文字渲染,避免影响全部用户的浏览页面。
进一步地,在本公开的一个实施例中,判定向目标页面中嵌入水印字体,包括:在根据页面内容确定目标页面包括保密信息的情况下,判定向目标页面中嵌入水印字体。
在该实施例中,可对指定目标页面或目标页面的指定内容进行水印文字渲染,无需影响全部页面。具体地,根据目标页面的页面内容,判断该目标页面是否包括保密信息,如果包括,则确定需要向目标页面中嵌入水印字体。并且,如果该目标页面的整体内容均需要保密,则将该目标页面的全部文字均设定为目标水印字体的文字,如果该目标页面的部分内容需要保密,则将该部分内容的文字设定为目标水印字体的文字。
在判定用户不为保密对象的情况下,不进行页面的水印文字渲染,使得页面中的文字字体为默认字体,直接展示即可。
本公开的实施例,支持根据用户请求浏览的目标页面是否包括涉密信息, 定向地为页面进行水印文字渲染,避免影响用户的全部浏览页面。
本公开提供了一种页面显示方法,如图6所示,该页面显示方法包括:
步骤602,向服务器发送页面浏览请求,页面浏览请求中携带有第一用户的目标用户标识和目标页面的页面标识,页面浏览请求用于指示服务器在目标页面中嵌入与目标用户标识对应的目标水印字体文件得到嵌入有水印字体的目标页面;
步骤604,接收来自服务器的嵌入有水印字体的目标页面;
步骤606,显示嵌入有水印字体的目标页面。
在该实施例中,第一用户向服务器发送携带有其目标用户标识以及目标页面的页面标识的页面浏览请求,服务器接收到该页面浏览请求后,获取其携带的目标用户标识以及页面标识,其中目标用户标识用于指示第一用户的身份,页面标识可指目标页面的页面链接。第一用户在用户设备上点击某个页面的页面链接时,则向服务器发送携带有第一用户的目标用户标识和目标页面的页面标识的页面浏览请求。服务器根据页面标识获取目标页面,以及在水印字体库中查找是否存在与该目标用户标识具有关联关系的目标水印字体文件,若存在,则在目标页面中嵌入目标水印字体文件,从而改变目标网页的字体编码,得到嵌入有水印字体的目标页面,也即,目标页面上的文字为目标水印字体文件中的至少部分文字。最后,用户设备接收服务器发送的嵌入有水印字体的目标页面,并进行显示。
在本公开的实施例中,实现在浏览的目标页面中嵌入对用户身份对应的水印字体,使得每个用户在浏览页面时页面中显示的字体都是不同的,能够根据页面字体定位到对应用户,增强页面与用户的关联性,提供页面信息追溯依据,提高页面信息的安全性。
进一步地,在本公开的一个实施例中,具有水印字体的文字包括以下至少一种:数字、英文字母以及汉字。
在该实施例中,通过数字、英文字母或汉字等关键字进行字体区别,能够提高根据页面字体定位到对应用户的准确性,增强页面与用户的关联性。
需要说明的是,本公开的实施例提供的页面生成方法,执行主体可以为页面生成装置,或者,该页面生成装置中的用于执行页面生成方法的控制模 块。本公开的实施例中以页面生成装置执行页面生成方法为例,说明本公开的实施例提供的页面生成装置。
本公开提供了一种页面生成装置,如图7所示,该页面生成装置700包括:
接收模块702,用于接收第一用户的页面浏览请求,页面浏览请求中携带有第一用户的目标用户标识和目标页面的页面标识;
获取模块704,用于根据页面标识获取目标页面,以及从水印字体库中获取与目标用户标识对应的目标水印字体文件,水印字体库用于维护至少一个用户对应的水印字体文件,水印字体文件用于改变网页字体编码;
处理模块706,用于在目标页面中嵌入目标水印字体文件得到嵌入有水印字体的目标页面;
发送模块708,用于响应于页面浏览请求,向第一用户反馈嵌入有水印字体的目标页面。
在该实施例中,服务器接收第一用户的页面浏览请求,获取该页面浏览请求中所携带的第一用户的目标用户标识和目标页面的页面标识,其中目标用户标识用于指示第一用户的身份,页面标识可指目标页面的页面链接。第一用户在用户设备上点击某个页面的页面链接时,则向服务器发送携带有第一用户的目标用户标识和目标页面的页面标识的页面浏览请求。进一步地,根据页面标识获取目标页面,以及在水印字体库中查找是否存在与第一用户的目标用户标识具有关联关系的目标水印字体文件,若存在,则在目标页面中嵌入目标水印字体文件,从而改变目标网页的字体编码,得到嵌入有水印字体的目标页面,也即,目标页面上的文字为目标水印字体文件中的至少部分文字。最后,将嵌入有水印字体的目标页面展示给第一用户。
本公开的实施例中,实现在浏览的目标页面中嵌入与用户身份对应的水印字体,使得每个用户在浏览页面时页面中显示的字体都是不同的,能够根据页面字体定位到对应用户,增强页面与用户的关联性,提供页面信息追溯依据,提高页面信息的安全性。
进一步地,在本公开的一个实施例中,该页面生成装置700还包括:生成模块,用于生成多个水印字体文件,并建立水印字体文件与用户的用户标 识之间的对应关系;处理模块706,还用于将多个水印字体文件存储至水印字体库;其中,不同水印字体文件中相同文字的字体不同。
进一步地,在本公开的一个实施例中,该页面生成装置700还包括:判断模块,用于根据目标用户标识和/或目标页面的页面内容,判断是否向目标页面中嵌入水印字体;获取模块704,具体用于在判定向目标页面中嵌入水印字体的情况下,从水印字体库中获取与目标用户标识对应的目标水印字体文件。
进一步地,在本公开的一个实施例中,判断模块,具体用于在根据目标用户标识确定第一用户为保密对象的情况下,判定向目标页面中嵌入水印字体。
进一步地,在本公开的一个实施例中,判断模块,具体用于在根据页面内容确定目标页面包括保密信息的情况下,判定向目标页面中嵌入水印字体。
需要说明的是,本公开的实施例提供的页面显示方法,执行主体可以为页面显示装置,或者,该页面显示装置中的用于执行页面显示方法的控制模块。本公开的实施例中以页面显示装置执行页面显示方法为例,说明本公开的实施例提供的页面显示装置。
本公开提供了一种页面显示装置,如图8所示,该页面显示装置800包括:
发送模块802,用于向服务器发送页面浏览请求,页面浏览请求中携带有第一用户的目标用户标识和目标页面的页面标识,页面浏览请求用于指示服务器在目标页面中嵌入与目标用户标识对应的目标水印字体文件得到嵌入有水印字体的目标页面;
接收模块804,用于接收来自服务器的嵌入有水印字体的目标页面;
显示模块806,用于显示嵌入有水印字体的目标页面。
在该实施例中,第一用户向服务器发送携带有其目标用户标识以及目标页面的页面标识的页面浏览请求,服务器接收到该页面浏览请求后,获取其携带的目标用户标识以及页面标识,其中目标用户标识用于指示第一用户的身份,页面标识可指目标页面的页面链接。第一用户在用户设备上点击某个页面的页面链接时,则向服务器发送携带有第一用户的目标用户标识和目标 页面的页面标识的页面浏览请求。服务器根据页面标识获取目标页面,以及在水印字体库中查找是否存在与该目标用户标识具有关联关系的目标水印字体文件,若存在,则在目标页面中嵌入目标水印字体文件,从而改变目标网页的字体编码,得到嵌入有水印字体的目标页面,也即,目标页面上的文字为目标水印字体文件中的至少部分文字。最后,用户设备接收服务器发送的嵌入有水印字体的目标页面,并进行显示。
在本公开的实施例中,实现在浏览的目标页面中嵌入对用户身份对应的水印字体,使得每个用户在浏览页面时页面中显示的字体都是不同的,能够根据页面字体定位到对应用户,增强页面与用户的关联性,提供页面信息追溯依据,提高页面信息的安全性。
本公开的实施例中的页面生成装置或页面显示装置可以是装置,也可以是终端中的部件、集成电路或芯片。该装置可以是移动电子设备,也可以为非移动电子设备。示例性的,移动电子设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、可穿戴设备、超级移动个人计算机(Ultra-Mobile Personal Computer,UMPC)、上网本或者个人数字助理(Personal Digital Assistant,PDA)等,非移动电子设备可以为服务器、网络附属存储器(Network Attached Storage,NAS)、个人计算机(Personal Computer,PC)、电视机(Television,TV)、柜员机或者自助机等,本公开的实施例不作具体限定。
本公开的实施例中的页面生成装置或页面显示装置可以为具有操作系统的装置。该操作系统可以为安卓(Android)操作系统,可以为ios操作系统,还可以为其他可能的操作系统,本公开的实施例不作具体限定。
本公开的实施例提供的页面生成装置能够实现图1和图5的方法实施例中实现的各个过程,本公开的实施例提供的页面显示装置能够实现图6的方法实施例中实现的各个过程,为避免重复,这里不再赘述。
本公开的实施例还提供一种页面显示系统,该页面显示系统包括:上述实施例中的页面生成装置;以及上述实施例中的页面显示装置。
可选的,如图9所示,本公开的实施例还提供一种电子设备900,包括处理器902,存储器904,存储在存储器904上并可在处理器902上运行的程序或指令,该程序或指令被处理器902执行时实现上述页面生成方法或页 面显示方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
需要注意的是,本公开的实施例中的电子设备包括上述的移动电子设备和非移动电子设备。
本公开的实施例还提供一种可读存储介质,可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述页面生成方法或页面显示方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
其中,处理器为上述实施例中的电子设备中的处理器。可读存储介质,包括计算机可读存储介质,如计算机只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等。
本公开的实施例另提供了一种芯片,芯片包括处理器和通信接口,通信接口和处理器耦合,处理器用于运行程序或指令,实现上述页面生成方法或页面显示方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。应理解,本公开的实施例提到的芯片还可以称为系统级芯片、系统芯片、芯片系统或片上系统芯片等。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本公开的实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通 过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本公开的技术方案本质上或者说对现有技术做出贡献的部分可以以计算机软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,或者网络设备等)执行本公开中各个实施例所述的方法。
上面结合附图对本公开的实施例进行了描述,但是本公开并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本公开的启示下,在不脱离本公开的宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本公开的保护之内。

Claims (11)

  1. 一种页面生成方法,包括:
    接收第一用户的页面浏览请求,所述页面浏览请求中携带有所述第一用户的目标用户标识和目标页面的页面标识;
    根据所述页面标识获取所述目标页面;
    从水印字体库中获取与所述目标用户标识对应的目标水印字体文件,并在所述目标页面中嵌入所述目标水印字体文件得到嵌入有水印字体的目标页面,所述水印字体库用于维护至少一个用户对应的水印字体文件,所述水印字体文件用于改变网页字体编码;
    响应于所述页面浏览请求,向所述第一用户反馈所述嵌入有水印字体的目标页面。
  2. 根据权利要求1所述的页面生成方法,其中,在所述接收第一用户的页面浏览请求之前,所述页面生成方法还包括:
    生成多个水印字体文件;
    建立所述水印字体文件与用户的用户标识之间的对应关系,并将多个所述水印字体文件存储至所述水印字体库;
    其中,不同所述水印字体文件中相同文字的字体不同。
  3. 根据权利要求1或2所述的页面生成方法,其中,所述从水印字体库中获取与所述目标用户标识对应的目标水印字体文件,并在所述目标页面中嵌入所述目标水印字体文件得到嵌入有水印字体的目标页,包括:
    根据所述目标用户标识和/或所述目标页面的页面内容,判断是否向所述目标页面中嵌入水印字体;
    在判定向所述目标页面中嵌入水印字体的情况下,从水印字体库中获取与所述目标用户标识对应的目标水印字体文件,并在所述目标页面中嵌入所述目标水印字体文件得到嵌入有水印字体的目标页。
  4. 根据权利要求3所述的页面生成方法,其中,所述判定向所述目标页面中嵌入水印字体,包括:
    在根据所述目标用户标识确定所述第一用户为保密对象的情况下,判定 向所述目标页面中嵌入水印字体。
  5. 根据权利要求3所述的页面生成方法,其中,所述判定向所述目标页面中嵌入水印字体,包括:
    在根据所述页面内容确定所述目标页面包括保密信息的情况下,判定向所述目标页面中嵌入水印字体。
  6. 一种页面显示方法,包括:
    向服务器发送页面浏览请求,所述页面浏览请求中携带有第一用户的目标用户标识和目标页面的页面标识,所述页面浏览请求用于指示所述服务器在所述目标页面中嵌入与所述目标用户标识对应的目标水印字体文件得到嵌入有水印字体的目标页面;
    接收来自所述服务器的所述嵌入有水印字体的目标页面;
    显示所述嵌入有水印字体的目标页面。
  7. 一种页面生成装置,包括:
    接收模块,用于接收第一用户的页面浏览请求,所述页面浏览请求中携带有所述第一用户的目标用户标识和目标页面的页面标识;
    获取模块,用于根据所述页面标识获取所述目标页面,以及从水印字体库中获取与所述目标用户标识对应的目标水印字体文件,所述水印字体库用于维护至少一个用户对应的水印字体文件,所述水印字体文件用于改变网页字体编码;
    处理模块,用于在所述目标页面中嵌入所述目标水印字体文件得到嵌入有水印字体的目标页面;以及
    发送模块,用于响应于所述页面浏览请求,向所述第一用户反馈所述嵌入有水印字体的目标页面。
  8. 一种页面显示装置,包括:
    发送模块,用于向服务器发送页面浏览请求,所述页面浏览请求中携带有第一用户的目标用户标识和目标页面的页面标识,所述页面浏览请求用于指示所述服务器在所述目标页面中嵌入与所述目标用户标识对应的目标水印字体文件得到嵌入有水印字体的目标页面;
    接收模块,用于接收来自所述服务器的所述嵌入有水印字体的目标页面; 以及
    显示模块,用于显示所述嵌入有水印字体的目标页面。
  9. 一种页面显示系统,包括:
    如权利要求7所述的页面生成装置;以及
    如权利要求8所述的页面显示装置。
  10. 一种电子设备,包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如权利要求1至5中任一项所述的页面生成方法或如权利要求6所述的页面显示方法的步骤。
  11. 一种可读存储介质,其上存储有程序或指令,其中,所述程序或指令被处理器执行时实现如权利要求1至5中任一项所述的页面生成方法或如权利要求6所述的页面显示方法的步骤。
PCT/CN2023/074824 2021-11-10 2023-02-07 页面生成方法、显示方法、装置、电子设备和存储介质 WO2023155712A1 (zh)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
CN202111324826 2021-11-10
CN202210155627.9A CN114417226A (zh) 2021-11-10 2022-02-21 页面生成方法、显示方法、装置、电子设备和存储介质
CN202210155627.9 2022-02-21

Publications (1)

Publication Number Publication Date
WO2023155712A1 true WO2023155712A1 (zh) 2023-08-24

Family

ID=81261113

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/074824 WO2023155712A1 (zh) 2021-11-10 2023-02-07 页面生成方法、显示方法、装置、电子设备和存储介质

Country Status (2)

Country Link
CN (1) CN114417226A (zh)
WO (1) WO2023155712A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114417226A (zh) * 2021-11-10 2022-04-29 北京字节跳动网络技术有限公司 页面生成方法、显示方法、装置、电子设备和存储介质
CN116127916B (zh) * 2022-11-18 2024-05-28 百望股份有限公司 一种动态添加水印的方法和装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102169534A (zh) * 2011-02-21 2011-08-31 北京书生国际信息技术有限公司 一种显示水印的方法和装置
CN104361268A (zh) * 2014-11-28 2015-02-18 广州视源电子科技股份有限公司 一种水印的嵌入和读取方法、装置及系统
KR20180090044A (ko) * 2017-02-02 2018-08-10 이흥범 폰트 교체 기반 웹 컨텐츠 제공 시스템 및 방법
CN112966277A (zh) * 2020-12-16 2021-06-15 南京指掌易信息科技有限公司 网页保护方法、装置、计算机设备及存储介质
CN114417226A (zh) * 2021-11-10 2022-04-29 北京字节跳动网络技术有限公司 页面生成方法、显示方法、装置、电子设备和存储介质

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040001606A1 (en) * 2002-06-28 2004-01-01 Levy Kenneth L. Watermark fonts
US8438648B2 (en) * 2010-02-16 2013-05-07 Celartem, Inc. Preventing unauthorized font linking
CN109635223A (zh) * 2018-12-10 2019-04-16 北京字节跳动网络技术有限公司 页面显示方法和装置
CN111191414B (zh) * 2019-11-11 2021-02-02 苏州亿歌网络科技有限公司 一种页面水印生成方法、识别方法、装置、设备及存储介质
CN112035804B (zh) * 2020-09-01 2024-03-15 珠海豹趣科技有限公司 一种在文档页面中插入水印标识的方法、装置、电子设备及存储介质
CN112214740A (zh) * 2020-09-27 2021-01-12 金蝶医疗软件科技有限公司 Pdf处理方法、装置、计算机设备和存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102169534A (zh) * 2011-02-21 2011-08-31 北京书生国际信息技术有限公司 一种显示水印的方法和装置
CN104361268A (zh) * 2014-11-28 2015-02-18 广州视源电子科技股份有限公司 一种水印的嵌入和读取方法、装置及系统
KR20180090044A (ko) * 2017-02-02 2018-08-10 이흥범 폰트 교체 기반 웹 컨텐츠 제공 시스템 및 방법
CN112966277A (zh) * 2020-12-16 2021-06-15 南京指掌易信息科技有限公司 网页保护方法、装置、计算机设备及存储介质
CN114417226A (zh) * 2021-11-10 2022-04-29 北京字节跳动网络技术有限公司 页面生成方法、显示方法、装置、电子设备和存储介质

Also Published As

Publication number Publication date
CN114417226A (zh) 2022-04-29

Similar Documents

Publication Publication Date Title
WO2023155712A1 (zh) 页面生成方法、显示方法、装置、电子设备和存储介质
US10262300B2 (en) Presenting image previews in electronic messages
US8707164B2 (en) Integrated document viewer
CN109145078B (zh) 对本机应用的应用页面建索引
US7146369B2 (en) Method and system for native-byte form handling
US8095534B1 (en) Selection and sharing of verified search results
US9652553B2 (en) Method and device for displaying a web page
US9934206B2 (en) Method and apparatus for extracting web page content
US10198406B2 (en) Modifying native document comments in a preview
US20090313579A1 (en) Systems and methods involving favicons
US8924251B2 (en) Systems and methods for providing one or more pages from an electronic document
JP2022184964A (ja) インターネットコンテンツ内の要素の直接的なブラウザ内のマークアップのためのシステムおよび方法
US9710440B2 (en) Presenting fixed format documents in reflowed format
US20210149842A1 (en) System and method for display of document comparisons on a remote device
US20190073342A1 (en) Presentation of electronic information
KR20130065710A (ko) 사이트 메모리 프로세싱 및 클리핑 제어
US20180218076A1 (en) Information obtaining method and apparatus
US10817651B2 (en) Method for referring to specific content on a web page and web browsing system
US10686835B2 (en) Method and device for providing authentication information on web page
CN109190062B (zh) 目标语料数据的爬取方法、装置及存储介质
WO2014081762A1 (en) Mobile-commerce store generator that automatically extracts and converts data
JP2011113512A (ja) 電子書籍コンテンツ生成装置、及び、電子書籍コンテンツ生成方法
CN103136259A (zh) 一种基于内容块标识处理网页内容的方法与设备
US20050050452A1 (en) Systems and methods for generating an electronically publishable document
JP2008071116A (ja) 情報配信システム、情報配信装置、情報配信方法および情報配信用プログラム

Legal Events

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

Ref document number: 23755715

Country of ref document: EP

Kind code of ref document: A1