Document presentation method and apparatus, electronic device, and storage medium

CN116362201BActive Publication Date: 2026-10-09ZHUHAI KINGSOFT OFFICE SOFTWARE +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310269400.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-17
Publication Date
2026-10-09
Estimated Expiration
2043-03-17

AI Technical Summary

Technical Problem

此外,在对文档中的内容进行替换时,由于替换前后的字符存在字符尺寸、字符间距、行间距、字号大小、字符数量不一致的情况,容易导致字符替换前后文档排版差异较大的问题

Benefits of technology

[0097] The document presentation method provided in this application embodiment can obtain the content of a first region of a target document, then replace the content of the first region with the content of a second region, wherein the content of a third region in the target document maintains consistent layout before and after the replacement, and the third region content is the part of the target document excluding the content of the first region. Then, the target document is presented, wherein if the content of the first region is de-sensitized content, the content of the second region is the non-de-sensitized content of the first region content; if the content of the first region is non-de-sensitized content, the content of the second region is the de-sensitized content of the first region content. Therefore, in the process of replacing the de-sensitized and non-de-sensitized content of the document, the part of the target document excluding the content of the first region can maintain consistent layout before and after the replacement, thereby reducing the impact of content replacement on the layout of the target document.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116362201B_ABST
    Figure CN116362201B_ABST
Patent Text Reader

Abstract

Embodiments of the present application relate to a document presentation method and device, electronic equipment and storage medium. The method comprises: obtaining first region content of a target document; replacing the first region content with second region content, wherein third region content in the target document remains consistent in layout before and after the replacement, and the third region content is a part of the target document other than the first region content; and presenting the target document. In the case where the first region content is desensitization content, the second region content is non-desensitization content of the first region content. In the case where the first region content is non-desensitization content, the second region content is desensitization content of the first region content. Thus, the impact on the layout of the target document after content replacement is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a document presentation method, apparatus, electronic device, and storage medium. Background Technology

[0002] In existing technologies, to ensure data security, data anonymization techniques can be used to present the data. For example, fixed characters (such as *) or strings can be used to replace data. However, when replacing content in a document, inconsistencies in character size, character spacing, line spacing, font size, and number of characters before and after replacement can easily lead to significant differences in document layout.

[0003] It is clear that minimizing the impact of content replacement on document layout is a technical issue that deserves attention. Summary of the Invention

[0004] In view of this, in order to solve some or all of the above-mentioned technical problems, embodiments of this application provide a document presentation method, apparatus, electronic device and storage medium.

[0005] In a first aspect, embodiments of this application provide a document presentation method, the method comprising:

[0006] Retrieve the content of the first region of the target document;

[0007] The first area content is replaced with the second area content, wherein the third area content in the target document maintains consistent layout before and after the replacement, and the third area content is the part of the target document excluding the first area content;

[0008] Present the target document;

[0009] Wherein, if the content in the first area is de-sensitized content, the content in the second area is the non-de-sensitized content of the first area; if the content in the first area is non-de-sensitized content, the content in the second area is the de-sensitized content of the first area.

[0010] In one possible implementation, replacing the content of the first region with the content of the second region includes:

[0011] Replace the first area content with the second area content that occupies the same area as the first area content.

[0012] In one possible implementation, replacing the content of the first region with the content of the second region includes:

[0013] Replace the first area content with the second area content, which occupies the same length in a preset direction.

[0014] In one possible implementation, replacing the content of the first region with the content of the second region includes:

[0015] Determine the first layout information of the content in the first area;

[0016] Based on the first layout information, determine the second layout information of the second area content of the target document;

[0017] Replace the content of the first area with the content of the second area that contains the second layout information; and

[0018] Presenting the target document includes:

[0019] The second area content in the target document is presented according to the layout method indicated by the second layout information.

[0020] In one possible implementation, determining the second layout information of the second region content of the target document based on the first layout information includes:

[0021] Determine the number of the first characters in the content of the first area from the first layout information;

[0022] Based on the first layout information and the second character count, determine the second character count of the content in the second area;

[0023] Based on the first layout information and the second number of characters, the second layout information of the content in the second area is determined.

[0024] In one possible implementation, the content of the first region is un-de-sensitized content, and the content of the second region is de-sensitized content of the first region; and

[0025] The step of generating the second character count of the second region content of the target document based on the first character count includes:

[0026] If the number of the first character is less than or equal to a preset first threshold, a preset strategy is adopted to increase the number of the first character, and the increased number of the first character is determined as the number of the second character in the second region content of the target document.

[0027] If the number of the first characters is greater than the preset first threshold, the number of the first characters is determined as the number of the second characters in the second region content of the target document.

[0028] In one possible implementation, generating the second character count of the second region content of the target document based on the first character count includes:

[0029] When using the first configuration, the number of the first character is changed using a preset strategy, and the changed number of the first character is determined as the number of the second character in the second region content of the target document.

[0030] When the second configuration is adopted, the first character count is determined as the second character count of the second region content of the target document.

[0031] In one possible implementation, determining the second layout information of the second region content of the target document based on the first layout information includes at least one of the following:

[0032] The first character spacing of the first area content included in the first typesetting information is determined as the second character spacing of the second area content of the target document, thereby obtaining the second typesetting information of the second area content;

[0033] The first character size of the first area content included in the first layout information is determined as the second character size of the second area content of the target document, thereby obtaining the second layout information of the second area content;

[0034] The first line spacing of the first area content included in the first layout information is determined as the second line spacing of the second area content of the target document, thereby obtaining the second layout information of the second area content.

[0035] In one possible implementation, determining the second layout information of the second region content of the target document based on the first layout information includes:

[0036] From the first layout information, determine the number of first characters, the spacing between first characters, and the size of first characters in the content of the first area;

[0037] Based on the first character count, the first character spacing, and the first character size, the second character count, the second character spacing, and the second character size of the second region content of the target document are determined, and the second layout information of the second region content is obtained.

[0038] In one possible implementation, determining the second character count, second character spacing, and second character size of the second region content of the target document based on the first character count, the first character spacing, and the first character size includes:

[0039] Based on the first number of characters, determine the third number of characters in the second region content of the target document;

[0040] Based on the number of the first characters, the spacing between the first characters, and the size of the first characters, the first size information of the content in the first region is determined;

[0041] Determine the third character spacing and third character size of the second region content of the target document;

[0042] The third size information is determined based on the number of third characters, the spacing between third characters, and the size of the third character;

[0043] Determine whether the size difference between the size represented by the first size information and the size represented by the third size information is less than or equal to a preset second threshold.

[0044] When the size difference is less than or equal to the preset second threshold, the number of third characters is determined as the number of second characters in the content of the second region, the size of the third character is determined as the size of the second character in the content of the second region, and the spacing of the third character is determined as the spacing of the second character in the content of the second region.

[0045] If the size difference is greater than the preset second threshold, at least one of the number of third characters, the size of the third character, and the spacing of the third character is adjusted so that the size difference between the size determined based on the adjusted number of third characters, the size of the third character, and the spacing of the third character and the size represented by the first size information is less than or equal to the preset second threshold, and the adjusted number of third characters, the size of the third character, and the spacing of the third character are respectively determined as the number of second characters, the size of the second character, and the spacing of the second character in the second area content.

[0046] In one possible implementation, the first layout information includes first size information of the content in the first area; and

[0047] The step of determining the second layout information of the second region content of the target document based on the first layout information includes:

[0048] The first size information included in the first layout information is determined as the second size information of the second area content of the target document;

[0049] Based on the second size information, the second layout information of the second area content of the target document is determined.

[0050] Secondly, embodiments of this application provide a document presentation apparatus, the apparatus comprising:

[0051] The acquisition unit is used to acquire the content of the first region of the target document;

[0052] The replacement unit is used to replace the content of the first region with the content of the second region, wherein the content of the third region in the target document maintains consistent layout before and after the replacement, and the content of the third region is the part of the target document other than the content of the first region;

[0053] A presentation unit is used to present the target document;

[0054] Wherein, if the content in the first area is de-sensitized content, the content in the second area is the non-de-sensitized content of the first area; if the content in the first area is non-de-sensitized content, the content in the second area is the de-sensitized content of the first area.

[0055] In one possible implementation, replacing the content of the first region with the content of the second region includes:

[0056] Replace the first area content with the second area content that occupies the same area as the first area content.

[0057] In one possible implementation, replacing the content of the first region with the content of the second region includes:

[0058] Replace the first area content with the second area content, which occupies the same length in a preset direction.

[0059] In one possible implementation, replacing the content of the first region with the content of the second region includes:

[0060] Determine the first layout information of the content in the first area;

[0061] Based on the first layout information, determine the second layout information of the second area content of the target document;

[0062] Replace the content of the first area with the content of the second area that contains the second layout information; and

[0063] Presenting the target document includes:

[0064] The second area content in the target document is presented according to the layout method indicated by the second layout information.

[0065] In one possible implementation, determining the second layout information of the second region content of the target document based on the first layout information includes:

[0066] Determine the number of the first characters in the content of the first area from the first layout information;

[0067] Based on the first number of characters, generate the second number of characters for the second region content of the target document;

[0068] Based on the first layout information and the second number of characters, the second layout information of the content in the second area is determined.

[0069] In one possible implementation, the content of the first region is un-de-sensitized content, and the content of the second region is de-sensitized content of the first region; and

[0070] The step of generating the second character count of the second region content of the target document based on the first character count includes:

[0071] If the number of the first character is less than or equal to a preset first threshold, a preset strategy is adopted to increase the number of the first character, and the increased number of the first character is determined as the number of the second character in the second region content of the target document.

[0072] If the number of the first characters is greater than the preset first threshold, the number of the first characters is determined as the number of the second characters in the second region content of the target document.

[0073] In one possible implementation, determining the second layout information of the second region content of the target document based on the first layout information includes at least one of the following:

[0074] The first character spacing of the first area content included in the first typesetting information is determined as the second character spacing of the second area content of the target document, thereby obtaining the second typesetting information of the second area content;

[0075] The first character size of the first area content included in the first layout information is determined as the second character size of the second area content of the target document, thereby obtaining the second layout information of the second area content;

[0076] The first line spacing of the first area content included in the first layout information is determined as the second line spacing of the second area content of the target document, thereby obtaining the second layout information of the second area content.

[0077] In one possible implementation, determining the second layout information of the second region content of the target document based on the first layout information includes:

[0078] From the first layout information, determine the number of first characters, the spacing between first characters, and the size of first characters in the content of the first area;

[0079] Based on the first character count, the first character spacing, and the first character size, the second character count, the second character spacing, and the second character size of the second region content of the target document are determined, and the second layout information of the second region content is obtained.

[0080] In one possible implementation, determining the second character count, second character spacing, and second character size of the second region content of the target document based on the first character count, the first character spacing, and the first character size includes:

[0081] Based on the first number of characters, determine the third number of characters in the second region content of the target document;

[0082] Based on the number of the first characters, the spacing between the first characters, and the size of the first characters, the first size information of the content in the first region is determined;

[0083] Determine the third character spacing and third character size of the second region content of the target document;

[0084] The third size information is determined based on the number of third characters, the spacing between third characters, and the size of the third character;

[0085] Determine whether the size difference between the size represented by the first size information and the size represented by the third size information is less than or equal to a preset second threshold.

[0086] When the size difference is less than or equal to the preset second threshold, the number of third characters is determined as the number of second characters in the content of the second region, the size of the third character is determined as the size of the second character in the content of the second region, and the spacing of the third character is determined as the spacing of the second character in the content of the second region.

[0087] If the size difference is greater than the preset second threshold, at least one of the number of third characters, the size of the third character, and the spacing of the third character is adjusted so that the size difference between the size determined based on the adjusted number of third characters, the size of the third character, and the spacing of the third character and the size represented by the first size information is less than or equal to the preset second threshold, and the adjusted number of third characters, the size of the third character, and the spacing of the third character are respectively determined as the number of second characters, the size of the second character, and the spacing of the second character in the second area content.

[0088] In one possible implementation, the first layout information includes first size information of the content in the first area; and

[0089] The step of determining the second layout information of the second region content of the target document based on the first layout information includes:

[0090] The first size information included in the first layout information is determined as the second size information of the second area content of the target document;

[0091] Based on the second size information, the second layout information of the second area content of the target document is determined.

[0092] Thirdly, embodiments of this application provide an electronic device, including:

[0093] Memory, used to store computer programs;

[0094] A processor is configured to execute a computer program stored in the memory, wherein, when the computer program is executed, it implements the method of any embodiment of the document presentation method of the first aspect of this application described above.

[0095] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, it implements the method of any embodiment of the document presentation method of the first aspect described above.

[0096] Fifthly, embodiments of this application provide a computer program comprising computer-readable code that, when executed on a device, causes a processor in the device to implement the method of any embodiment of the document presentation method of the first aspect described above.

[0097] The document presentation method provided in this application embodiment can obtain the content of a first region of a target document, then replace the content of the first region with the content of a second region, wherein the content of a third region in the target document maintains consistent layout before and after the replacement, and the third region content is the part of the target document excluding the content of the first region. Then, the target document is presented, wherein if the content of the first region is de-sensitized content, the content of the second region is the non-de-sensitized content of the first region content; if the content of the first region is non-de-sensitized content, the content of the second region is the de-sensitized content of the first region content. Therefore, in the process of replacing the de-sensitized and non-de-sensitized content of the document, the part of the target document excluding the content of the first region can maintain consistent layout before and after the replacement, thereby reducing the impact of content replacement on the layout of the target document. Attached Figure Description

[0098] Figure 1A A flowchart illustrating a document presentation method provided in an embodiment of this application;

[0099] Figure 1B This is a schematic diagram of a strategy configuration;

[0100] Figure 1C This is a schematic diagram illustrating the presentation effect of content in the first area.

[0101] Figure 1D This is a schematic diagram illustrating the presentation effect of content in a second area.

[0102] Figure 1E This is a schematic diagram illustrating the presentation effect of another type of first-area content;

[0103] Figure 1F This is a schematic diagram illustrating the presentation effect of another type of second-area content;

[0104] Figure 1G This is a schematic diagram illustrating the presentation effect of another type of first-area content;

[0105] Figure 1H This is a schematic diagram illustrating the presentation effect of another type of second-area content;

[0106] Figure 1I This is a schematic diagram illustrating the presentation effect of another type of content in the first area;

[0107] Figure 1J This is a schematic diagram illustrating the presentation effect of another type of second-area content;

[0108] Figure 1K This diagram illustrates a method for labeling and setting permissions.

[0109] Figure 1L This diagram illustrates one method for setting first-level permission information.

[0110] Figure 1M This is a schematic diagram illustrating a method for setting a preset set of keywords;

[0111] Figure 1N A schematic diagram illustrating a method for determining target annotation information is shown.

[0112] Figure 10 This diagram illustrates yet another method for determining target annotation information;

[0113] Figure 1P and Figure 1Q A diagram illustrating one method of setting user information;

[0114] Figure 1R This is a schematic diagram illustrating one possible presentation style.

[0115] Figure 2 A flowchart illustrating another document presentation method provided in an embodiment of this application;

[0116] Figure 3A flowchart illustrating yet another document presentation method provided in an embodiment of this application;

[0117] Figure 4 This is a schematic diagram of the structure of a document presentation device provided in an embodiment of this application;

[0118] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0119] Various exemplary embodiments of this application will now be described in detail with reference to the accompanying drawings. It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values ​​of the components and steps set forth in these embodiments do not limit the scope of this application.

[0120] Those skilled in the art will understand that the terms "first" and "second" in the embodiments of this application are only used to distinguish different steps, devices or modules, and do not represent any specific technical meaning, nor do they indicate the logical order between them.

[0121] It should also be understood that in this embodiment, "multiple" can refer to two or more, and "at least one" can refer to one, two or more.

[0122] It should also be understood that any component, data or structure mentioned in the embodiments of this application can generally be understood as one or more unless explicitly defined or given contrary guidance in the context.

[0123] Furthermore, the term "and / or" in this application is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this application generally indicates that the preceding and following related objects have an "or" relationship.

[0124] It should also be understood that the description of the various embodiments in this application emphasizes the differences between the various embodiments, and the similarities or similarities can be referred to each other. For the sake of brevity, they will not be described in detail.

[0125] The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit the scope of this application and its application or use.

[0126] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment should be considered part of the specification.

[0127] It should be noted that similar labels and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be discussed further in subsequent figures.

[0128] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. To facilitate understanding of the embodiments of this application, the application will be described in detail below with reference to the accompanying drawings and embodiments. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0129] Furthermore, it should be noted that the users described in this application (e.g., target users) can be distinguished by user identifiers. For example, a user identifier can be a login account. In this scenario, if different people log in using the same account, they can be considered the same user; if the same person logs in using different accounts, they can be considered different users. As another example, when a device is not logged in, a user identifier can be assigned based on the device's identifier. In this scenario, if different people operate using devices with the same device identifier, they can be considered the same user; if the same person operates using devices with different device identifiers, they can be considered different users.

[0130] Figure 1A This is a flowchart illustrating a document presentation method provided in an embodiment of this application. Figure 1A As shown, the method specifically includes:

[0131] Step 101: Obtain the content of the first region of the target document.

[0132] In this embodiment, the target document can be any document. As examples, the target document can include, but is not limited to, the following formats: doc, docx, ppt, pptx, rtf (Rich Text Format), and html (Hyper Text Markup Language), etc. Additionally, the target document can be an offline document stored locally or an online document stored in the cloud. Furthermore, the target document can include one or more document regions. Each document region can display one or more document region contents.

[0133] The content of the first area can be either anonymized or unanonymized. If the content of the first area is unanonymized, it can be the content of the document area where it is located. If the content of the first area is anonymized, it can be obtained by replacing the content of the document area where it is located with one or more preset characters (such as "x", "*", "#", "■", "~", etc.).

[0134] Document area content can be the content of a document area within the target document. As an example, document area content can include at least one of the following: text, images, tables, etc. When the document area content is text, a single word, a sentence, or a paragraph of text within the document can be defined as a document area content.

[0135] Step 102: Replace the content of the first region with the content of the second region, wherein the content of the third region in the target document maintains the same layout before and after the replacement, and the content of the third region is the part of the target document other than the content of the first region.

[0136] In this embodiment, the content of the second region can be either non-anonymized or anonymized content. If the content of the second region is non-anonymized, it can be the content of the document region where it is located. If the content of the second region is anonymized, it can be obtained by replacing the content of the document region where it is located with one or more preset characters (e.g., "x", "*", "#", "■", "~", etc.).

[0137] In this embodiment, when the content of the first region is de-sensitized content, the content of the second region is the non-de-sensitized content of the first region; when the content of the first region is non-de-sensitized content, the content of the second region is the de-sensitized content of the first region.

[0138] It's important to note that consistent layout between two content areas means that the two content areas occupy the same area in the document, the difference in area occupied by the two content areas is less than a preset threshold, they occupy the same length and position in a preset direction in the document, or the difference in length or position occupied in a preset direction in the document is less than a preset threshold. This preset direction can be either portrait or landscape orientation.

[0139] In one embodiment, the layout of the third region content in the target document remains consistent before and after the replacement, indicating that the layout position of the third region content in the document will not be changed by the replacement of the first region content. The layout position of the region content in the document can be represented using coordinates. For example, a coordinate system can be established on each page of the document with the top-left corner as the origin, and the region formed by the content can be represented using coordinates based on this coordinate system.

[0140] In some optional implementations of this embodiment, the content of the first region can be replaced with the content of the second region in the following manner:

[0141] Replace the first area content with the second area content, which occupies the same length in a preset direction.

[0142] The preset direction may include at least one of the directions in which the length of the target document is located and the directions in which the width of the target document is located.

[0143] It is understood that, in the above optional implementation methods, the content of a second region, which occupies the same length in a preset direction as the content of the first region, can be used to replace the content of the first region. This further reduces the impact of content replacement on the layout of the target document.

[0144] In one embodiment, if the content of the first region is determined to be the end of a segment, the content of the first region is replaced with the content of the second region, which occupies the same length in a preset direction.

[0145] Assuming the preset direction is the length of the target document (vertical), and the first area content is at the end of a paragraph, setting the starting positions of the first and second areas to be equal and occupying the same document height ensures that the layout of the third area content will not change due to the replacement of the first area content. Of course, it is not necessary to guarantee that the last line of the replaced second area content will be consistent with the last line of the first area content.

[0146] In this embodiment, replacing the content of the first region with the content of the second region specifically includes:

[0147] First, load the contents of the first region into memory.

[0148] Then, in memory, the content of the first region is replaced with the content of the second region so that the target document including the content of the second region can be rendered in subsequent steps.

[0149] It is understandable that by loading content from memory, the content of the first region can be replaced with the content of the second region, thus achieving the replacement and presentation of the content of the second region without changing the source file of the target document.

[0150] Step 103: Present the target document.

[0151] In this embodiment, after replacing the content of the first region with the content of the second region, the target document described above can be presented.

[0152] Here, the portion of the target document excluding the content in the first area maintains consistent formatting before and after the replacement.

[0153] The document presentation method provided in this application embodiment can obtain the content of a first region of a target document, then replace the content of the first region with the content of a second region, wherein the content of a third region in the target document maintains consistent layout before and after the replacement, and the third region content is the part of the target document excluding the content of the first region. Then, the target document is presented, wherein if the content of the first region is de-sensitized content, the content of the second region is the non-de-sensitized content of the first region content; if the content of the first region is non-de-sensitized content, the content of the second region is the de-sensitized content of the first region content. Therefore, in the process of replacing the de-sensitized and non-de-sensitized content of the document, the part of the target document excluding the content of the first region can maintain consistent layout before and after the replacement, thereby reducing the impact of content replacement on the layout of the target document.

[0154] Figure 2 This is a flowchart illustrating another document presentation method provided in an embodiment of this application. Figure 2 As shown, the method specifically includes:

[0155] Step 201: Obtain the content of the first region of the target document.

[0156] In this embodiment, the execution method of step 201 can be the same as that of step 101 above, and will not be repeated here.

[0157] Step 202: Determine the first layout information of the content in the first area.

[0158] In this embodiment, the first layout information of the first area content may include at least one of the following: the number of characters in the first area content (i.e., the number of first characters described below), the character size (i.e., the first character size described below, such as width and height), the line spacing (i.e., the first line spacing described below), the character spacing (i.e., the first character spacing described below), the font size of the first area content, the position information of the adjacent area content of the first area content in the target document, etc.

[0159] Step 203: Based on the first layout information, determine the second layout information of the second area content of the target document.

[0160] In this embodiment, the second layout information of the second area content may include at least one of the following: the number of characters in the second area content (i.e., the second number of characters described below), the character size (i.e., the second character size described below), the line spacing (i.e., the second line spacing described below), the character spacing (i.e., the second character spacing described below), and the font size of the second area content.

[0161] In this embodiment, when the second layout information includes at least two items, a portion of the second layout information can be determined using a preset method, and the remaining portion is calculated based on the goal of layout consistency. If the remaining portion of the second layout information has multiple possible combinations of values ​​to achieve layout consistency, one can be arbitrarily selected. Alternatively, all the second layout information can be calculated based on the goal of layout consistency, and if the second layout information has multiple possible combinations of values ​​to achieve layout consistency, one can be arbitrarily selected. The preset method may include, but is not limited to, one of the following: the second layout information is equal to the first layout information; the second layout information is a multiple of the first layout information; the second layout information is a preset value.

[0162] In some optional implementations of this embodiment, the second character count, second character spacing, and second character size of the second region content of the target document can be determined based on the first character count, the first character spacing, and the first character size in the following manner:

[0163] First, based on the first number of characters, the third number of characters in the second region of the target document is determined.

[0164] The third character count can be a hypothetical number of characters in the second region of the target document.

[0165] Then, based on the number of the first characters, the spacing between the first characters, and the size of the first characters, the first size information of the content in the first region is determined.

[0166] As an example, the first dimension information X1 can be determined using the following formula:

[0167] X1=N1×L1+(N1-1)×D1 Formula 1

[0168] Wherein, N1 represents the number of first characters, L1 represents the size of the first character (e.g., character width or character height), and D1 represents the spacing between the first characters.

[0169] Then, the third character spacing and third character size of the second region content of the target document are determined.

[0170] The third character spacing can be a predetermined and fixed character spacing, or it can be a character spacing determined based on the first character spacing, such as setting the third character spacing to be equal to the first character spacing or a multiple of the first character spacing. Similarly, the third character size can be a predetermined and fixed character size, or it can be a character size determined based on the first character size, such as setting the third character size to be equal to the first character size or a multiple of the first character size.

[0171] Subsequently, based on the number of third characters, the spacing between third characters, and the size of the third character, the third size information is determined.

[0172] As an example, the third dimension information X2 can be determined using the following formula:

[0173] X2=N2×L2+(N2-1)×D2 Formula 2 Where N2 represents the number of second characters, L2 represents the size of the second character, and D2 represents the spacing between the second characters.

[0174] Next, it is determined whether the size difference between the size represented by the first size information and the size represented by the third size information is less than or equal to a preset second threshold.

[0175] The aforementioned size difference can be calculated by the absolute value of the difference between the size represented by the first size information and the size represented by the third size information, or by the quotient, etc.

[0176] When the size difference is less than or equal to the preset second threshold, the number of the third character is determined as the number of the second character in the content of the second region, the size of the third character is determined as the size of the second character in the content of the second region, and the spacing of the third character is determined as the spacing of the second character in the content of the second region.

[0177] If the size difference is greater than the preset second threshold, at least one of the number of third characters, the size of the third character, and the spacing of the third character is adjusted so that the size difference between the size determined based on the adjusted number of third characters, the size of the third character, and the spacing of the third character and the size represented by the first size information is less than or equal to the preset second threshold, and the adjusted number of third characters, the size of the third character, and the spacing of the third character are respectively determined as the number of second characters, the size of the second character, and the spacing of the second character in the second area content.

[0178] Here, if the number of third characters is adjusted, the adjusted number of third characters can be determined as the number of second characters in the second area content; if the number of third characters is not adjusted, the unadjusted number of third characters can be determined as the number of second characters in the second area content. If the size of the third character is adjusted, the adjusted size of the third character can be determined as the size of the second character in the second area content; if the size of the third character is not adjusted, the unadjusted size of the third character can be determined as the size of the second character in the second area content. If the spacing of the third character is adjusted, the adjusted spacing of the third character can be determined as the spacing of the second character in the second area content; if the spacing of the third character is not adjusted, the unadjusted spacing of the third character can be determined as the spacing of the second character in the second area content.

[0179] Furthermore, in some cases, when the size difference is greater than the preset second threshold, at least one of the third character quantity, the third character size, and the third character spacing can be adjusted to make the size determined based on the adjusted third character quantity, the third character size, and the third character spacing equal to the size represented by the first size information, and the adjusted third character quantity, the third character size, and the third character spacing are respectively determined as the second character quantity, the second character size, and the second character spacing of the second area content.

[0180] It is understood that, in the above-mentioned optional implementation methods, the size difference between the size of the second area content after content replacement and the size of the first area content before content replacement can be small (that is, less than or equal to the preset second threshold), thereby further reducing the impact of content replacement on the layout of the target document.

[0181] In some optional implementations of this embodiment, the second layout information of the second region content of the target document can be determined based on the first layout information in the following manner:

[0182] First, determine the number of first characters in the content of the first area from the first layout information.

[0183] The first layout information may include the number of first characters in the content of the first area. Therefore, the number of first characters in the content of the first area can be determined from the first layout information.

[0184] Then, based on the first number of characters, the second number of characters in the second region content of the target document is generated.

[0185] The second typesetting information may include the number of the two characters.

[0186] Then, based on the first layout information and the second number of characters, the second layout information of the second area content is determined.

[0187] For example, the second layout information of the second region content of the target document can be determined based on the first layout information and the second character count in the following manner:

[0188] The first character spacing of the first region content included in the first typesetting information is determined as the second character spacing of the second region content of the target document. The second character spacing and the second character count are determined as the second typesetting information of the second region content.

[0189] The first character size of the first region content included in the first layout information is determined as the second character size of the second region content of the target document. The second character size and the second character count are determined as the second layout information of the second region content.

[0190] The first line spacing of the first area content included in the first typesetting information is determined as the second line spacing of the second area content of the target document. The second line spacing and the second character count are determined as the second typesetting information of the second area content.

[0191] In some optional implementations of this embodiment, the second character count of the second region content of the target document can be generated based on the first character count in the following manner:

[0192] When using the first configuration, a preset strategy is used to change the number of the first character, and the changed number of the first character is determined as the number of the second character in the second region content of the target document.

[0193] The first configuration can be used to indicate that the number of characters in the area content before and after desensitization is not equal.

[0194] The preset strategy can be: reduce a preset number of characters, reduce a preset percentage of characters, increase a preset number of characters, or increase a preset percentage of characters. The preset number or preset percentage can be set randomly or selected from multiple pre-selected options. Random setting can use a Gaussian distribution, for example, setting the mean to 2 and the variance to 1 to generate the preset number, such as any integer from 1, 2, or 3. Selecting from multiple pre-selected options could involve pre-setting the number to 1, 2, or 3, and then setting the preset number to 2 if 2 is selected.

[0195] When the second configuration is adopted, the first character count is determined as the second character count of the second region content of the target document.

[0196] The second configuration can be used to indicate that the number of characters in the area content before and after desensitization is equal.

[0197] It is understandable that, among the above optional implementation methods, the number of characters included in the area content before and after de-identification can be determined by configuration.

[0198] In some optional implementations of this embodiment, the first region content is non-anonymized content, and the second region content is anonymized content of the first region content. Therefore, one of the following methods can be used to generate the second character count of the second region content of the target document based on the first character count:

[0199] Method 1: If the number of the first characters is less than or equal to a preset first threshold, a preset strategy is used to increase the number of the first characters, and the increased number of the first characters is determined as the number of the second characters in the second region content of the target document.

[0200] The preset strategy can be an auto-incrementing preset value (e.g., 1, 5, etc.) or an expansion preset multiple (e.g., 2 times).

[0201] Method 2: If the number of the first characters is greater than the preset first threshold, the number of the first characters is determined as the number of the second characters in the second region content of the target document.

[0202] Method 3: The first character count is determined as the second character count of the second region content of the target document.

[0203] It is understandable that, among the above optional implementation methods, methods one and two allow for different methods to determine the number of second characters in different situations, further reducing the impact of content replacement on the target document layout. Method three allows for faster determination of the number of second characters, thereby improving the speed of rendering the content in the second area.

[0204] In some optional implementations of this embodiment, one or more of the following methods can be used to determine the second layout information of the second region content of the target document based on the first layout information:

[0205] The first step is to determine the first character spacing of the first region content included in the first typesetting information as the second character spacing of the second region content of the target document, thereby obtaining the second typesetting information of the second region content.

[0206] The second step involves determining the first character size of the first region content included in the first layout information as the second character size of the second region content of the target document, thereby obtaining the second layout information of the second region content.

[0207] The third step involves determining the first line spacing of the first area content included in the first layout information as the second line spacing of the second area content of the target document, thereby obtaining the second layout information of the second area content.

[0208] The fourth step involves determining the number of first characters in the first region content included in the first layout information as the number of second characters in the second region content of the target document, thereby obtaining the second layout information of the second region content.

[0209] As an example, please refer to Figure 1B , Figure 1B This is a schematic diagram illustrating a strategy configuration. For example... Figure 1B As shown, when the number of key points (i.e., the number of second characters) and the number of characters (i.e., the number of first characters) are the same, the number of characters can be directly determined as the number of key points.

[0210] Please continue to refer to Figure 1C and Figure 1D , Figure 1C This is a schematic diagram illustrating the presentation effect of content in the first area. Figure 1D This is a schematic diagram illustrating the presentation effect of content in a second area. Among them, Figure 1C The first section includes content on "Supporting multi-person online collaborative work". Figure 1D The second area contains "**********", and the number of the first character is equal to the number of the second character.

[0211] It should be noted that in this embodiment, the number of characters refers to the number of characters in the area content. There is no restriction on the method of counting the number of characters. In one method, one Chinese character or one English letter is counted as one character, one half-width or full-width punctuation mark is counted as one character, and one space is counted as one character.

[0212] Furthermore, if for Figure 1C and Figure 1D If you need to adjust the font and font size of a document, you can refer to... Figure 1E and Figure 1F As shown. Among them, Figure 1E This is a schematic diagram illustrating the presentation effect of another type of first-area content. Figure 1F This is a schematic diagram illustrating the presentation effect of another type of second-area content.

[0213] In addition, you can set different key points and word counts to improve the security of document content presentation.

[0214] Please continue to refer to Figure 1G and Figure 1H , Figure 1G This is a schematic diagram illustrating the presentation effect of another type of first-area content. Figure 1H This is an illustration of another type of second-area content presentation effect. Among them, Figure 1G The first section of the document includes the text: "Documents, the next generation of cloud-based Office software, supports multi-user online collaborative work, real-time collaboration, and allows setting document access and editing permissions." Figure 1H The second area contains “************************************************************”, and the number of the first character is not equal to the number of the second character.

[0215] Furthermore, if for Figure 1G and Figure 1H If you need to adjust the font and font size of a document, you can refer to... Figure 1I and Figure 1J As shown. Among them, Figure 1I This is a schematic diagram illustrating the presentation effect of another type of content in the first area. Figure 1J This is a schematic diagram illustrating the presentation effect of another type of second-area content.

[0216] contrast Figure 1C and Figure 1D , Figure 1E and Figure 1F , Figure 1G and Figure 1H , Figure 1I and Figure 1J It can be observed that replacing the content in the first area with the content in the second area did not affect the layout of the target document.

[0217] It is understood that, in the above optional implementation methods, the second layout information of the second area content may include at least one of the second character spacing, second character size, second line spacing and second character number of the second area content. Thus, through subsequent steps, the impact of content replacement on the target document layout can be further reduced.

[0218] In some optional implementations of this embodiment, the first layout information includes the first size information of the content in the first area.

[0219] The first size information may be the size information of the content of the first area. As an example, the first size information may include at least one of the width and height of the content of the first area. As yet another example, when the content of the first area includes at least two lines of content, the first size information may include the total width and / or total height of the content of each line.

[0220] Based on this, the second layout information of the second area content of the target document can be determined using the following method, based on the first layout information:

[0221] First, the first size information included in the first layout information is determined as the second size information of the second area content of the target document.

[0222] The second size information mentioned above can be the size information of the second area content. As an example, the second size information can include at least one of the width and height of the second area content. As yet another example, if the second area content includes at least two lines of content, the second size information can include the width of each line of content. The second size information corresponds to the first size information. For example, if the first size information includes the width of the first area content, then the second size information includes the width of the second area content. If the first size information includes the height of the first area content, then the second size information includes the height of the second area content.

[0223] Subsequently, based on the second size information, the second layout information of the second region content of the target document is determined.

[0224] As an example, a target size range including the size represented by the second size information can be determined first from a preset set of size ranges. Then, the second layout information pre-associated with the target size information is determined as the second layout information for the second area content of the target document.

[0225] The target size range can be a size range within a preset size range set that includes the size represented by the second size information. Each size range in the preset size range set can be pre-associated with a second type of layout information.

[0226] As another example, it can be first determined whether the second size information satisfies the following conditions: the size represented by the second size information is greater than the first preset size, and the size represented by the second size information is less than the second preset size. If the above conditions are met, then the second layout information of the second area content of the target document is determined as the preset second layout information. Wherein, the first preset size is less than the second preset size. Here, when the second area content is presented according to the layout method indicated by the preset second layout information, the layout method of the other document area content in the target document other than the second area content is consistent with the layout method of the other document area content in the target document other than the first area content when the first area content is presented.

[0227] It is understandable that, in the above optional implementation methods, the second size information of the second area content is determined by the first size information included in the first layout information, and then the second layout information of the second area content is determined, which can further reduce the impact of content replacement on the layout of the target document.

[0228] In one embodiment, when the content of the first area is non-anonymized content and the content of the second area is anonymized content of the first area, the content of the second area is set to a preset presentation style different from that of the content of the first area. For example, at least one of the following can be set: font size, font, bold, italic, underline, strikethrough, font color, and background color of the document area content, to remove the original presentation style of the non-anonymized content and avoid leakage of information such as the security level of the second area content due to the correspondence between the presentation style and the security level of the non-anonymized content.

[0229] Step 204: Replace the content of the first region with the content of the second region that has the second layout information, wherein the content of the third region in the target document maintains the same layout before and after the replacement, and the content of the third region is the part of the target document other than the content of the first region.

[0230] Step 205: Present the content of the second area in the target document according to the layout method indicated by the second layout information.

[0231] If the content in the first area is de-sensitized, the content in the second area is the un-sensitized content of the first area; if the content in the first area is not de-sensitized, the content in the second area is the de-sensitized content of the first area.

[0232] As an example, if the content in the first area is anonymized, and the content in the second area is unanonymized content of the first area, the content in the first area may include the text "quote price 1000 yuan", and the content in the second area may include "*****". In this example, the content in the first area is anonymized, and the content in the second area is unanonymized content of the first area.

[0233] Here, when the content of the second region is the non-anonymized content of the first region, the layout information in the source file of the target document can be directly determined as the layout information of the second region (i.e., the aforementioned second layout information) without recalculation.

[0234] It should be noted that, in addition to the contents described above, this embodiment may also include the corresponding technical features described in the embodiment corresponding to FIG1, thereby achieving... Figure 1A For details on the technical effects of the document rendering method shown, please refer to [link / reference]. Figure 1A The relevant descriptions are presented concisely and will not be elaborated upon here.

[0235] The document presentation method provided in this application embodiment can determine the second layout information of the replaced content based on the first layout information of the content before replacement during the process of replacing the anonymized and non-anonymized content of a document. Then, the replaced content is presented according to the corresponding layout method, so that the part of the target document other than the first area content maintains consistent layout before and after replacement, thereby reducing the impact of content replacement on the layout of the target document.

[0236] Alternatively, the content of the above document area can be displayed in the following manner:

[0237] The first step is to obtain the document data of the target document and the user information of the target user.

[0238] The document data includes document area content.

[0239] Document data can include any data from the target document. As an example, document data can include one or more document area contents, such as text, images, and tables. As yet another example, document data can also include formatting information for the document area contents.

[0240] User information can be information about the target user. As an example, user information may include at least one of the following: user security level, target user's gender, target user's age group, target user's occupation, etc. The user security level can represent the highest security level of the document area content that the target user has viewing permissions for.

[0241] Specifically, please refer to Figure 1P and Figure 1Q , Figure 1P and Figure 1Q This is a diagram illustrating one method of setting user information.

[0242] like Figure 1P and Figure 1Q As shown, the user security level above represents the highest security level of the document area content that the target user has viewing rights to (i.e., the personnel security level in the diagram). Figure 1P As shown, user information can be set by adding users (e.g., entering user account, name, etc.) and personnel security levels. Then, as... Figure 1Q As shown, the user information of the user named "Xu Maomao" is "Top Secret", and the user information of the user named "Yuexia Qinsheng" is "Secret".

[0243] Then, determine the content information of the document area.

[0244] Content information can be information about the document area content. As an example, content information may include at least one of the following: the security level of the document area content, the modification time of the document area content, etc.

[0245] As an example, the content information of the document area can be contained in the document data mentioned above, thus the content information of the document area can be obtained from the document data.

[0246] Alternatively, the content information of the document area can also be determined using the following methods:

[0247] Step 1: Determine whether the content of the document area includes classified information.

[0248] As an example, the classified content may include keywords from a preset keyword set. Therefore, by scanning the content of the target document, it can be determined whether the document area content includes keywords from the preset keyword set, and thus whether the document area content includes classified content.

[0249] As another example, the classified content can also be content that conforms to a set of preset regular expressions. Therefore, by scanning the content of the target document, it can be determined whether the content of the document region conforms to the content of a set of preset regular expressions, and thus whether the content of the document region includes classified content.

[0250] Regular expressions are logical formulas for string manipulation. They use predefined specific characters and combinations of these characters to form a rule string. This rule string is used to express a filtering logic for strings. By defining special syntax to represent character classes, quantifiers, and positional relationships, and then using these special syntaxes along with ordinary characters to represent a pattern, we get a regular expression.

[0251] As another example, the classified content can be content set to a preset display style. For instance, when the security dot style is enabled, security dot style settings can be configured, allowing for one or more settings such as the security level color, security level background color, security level transparency, and whether to display an underline for each security level. Furthermore, thus, when the target document is classified, it can be determined whether the presentation method of the document area content is the target presentation method; wherein, the target presentation method is any preset presentation method in the set of preset presentation methods. If the presentation method of the document area content is the target presentation method, it is determined that the content information includes the classified content.

[0252] Step 2: If the document area content includes the classified content, determine the level information of the secret level corresponding to the classified content.

[0253] Each piece of classified information can correspond to a secret level. The level information can represent the secret level.

[0254] Optionally, if the classified content is a keyword in a preset keyword set, then each keyword in the preset keyword set can correspond to a level of secrecy.

[0255] As an example, such as Figure 1M As shown, Figure 1M This is a diagram illustrating a method for setting a preset keyword set. Figure 1M The preset keyword set can include keywords such as "development strategy and its planning", "major reform matters", "major project arrangements and large-scale asset disposals", and "XXXX case". All of these keywords correspond to the "core commercial secret" level. In this case, the secret level information can be "core commercial secret" or an identifier indicating "core commercial secret" (e.g., 1, 2, etc.).

[0256] It is understandable that a preset set of keywords is used to determine whether the content of a document area includes classified information. Therefore, after scanning the target document, if the target document contains keywords from the preset set of keywords, then it can be determined that the content of the document area includes the classified information. Furthermore, the level information of the secret level corresponding to the included keywords can be determined, which can improve the accuracy of determining whether the content of the document area includes classified information.

[0257] Optionally, if the classified content is content that conforms to a regular expression in a preset set of regular expressions, then each regular expression in the preset set of regular expressions can correspond to a secret level.

[0258] As an example, if the preset set of regular expressions includes regular expression A and regular expression B, where regular expression A corresponds to the secret level "secret level 1" and regular expression B corresponds to the secret level "secret level 2", then the level information of the secret level can be "secret level 2", "2", etc.

[0259] It is understandable that a preset set of regular expressions is used to determine whether the document area content includes classified information. Therefore, after scanning the target document, if the target document contains document area content that matches the regular expressions in the preset set of regular expressions, then it can be determined that the document area content includes the classified information. Furthermore, the level information of the secret level corresponding to the included regular expressions can be determined, which can improve the accuracy of determining whether the document area content includes classified information.

[0260] Step 3: Determine the level information as the content information of the document area.

[0261] It is understood that when the document area content includes classified content, the level information of the secret level corresponding to the classified content can be determined as the content information of the document area content. Then, through subsequent steps, the presentation style of the document area content can be determined based on the user information and the level information of the secret level corresponding to the classified content. The document area content can be presented in a way that matches the user information and the secret level corresponding to the classified content. In this way, document area content with different secret levels in the same document can be presented in different presentation styles, which improves the security of document area content display and the richness of document area content presentation styles.

[0262] The second step is to determine the presentation style of the document area content based on the user information and the content information.

[0263] The presentation style of document area content can be either an anonymized style or a non-anonymized style. Furthermore, the presentation style of document area content can include font size, font type, bold, italic, underline, strikethrough, font color, background color, and so on.

[0264] Optionally, the presentation style of the document area content can be determined based on the user information and the content information in the following manner:

[0265] First, determine the presentation style that is pre-associated with the user information and the content information.

[0266] Here, the drafter or classifier of the target document, or other users with permissions to determine the presentation style of the target document, can establish the association between user information, content information, and presentation style. Alternatively, they can establish the association between user information, content information, and presentation style by setting determination rules. For example, the determination rule could be: "If the user information indicates the highest security level of the document area content that the user has viewing permissions for, which is higher than or equal to the content security level indicated by the content information, then the presentation style associated with the user information and the content information can be a 'non-identified style'." Or, the determination rule could also be: "If the user information indicates the highest security level of the document area content that the user has viewing permissions for, which is lower than the content security level indicated by the content information, then the presentation style associated with the user information and the content information can be an 'identified style'." Furthermore, the determination rule could also be: "If the user information represents a user identifier (e.g., account), and the content information represents the security level of the classified content included in the document area content, then the presentation style associated with the user information and the content information can be 'displaying the document area content in a preset color (e.g., red)'."

[0267] When the presentation style of the document area content is "non-anonymized style", the style data corresponding to the document area content is read from the document data of the target document, and the presentation style represented by the style data is used as the presentation style of the document area content.

[0268] When the presentation style of the document area content is set to "de-identified style", the preset, default presentation style will be used as the presentation style of the document area content.

[0269] In one specific embodiment, when the presentation style of the document area content is "de-sensitized style", the security dot style corresponding to the security level of the document area content is not displayed. The presentation style of the document area content can be set to a preset default style to avoid leaking the security level of the document area content through the security dot style.

[0270] The third step is to determine the presentation style as the presentation style of the document area content.

[0271] For example, please refer to Figure 1R , Figure 1R This is a schematic diagram of a presentation style.

[0272] like Figure 1RAs shown, you can choose whether to use personnel security levels (i.e., a type of user information) and whether to enable security dot styles. When security dot styles are enabled, you can configure them, such as setting one or more options for each security level, including security level color, security level background color, security level transparency, and whether to display an underline.

[0273] It is understandable that by establishing a correspondence between user information, content information, and presentation style in advance, the speed of determining the presentation style of document area content can be improved.

[0274] The fourth step is to present the document area content using the aforementioned presentation style.

[0275] If the presentation style is "de-sensitized style," then the document area content can be presented using the de-sensitized style. If the presentation style is "non-de-sensitized style," then the document area content can be presented using the non-de-sensitized style. If the presentation style indicates that "the background color of the document area content is yellow," then yellow can be used as the background color to present the document area content.

[0276] Optionally, the content information represents the content security level. When the target user has viewing permissions for the document area content, the user information represents the highest security level of the document area content that the target user has viewing permissions for. Based on this, the presentation style of the document area content can be determined using the following method, based on the user information and the content information:

[0277] First, based on the user information, determine the highest security level of the document area content that the target user has viewing permission for.

[0278] Subsequently, if the content security level represented by the content information is lower than or equal to the highest security level, the presentation style of the document area content is determined to be a non-sensitized style.

[0279] Then, if the content information represents a higher level of security than the highest level of security, the presentation style of the document area content is determined to be a desensitized style.

[0280] Here, the content information represents the content security level. When the target user has viewing permissions for the document area content, the user information represents the highest security level of the document area content that the target user has viewing permissions for.

[0281] For example, the security level of the document area content (i.e., the content security level described below) can include 1, 2, 3, 4, and 5. In this scenario, if the user information indicates that the highest security level of the document area content that the target user has viewing permission for is "3", then the target user can have viewing permission for document area content with security levels of 1, 2, and 3, and cannot have viewing permission for document area content with security levels of 4 and 5.

[0282] Here, the representation of each security classification and the hierarchy between them can be determined according to actual needs, and the above example does not constitute a limitation.

[0283] When the presentation style is not anonymized, text, images, tables, and other information within the displayed document area can be encrypted, thus displaying the encrypted information. In other words, when the document area is presented using an anonymized style, users cannot directly access the text, images, tables, and other information within the displayed document area.

[0284] As an example, if the document area contains the text "quote price 1000 yuan", then "quote price 1000 yuan" can be displayed to show the document area content in a non-sensitive style. If the document area contains the text "quote price 1000 yuan", then "XXXXX" can be displayed to show the document area content in a desensitized style.

[0285] It's understandable that comparing the highest security level of the document area content that the target user has viewing permissions with the content security level represented by the content information in the document area helps determine whether to display the document area content in a de-identified or un-identified style. Compared to setting passwords or different document permissions for different users, this approach improves the granularity of document management. Compared to determining whether to use a de-identified or un-identified style for each user, this approach improves efficiency. Compared to determining the visible document area content for each user and then generating multiple different documents for different users based on the same document, this approach avoids inconsistencies caused by the inability to synchronize modifications from a single document to other documents.

[0286] Optionally, if the content information represents a higher security level than the highest security level, after presenting the document area content using the presentation style, the following steps may also be performed:

[0287] First, obtain the authorization request from the target user for the content of the target area, wherein the content of the target area is the content of the document area presented in a de-identified style, and the authorization request is used to request permission to view the content of the target area.

[0288] Next, the authorization information corresponding to the authorization request is determined.

[0289] The authorization information indicates whether the target user is authorized to view the content of the target area.

[0290] Then, based on the authorization information, it is determined whether to present the target area content in a non-anonymized style.

[0291] Finally, if it is determined that the target area content should be presented in a non-sensitive style, then the target area content should be presented in a non-sensitive style.

[0292] Optionally, the document data is stored in a preset location. Based on this, the document data of the target document and the user information of the target user can be obtained in the following ways:

[0293] First, retrieve the document data of the target document and the user information of the target user from the preset location.

[0294] The preset location can be a storage space such as a database. Therefore, document data of the target document and user information of the target user can be obtained from the preset location.

[0295] Then, the document data of the target document and the user information of the target user are loaded into memory.

[0296] This approach, which uses memory loading to convert sensitive data and determines the visibility of sensitive content based on the security classification of different personnel, allows for the display of sensitive content according to the personnel's security classification without altering the source file.

[0297] Optionally, the document area content can be presented using the presentation method described above, including:

[0298] First, the portion of the document area content in the document data loaded into memory is modified to the original content with the aforementioned presentation method.

[0299] Then, the original content with the aforementioned presentation method is presented.

[0300] It's understandable that modifying the presentation of the original document in memory will not change the target document in the preset location, nor will it affect the style of the document presented to other users. The presentation style of the same document is independent for each user.

[0301] Optionally, if the document area content includes classified content, the content information includes the secrecy level of the classified content in the document area content.

[0302] Each piece of classified information can correspond to a level of secrecy. For example, the secrecy level of classified information A can be "Secret" or "Top Secret".

[0303] It is understandable that when the document area contains classified information, the document area content can be presented in a way that matches the user information and the level of secrecy.

[0304] Optionally, if the target document is already classified, one of the following methods can be used to determine whether the content information includes the classified content:

[0305] Method 1: Determine whether the content of the document area includes the target keywords.

[0306] The target keyword is any preset keyword from a preset keyword set. If the document area content includes the target keyword, then the content information is determined to include the classified content.

[0307] For example, by scanning the content of the document area, it can be determined whether the document area content includes target keywords, and thus whether the content information includes classified information.

[0308] In one embodiment, the scope of the document area content can be words, word combinations, sentences, paragraphs, sections, or chapters in the document.

[0309] Method 2: Determine whether the content of the document region conforms to the target regular expression.

[0310] The target regular expression is any preset regular expression from a preset set of regular expressions. If the content of the document area matches the target regular expression, it is determined that the content information includes the classified content.

[0311] For example, the document area content can be scanned to determine whether the document area content conforms to a target regular expression, thereby determining whether the content information includes classified information.

[0312] Regular expressions are logical formulas for string manipulation. They use predefined specific characters and combinations of these characters to form a rule string. This rule string is used to express a filtering logic for strings. By defining special syntax to represent character classes, quantifiers, and positional relationships, and then using these special syntaxes along with ordinary characters to represent a pattern, we get a regular expression.

[0313] Method 3: Determine whether the presentation mode of the document area content is the target presentation mode.

[0314] The target presentation method is any preset presentation method from a set of preset presentation methods. When the presentation method of the document area content is the target presentation method, it is determined that the content information includes the classified content.

[0315] It is understandable that the first method described above can determine whether the content information includes classified information based on a preset keyword set. Therefore, after scanning the target document, if the target document contains keywords from the preset keyword set, then it can be determined that the content information includes the classified content. The second method described above can determine whether the content information includes classified information based on a preset regular expression set. Therefore, after scanning the target document, if the target document contains regular expressions from the preset regular expression set, then it can be determined that the content information includes the classified content. The third method described above can determine whether the content information includes classified information based on a preset presentation method set. Therefore, if the presentation method of the document area content is the target presentation method, then it can be determined that the content information includes the classified content. This improves the accuracy of determining whether the content information includes classified content.

[0316] Optionally, each preset keyword in the preset keyword set corresponds to a secrecy level. When the document area content includes the target keyword, the secrecy level included in the content information is determined based on the secrecy level corresponding to the target keyword.

[0317] Each preset regular expression in the preset regular expression set corresponds to a secret level. When the content of the document area conforms to the target regular expression, the secret level included in the content information is determined based on the secret level corresponding to the target regular expression.

[0318] Each preset presentation mode in the set of preset presentation modes corresponds to a security level. When the presentation mode of the document area content is the target presentation mode, the security level included in the content information is determined based on the security level corresponding to the target presentation mode.

[0319] As an example, the secrecy level can be determined based on at least one of the following: whether the document area content includes the target keyword, whether the document area content conforms to the target regular expression, and the presentation method of the document area content. For instance, if the document area content includes the target keyword, does not conform to the target regular expression, and is not presented in the target presentation method, then the secrecy level corresponding to the target keyword can be determined as the secrecy level of the content information. As another example, if the document area content includes the target keyword, conforms to the target regular expression, and is presented in the target presentation method, then the highest of the three secrecy levels—the secrecy level corresponding to the target keyword, the secrecy level corresponding to the target regular expression, and the secrecy level corresponding to the target presentation method—can be determined as the secrecy level of the content information.

[0320] Understandably, the above methods can improve the accuracy of determining the level of secrecy included in the content information.

[0321] The aforementioned optional implementation method can acquire document data of the target document and user information of the target user. The document data includes document area content. Then, the content information of the document area content is determined. Next, based on the user information and the content information, the presentation style of the document area content is determined. Finally, the document area content is presented using the determined presentation style. Therefore, the document area content can be presented in a way that matches the user information and the content information of the document area content. This allows the same document area content to be presented to users with different user information using multiple presentation styles, improving the granularity of document management.

[0322] Optionally, the following method can be used to determine whether the target user has the permission to perform the target operation on the classified content:

[0323] First, determine the target user's primary access rights to the confidential content of the target document.

[0324] The first permission information refers to the target user's permissions to operate on the classified content. For example, the first permission information may include at least one of the following: whether the target user has viewing, editing, copying, cutting, deleting, or changing the security level of each document area (which may include classified content) in the target document.

[0325] The classified information will then be presented.

[0326] Here, the classified content can be presented in the manner indicated by the presentation method information in the document data of the target document. Alternatively, the classified content can be presented in the manner indicated by the presentation method information associated with the target user.

[0327] Then, the target user's target operation on the classified content is detected.

[0328] The target operation can be an operation performed by a target user on the classified content. As an example, the target operation may include at least one of the following: copy operation, edit operation, cut operation, delete operation, etc.

[0329] Finally, based on the first permission information, it is determined whether the target user has the permission to perform the target operation.

[0330] Here, if the first permission information indicates that the target user has editing permission for the confidential content in the target document, and the target operation is an editing operation, then it can be determined that the target user has the operation permission to perform the target operation. If the first permission information does not indicate that the target user has editing permission for the confidential content in the target document, and the target operation is an editing operation, then it can be determined that the target user does not have the operation permission to perform the target operation. Therefore, the operation of the target document by the target user can be controlled.

[0331] It is understandable that by determining the target user's first permission information regarding the classified content of a target document—where the first permission information refers to the target user's operational permissions for the classified content—the classified content is presented. Subsequently, the target user performs a target operation on the classified content. Then, based on the first permission information, it is determined whether the target user has the operational permission to perform the target operation, thereby controlling the target user's operation on the target document. Thus, based on the user's permission information regarding the classified content of the document, it is possible to determine whether the user has the corresponding operational permissions for the aforementioned classified content, improving the granularity of document operation control and enhancing the security of document operations.

[0332] Optionally, the target user's first access permission information for the confidential content of the target document can be determined in the following manner:

[0333] First, determine the target user's secondary permission information for the target document.

[0334] The second permission information can be the permission information of the target user for the target document. As an example, the second permission information can represent at least one of the following: the target user has viewing permission for the target document, the target user does not have viewing permission for the target document, the target user has editing permission for the target document, the target user does not have editing permission for the target document, the target user has deletion permission for the target document, the target user does not have deletion permission for the target document, etc.

[0335] Subsequently, based on the second permission information, the first permission information of the target user for the confidential content of the target document is determined.

[0336] Here, how to determine the target user's first permission information for the confidential content of the target document based on the second permission information can be referred to the following description, and will not be repeated here.

[0337] It is understandable that by using the target user's second permission information on the target document, the target user's first permission information on the classified content of the target document can be determined, thereby improving the speed of determining the permission information for classified content.

[0338] Optionally, the target user's first permission information regarding the confidential content of the target document can be determined based on the second permission information using one of the following methods:

[0339] Method 1: The second permission information is determined as the first permission information of the target user for the confidential content of the target document.

[0340] As an example, if the second permission information indicates "the target user has viewing permission for the target document," then the first permission information can indicate "the target user has viewing permission for the target document." If the second permission information indicates "the target user does not have viewing permission for the target document," then the first permission information can indicate "the target user does not have viewing permission for the target document."

[0341] Please refer to this. Figure 1B , Figure 1B This diagram illustrates a method for setting annotations and permissions. Figure 1B When "Reuse document permissions" is selected, the second permission information (i.e., the document permissions shown in the figure) can be determined as the target user's first permission information (i.e., the confidentiality permissions in the document) for the confidential content of the target document.

[0342] Method 2: Determine the permission priority corresponding to the first permission information of the target user for the confidential content of the target document, which is lower than the permission priority corresponding to the second permission information.

[0343] As an example, if the second permission information indicates "the target user has no editing permissions for the target document," then the first permission information could indicate "the target user does not have any permissions for classified content." The effect is that no permissions for classified content can be set for the target user.

[0344] As another example, if the second permission information indicates that "the target user has editing permission for the target document", then the first permission information can indicate that "the target user has editing permission for classified content", or it can indicate that "the target user does not have any permission for classified content".

[0345] Method 3: Determine the permission priority corresponding to the first permission information of the target user for the confidential content of the target document, which is higher than the permission priority corresponding to the second permission information.

[0346] As an example, if the second permission information indicates "the target user has editing permission for the target document", then the first permission information could indicate "the target user does not have any permission for classified content", or the first permission information could also indicate "the target user has editing permission for the target document".

[0347] As another example, if the second permission information indicates "the target user does not have editing permission for the target document", then the first permission information could indicate "the target user has editing permission for classified content", or it could indicate "the target user does not have any permission for classified content".

[0348] Furthermore, for methods two and three mentioned above, classified content can be categorized to achieve more refined document operations. For example, classified content can be divided into two (or more) categories. If the classified content includes core keywords (one type of keyword from the aforementioned preset keyword set) or conforms to a core regular expression (one type of regular expression from the aforementioned preset regular expression set), then the classified content can be identified as category A classified content. If the classified content includes ordinary keywords (another type of keyword from the aforementioned preset keyword set) or conforms to an ordinary regular expression (another type of regular expression from the aforementioned preset regular expression set), then the classified content can be identified as category B classified content. The permission priority corresponding to the permission information of category A classified content can be set to be higher or lower than the permission priority corresponding to the permission information of category B classified content.

[0349] The number of categories of classified content can be equal to the number of categories of keywords in the preset keyword set, and each category of classified content corresponds one-to-one with each category of keywords in the preset keyword set. Alternatively, the number of categories of classified content can be equal to the number of categories of regular expressions in the preset regular expression set, and each category of classified content corresponds one-to-one with each category of regular expressions in the preset regular expression set.

[0350] It is understandable that directly setting the second permission information as the first permission information can further improve the speed of determining the permission information for classified content. Methods two and three in the above application scenarios determine the permission priority of the first permission information by using the permission priority of the second permission information, thus narrowing the configurable range of the first permission information and improving the controllability of operations involving classified content.

[0351] Optionally, the first permission information is set for the target user and the classified content, and the first permission information and the second permission information are set independently. The second permission information is the target user's permission information for non-classified content in the target document. Non-classified content can be other content in the target document besides the classified content.

[0352] For example, please refer to Figure 1B It illustrates a diagram of a labeling and permission setting method. Figure 1B In the middle, when "Use key mark permission" is selected, the first permission information (i.e., key mark permission in the figure) and the second permission information (i.e. document permission in the figure) are set independently.

[0353] Furthermore, when the first permission information and the second permission information are set independently, it can be done through methods such as... Figure 1C The method shown sets the first level of access information for users and classified content.

[0354] It is understood that in the above optional implementation methods, the first permission information and the second permission information can be set independently, thus improving the flexibility of operation control over classified and non-classified content. The first permission information is set for the target user and the classified content, and the first permission information and the second permission information are set independently. The second permission information is the target user's permission information for the non-classified content in the target document.

[0355] Optionally, the first access information of the target user to the confidential content of the target document can be determined in the following manner:

[0356] If the target user's permission information for the confidential content of the target document is not pre-set, the first permission information for the target user's access to the confidential content of the target document is defined as: the target user does not have permission to operate on the confidential content.

[0357] It is understandable that if the target user's permission information for the classified content of the target document is not pre-set, it can be assumed that the target user does not have the permission to operate on the classified content, thus improving the security of the classified content.

[0358] Alternatively, the following methods can be used to determine the target user's first access permission information for the confidential content of the target document:

[0359] In the absence of pre-set permission information for the target user regarding the confidential content of the target document, the first permission information for the target user regarding the confidential content of the target document is defined as follows: the target user only has the permission to copy and paste the confidential content, and does not have any other permissions besides the permission to copy and paste.

[0360] Optionally, the first access information of the target user to the confidential content of the target document can be determined in the following manner:

[0361] First, determine how the classified content of the target document will be presented.

[0362] Subsequently, when the presentation method is anonymized, the first permission information of the target user for the confidential content of the target document is determined as follows: the target user has the permission to copy and paste the confidential content, and the target user does not have the permission to edit the confidential content.

[0363] Copy and paste permissions can include both copy permissions and paste permissions.

[0364] It is understandable that when classified content is presented in an anonymized manner, the target user has the permission to copy and paste the classified content, but does not have the permission to edit the classified content. This provides the target user with more operational permissions for the classified content and avoids the document security risks that would arise from the target user editing the classified content.

[0365] Alternatively, the classified information can be presented in the following manner:

[0366] If the target user has viewing rights to the classified content, the classified content is presented in an anonymized manner.

[0367] If the target user does not have the required viewing permissions, the confidential content will be presented in a non-anonymized manner.

[0368] As an example, if the classified content includes the text "quote price 1000 yuan", then "quote price 1000 yuan" can be displayed to show the classified content in a non-sensitized manner. If the content of the displayed document area includes the text "quote price 1000 yuan", then "XXXXX" can be displayed to show the classified content in a desensitized manner.

[0369] It is understandable that by using de-identification or non-de-identification methods to prohibit or allow target users to view classified content, the security of classified content is improved.

[0370] Alternatively, the classified information may be presented in the following manner:

[0371] If the target user has viewing permission for the classified content, the classified content can be presented in the following manner: If the target user has viewing permission for the classified content, the target labeling information of the classified content is presented.

[0372] Here, the target annotation information is determined in the following way:

[0373] First, identify multiple (at least two) annotation information corresponding to the classified content.

[0374] Here, for a section or sentence of document content, by scanning, there may be cases where the document content hits multiple keywords in the aforementioned preset keyword set, or multiple regular expressions in the aforementioned preset regular expression set. In this case, at least one of the secret content, security level, and confidentiality period corresponding to each hit keyword and each regular expression can be determined as multiple annotation information corresponding to the classified content.

[0375] Then, multiple annotation information items are presented.

[0376] Then, the selection operation for a single annotation among the multiple annotation information is detected.

[0377] Finally, the single annotation information selected by the selection operation is determined as the target annotation information of the classified content.

[0378] Here, when using intelligent annotation, the target annotation information can be determined in the manner described above. For an example, please refer to... Figure 1B , Figure 1B Showing the target Figure 1A This is a diagram illustrating the annotation and permission settings in one implementation method. Figure 1BIn the context of "Smart Annotation," the target annotation information can be determined as described above. Additionally, for "Manual Annotation," the following steps can be taken: Figure 1F As shown, the method prompts users to manually annotate by sending a message to the drafter.

[0379] Subsequently, after determining multiple annotation information corresponding to the classified content, the following can be adopted: Figure 1F As shown, multiple annotation information is presented in a way that allows for dense point recommendations. Users can then click on the annotation information they want to select to add annotations.

[0380] It is understandable that the above method can push multiple annotation information to users so that they can select target annotation information from them, thereby improving the speed and flexibility of determining target annotation information.

[0381] Optionally, the target operation includes an adjustment operation. The adjustment operation is used to adjust the secrecy level of the classified content. The target user has the permission to perform the target operation.

[0382] Based on this, when the target operation is an adjustment operation, before determining whether the target user has the operation permission to perform the target operation based on the first permission information, so as to control the target user's operation on the target document, the following steps may also be performed:

[0383] First, determine whether collaborating users have viewing permissions for classified content prior to the change in confidentiality level.

[0384] Specifically, it can be determined whether a collaborating user has viewing permissions for classified content before the security level adjustment by examining the terminal or server used by the collaborating user.

[0385] Subsequently, if the collaborating user has viewing access before the security level adjustment, the terminal used by the collaborating user can present the classified content before the security level adjustment in a non-anonymized format; if the collaborating user does not have viewing access before the security level adjustment, the terminal used by the collaborating user can present the classified content before the security level adjustment in an anonymized format.

[0386] Furthermore, after determining whether the target user has the permission to perform the target operation based on the first permission information, so as to control the target user's operation on the target document, the following steps may also be performed:

[0387] First, determine whether collaborating users have viewing permissions for the classified content after the secret level adjustment.

[0388] Specifically, it can be determined whether a collaborating user has viewing permissions for classified content after the security level has been adjusted, through the terminal or server used by the collaborating user.

[0389] Subsequently, if the collaborating user has the right to view the classified content after the security level adjustment, the terminal used by the collaborating user can present the classified content after the security level adjustment in a non-identifiable format; if the collaborating user does not have the right to view the classified content after the security level adjustment, the terminal used by the collaborating user can present the classified content after the security level adjustment in an anonymized format.

[0390] It is understandable that, before and after a user adjusts the confidentiality level of classified content, the classified content can be presented to the user's collaborating users in a timely manner, either in an anonymized or unanonymized format.

[0391] Alternatively, the target labeling information for the classified content can be determined in the following manner:

[0392] First, identify multiple (at least two) annotation information corresponding to the classified content.

[0393] Here, for a section or sentence of document content, by scanning, there may be cases where the document content hits multiple keywords in the aforementioned preset keyword set, or multiple regular expressions in the aforementioned preset regular expression set. In this case, at least one of the secret content, security level, and confidentiality period corresponding to each hit keyword and each regular expression can be determined as multiple annotation information corresponding to the classified content.

[0394] Then, multiple annotation information items are presented.

[0395] Then, the selection operation for a single annotation among the multiple annotation information is detected.

[0396] Finally, the single annotation information selected by the selection operation is determined as the target annotation information of the classified content.

[0397] Here, when using intelligent annotation, the target annotation information can be determined in the manner described above. For an example, please refer to... Figure 1B , Figure 1B This diagram illustrates a method for setting annotations and permissions. Figure 1B In the context of "Smart Annotation," the target annotation information can be determined as described above. Additionally, for "Manual Annotation," the following steps can be taken: Figure 1F As shown, the method prompts users to manually annotate by sending a message to the drafter.

[0398] Subsequently, after determining multiple annotation information corresponding to the classified content, the following can be adopted: Figure 1F As shown, multiple annotation information is presented in a way that allows for dense point recommendations. Users can then click on the annotation information they want to select to add annotations.

[0399] It is understandable that pushing multiple annotation information to users so that they can select target annotation information improves the speed and flexibility of determining target annotation information.

[0400] Optionally, the classified content is presented in an anonymized manner, and the first permission information indicates that the target user has copy and paste permissions for the classified content, and the target operation includes a copy and paste operation. Based on this,

[0401] After determining whether the target user has the permission to perform the target operation based on the first permission information, the method further includes performing the following steps:

[0402] First, if the target operation is the copy and paste operation, paste the classified content according to the de-identification method.

[0403] Here, the target user can paste the classified content into the target document, or they can paste the classified content into another document other than the target document.

[0404] Afterwards, save the document obtained by pasting the classified information.

[0405] Here, if the classified content is pasted into the target document, the resulting target document can be saved. If the classified content is pasted into another document other than the target document, the resulting other document can be saved.

[0406] It is understandable that when the target user does not have permission to view classified content, the aforementioned classified content can be displayed to the target user in an anonymized manner. During this process, even if the target user copies and pastes the classified content, they will only ever see the anonymized version, thus improving the security of the document content display.

[0407] Optionally, after saving the document obtained after pasting the classified content, the method further includes performing the following steps:

[0408] First, the system detects authorized users' requests to view the target document after the confidential content has been pasted.

[0409] The authorized user has viewing rights for the classified content.

[0410] Subsequently, upon detecting the viewing request, the confidential content is presented in a non-anonymized manner.

[0411] As an example, regarding the classified content "quote price 1000 yuan" in a target document, if the target user does not have viewing permissions for this classified content, "XXXXX" can be displayed to the target user during the period from when the target user opens the target document to when they close it, thus displaying the classified content to the target user in a de-identified manner. During this time, even if the target user copies and pastes the classified content, the target user will always see "XXXXX". After the target user copies and pastes the classified content, "quote price 1000 yuan" can be displayed to authorized users, thus displaying the classified content to the target user in a non-de-identified manner.

[0412] It is understandable that for the same classified content, the actions of users who do not have viewing permissions will not affect the normal viewing by users who do have viewing permissions, thus improving the accuracy of determining whether classified content is displayed.

[0413] In some optional implementations of this embodiment, the presentation method of the document area content can be determined based on the user information and the content information in the following manner:

[0414] First, determine the presentation method that is pre-associated with the user information and the content information.

[0415] Here, the drafter or classifier of the target document, or other users with permissions to determine the presentation method of the target document, can establish the association between user information, content information, and presentation method. Alternatively, the association between user information, content information, and presentation method can be established by setting determination rules. For example, the determination rule could be: "If the user information indicates the highest security level of the document area content that the user has viewing permissions for is higher than or equal to the content security level indicated by the content information, then the presentation method associated with the user information and the content information can be 'non-identified'." Or, the determination rule could also be: "If the user information indicates the highest security level of the document area content that the user has viewing permissions for is lower than the content security level indicated by the content information, then the presentation method associated with the user information and the content information can be 'identified'." Furthermore, the determination rule could also be: "If the user information represents a user identifier (e.g., account), and the content information represents the security level of the classified content included in the document area content, then the presentation method associated with the user information and the content information can be 'displaying the document area content in a preset color (e.g., red)'."

[0416] Then, the presentation method is determined as the presentation method of the document area content.

[0417] For example, please refer to Figure 1I , Figure 1I This is a schematic diagram of a presentation style.

[0418] like Figure 1I As shown, you can choose whether to use personnel security levels (i.e., a type of user information) and whether to enable security dot styles. When security dot styles are enabled, you can configure them, such as setting one or more options for each security level, including security level color, security level background color, security level transparency, and whether to display an underline.

[0419] It is understandable that, among the above optional implementation methods, the speed of determining the presentation method of document area content can be improved by pre-establishing the correspondence between user information, content information and presentation method.

[0420] In some optional implementations of this embodiment, the following methods can be used to determine the target user's first permission information for the confidential content of the target document:

[0421] First, determine the target user's secondary permission information for the target document.

[0422] The second permission information can be the permission information of the target user for the target document. As an example, the second permission information can represent at least one of the following: the target user has viewing permission for the target document, the target user does not have viewing permission for the target document, the target user has editing permission for the target document, the target user does not have editing permission for the target document, the target user has deletion permission for the target document, the target user does not have deletion permission for the target document, etc.

[0423] Subsequently, based on the second permission information, the first permission information of the target user for the confidential content of the target document is determined.

[0424] Here, how to determine the target user's first permission information for the confidential content of the target document based on the second permission information can be referred to the following description, and will not be repeated here.

[0425] It is understandable that, among the above optional implementation methods, the target user's first permission information for the classified content of the target document can be determined based on the target user's second permission information for the target document, thereby improving the speed of determining the permission information for classified content.

[0426] In some application scenarios of the above-mentioned optional implementation methods, one of the following methods can be used to determine the target user's first permission information for the confidential content of the target document based on the second permission information:

[0427] Method 1: The second permission information is determined as the first permission information of the target user for the confidential content of the target document.

[0428] As an example, if the second permission information indicates "the target user has viewing permission for the target document," then the first permission information can indicate "the target user has viewing permission for the target document." If the second permission information indicates "the target user does not have viewing permission for the target document," then the first permission information can indicate "the target user does not have viewing permission for the target document."

[0429] Please refer to this. Figure 1K , Figure 1K This diagram illustrates a method for setting annotations and permissions. Figure 1K When "Reuse document permissions" is selected, the second permission information (i.e., the document permissions shown in the figure) can be determined as the target user's first permission information (i.e., the confidentiality permissions in the document) for the confidential content of the target document.

[0430] Method 2: Determine the permission priority corresponding to the first permission information of the target user for the confidential content of the target document, which is lower than the permission priority corresponding to the second permission information.

[0431] As an example, if the second permission information indicates "the target user has no editing permissions for the target document," then the first permission information could indicate "the target user does not have any permissions for classified content." The effect is that no permissions for classified content can be set for the target user.

[0432] As another example, if the second permission information indicates that "the target user has editing permission for the target document", then the first permission information can indicate that "the target user has editing permission for classified content", or it can indicate that "the target user does not have any permission for classified content".

[0433] Method 3: Determine the permission priority corresponding to the first permission information of the target user for the confidential content of the target document, which is higher than the permission priority corresponding to the second permission information.

[0434] As an example, if the second permission information indicates "the target user has editing permission for the target document", then the first permission information could indicate "the target user does not have any permission for classified content", or the first permission information could also indicate "the target user has editing permission for the target document".

[0435] As another example, if the second permission information indicates "the target user does not have editing permission for the target document", then the first permission information could indicate "the target user has editing permission for classified content", or it could indicate "the target user does not have any permission for classified content".

[0436] Furthermore, for methods two and three mentioned above, classified content can be categorized to achieve more refined document operations. For example, classified content can be divided into two (or more) categories. If the classified content includes core keywords (one type of keyword from the aforementioned preset keyword set) or conforms to a core regular expression (one type of regular expression from the aforementioned preset regular expression set), then the classified content can be identified as category A classified content. If the classified content includes ordinary keywords (another type of keyword from the aforementioned preset keyword set) or conforms to an ordinary regular expression (another type of regular expression from the aforementioned preset regular expression set), then the classified content can be identified as category B classified content. The permission priority corresponding to the permission information of category A classified content can be set to be higher or lower than the permission priority corresponding to the permission information of category B classified content.

[0437] The number of categories of classified content can be equal to the number of categories of keywords in the preset keyword set, and each category of classified content corresponds one-to-one with each category of keywords in the preset keyword set. Alternatively, the number of categories of classified content can be equal to the number of categories of regular expressions in the preset regular expression set, and each category of classified content corresponds one-to-one with each category of regular expressions in the preset regular expression set.

[0438] Understandably, in the above application scenario, Method 1, by directly designating the second permission information as the first permission information, can further improve the speed of determining the permission information for classified content. Methods 2 and 3 in the above application scenario, by determining the permission priority of the first permission information based on the permission priority of the second permission information, narrow the configurable range of the first permission information and improve the controllability of operations involving classified content.

[0439] In some optional implementations of this embodiment, the first permission information is set for the target user and the classified content, and the first permission information and the second permission information are set independently. The second permission information is the target user's permission information for non-classified content in the target document. Non-classified content can be other content in the target document besides the classified content.

[0440] For example, please refer to Figure 1K , Figure 1KThis diagram illustrates a method for setting annotations and permissions. Figure 1K In the middle, when "Use key mark permission" is selected, the first permission information (i.e., key mark permission in the figure) and the second permission information (i.e. document permission in the figure) are set independently.

[0441] Furthermore, when the first permission information and the second permission information are set independently, it can be done through methods such as... Figure 1L The method shown sets the first level of access information for users and classified content.

[0442] It is understandable that, among the above optional implementation methods, the first permission information and the second permission information can be set independently, which improves the flexibility of operation control over classified and unclassified content.

[0443] In some optional implementations of this embodiment, the following methods can also be used to determine the target user's first permission information for the confidential content of the target document:

[0444] If the target user's permission information for the confidential content of the target document is not pre-set, the first permission information for the target user's access to the confidential content of the target document is defined as: the target user does not have permission to operate on the confidential content.

[0445] It is understood that in the above optional implementation methods, if the target user's permission information for the confidential content of the target document is not pre-set, it can be assumed by default that the target user does not have the permission to operate on the confidential content, thus improving the security of the confidential content.

[0446] In some optional implementations of this embodiment, the following methods can also be used to determine the target user's first permission information for the confidential content of the target document:

[0447] In the absence of pre-set permission information for the target user regarding the confidential content of the target document, the first permission information for the target user regarding the confidential content of the target document is defined as follows: the target user only has the permission to copy and paste the confidential content, and does not have any other permissions besides the permission to copy and paste.

[0448] Figure 3This is a flowchart illustrating another document presentation method provided in an embodiment of this application. This method can be applied to one or more electronic devices such as smartphones, laptops, desktop computers, portable computers, and servers. Furthermore, the executing entity of this method can be hardware or software. When the executing entity is hardware, it can be one or more of the aforementioned electronic devices. For example, a single electronic device can execute this method, or multiple electronic devices can cooperate with each other to execute this method. When the executing entity is software, this method can be implemented as multiple software programs or software modules, or as a single software program or software module. No specific limitations are made here.

[0449] Specifically, such as Figure 3 As shown, the method specifically includes:

[0450] Step 301: Obtain the content of the first region of the target document.

[0451] In this embodiment, step 301 and Figure 1A Step 101 in the corresponding embodiment is basically the same, and will not be repeated here.

[0452] Step 302: Replace the first area content with the second area content that occupies the same area as the first area content, wherein the third area content in the target document maintains consistent layout before and after the replacement, and the third area content is the part of the target document excluding the first area content.

[0453] In this embodiment, the occupied area can be measured using area or pixels.

[0454] In addition, the above step 302 and Figure 1A Step 102 in the corresponding embodiment is basically the same, and will not be repeated here.

[0455] Step 303: Present the target document.

[0456] In this embodiment, step 303 and Figure 1A Step 103 in the corresponding embodiment is basically the same, and will not be repeated here.

[0457] The embodiments of this application are described below by way of example. However, it should be noted that the embodiments of this application may have the features described below, but the following description does not constitute a limitation on the protection scope of the embodiments of this application.

[0458] In this method, when the document (i.e., the target document mentioned above) is opened, the character width (i.e., the size of the first character) and line spacing (i.e., the line spacing of the first character) attributes of the confidential text (i.e., the characters in the first area content mentioned above) are calculated. Combined with the configuration strategy in the background (i.e., the first configuration or the second configuration mentioned above, such as the number of the first character and the number of the second character being equal or unequal), the font scaling (e.g., the quotient of the size of the second character and the size of the first character), character spacing (i.e., the spacing of the second character), character width (i.e., the size of the second character), and line spacing (i.e., the spacing of the second line) are calculated and the corresponding values ​​are fixed. This ensures that whether the state of the confidential text (i.e., the content in the first area) is displayed or the state of the ciphertext (i.e., the content in the second area) is restored, the layout of Chinese / English / special characters remains unchanged (e.g., the content before and after replacement has no impact on the layout of other parts of the target document).

[0459] In addition, such as Figure 1B As shown, the number of dense points displayed can be set through the configuration strategy in the backend.

[0460] For example, the number of hidden dots and the number of characters can be the same. That is, the number of the first character can be used as the number of the second character. When the document is set to have the same number of hidden dots and the same number of characters, the number of hidden characters and the number of hidden dots displayed will be the same when the client opens the document.

[0461] Alternatively, the number of dots and the number of characters can be different. That is, the number of the first character is not equal to the number of the second character.

[0462] When the number of hidden characters and the number of hidden characters in a document do not match, the number of characters hidden and the number of hidden characters displayed will be disproportionate when the client opens the document. This method is used to prevent shorter pieces of classified content from being easily guessed.

[0463] Here, when rendering documents through the client, the following two scenarios can also exist for the two configuration strategies mentioned above:

[0464] In scenario one, if the number of dots (i.e., the number of the second character mentioned above) and the number of characters (i.e., the number of the first character mentioned above) are the same, the size of the second character in the second region (e.g., the length and width of *) can be the size of the first character in the first region (e.g., the length and width of Chinese or English characters). When the document is opened, the first character spacing and the first line spacing of the first region are calculated. Based on the strategy selected in the backend regarding the number of characters and key points (in this case, the number of key points and characters are the same), the data corresponding to the key points (i.e., the second character size, second character spacing, and second line spacing) is calculated through font scaling (e.g., the quotient of the second character size and the first character size), character spacing (i.e., the first character spacing), and line spacing (i.e., the first line spacing). This ensures that the character spacing (i.e., the first character spacing) and line spacing (i.e., the first line spacing) of a confidential text correspond to the field spacing (i.e., the second character spacing) and line spacing (i.e., the second line spacing) of a key point (e.g., the second character spacing equals the first character spacing, the second character size equals the first character size, and the second line spacing equals the first line spacing). This achieves a consistent layout, as shown in the image. Figure 1C and Figure 1D As shown. The line spacing is a fixed value, and this fixed value will remain unchanged when converted to *. Furthermore, changes in font and font size will not affect the original layout. See the example image below. Figure 1E and Figure 1F As shown.

[0465] Scenario 2: When the number of key points and the number of characters are inconsistent, upon opening the document (i.e., the target document mentioned above), the character spacing (i.e., the first character spacing) and line spacing (i.e., the first line spacing) of the targeted classified text (i.e., the text in the first area mentioned above) are calculated. Based on the strategy of inconsistent character and key point counts selected in the backend, the data corresponding to the key points (i.e., the second character size, second character spacing, and second line spacing) are calculated through a combination of font scaling (i.e., the quotient of the second character size and the first character size), character spacing (i.e., the first character spacing), character width (i.e., the first character size), and line spacing (i.e., the first line spacing). This ensures that the character spacing and line spacing of a section of classified text correspond to the overall data of field spacing and line spacing of a section of key points, achieving a consistent layout. See the screenshot below. Figure 1G and Figure 1H As shown. When the font and font size change, * will be automatically added to fill the gaps based on the original character spacing (i.e., the first character spacing mentioned above) and line spacing (i.e., the first line spacing mentioned above). If the filling does not achieve the desired effect, the font scaling, character spacing, character width, and line spacing will be recalculated to maintain the original character spacing. The effect is shown in the image. Figure 1Iand Figure 1J As shown.

[0466] This method calculates the character width (i.e., the first character size mentioned above) attribute of classified text when the document is opened, and fixes the line spacing attribute (i.e., the first line spacing is determined as the second line spacing). This ensures that after the classified document is converted into a classified document (i.e., the content of the first area is replaced by the content of the second area mentioned above), it is not affected by the font, font size, or line spacing, and the document layout remains consistent.

[0467] Furthermore, this method can scan document regions using either keywords (i.e., keywords from the aforementioned preset keyword set) or formal expressions (i.e., regular expressions from the aforementioned preset regular expression set). For example, Figure 1M As shown, Figure 1M This is a diagram illustrating a method for setting a preset keyword set. Figure 1M The preset keyword set can include keywords such as "development strategy and its planning", "major reform matters", "major project arrangements and large-scale asset disposals", and "XXXX case". All of these keywords correspond to the "core commercial secret" level. In this case, the secret level information can be "core commercial secret" or an identifier indicating "core commercial secret" (e.g., 1, 2, etc.).

[0468] Upon successful scanning, the system automatically or manually marks the detected classified content and displays its corresponding classification level before the content. When multiple keywords or regular expressions are detected, the system displays the classification level, basis for classification, and confidentiality period (i.e., the aforementioned multiple marking information) corresponding to the detected keywords or regular expressions in the taskbar. Users can manually determine which classification level, basis for classification, and confidentiality period (i.e., the aforementioned target marking information) should be marked before the classified content. The permissions for classified content (i.e., the aforementioned first permission information) can reuse document permissions (i.e., the aforementioned second permission information). In addition, permissions for classified content can be set separately through regional permission protection technology, thereby achieving the effect that modifying document permissions does not affect the permission to modify classified information (i.e., the aforementioned first permission information).

[0469] In addition, this method can have annotation and permission setting functions.

[0470] The annotation function allows users to choose between manual or intelligent annotation via configuration options. As shown in Figure 1B, when "manual annotation" is selected, the drafter is notified via message after identifying classified information, and then manually adds the classification level before the content. When "intelligent annotation" is selected, the classification level is automatically added before the annotation function after identifying classified content. If multiple annotation options are unresolved, a classification point recommendation function can be enabled, providing suggestions upon opening the document.

[0471] For the permission settings, you can configure whether the permissions for classified content (i.e., the first permission information mentioned above) are set separately or are consistent with the document permissions (i.e., the second permission information mentioned above). Selecting "Use Classified Content Permissions" separates document permissions from classified content permissions. Selecting "Reuse Document Permissions" makes document permissions and classified content permissions consistent.

[0472] In addition, such as Figure 1N As shown, the user's front-end interface allows for settings such as message notifications and annotation information for target targets.

[0473] The aforementioned message notification function, when "manual annotation" is selected, can notify the drafter via message after identifying classified content. The drafter can then click the "Document Classification" button to open the document. Furthermore, through the target annotation information function, when "intelligent annotation" is selected, if keywords or regular expressions are matched during the document scanning process, automatic annotation can be performed, thus automatically converting the document into a commercially classified document.

[0474] With "Manual Annotation" selected in the management backend configuration, the scanned classified content will be marked, and the classification level, security period, and corresponding secret points will be displayed on the right taskbar. Clicking on "Secret Point ①" will locate the classified content in the document, and target annotation information can be manually added before the secret point in the document.

[0475] When "Smart Labeling" is selected in the management backend configuration, the scanned classified content can be automatically labeled with information such as classification level, basis for classification, and confidentiality period (i.e., the aforementioned target labeling information).

[0476] In addition, such as Figure 10As shown, in cases where multiple keywords or regular expressions are matched, for example, if the text states "Materials related to the annual basic financial situation and annual financial settlement need to be uploaded and archived to the financial system," then "annual basic financial situation" is a secret point (i.e., a matched keyword or regular expression), corresponding to core commercial secrets, and "annual financial settlement" is another secret point, corresponding to ordinary commercial secrets. If the combined secret points involve associations with different security levels or classification criteria, multiple annotation information will appear in the right-hand taskbar for recommendation. The drafter can click on the annotation information to select and annotate it.

[0477] When the "Use classified content permissions (i.e., the first permission information) independent of document permissions (i.e., the second permission information mentioned above)" option is selected in the management backend configuration, permissions for classified content can be set separately through regional permission protection technology. This permission only applies to situations where classified content is visible (i.e., has viewing permissions, and is displayed in a non-identifiable style). Operations on the visible classified content are performed according to the given permissions. When classified content cannot be viewed, key points can be copied, and the copied content is still displayed in an anonymized style. The authorized object of the classified content (i.e., the authorized user mentioned above) reads the document's authorized object (i.e., displays the classified content to the authorized object in a non-identifiable style). As an example, one could use... Figure 1L The method shown allows for individual permission settings for classified content.

[0478] Here, when document permissions and classified content permissions are independent, the secret point name can be the name of the document permission, but the setting of classified content permissions is unrelated to document permissions.

[0479] In addition, the following strategies can be used to compare the security levels:

[0480] If the content is set to editable, and the security levels are ordered as 1, 2, and 3, with security level 3 being the highest, then user A, having permission to modify content at security level 3, can modify content at security levels 1, 2, and 3. Similarly, user B, having permission to modify content at security level 2, can modify content at security levels 1 and 2.

[0481] For content set to non-editable, if the security levels are ordered as 1, 2, 3, 4, 5 in that order, with security level 5 being the highest, then if user A cannot modify content with security level 2, then user A cannot modify content with security levels 2, 3, 4, or 5. Similarly, if user B cannot modify content with security level 3, then user B cannot modify content with security levels 3, 4, or 5.

[0482] In the management backend configuration options, you can choose one of the following three methods to set permissions for classified content:

[0483] The first approach is to prioritize key point permissions over document permissions.

[0484] For example, if user A has edit permissions for document A, they have no edit permissions for core keypoints but have edit permissions for regular keypoints. This example means that user A can modify text outside of the set keypoints and regular keypoints, but cannot modify the content of core keypoints. If user B has no edit permissions for document A (read-only), user B has no edit permissions for core keypoints and no edit permissions for regular keypoints. This example means that user B can modify regular keypoints and text outside of the set keypoints.

[0485] This scheme is equivalent to setting the text outside the security point to the lowest security level.

[0486] The second approach is to prioritize document permissions over permissions for classified content.

[0487] For example, if user a has no editing permissions for document A, then user a has no editing permissions for either core keypoints or regular keypoints. In this example, it means that user a cannot be granted any keypoint permissions. If user b has editing permissions for document A, then user b has no editing permissions for core keypoints but has editing permissions for regular keypoints. In this example, user b can modify text outside of the set keypoints and regular keypoints, but cannot modify the content of core keypoints.

[0488] The third solution is to separate key point permissions from document permissions:

[0489] For example, if user A has edit permissions for document A, but not core keypoints, but has edit permissions for regular keypoints, this means user A can modify text outside of the set keypoints and regular keypoints, but cannot modify the content of core keypoints. Similarly, if user B has no edit permissions (read-only) for document A, but not core keypoints, but has edit permissions for regular keypoints, this means user B can modify regular keypoints, but cannot modify the content of core keypoints or text outside of the set keypoints.

[0490] Additionally, when a new authorized user is added to a document, if no secret mark permissions are set, the new user can perform authorized operations on the document. Secret mark operation permissions are none by default. The secret mark display content is determined by the role configured in the backend to determine whether the classified content is displayed in secret mark form (i.e., the above-mentioned de-identification style). The new user cannot view any classified content and needs to be authorized before they can view or modify it.

[0491] Therefore, when a document contains multiple keywords or regular expressions, this method can recommend alternative solutions (i.e., recommend multiple annotation options), allowing users to manually select and confirm the target annotation information. Furthermore, it controls access to confidential content through document area permissions, thus not affecting the original document permissions.

[0492] Furthermore, this method can load data into memory, thus not altering the source data (i.e., the source data of the target document mentioned above). When the encrypted commercial confidential document (i.e., the target document mentioned above) is opened, the document content is scanned and matched against the sensitive word policy in the management backend. The sensitive word policy can be set with keywords or regular expressions. When the scan hits a confidential sensitive word in the configured keywords (i.e., keywords in the preset keyword set mentioned above) or regular expression (i.e., regular expressions in the preset regular expression set mentioned above), this hit information (i.e., the content of the document area mentioned above) can be marked as a confidential point (i.e., the confidential content mentioned above). For confidential points, visibility needs to be determined. If the determination result is visible, it is presented in a non-sensitive style; if the determination result is not visible, it is presented in a sensitive style. The sensitive word policy will match confidential point content with confidentiality levels in a one-to-one correspondence. This matching relationship can be determined by the correspondence between keywords and confidentiality levels, or by the correspondence between regular expressions and confidentiality levels.

[0493] Different security levels can be configured with corresponding display styles (i.e., the presentation styles mentioned above) through the management backend. When a document is opened, the security level style is read and matched with the security level of the currently logged-in role. During document search and quick browsing, the location and security level of security points can be quickly determined based on the custom security level styles configured in the backend. Different security levels can have different styles, and the display of security points can be quickly determined based on the style. By modifying the document data in memory (such as the presentation style of document area content), the effect of displaying different content styles for personnel with different permissions (corresponding to the highest security level mentioned above) can be achieved. Ultimately, there is only one document, and the original document remains unchanged.

[0494] The aforementioned management backend allows for the setting of personnel security levels (such as...). Figure 1P and Figure 1Q As shown), and to configure policies (such as...). Figure 1R (As shown).

[0495] Here, different personnel can be assigned different security levels. After setting, users with access permissions can only view the corresponding security level and lower-level classified content when opening confidential documents. Content above the security level cannot be viewed and is displayed with an anonymized effect. Furthermore, during policy configuration, the "Settings" button can be used to determine whether to use the personnel security level function. Once enabled, personnel security levels are set according to... Figure 1N The configuration data will take effect. When customizing the style of security classifications and key points displayed in document content, you can click the "Add" button to add them. Different styles can be used for different security classifications.

[0496] In the front-end interface, if a document (i.e., the target document mentioned above) is opened, the permissions of the currently logged-in account need to be checked. For commercially classified documents, if the user does not have document opening permissions, the document cannot be opened. If the user has document opening permissions but does not have document security level permissions, the classified information is displayed in an anonymized style. If the user has document opening permissions and document security level permissions, it needs to be matched with the security level information of the currently logged-in account. If the personnel security level of the currently logged-in account (i.e., the highest security level mentioned above) is the same as or lower than the classified information level (i.e., the secret level corresponding to the classified content mentioned above), the classified information (i.e., the content of the document area mentioned above) is displayed in a non-anonymized style. If the document security level is higher than the personnel security level, the content cannot be viewed and is displayed with an anonymized effect.

[0497] Furthermore, users without document security clearance can submit an approval request to the drafter or security authority to grant access to classified information. Once approved, the user can reopen the document to view the classified information. The approval process can involve granting access to some or all classified information. For users with partial security clearance, they can submit an approval request to the drafter or security authority to grant access to highly classified information. Once approved, the user can reopen the document to view the highly classified information.

[0498] Therefore, this method converts confidential data through memory loading and determines the visibility of confidential content based on the confidentiality level attributes corresponding to different personnel. Furthermore, it can display confidential content based on personnel confidentiality levels without modifying the source file.

[0499] It should be noted that, in addition to the contents described above, this embodiment may also include the technical features described in the above embodiments, thereby achieving the technical effect of the document presentation method shown above. Please refer to the above description for details. For the sake of brevity, it will not be elaborated here.

[0500] The document presentation method provided in this application embodiment can replace the content of the first region with the content of a second region that occupies the same area as the content of the first region. This further reduces the impact of content replacement on the layout of the target document.

[0501] Figure 4 This is a schematic diagram of the structure of a document presentation device provided in an embodiment of this application. Specifically, it includes:

[0502] Acquisition unit 401 is used to acquire the content of the first region of the target document;

[0503] Replacement unit 402 is used to replace the content of the first region with the content of the second region, wherein the content of the third region in the target document maintains consistent layout before and after the replacement, and the content of the third region is the part of the target document other than the content of the first region;

[0504] Presentation unit 403 is used to present the target document;

[0505] Wherein, if the content in the first area is de-sensitized content, the content in the second area is the non-de-sensitized content of the first area; if the content in the first area is non-de-sensitized content, the content in the second area is the de-sensitized content of the first area.

[0506] In one possible implementation, replacing the content of the first region with the content of the second region includes:

[0507] Replace the first area content with the second area content that occupies the same area as the first area content.

[0508] In one possible implementation, replacing the content of the first region with the content of the second region includes:

[0509] Replace the first area content with the second area content, which occupies the same length in a preset direction.

[0510] In one possible implementation, replacing the content of the first region with the content of the second region includes:

[0511] Determine the first layout information of the content in the first area;

[0512] Based on the first layout information, determine the second layout information of the second area content of the target document;

[0513] Replace the content of the first area with the content of the second area that contains the second layout information; and

[0514] Presenting the target document includes:

[0515] The second area content in the target document is presented according to the layout method indicated by the second layout information.

[0516] In one possible implementation, determining the second layout information of the second region content of the target document based on the first layout information includes:

[0517] Determine the number of the first characters in the content of the first area from the first layout information;

[0518] Based on the first number of characters, generate the second number of characters for the second region content of the target document;

[0519] Based on the first layout information and the second number of characters, the second layout information of the content in the second area is determined.

[0520] In one possible implementation, the content of the first region is un-de-sensitized content, and the content of the second region is de-sensitized content of the first region; and

[0521] The step of generating the second character count of the second region content of the target document based on the first character count includes:

[0522] If the number of the first character is less than or equal to a preset first threshold, a preset strategy is adopted to increase the number of the first character, and the increased number of the first character is determined as the number of the second character in the second region content of the target document.

[0523] If the number of the first characters is greater than the preset first threshold, the number of the first characters is determined as the number of the second characters in the second region content of the target document.

[0524] In one possible implementation, determining the second layout information of the second region content of the target document based on the first layout information includes at least one of the following:

[0525] The first character spacing of the first area content included in the first typesetting information is determined as the second character spacing of the second area content of the target document, thereby obtaining the second typesetting information of the second area content;

[0526] The first character size of the first area content included in the first layout information is determined as the second character size of the second area content of the target document, thereby obtaining the second layout information of the second area content;

[0527] The first line spacing of the first area content included in the first layout information is determined as the second line spacing of the second area content of the target document, thereby obtaining the second layout information of the second area content.

[0528] In one possible implementation, determining the second layout information of the second region content of the target document based on the first layout information includes:

[0529] From the first layout information, determine the number of first characters, the spacing between first characters, and the size of first characters in the content of the first area;

[0530] Based on the first character count, the first character spacing, and the first character size, the second character count, the second character spacing, and the second character size of the second region content of the target document are determined, and the second layout information of the second region content is obtained.

[0531] In one possible implementation, determining the second character count, second character spacing, and second character size of the second region content of the target document based on the first character count, the first character spacing, and the first character size includes:

[0532] Based on the first number of characters, determine the third number of characters in the second region content of the target document;

[0533] Based on the number of the first characters, the spacing between the first characters, and the size of the first characters, the first size information of the content in the first region is determined;

[0534] Determine the third character spacing and third character size of the second region content of the target document;

[0535] The third size information is determined based on the number of third characters, the spacing between third characters, and the size of the third character;

[0536] Determine whether the size difference between the size represented by the first size information and the size represented by the third size information is less than or equal to a preset second threshold.

[0537] When the size difference is less than or equal to the preset second threshold, the number of third characters is determined as the number of second characters in the content of the second region, the size of the third character is determined as the size of the second character in the content of the second region, and the spacing of the third character is determined as the spacing of the second character in the content of the second region.

[0538] If the size difference is greater than the preset second threshold, at least one of the number of third characters, the size of the third character, and the spacing of the third character is adjusted so that the size difference between the size determined based on the adjusted number of third characters, the size of the third character, and the spacing of the third character and the size represented by the first size information is less than or equal to the preset second threshold, and the adjusted number of third characters, the size of the third character, and the spacing of the third character are respectively determined as the number of second characters, the size of the second character, and the spacing of the second character in the second area content.

[0539] In one possible implementation, the first layout information includes first size information of the content in the first area; and

[0540] The step of determining the second layout information of the second region content of the target document based on the first layout information includes:

[0541] The first size information included in the first layout information is determined as the second size information of the second area content of the target document;

[0542] Based on the second size information, the second layout information of the second area content of the target document is determined.

[0543] The document presentation device provided in this embodiment can be as follows: Figure 4 The document presentation device shown can execute all the steps of the document presentation methods described above, thereby achieving the technical effects of the document presentation methods described above. For details, please refer to the relevant descriptions above. For the sake of brevity, further details are not provided here.

[0544] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 5 The illustrated electronic device 500 includes at least one processor 501, a memory 502, at least one network interface 504, and other user interfaces 503. The various components in the electronic device 500 are coupled together via a bus system 505. It is understood that the bus system 505 is used to implement communication between these components. In addition to a data bus, the bus system 505 also includes a power bus, a control bus, and a status signal bus. However, for clarity, ... Figure 5 The general designated all buses as Bus System 505.

[0545] The user interface 503 may include a display, keyboard, or clicking device (e.g., mouse, trackball, touchpad, or touchscreen).

[0546] It is understood that the memory 502 in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The memory 502 described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0547] In some implementations, memory 502 stores elements, executable units or data structures, or subsets thereof, or extended sets thereof: operating system 5021 and application program 5022.

[0548] The operating system 5021 includes various system programs, such as the framework layer, core library layer, and driver layer, used to implement various basic business functions and handle hardware-based tasks. The application program 5022 includes various applications, such as a media player and a browser, used to implement various application functions. Programs implementing the methods of this application embodiment can be included in application program 5022.

[0549] In this embodiment, by calling the program or instructions stored in memory 502, specifically the program or instructions stored in application program 5022, processor 501 executes the method steps provided in each method embodiment, including, for example:

[0550] Retrieve the content of the first region of the target document;

[0551] The first area content is replaced with the second area content, wherein the third area content in the target document maintains consistent layout before and after the replacement, and the third area content is the part of the target document excluding the first area content;

[0552] Present the target document;

[0553] Wherein, if the content in the first area is de-sensitized content, the content in the second area is the non-de-sensitized content of the first area; if the content in the first area is non-de-sensitized content, the content in the second area is the de-sensitized content of the first area.

[0554] The methods disclosed in the embodiments of this application can be applied to or implemented by processor 501. Processor 501 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in processor 501 or by instructions in the form of software. The processor 501 may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software units in the decoding processor. The software units may be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 502. Processor 501 reads the information in memory 502 and, in conjunction with its hardware, completes the steps of the above method.

[0555] It is understood that the embodiments described herein can be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described above in this application, or combinations thereof.

[0556] For software implementation, the techniques described herein can be implemented by units that perform the functions described above. The software code can be stored in memory and executed by a processor. The memory can be implemented within the processor or external to the processor.

[0557] The electronic device provided in this embodiment may be as follows: Figure 5 The electronic device shown can execute all the steps of the document presentation methods described above, thereby achieving the technical effects of the document presentation methods described above. For details, please refer to the relevant descriptions above. For the sake of brevity, further details are not provided here.

[0558] This application also provides a storage medium (computer-readable storage medium). This storage medium stores one or more programs. The storage medium may include volatile memory, such as random access memory; it may also include non-volatile memory, such as read-only memory, flash memory, hard disk, or solid-state drive; and it may also include combinations of the above types of memory.

[0559] When one or more programs in the storage medium can be executed by one or more processors to implement the document presentation method executed on the electronic device side as described above.

[0560] The processor described above is used to execute a document rendering program stored in memory to implement the following steps of a document rendering method executed on the electronic device side:

[0561] Retrieve the content of the first region of the target document;

[0562] The first area content is replaced with the second area content, wherein the third area content in the target document maintains consistent layout before and after the replacement, and the third area content is the part of the target document excluding the first area content;

[0563] Present the target document;

[0564] Wherein, if the content in the first area is de-sensitized content, the content in the second area is the non-de-sensitized content of the first area; if the content in the first area is non-de-sensitized content, the content in the second area is the de-sensitized content of the first area.

[0565] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0566] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented in hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0567] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of this application. It should be understood that the above descriptions are merely specific embodiments of this application and are not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of this application should be included within the scope of protection of this application. Furthermore, for the foregoing embodiments, for the sake of simplicity, they are all described as a series of actions. However, those skilled in the art should understand that the present invention is not limited to the described order of actions, because according to the present invention, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to the present invention.

Claims

1. A document presentation method, characterized in that, The method includes: Retrieve the content of the first section of the target document; The first region content is replaced with the second region content, wherein the second region content occupies the same length in a preset direction as the first region content; the third region content in the target document maintains the same layout before and after the replacement, and the third region content is the part of the target document excluding the first region content; Present the target document; Wherein, if the content in the first area is desensitized content, the content in the second area is the non-desensitized content of the first area; if the content in the first area is non-desensitized content, the content in the second area is the desensitized content of the first area. Replace the content of the first area with the content of the second area, including: Determine the first layout information of the content in the first area; Based on the first layout information, determine the second layout information of the second area content of the target document; Replace the content of the first area with the content of the second area that contains the second layout information; The first layout information includes first size information of the content in the first area; and the second layout information for determining the content of the second area of ​​the target document based on the first layout information includes: The first size information included in the first layout information is determined as the second size information of the second area content of the target document; Based on the second size information, the second layout information of the second area content of the target document is determined.

2. The method according to claim 1, characterized in that, The step of replacing the content of the first region with the content of the second region includes: Replace the first area content with the second area content that occupies the same area as the first area content.

3. The method according to claim 1, characterized in that, The step of replacing the content of the first region with the content of the second region includes: Replace the first area content with the second area content, which occupies the same length in a preset direction.

4. The method according to claim 1, characterized in that, Presenting the target document includes: The second area content in the target document is presented according to the layout method indicated by the second layout information.

5. The method according to claim 4, characterized in that, The step of determining the second layout information of the second region content of the target document based on the first layout information includes: Determine the number of the first characters in the content of the first area from the first layout information; Based on the first number of characters, generate the second number of characters for the second region content of the target document; Based on the first layout information and the second number of characters, the second layout information of the content in the second area is determined.

6. The method according to claim 5, characterized in that, The content in the first area is un-anonymized content, and the content in the second area is anonymized content of the first area. as well as The step of generating the second character count of the second region content of the target document based on the first character count includes: If the number of the first character is less than or equal to a preset first threshold, a preset strategy is adopted to increase the number of the first character, and the increased number of the first character is determined as the number of the second character in the second region content of the target document. If the number of the first characters is greater than the preset first threshold, the number of the first characters is determined as the number of the second characters in the second region content of the target document.

7. The method according to claim 5, characterized in that, The step of generating the second character count of the second region content of the target document based on the first character count includes: When using the first configuration, the number of the first character is changed using a preset strategy, and the changed number of the first character is determined as the number of the second character in the second region content of the target document. When the second configuration is adopted, the first character count is determined as the second character count of the second region content of the target document; The first configuration is used to indicate that the number of characters in the area content before and after desensitization is not equal; the second configuration is used to indicate that the number of characters in the area content before and after desensitization is equal.

8. The method according to claim 4, characterized in that, The second layout information for determining the second area content of the target document based on the first layout information includes at least one of the following: The first character spacing of the first area content included in the first layout information is determined as the second character spacing of the second area content of the target document, thereby obtaining the second layout information of the second area content; The first character size of the first area content included in the first layout information is determined as the second character size of the second area content of the target document, thereby obtaining the second layout information of the second area content; The first line spacing of the first area content included in the first layout information is determined as the second line spacing of the second area content of the target document, thereby obtaining the second layout information of the second area content.

9. The method according to claim 4, characterized in that, The step of determining the second layout information of the second region content of the target document based on the first layout information includes: From the first layout information, determine the number of first characters, the spacing between first characters, and the size of first characters in the content of the first area; Based on the first character count, the first character spacing, and the first character size, the second character count, the second character spacing, and the second character size of the second region content of the target document are determined, and the second layout information of the second region content is obtained.

10. The method according to claim 9, characterized in that, The step of determining the second character count, second character spacing, and second character size of the second region content of the target document based on the first character count, the first character spacing, and the first character size includes: Based on the first number of characters, determine the third number of characters in the second region content of the target document; Based on the number of the first characters, the spacing between the first characters, and the size of the first characters, the first size information of the content in the first region is determined; Determine the third character spacing and third character size of the second region content of the target document; The third size information is determined based on the number of third characters, the spacing between third characters, and the size of the third character; Determine whether the size difference between the size represented by the first size information and the size represented by the third size information is less than or equal to a preset second threshold. When the size difference is less than or equal to the preset second threshold, the number of third characters is determined as the number of second characters in the content of the second region, the size of the third character is determined as the size of the second character in the content of the second region, and the spacing of the third character is determined as the spacing of the second character in the content of the second region. If the size difference is greater than the preset second threshold, at least one of the number of third characters, the size of the third character, and the spacing of the third character is adjusted so that the size difference between the size determined based on the adjusted number of third characters, the size of the third character, and the spacing of the third character and the size represented by the first size information is less than or equal to the preset second threshold, and the adjusted number of third characters, the size of the third character, and the spacing of the third character are respectively determined as the number of second characters, the size of the second character, and the spacing of the second character in the second area content.

11. A document presentation device, characterized in that, The device includes: The acquisition unit is used to acquire the content of the first region of the target document; The replacement unit is used to replace the content of the first region with the content of the second region, wherein the length occupied by the content of the second region in a preset direction is the same as that of the content of the first region; the content of the third region in the target document maintains the same layout before and after the replacement, and the content of the third region is the part of the target document other than the content of the first region; A presentation unit is used to present the target document; Wherein, if the content in the first area is desensitized content, the content in the second area is the non-desensitized content of the first area; if the content in the first area is non-desensitized content, the content in the second area is the desensitized content of the first area. Replace the content of the first area with the content of the second area, including: Determine the first layout information of the content in the first area; Based on the first layout information, determine the second layout information of the second area content of the target document; Replace the content of the first area with the content of the second area that contains the second layout information; The first layout information includes first size information of the content in the first area; and the second layout information for determining the content of the second area of ​​the target document based on the first layout information includes: The first size information included in the first layout information is determined as the second size information of the second area content of the target document; Based on the second size information, the second layout information of the second area content of the target document is determined.

12. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing a computer program stored in the memory, wherein when the computer program is executed, it implements the method described in any one of claims 1-10.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1-10.

Citation Information

Patent Citations

  • Information shielding method and device, terminal and computer-readable storage medium

    CN108595978A

  • File encryption and decryption method and device, electronic equipment and medium

    CN115098877A