Display method and device of hierarchical information and storage medium

CN115358187BActive Publication Date: 2026-09-04ZHUHAI KINGSOFT OFFICE SOFTWARE +2
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210953194.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-08
Publication Date
2026-09-04
Estimated Expiration
2042-08-08

AI Technical Summary

Technical Problem

[0003]现有技术中,在用户要新创建一个具有层级的层级对象时,如果不确定这个层级对象应该属于哪个层级,通常需要手动确定已创建好的层级对象,之后确定该层级对象的层级信息,再返回编辑处进行层级设置,影响层级的设置效率

Benefits of technology

[0038] The method for displaying hierarchical information provided in this disclosure involves acquiring a target document, detecting a pre-operation for hierarchical settings within the document content, determining the target hierarchical information of the pre-operation, and then displaying a setting prompt indicating the target hierarchical level. This method helps users determine the desired hierarchical level by displaying the setting prompt, thus improving the efficiency of setting hierarchical levels in a document.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115358187B_ABST
    Figure CN115358187B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure relate to a display method and apparatus for hierarchical information, and a storage medium. The method comprises: obtaining a target document; detecting a hierarchical setting pre-operation for document content of the target document; in a case where the hierarchical setting pre-operation is detected, determining target hierarchical information of the hierarchical setting pre-operation; and displaying setting prompt information of a target level indicated by the target hierarchical information. By this method, the user can be helped to determine the required setting level by displaying the setting prompt information of the target level indicated by the target hierarchical information, and the efficiency of the user in setting the level in the document is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and in particular to a method, apparatus and storage medium for displaying hierarchical information. Background Technology

[0002] A document can have its content structured as hierarchical objects. For example, these hierarchical objects can be headings (e.g., main heading, subheading, heading 1, heading 2, heading 3, etc.), item numbers (e.g., 123, abc, I, II, III, IV, V, etc.), or item labels (e.g., *). Taking headings as an example, each heading—"main heading," "subheading," "heading 1," "heading 2," "heading 3"—can belong to a different level, forming a hierarchical relationship in the document outline.

[0003] In existing technologies, when a user wants to create a new hierarchical object, if they are unsure which level the object belongs to, they usually need to manually determine the level of the existing hierarchical object, then determine the level information of the object, and then return to the editor to set the level, which affects the efficiency of setting the level. Summary of the Invention

[0004] In view of this, in order to solve some or all of the above-mentioned technical problems, the present disclosure provides a method, apparatus and storage medium for displaying hierarchical information.

[0005] In a first aspect, embodiments of this disclosure provide a method for displaying hierarchical information, the method comprising: Obtain the target document; Detect the hierarchical settings of the document content for the target document as a pre-operation; If the hierarchical setting pre-operation is detected, the target hierarchical information of the hierarchical setting pre-operation is determined; Displays a prompt message indicating the target level as specified in the target level information.

[0006] In one possible implementation, determining the target hierarchy information for the hierarchy setting pre-operation includes: Obtain the cursor's position information within the target document; Based on the location information, the target level information for the pre-operation of the level setting is determined.

[0007] In one possible implementation, determining the target hierarchical information for the hierarchical setting pre-operation based on the location information includes: In the target document, determine the first level information of the first number of hierarchical objects with hierarchy preceding the location indicated by the location information, and obtain the first level information set; In the target document, determine the second-level information of a number of hierarchical objects with a hierarchy following the location indicated by the location information, and obtain a set of second-level information; Based on at least one piece of hierarchical information from the first hierarchical information set and the second hierarchical information set, the target hierarchical information for the hierarchical setting pre-operation is determined.

[0008] In one possible implementation, determining the target hierarchical information for the hierarchical setting pre-operation based on at least one piece of hierarchical information from the first hierarchical information set and the second hierarchical information set includes: At least one piece of hierarchical information from the first hierarchical information set and the second hierarchical information set is determined as the target hierarchical information for the hierarchical setting pre-operation.

[0009] In one possible implementation, determining the target hierarchical information for the hierarchical setting pre-operation based on at least one piece of hierarchical information from the first hierarchical information set and the second hierarchical information set includes: Hierarchical structure information is extracted from the first hierarchical information set and / or the second hierarchical information set, wherein the hierarchical structure information includes at least one set of hierarchical structure information; Based on the hierarchical structure information, a third hierarchical information set is determined from the first hierarchical information set and / or the second hierarchical information set, wherein the hierarchical objects of the hierarchical levels indicated by the hierarchical information in the third hierarchical information set belong to at least one hierarchical structure; At least one item from the third-level information set is determined as the target level information for the level setting pre-operation.

[0010] In one possible implementation, determining the third-level information set from the first-level information set and / or the second-level information set includes: The first-level information set and / or the second-level information set are deduplicated to obtain the fifth-level information set; From the fifth-level information set, determine the third-level information set.

[0011] In one possible implementation, determining the target hierarchical information for the hierarchical setting pre-operation based on at least one piece of hierarchical information from the first hierarchical information set and the second hierarchical information set includes: According to the hierarchical structure, the first hierarchical information set and / or the second hierarchical information set are divided to obtain multiple hierarchical information subsets, wherein the hierarchical objects of the hierarchical information indicated in each of the multiple hierarchical information subsets belong to a hierarchical structure. For each of the multiple hierarchical information subsets, deduplication is performed to obtain the target hierarchical information for the hierarchical setting pre-operation.

[0012] In one possible implementation, determining the target hierarchical information for the hierarchical setting pre-operation based on the location information includes: Identify the hierarchical object in the target document that precedes the position indicated by the location information and has a hierarchy. Based on the hierarchical information of the hierarchical object, the target hierarchical information for the hierarchical setting pre-operation is determined.

[0013] In one possible implementation, determining the target hierarchical information for the hierarchical setting pre-operation based on the hierarchical information of the hierarchical object includes: The hierarchical information of the hierarchical object is determined as the target hierarchical information for the pre-operation of the hierarchical setting.

[0014] In one possible implementation, determining the target hierarchy information for the hierarchy setting pre-operation includes: Determine the hierarchical set of each level of objects included in the target document; From the set of levels, determine the target level for the level setting pre-operation; The hierarchical information of the target level is determined as the target hierarchical information for setting pre-operations of the level.

[0015] In one possible implementation, the setting prompt information indicating the target level of the target level information includes: Determine whether the hierarchical object with the target level is located outside the visible area of ​​the document corresponding to the screen display interface; If the hierarchical object with the target level is located outside the visible area of ​​the document, display a setting prompt message for the target level.

[0016] In one possible implementation, it is determined whether the hierarchical setting pre-operation has been detected by one of the following methods: If a preset string is detected, it is determined that the hierarchical setting pre-operation has been detected, wherein the preset string is used to trigger the hierarchical setting operation; or If the opening of the target menu is detected, it is determined that the hierarchical setting pre-operation has been detected, wherein the target menu is used to set the hierarchy of document content.

[0017] In one possible implementation, the method further includes: Displays the hierarchical information of the various hierarchical objects included in the target document.

[0018] In one possible implementation, the method further includes: Detect the hierarchical setting operation triggered by the setting prompt information; If the level setting operation is detected, the document content is set as a level object with the target level.

[0019] In one possible implementation, the hierarchy setting pre-operation is a pre-operation for setting a title hierarchy, where the hierarchy object is a title.

[0020] Secondly, embodiments of this disclosure provide a display device for hierarchical information, the device comprising: The acquisition unit is used to acquire the target document; The first detection unit is used to detect the hierarchical setting pre-operation of the document content for the target document; The determining unit is configured to determine the target level information of the level setting pre-operation when the level setting pre-operation is detected; The first display unit is used to display setting prompts for the target level indicated by the target level information.

[0021] In one possible implementation, determining the target hierarchy information for the hierarchy setting pre-operation includes: Obtain the cursor's position information within the target document; Based on the location information, the target level information for the pre-operation of the level setting is determined.

[0022] In one possible implementation, determining the target hierarchical information for the hierarchical setting pre-operation based on the location information includes: In the target document, determine the first level information of the first number of hierarchical objects with hierarchy preceding the location indicated by the location information, and obtain the first level information set; In the target document, determine the second-level information of a number of hierarchical objects with a hierarchy following the location indicated by the location information, and obtain a set of second-level information; Based on at least one piece of hierarchical information from the first hierarchical information set and the second hierarchical information set, the target hierarchical information for the hierarchical setting pre-operation is determined.

[0023] In one possible implementation, determining the target hierarchical information for the hierarchical setting pre-operation based on at least one piece of hierarchical information from the first hierarchical information set and the second hierarchical information set includes: At least one piece of hierarchical information from the first hierarchical information set and the second hierarchical information set is determined as the target hierarchical information for the hierarchical setting pre-operation.

[0024] In one possible implementation, determining the target hierarchical information for the hierarchical setting pre-operation based on at least one piece of hierarchical information from the first hierarchical information set and the second hierarchical information set includes: Hierarchical structure information is extracted from the first hierarchical information set and / or the second hierarchical information set, wherein the hierarchical structure information includes at least one set of hierarchical structure information; Based on the hierarchical structure information, a third hierarchical information set is determined from the first hierarchical information set and / or the second hierarchical information set, wherein the hierarchical objects of the hierarchical levels indicated by the hierarchical information in the third hierarchical information set belong to at least one hierarchical structure; At least one item from the third-level information set is determined as the target level information for the level setting pre-operation.

[0025] In one possible implementation, determining the third-level information set from the first-level information set and / or the second-level information set includes: The first-level information set and / or the second-level information set are deduplicated to obtain the fifth-level information set; From the fifth-level information set, determine the third-level information set.

[0026] In one possible implementation, determining the target hierarchical information for the hierarchical setting pre-operation based on at least one piece of hierarchical information from the first hierarchical information set and the second hierarchical information set includes: According to the hierarchical structure, the first hierarchical information set and / or the second hierarchical information set are divided to obtain multiple hierarchical information subsets, wherein the hierarchical objects of the hierarchical information indicated in each of the multiple hierarchical information subsets belong to a hierarchical structure. For each of the multiple hierarchical information subsets, deduplication is performed to obtain the target hierarchical information for the hierarchical setting pre-operation.

[0027] In one possible implementation, determining the target hierarchical information for the hierarchical setting pre-operation based on the location information includes: Identify the hierarchical object in the target document that precedes the position indicated by the location information and has a hierarchy. Based on the hierarchical information of the hierarchical object, the target hierarchical information for the hierarchical setting pre-operation is determined.

[0028] In one possible implementation, determining the target hierarchical information for the hierarchical setting pre-operation based on the hierarchical information of the hierarchical object includes: The hierarchical information of the hierarchical object is determined as the target hierarchical information for the pre-operation of the hierarchical setting.

[0029] In one possible implementation, determining the target hierarchy information for the hierarchy setting pre-operation includes: Determine the hierarchical set of each level of objects included in the target document; From the set of levels, determine the target level for the level setting pre-operation; The hierarchical information of the target level is determined as the target hierarchical information for setting pre-operations of the level.

[0030] In one possible implementation, the setting prompt information indicating the target level of the target level information includes: Determine whether the hierarchical object with the target level is located outside the visible area of ​​the document corresponding to the screen display interface; If the hierarchical object with the target level is located outside the visible area of ​​the document, display a setting prompt message for the target level.

[0031] In one possible implementation, it is determined whether the hierarchical setting pre-operation has been detected by one of the following methods: If a preset string is detected, it is determined that the hierarchical setting pre-operation has been detected, wherein the preset string is used to trigger the hierarchical setting operation; or If the opening of the target menu is detected, it is determined that the hierarchical setting pre-operation has been detected, wherein the target menu is used to set the hierarchy of document content.

[0032] In one possible implementation, the device further includes: The second display unit is used to display the hierarchical information of each level of objects included in the target document.

[0033] In one possible implementation, the device further includes: The second detection unit is used to detect the hierarchical setting operation triggered by the setting prompt information; The setting unit is used to set the document content as a hierarchical object with the target hierarchical level when the hierarchical setting operation is detected.

[0034] In one possible implementation, the hierarchy setting pre-operation is a pre-operation for setting a title hierarchy, where the hierarchy object is a title.

[0035] Thirdly, embodiments of this disclosure provide an electronic device, including: Memory, used to store computer programs; A processor is configured to execute a computer program stored in the aforementioned memory, and when the computer program is executed, to implement any embodiment of the method for displaying hierarchical information according to the first aspect of this disclosure.

[0036] Fourthly, embodiments of this disclosure provide a computer-readable storage medium that, when executed by a processor, implements the method of any embodiment of the method for displaying hierarchical information as described in the first aspect above.

[0037] Fifthly, embodiments of this disclosure provide a computer program including computer-readable code that, when executed on a device, causes a processor in the device to execute instructions for implementing steps in any embodiment of the method for displaying hierarchical information as described in the first aspect above.

[0038] The method for displaying hierarchical information provided in this disclosure involves acquiring a target document, detecting a pre-operation for hierarchical settings within the document content, determining the target hierarchical information of the pre-operation, and then displaying a setting prompt indicating the target hierarchical level. This method helps users determine the desired hierarchical level by displaying the setting prompt, thus improving the efficiency of setting hierarchical levels in a document. Attached Figure Description

[0039] Figure 1 A flowchart illustrating a method for displaying hierarchical information provided in an embodiment of this disclosure; Figure 2A A flowchart illustrating another method for displaying hierarchical information provided in this embodiment of the disclosure; Figure 2B In response to Figure 2A A schematic diagram of an application scenario; Figure 2C A flowchart illustrating another method for displaying hierarchical information provided in this embodiment of the disclosure; Figure 2D In response to Figure 2C A schematic diagram of an application scenario; Figure 3A A flowchart illustrating yet another method for displaying hierarchical information provided in this embodiment of the disclosure; Figure 3B In response to Figure 3A A schematic diagram of an application scenario; Figure 4 A schematic diagram of the structure of a display device for hierarchical information provided in an embodiment of this disclosure; Figure 5This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation

[0040] Various exemplary embodiments of the present disclosure 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 the present disclosure.

[0041] Those skilled in the art will understand that the terms "first" and "second" in the embodiments of this disclosure 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.

[0042] 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.

[0043] It should also be understood that any component, data or structure mentioned in the embodiments of this disclosure can generally be understood as one or more unless expressly defined or given to the contrary in the context.

[0044] Furthermore, the term "and / or" in this disclosure 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 disclosure generally indicates that the preceding and following related objects have an "or" relationship.

[0045] It should also be understood that the description of the various embodiments in this disclosure 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.

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

[0047] 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.

[0048] 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.

[0049] It should be noted that, unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other. To facilitate understanding of the embodiments of this disclosure, the disclosure 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 disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without creative effort are within the scope of protection of this disclosure.

[0050] Figure 1 This is a flowchart illustrating a method for displaying hierarchical information according to an embodiment of this disclosure. Figure 1 As shown, the method specifically includes: 101. Obtain the target document.

[0051] In this embodiment, the target document can be various types of documents. 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 also be an offline document stored locally or an online document stored in the cloud.

[0052] The target document can include text, images, tables, videos, web pages, to-do lists, schedules, maps, mind maps, flowcharts, and other document content.

[0053] 102. Detect the pre-operation of the hierarchical settings of the document content for the target document.

[0054] In this embodiment, the hierarchy setting pre-operation can be an operation performed before the hierarchy setting operation. The hierarchy setting pre-operation can be used to set the hierarchy of document content, thereby obtaining a hierarchy object, which is the document content with the hierarchy set.

[0055] Document content can be any content contained within a document. For example, document content can include text, images, tables, etc.

[0056] As an example, the hierarchical setting pre-action can be a user-defined operation. For instance, a user can define that pressing one or more keys indicates that the user has performed a hierarchical setting pre-action. When the hierarchical setting pre-action is represented by pressing multiple keys, these multiple keys can be pressed simultaneously, or they can be pressed sequentially in a preset order to indicate that the user has performed the hierarchical setting pre-action.

[0057] 103. If the pre-operation of the hierarchical setting is detected, determine the target hierarchical information of the pre-operation of the hierarchical setting.

[0058] In this embodiment, the target hierarchical information of the hierarchical setting pre-operation can characterize the hierarchical information of the target hierarchical level of the hierarchical setting pre-operation.

[0059] The target hierarchy can be determined before the user sets the hierarchy and can be used to assist the user in setting the hierarchy at the current position. The target hierarchy can be determined in several ways. As an example, the target hierarchy can be the hierarchy possessed by the hierarchy object preceding the current cursor position (e.g., the hierarchy possessed by the hierarchy object before the cursor position).

[0060] Hierarchical information indicates a hierarchy. It can represent the hierarchy of objects, using text, images, or other formats. Hierarchical objects can be headings, item numbers, item labels, etc. For example, when the hierarchical object is a heading, the hierarchical information could be "Main Heading," "Subheading," "Heading 1," "Heading 2," and "Heading 3." Furthermore, hierarchical information can also be displayed through a document outline; for instance, it can be represented as a hierarchy diagram within the document outline.

[0061] Target level information can indicate the target level.

[0062] As an example, the hierarchical information of the hierarchical setting time that is closest to the current time can be determined as the target hierarchical information for the hierarchical setting pre-operation.

[0063] As another example, the hierarchical information of the hierarchical object in the target document that is before and closest to the current cursor position can also be used as the target hierarchical information for setting pre-operations.

[0064] 104. Display the target level setting prompt information indicated by the target level information.

[0065] In this embodiment, a prompt message is set to prompt the user to set the document content as a hierarchical object with the aforementioned target level.

[0066] As an example, if the target hierarchy information is "Heading 2", then the tooltip message could be set to "Recently Used: Heading 2".

[0067] In addition, the above prompt information can be displayed in at least one of the following locations: the body of the target document, the menu bar of the target document, and the table of contents of the target document.

[0068] After seeing the message "Recently Used: Heading 2", users can consider setting the document content level to "Heading 2"; or to "Heading 1", a level higher than "Heading 2"; or to "Heading 3", "Heading 4", or "Heading 5", a level lower than "Heading 2", etc.

[0069] The method for displaying hierarchical information provided in this disclosure involves acquiring a target document, detecting a pre-operation for hierarchical settings within the document content, determining the target hierarchical information of the pre-operation, and then displaying a setting prompt indicating the target hierarchical level. This method helps users determine the desired hierarchical level by displaying the setting prompt, thus improving the efficiency of setting hierarchical levels in a document.

[0070] In some optional implementations of this embodiment, the target level information for the level setting pre-operation can be determined in the following manner: First, obtain the cursor's position information in the target document.

[0071] Subsequently, based on the location information, the target level information for the pre-operation of the level setting is determined.

[0072] In some application scenarios of the above-mentioned optional implementation methods, the target level information for the level setting pre-operation can be determined based on the location information in the following manner: The first step is to determine the first-level information of a first number of hierarchical objects with a hierarchy preceding the location indicated by the location information in the target document, thus obtaining a first-level information set. The second step is to determine the second-level information of a second number of hierarchical objects with a hierarchy following the location indicated by the location information in the target document, thus obtaining a second-level information set.

[0073] The first target number can be a predetermined value, or it can be determined based on the total number of all hierarchical objects in the target document preceding the aforementioned position. For example, if there are exactly five hierarchical objects in the target document preceding the aforementioned position, then the first target number can be five or a non-negative integer less than or equal to five.

[0074] The aforementioned second target quantity can be a predetermined value, or it can be determined based on the total number of all hierarchical objects in the target document following the aforementioned position. For example, if there is exactly one hierarchical object in the target document following the aforementioned position, then the aforementioned second target quantity can be 1 or 0.

[0075] The quantities of the first objective and the second objective mentioned above may be equal or unequal.

[0076] The first-level information set can be: the hierarchical information of a first number of hierarchical objects with a hierarchy preceding the position indicated by the location information in the target document (i.e., the first-level information). The second-level information set can be: the hierarchical information of a second number of hierarchical objects with a hierarchy following the position indicated by the location information in the target document (i.e., the second-level information).

[0077] The second step is to determine the target level information for the level setting pre-operation based on at least one level information from the first level information set and the second level information set.

[0078] In some of the above application scenarios, the target level information can be determined in the following way: at least one level information from the first level information set and the second level information set is determined as the target level information for setting the pre-operation of the level.

[0079] In one embodiment, the hierarchical information of the level indicated by the first level information can be determined as the target level information.

[0080] In a specific example, the cursor's position information within the target document is obtained, and the hierarchical objects existing before the position indicated by this position information are determined as follows: Heading 1, Heading 2, Heading 5. Therefore, when the number of first targets is 3, the hierarchical information indicated by the first hierarchical information can be "Recently Used: Heading 1, Heading 2, Heading 5"; when the number of first targets is 1, the hierarchical information indicated by the first hierarchical information can be "Recently Used: Heading 5".

[0081] In another embodiment, the hierarchical information of the level indicated by the second-level information can be determined as the target level information.

[0082] In a specific example, the cursor's position information within the target document is obtained, and the hierarchical objects existing after the position indicated by this position information are determined as follows: Heading 1, Heading 2, Heading 5. Therefore, corresponding to the case where the first target quantity is 3, the hierarchical information indicated by the second level information can be "Recently Used: Heading 1, Heading 2, Heading 5"; corresponding to the case where the first target quantity is 1, the hierarchical information indicated by the second level information can be "Recently Used: Heading 5".

[0083] It should be noted that when the line of text at the cursor position corresponds to a hierarchical object, that hierarchical object can be classified into the first-level information set and / or the second-level information set.

[0084] It is understood that, in the above situation, at least one piece of hierarchical information from the first hierarchical information set and the second hierarchical information set is determined as the target hierarchical information for the hierarchical setting pre-operation, thereby further improving the accuracy of the target hierarchical information determination.

[0085] In another embodiment, the hierarchical information of the next higher level indicated by the second-level information can be determined as the target hierarchical information.

[0086] The aforementioned "upper level" can be the level above the level indicated by the second-level information that has been set in the target document; or it can be the level above the level indicated by the second-level information that can be set by the user. This upper level can be a level that has been set in the target document or a level that has not been set in the target document.

[0087] During the editing process of the target document, the heading levels are not necessarily set in the order of Heading 1, Heading 2, Heading 3. The font size increases with the heading level; for example, the font size of Heading 1 is larger than that of Heading 2. Some users are more sensitive to font size settings and may use Heading 1, Heading 2, Heading 5 instead.

[0088] In a specific example, assuming the number of second targets is 1, and the position information of the cursor in the target document is obtained, the hierarchical objects existing before the position indicated by the position information in the target document are determined as follows: Heading 1, Heading 2; and the hierarchical objects existing after the position indicated by the position information in the target document are determined as follows: Heading 5, Heading 1, Heading 2.

[0089] Scenario 1: The next level up is the level above the level indicated by the second level information in the target document.

[0090] Specifically, for this type of non-sequential heading hierarchy, Heading 5 is designated as the second level of information. In this scenario, the preceding level could be Heading 2.

[0091] Scenario 2: The above-mentioned next-level hierarchy is the level above the second-level information indication level that the user can set.

[0092] Specifically, for this non-sequential heading hierarchy, Heading 5 is designated as the second level of information. In this scenario, the preceding level could be Heading 4.

[0093] In another embodiment, the hierarchical information of the next level below the level indicated by the first level information can also be determined as the target level information.

[0094] Similarly, the next level mentioned above can be the level below the level indicated by the first level information that has been set in the target document; or it can be the level below the level indicated by the first level information that can be set by the user. This next level can be a level that has been set in the target document or a level that has not been set in the target document.

[0095] It is understandable that, among the above optional implementation methods, the target level information can be determined based on the cursor position, thus making the determined target level information more accurate.

[0096] In the above embodiments, the setting prompt information can reflect the hierarchical structure of the hierarchical objects used in the current target document; furthermore, by setting the number of the first target and the number of the second target, the setting prompt information can be further simplified, avoiding increasing the user's thinking time in setting the target hierarchy.

[0097] However, in some cases, even by simply setting the number of first and second targets, the prompt message may still contain duplicate hierarchical information. For example, if we obtain the cursor's position information in the target document and determine the hierarchical objects existing after the position indicated by that position information, such as Heading 1, Heading 2, Heading 2, Heading 5, then for the case where the number of first targets is 4, the hierarchical information indicated by the second level message could be "Recently Used: Heading 1, Heading 2, Heading 2, Heading 5," where "Heading 2" is repeated. Moreover, if there are a sufficient number of repeated headings, on the one hand, setting an excessively long prompt message will occupy too much space, affecting the layout of the target document, menus, or table of contents; on the other hand, setting an excessively long prompt message is also not conducive to users quickly determining the actual hierarchical structure used in the current document, and therefore not conducive to users quickly determining the target level.

[0098] In some of the above application scenarios, the target level information for the level setting pre-operation can be determined based on at least one level information from the first level information set and the second level information set, using the following method: First, hierarchical structure information is extracted from the first-level information set and / or the second-level information set. The hierarchical structure information includes at least one set of hierarchical structure information.

[0099] Subsequently, based on the hierarchical structure information, a third hierarchical information set is determined from the first hierarchical information set and / or the second hierarchical information set. The hierarchical objects indicated by the hierarchical information in the third hierarchical information set belong to at least one hierarchical structure. Therefore, the third hierarchical information set can more concisely represent the hierarchical structure used by the target document.

[0100] Here, the third-level information set can be determined from the first-level information set and / or the second-level information set in the following manner: The following example illustrates how to determine the third-level information set from the first-level information set: The first step is to determine the hierarchical information of the object preceding the location indicated by the location information from the first-level information set, and use this hierarchical information as candidate hierarchical information, and use this candidate hierarchical information as an element in the third-level information set.

[0101] The second step involves determining the level information of the preceding level object from the first-level information set, based on the level indicated by the candidate level information. If the level indicated by the preceding level object is higher than the level indicated by the candidate level information, then the level information of the preceding level object is included as an element in the third-level information set. If the level indicated by the preceding level object is lower than or equal to the level indicated by the candidate level information, then the level information of the preceding level object is not included as an element in the third-level information set, thus obtaining the final third-level information set.

[0102] If the level indicated by the hierarchical information of the preceding level object is higher than the level indicated by the aforementioned candidate level information, the hierarchical information of the preceding level object is taken as the new candidate level information, and the second step described above is performed based on the new candidate level information to obtain the final set of third level information.

[0103] Here, the determined third-level information set includes a hierarchical structure of information. In other words, a hierarchical structure can be obtained by following the process described in the example above.

[0104] Here, the method for determining the third-level information set from the second-level information set can also refer to the above description of determining the third-level information set from the first-level information set, and will not be repeated here.

[0105] Similarly, the method for determining the third-level information set from the set composed of the first-level information set and the second-level information set can refer to the above description of determining the third-level information set from the first-level information set, and will not be repeated here.

[0106] Then, at least one item in the third-level information set is determined as the target level information for the level setting pre-operation.

[0107] In some examples, when displaying target hierarchy information, the preceding hierarchy information of the location indicated by the above location information can be highlighted before being displayed. The highlighting can include at least one of the following: bold, underline, emphasis mark, etc.

[0108] It is understandable that, in the above situation, determining the target level information for the pre-operation of the level setting by using the hierarchical relationship of the hierarchical objects preceding the location indicated by the location information can further improve the accuracy of the target level information determination.

[0109] Furthermore, after determining the third-level information set, the lowest-level information within the third-level information set can also be determined. The lowest-level information is the level information of the lowest-level object in the third-level information set. The level information of the object below the lowest level, along with all the level information in the third-level information set, is determined as the fourth-level information set. At least one item in the fourth-level information set is determined as the target level information for the level setting pre-operation.

[0110] In some examples of the above situations, the third-level information set can also be determined from the first-level information set and / or the second-level information set in the following manner: First, the first-level information set and / or the second-level information set are deduplicated to obtain the fifth-level information set.

[0111] Specifically, in the case of processing the first-level information set, if the first-level information set includes: first-level information 1, first-level information 2, first-level information 3, then the third-level information set obtained after deduplication may include: first-level information 1, first-level information 2, and first-level information 3.

[0112] In the case of processing the second-level information set, if the second-level information set includes: second-level information 1, second-level information 2, second-level information 3, then the third-level information set obtained after deduplication may include: second-level information 1, second-level information 2, second-level information 3.

[0113] In processing the first-level information set and the second-level information set, if the first-level information set includes: first-level information 1, first-level information 2, first-level information 3, and the second-level information set includes: second-level information 1, second-level information 2, second-level information 3, then the deduplicated third-level information set can include: first-level information 1, first-level information 2, first-level information 3, second-level information 1, second-level information 2, and second-level information 3. In this case, first-level information 1 and second-level information 1 in the third-level information set can be the same.

[0114] Then, the third-level information set is determined from the fifth-level information set.

[0115] Here, the method for determining the third-level information set from the fifth-level information set can refer to the description above regarding determining the third-level information set from the first-level information set, and will not be repeated here. Alternatively, the fifth-level information set can be directly used as the third-level information set.

[0116] It is understandable that, in the above example, by performing deduplication, the target hierarchical information can be made to not contain duplicate hierarchical information.

[0117] In some of the above application scenarios, the target level information for the level setting pre-operation can be determined based on at least one level information from the first level information set and the second level information set, using the following method: Step 1: Deduplicate at least one of the first-level information set and the second-level information set to obtain the third-level information set.

[0118] Here, the method for deduplicating at least one of the first-level information set and the second-level information set can be referred to the above description of determining the third-level information set from the first-level information set and / or the second-level information set, and will not be repeated here.

[0119] Step 2: Based on the third-level information set, determine the target level information for the level setting pre-operation.

[0120] As an example, the third-level information set can be identified as the target level information for pre-operation of the level setting.

[0121] In some examples of the above situations, the following method can be used to deduplicate at least one of the first-level information set and the second-level information set to obtain the third-level information set: Deduplicate the first-level information set to obtain the third-level information set.

[0122] Based on this, the target level information for the pre-operation of the level setting can also be determined using the following method, based on the third-level information set: First, determine the hierarchical structure information of the hierarchical objects of the hierarchy indicated by the hierarchical information in the third-level information set. The hierarchical structure information includes at least one set of hierarchical structure information.

[0123] Subsequently, based on the hierarchical structure information, a fourth-level information set is determined from the third-level information set.

[0124] Here, the fourth-level information set can be determined from the third-level information set in the following manner: The first step is to determine the hierarchical information of the object preceding the location indicated by the above location information from the third-level information set, and use this hierarchical information as candidate hierarchical information, and use this candidate hierarchical information as an element in the fourth-level information set.

[0125] The second step involves determining the level information of the preceding level object from the third-level information set, based on the level indicated by the candidate level information. If the level indicated by the preceding level object is higher than the level indicated by the candidate level information, then the level information of the preceding level object is included as an element in the fourth-level information set. If the level indicated by the preceding level object is lower than or equal to the level indicated by the candidate level information, then the level information of the preceding level object is not included as an element in the fourth-level information set, thus obtaining the final fourth-level information set.

[0126] If the level indicated by the hierarchical information of the preceding level object is higher than the level indicated by the aforementioned candidate level information, the hierarchical information of the preceding level object is taken as the new candidate level information, and the second step described above is performed based on the new candidate level information to obtain the final fourth level information set.

[0127] Finally, at least one item in the fourth-level information set is determined as the target level information for the level setting pre-operation.

[0128] Based on this, the target level information for the level setting pre-operation can also be determined based on the third level information set as follows: directly determine the third level information set as the target level information for the level setting pre-operation.

[0129] It is understandable that, among the above optional implementation methods, determining the target level information for the pre-operation of the level setting by using the hierarchical relationship of the hierarchical objects preceding the location indicated by the location information can further improve the accuracy of the target level information determination.

[0130] In one possible implementation, the target hierarchical information for the hierarchical setting pre-operation can also be determined based on at least one piece of hierarchical information from the first hierarchical information set and the second hierarchical information set: First, the first hierarchical information set and / or the second hierarchical information set are divided according to their hierarchical structure to obtain multiple hierarchical information subsets. Each of these subsets indicates a hierarchical object belonging to a specific hierarchical structure.

[0131] Subsequently, deduplication is performed on each of the multiple hierarchical information subsets to obtain the target hierarchical information for the hierarchical setting pre-operation.

[0132] As an example, the following explanation illustrates how to divide the first-level information set into multiple hierarchical information subsets: If the first-level information set is: H1H2H3H3H2H3H1H2H5H5H6, where H represents a title and the number after H indicates the title's level, then we can determine that we can obtain two hierarchical information subsets: H1H2H3H3H2H3 and H1H2H5H5H6. Then, we perform deduplication on both hierarchical information subsets to obtain the target hierarchical information: H1H2H3H1H2H5H6.

[0133] Here, the execution method of dividing the second-level information set into multiple hierarchical information subsets can be referred to the example above regarding dividing the first-level information set into multiple hierarchical information subsets, and will not be repeated here.

[0134] It is understandable that the target level information is determined by dividing the information into multiple subsets according to the hierarchical structure, which can provide hierarchical setting information prompts in scenarios with multiple hierarchical structures.

[0135] In some application scenarios of the above-mentioned optional implementation methods, the target level information for the level setting pre-operation can also be determined based on the above location information using the following method: First, identify the hierarchical objects in the target document that precede the location indicated by the location information and have a hierarchy. These hierarchical objects preceding the location indicated by the location information can be: any hierarchical object preceding the location indicated by the location information and having a hierarchy, or the hierarchical object preceding the location indicated by the location information and having a hierarchy.

[0136] It should be understood that the solution in this application scenario can be understood as setting the quantity of the second objective described in the above application scenario to 0.

[0137] Subsequently, based on the hierarchical information of the hierarchical object, the target hierarchical information for the hierarchical setting pre-operation is determined.

[0138] As an example, the hierarchical information of the next level of the hierarchical information indicated by the hierarchical information of the above hierarchical object can be determined as the target hierarchical information for the hierarchical setting pre-operation.

[0139] As another example, the hierarchical information of the hierarchy indicated by the hierarchical information of the above-mentioned hierarchical object can be determined as the target hierarchical information for the hierarchical setting pre-operation.

[0140] Furthermore, if there is no hierarchical object in the target document prior to the location indicated by the aforementioned location information, then the preset hierarchical information can be determined as the target hierarchical information for the hierarchical setting pre-operation. The preset hierarchical information can be the highest level (e.g., Heading 1).

[0141] It is understandable that, in the above application scenarios, determining the target level information for the pre-operation of the level setting by using the level information of the previous level object with a level before the cursor position can further improve the accuracy of the target level information determination.

[0142] In some optional implementations of the above embodiments, the target level information for the level setting pre-operation can be determined in the following manner: First, determine the hierarchical set of each level of objects included in the target document.

[0143] Then, from the set of levels, the target level for the level setting pre-operation is determined.

[0144] As an example, the level selected by the user from the set of levels can be determined as the target level for the pre-operation of the level setting.

[0145] Then, the hierarchical information of the target level is determined as the target hierarchical information for setting pre-operations of the level.

[0146] It is understandable that, among the above optional implementation methods, determining the target level information for the pre-operation of level setting by using the various level objects in the target document can further improve the accuracy of the target level information determination.

[0147] In some application scenarios of the above-mentioned optional implementation methods, the setting prompt information of the target level indicated by the target level information can be displayed in the following manner: First, determine whether the hierarchical object with the target level is located outside the visible area of ​​the document corresponding to the screen display interface.

[0148] Here, if the aforementioned hierarchical object is outside the visible area of ​​the document, the user cannot see the hierarchical object; if the aforementioned hierarchical object is within the visible area of ​​the document, the user can see the hierarchical object.

[0149] Subsequently, if the hierarchical object with the target level is located outside the visible area of ​​the document, a setting prompt message for the target level is displayed.

[0150] It is understandable that in the above application scenarios, the setting prompt information of the target level is only displayed when the user cannot see the level object, in order to assist the user in setting the level. When the user can see the level object, the user can directly set the level based on the level object that he / she can see.

[0151] In some optional implementations of the above embodiments, the following steps may also be performed: First, detect the hierarchical setting operation triggered by the setting prompt information. As an example, the hierarchical setting operation can be a click operation on the setting prompt information, or a pre-determined shortcut operation on the setting prompt information.

[0152] Subsequently, upon detecting the level setting operation, the document content is set as a level object with the target level.

[0153] It is understandable that, among the above optional implementation methods, hierarchical settings can be achieved by triggering hierarchical setting operations, which further improves the efficiency of hierarchical settings.

[0154] In some optional implementations of the above embodiments, the level setting pre-operation is a pre-operation for setting the title level, and the level object is the title.

[0155] It is understandable that the above optional implementation methods can help users determine the required heading level and improve the efficiency of setting heading levels in documents.

[0156] Figure 2AThis is a flowchart illustrating another method for displaying hierarchical information provided in an embodiment of this disclosure. For example... Figure 2A As shown, the method specifically includes: 201. Obtain the target document.

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

[0158] 202. Detect the pre-operation of the hierarchical settings of the document content for the target document.

[0159] In this embodiment, step 202 and Figure 1 Step 102 in the corresponding embodiment is basically the same, and will not be repeated here.

[0160] 203. If a preset string is detected, it is determined that the hierarchical setting pre-operation has been detected, wherein the preset string is used to trigger the hierarchical setting operation.

[0161] In this embodiment, the preset string may include one or more predetermined characters. As an example, the preset string may be "#".

[0162] 204. If the pre-operation of the hierarchical setting is detected, determine the target hierarchical information of the pre-operation of the hierarchical setting.

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

[0164] 205. Display the target level setting prompt information indicated by the target level information.

[0165] In this embodiment, step 205 and Figure 1 Step 104 in the corresponding embodiment is basically the same, and will not be repeated here.

[0166] As an example, please refer to Figure 2B , Figure 2B In response to Figure 2A A schematic diagram of an application scenario. For example... Figure 2B As shown, upon detecting the input of the preset string "#", it is determined that the level setting pre-operation has been detected. Then, the target level setting prompt information 200, indicating the target level information, is displayed. Figure 2B The settings prompt message "#Recently used: H2" is displayed.

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

[0168] The method for displaying hierarchical information provided in this embodiment determines that a hierarchical setting pre-operation has been detected when a preset input string is detected. This improves the accuracy and efficiency of detecting the hierarchical setting pre-operation, thereby further improving the efficiency of setting hierarchical objects in a document.

[0169] Figure 2C This is a flowchart illustrating another method for displaying hierarchical information provided in an embodiment of this disclosure. For example... Figure 2C As shown, the method specifically includes: 211. Obtain the target document.

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

[0171] 212. Detect the pre-operation of the hierarchical settings of the document content for the target document.

[0172] In this embodiment, step 212 and Figure 1 Step 102 in the corresponding embodiment is basically the same, and will not be repeated here.

[0173] 213. If the target menu is detected to be open, determine that the level setting pre-operation has been detected, wherein the target menu is used to set the level of document content.

[0174] 214. If the pre-operation of the hierarchical setting is detected, determine the target hierarchical information of the pre-operation of the hierarchical setting.

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

[0176] 215. Display the target level setting prompt information indicated by the target level information.

[0177] In this embodiment, step 215 and Figure 1 Step 104 in the corresponding embodiment is basically the same, and will not be repeated here.

[0178] As an example, please refer to Figure 2D , Figure 2D In response to Figure 2C A schematic diagram of an application scenario. Figure 2DThe system detects that the user has opened the target menu, thus determining that a pre-operation for setting the hierarchy has been detected. Afterwards, a setting prompt message 210 for the target hierarchy, indicating the target hierarchy information, is displayed.

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

[0180] The method for displaying hierarchical information provided in this embodiment determines that a hierarchical setting pre-operation has been detected when the target menu is opened, thereby improving the accuracy and efficiency of detecting the hierarchical setting pre-operation and further improving the efficiency of setting hierarchical objects in the document.

[0181] Figure 3A This is a flowchart illustrating another method for displaying hierarchical information provided in this embodiment. 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.

[0182] Specifically, such as Figure 3A As shown, the method specifically includes: 301. Obtain the target document.

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

[0184] 302. Detect the pre-operation of the hierarchical settings of the document content for the target document.

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

[0186] 303. If the pre-operation of the hierarchical setting is detected, determine the target hierarchical information of the pre-operation of the hierarchical setting.

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

[0188] 304. Display the target level setting prompt information indicated by the target level information.

[0189] In this embodiment, step 304 and Figure 1 Step 104 in the corresponding embodiment is basically the same, and will not be repeated here.

[0190] 305. Display the hierarchical information of each level of objects included in the target document.

[0191] For example, please refer to Figure 3B , Figure 3B In response to Figure 3A A schematic diagram of an application scenario. For example... Figure 3B As shown, the outline view of the target document displays the hierarchical information of the hierarchical objects included in the target document, namely H1, H2, H3, H4, and H5 in the illustration.

[0192] In existing technology, if a user wants to type a title at the cursor position but is unsure of the previous title's hierarchy, and wants to set the title to the same or a different level, they must first manually move the cursor to the previous title's location to display its hierarchy before setting the title, which is inconvenient. However, by automatically displaying the previous title's hierarchy, the user can directly determine the hierarchy of the title at the cursor position.

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

[0194] When a user intends to set a title (i.e., the aforementioned pre-operation of hierarchical setting is detected), the hierarchy of the most recent title in the preceding text is identified, and this information is displayed to the user. Specifically, this can be determined by detecting the input of a preset string, or by detecting the opening of a target menu.

[0195] When a user opens the dropdown menu for setting heading format (i.e., the target menu is detected as open as mentioned above) or enters Markdown syntax for setting heading format, the system automatically finds the nearest heading before the current position (i.e., the cursor position in the target document) and determines whether this heading is within the current visible area (i.e., the document's visible area as mentioned above). If the nearest heading is not within the visible area, its current level is displayed in the heading format menu; if the nearest heading is within the visible area, no prompt is made; if there is no heading in the preceding text, no prompt is made.

[0196] In Markdown, typing "#" sets the heading level to "Heading 1," and automatically formats the text after the "#" as Heading 1. Similarly, typing "##" sets the heading level to "Heading 2," "###" sets it to "Heading 3," and so on.

[0197] Therefore, when users need to set headings while editing documents, the system can display the current heading hierarchy, helping them determine the required heading level and quickly complete the heading formatting process. This reduces the need for scrolling and comparison, minimizes errors, and improves editing efficiency.

[0198] It should be noted that, in addition to the contents described above, this embodiment may also include... Figures 1-2D The technical features described in the corresponding embodiments, thereby achieving Figures 1-2D For details on the technical effects of the method for displaying hierarchical information, please refer to [link / reference]. Figures 1-2D The relevant descriptions are presented concisely and will not be elaborated upon here.

[0199] The method for displaying hierarchical information provided in this disclosure assists users in setting hierarchical objects by displaying the hierarchical information of each hierarchical object included in the target document, thereby improving the efficiency of setting hierarchical objects.

[0200] Figure 4 This is a schematic diagram of the structure of a display device for hierarchical information provided in an embodiment of this disclosure. Specifically, it includes: Acquisition unit 401 is used to acquire the target document; The first detection unit 402 is used to detect the hierarchical setting pre-operation of the document content for the target document; The determining unit 403 is used to determine the target level information of the level setting pre-operation when the level setting pre-operation is detected; The first display unit 404 is used to display setting prompt information for the target level indicated by the target level information.

[0201] In one possible implementation, determining the target hierarchy information for the hierarchy setting pre-operation includes: Obtain the cursor's position information within the target document; Based on the location information, the target level information for the pre-operation of the level setting is determined.

[0202] In one possible implementation, determining the target hierarchical information for the hierarchical setting pre-operation based on the location information includes: Identify the hierarchical object in the target document that precedes the position indicated by the location information and has a hierarchy. Based on the hierarchical information of the hierarchical object, the target hierarchical information for the hierarchical setting pre-operation is determined.

[0203] In one possible implementation, determining the target hierarchical information for the hierarchical setting pre-operation based on the hierarchical information of the hierarchical object includes: The hierarchical information of the hierarchical object is determined as the target hierarchical information for the pre-operation of the hierarchical setting.

[0204] In one possible implementation, determining the target hierarchical information for the hierarchical setting pre-operation based on the location information includes: In the target document, determine the first level information of the first number of hierarchical objects with hierarchy preceding the location indicated by the location information, and obtain the first level information set; In the target document, determine the second-level information of a number of hierarchical objects with a hierarchy following the location indicated by the location information, and obtain a set of second-level information; Based on at least one piece of hierarchical information from the first hierarchical information set and the second hierarchical information set, the target hierarchical information for the hierarchical setting pre-operation is determined.

[0205] In one possible implementation, determining the target hierarchical information for the hierarchical setting pre-operation based on at least one piece of hierarchical information from the first hierarchical information set and the second hierarchical information set includes: At least one piece of hierarchical information from the first hierarchical information set and the second hierarchical information set is determined as the target hierarchical information for the hierarchical setting pre-operation.

[0206] In one possible implementation, determining the target hierarchical information for the hierarchical setting pre-operation based on at least one piece of hierarchical information from the first hierarchical information set and the second hierarchical information set includes: Hierarchical structure information is extracted from the first hierarchical information set and / or the second hierarchical information set, wherein the hierarchical structure information includes at least one set of hierarchical structure information; Based on the hierarchical structure information, a third hierarchical information set is determined from the first hierarchical information set and / or the second hierarchical information set, wherein the hierarchical objects of the hierarchical levels indicated by the hierarchical information in the third hierarchical information set belong to at least one hierarchical structure; At least one item from the third-level information set is determined as the target level information for the level setting pre-operation.

[0207] In one possible implementation, determining the third-level information set from the first-level information set and / or the second-level information set includes: The first-level information set and / or the second-level information set are deduplicated to obtain the fifth-level information set; From the fifth-level information set, determine the third-level information set.

[0208] In one possible implementation, determining the target hierarchical information for the hierarchical setting pre-operation based on at least one piece of hierarchical information from the first hierarchical information set and the second hierarchical information set includes: According to the hierarchical structure, the first hierarchical information set and / or the second hierarchical information set are divided to obtain multiple hierarchical information subsets, wherein the hierarchical objects of the hierarchical information indicated in each of the multiple hierarchical information subsets belong to a hierarchical structure. For each of the multiple hierarchical information subsets, deduplication is performed to obtain the target hierarchical information for the hierarchical setting pre-operation.

[0209] In one possible implementation, determining the target hierarchy information for the hierarchy setting pre-operation includes: Determine the hierarchical set of each level of objects included in the target document; From the set of levels, determine the target level for the level setting pre-operation; The hierarchical information of the target level is determined as the target hierarchical information for setting pre-operations of the level.

[0210] In one possible implementation, the setting prompt information indicating the target level of the target level information includes: Determine whether the hierarchical object with the target level is located outside the visible area of ​​the document corresponding to the screen display interface; If the hierarchical object with the target level is located outside the visible area of ​​the document, display a setting prompt message for the target level.

[0211] In one possible implementation, it is determined whether the hierarchical setting pre-operation has been detected by one of the following methods: If a preset string is detected, it is determined that the hierarchical setting pre-operation has been detected, wherein the preset string is used to trigger the hierarchical setting operation; or If the opening of the target menu is detected, it is determined that the hierarchical setting pre-operation has been detected, wherein the target menu is used to set the hierarchy of document content.

[0212] In one possible implementation, the device further includes: The second display unit (not shown in the figure) is used to display the hierarchical information of each level of objects included in the target document.

[0213] In one possible implementation, the device further includes: The second detection unit (not shown in the figure) is used to detect the hierarchical setting operation triggered by the setting prompt information; A setting unit (not shown in the figure) is used to set the document content as a hierarchical object with the target hierarchical level when the hierarchical setting operation is detected.

[0214] In one possible implementation, the hierarchy setting pre-operation is a pre-operation for setting a title hierarchy, where the hierarchy object is a title.

[0215] The hierarchical information display device provided in this embodiment can be, for example, as follows: Figure 4 The display device for the hierarchical information shown can perform actions such as Figure 1-3B All steps of the method for displaying mid-level information, thereby achieving... Figure 1-3B For details on the technical effects of the method for displaying hierarchical information, please refer to [link / reference]. Figure 1-3B The relevant descriptions are presented concisely and will not be elaborated upon here.

[0216] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. 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 5The general designated all buses as Bus System 505.

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

[0218] It is understood that the memory 502 in this embodiment of the present disclosure may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory may 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 may 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.

[0219] 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.

[0220] 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. The program implementing the method of this embodiment can be included in the application program 5022.

[0221] 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: Obtain the target document; Detect the hierarchical settings of the document content for the target document as a pre-operation; If the hierarchical setting pre-operation is detected, the target hierarchical information of the hierarchical setting pre-operation is determined; Displays a prompt message indicating the target level as specified in the target level information.

[0222] The methods disclosed in the above embodiments of this disclosure 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 or by instructions in the form of software in processor 501. 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 disclosure. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this disclosure 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.

[0223] 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, or combinations thereof.

[0224] 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.

[0225] The electronic device provided in this embodiment may be as follows: Figure 5 The electronic device shown can perform the following: Figure 1-3B All steps of the method for displaying mid-level information, thereby achieving... Figure 1-3B For details on the technical effects of the method for displaying hierarchical information, please refer to [link / reference]. Figure 1-3B The relevant descriptions are presented concisely and will not be elaborated upon here.

[0226] This disclosure 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; the memory may also include non-volatile memory, such as read-only memory, flash memory, hard disk, or solid-state drive; the memory may also include combinations of the above types of memory.

[0227] When one or more programs in the storage medium can be executed by one or more processors to implement the above-mentioned method for displaying hierarchical information executed on the electronic device side.

[0228] The processor described above is used to execute a display program for hierarchical information stored in memory, in order to implement the following steps of a hierarchical information display method executed on the electronic device side: Obtain the target document; Detect the hierarchical settings of the document content for the target document as a pre-operation; If the hierarchical setting pre-operation is detected, the target hierarchical information of the hierarchical setting pre-operation is determined; Displays a prompt message indicating the target level as specified in the target level information.

[0229] 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 disclosure.

[0230] 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.

[0231] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of this disclosure. It should be understood that the above description is only a specific embodiment of this disclosure and is not intended to limit the scope of protection of this disclosure. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A method for displaying hierarchical information, characterized in that, The method includes: Obtain the target document; The detection performs a pre-operation on the hierarchical setting of the document content for the target document. The pre-operation on the hierarchical setting is an operation performed before the hierarchical setting operation. If the hierarchical setting pre-operation is detected, the target hierarchical information of the hierarchical setting pre-operation is determined; Displaying the target level information indicates the setting prompt information of the target level, the prompt information is used to prompt the user to set the document content as a level object with the target level; The step of determining the target level information for the pre-operation of the level setting includes: Obtain the cursor's position information within the target document; Based on the location information, the target level information for the pre-operation of the level setting is determined.

2. The method according to claim 1, characterized in that, The step of determining the target level information for the pre-operation of the level setting based on the location information includes: In the target document, determine the first level information of the first number of hierarchical objects with hierarchy preceding the location indicated by the location information, and obtain the first level information set; In the target document, determine the second-level information of a number of hierarchical objects with a hierarchy following the location indicated by the location information, and obtain a set of second-level information; Based on at least one piece of hierarchical information from the first hierarchical information set and the second hierarchical information set, the target hierarchical information for the hierarchical setting pre-operation is determined.

3. The method according to claim 2, characterized in that, The step of determining the target hierarchical information for the hierarchical setting pre-operation based on at least one piece of hierarchical information from the first hierarchical information set and the second hierarchical information set includes: At least one piece of hierarchical information from the first hierarchical information set and the second hierarchical information set is determined as the target hierarchical information for the hierarchical setting pre-operation.

4. The method according to claim 2, characterized in that, The step of determining the target hierarchical information for the hierarchical setting pre-operation based on at least one piece of hierarchical information from the first hierarchical information set and the second hierarchical information set includes: Hierarchical structure information is extracted from the first hierarchical information set and / or the second hierarchical information set, wherein the hierarchical structure information includes at least one set of hierarchical structure information; Based on the hierarchical structure information, a third hierarchical information set is determined from the first hierarchical information set and / or the second hierarchical information set, wherein the hierarchical information indicated by each level in the third hierarchical information set belongs to the same hierarchical structure; At least one item from the third-level information set is determined as the target level information for the level setting pre-operation.

5. The method according to claim 4, characterized in that, Determining the third-level information set from the first-level information set and / or the second-level information set includes: The first-level information set and / or the second-level information set are deduplicated to obtain the fifth-level information set; From the fifth-level information set, determine the third-level information set.

6. The method according to claim 4, characterized in that, The step of determining the target hierarchical information for the hierarchical setting pre-operation based on at least one piece of hierarchical information from the first hierarchical information set and the second hierarchical information set includes: According to the hierarchical structure, the first hierarchical information set and / or the second hierarchical information set are divided to obtain multiple hierarchical information subsets, wherein the hierarchical information indicated by each hierarchical information subset belongs to a hierarchical structure. For each of the multiple hierarchical information subsets, deduplication is performed to obtain the target hierarchical information for the hierarchical setting pre-operation.

7. The method according to any one of claims 1-6, characterized in that, The setting prompt information for the target level indicated by the target level information includes: Determine whether the hierarchical object with the target level is located outside the visible area of ​​the document corresponding to the screen display interface; If the hierarchical object with the target level is located outside the visible area of ​​the document, display a setting prompt message for the target level.

8. The method according to any one of claims 1-6, characterized in that, Whether the hierarchical setting pre-operation has been detected can be determined by one of the following methods: If a preset string is detected, it is determined that the hierarchical setting pre-operation has been detected, wherein the preset string is used to trigger the hierarchical setting operation; or If the opening of the target menu is detected, it is determined that the hierarchical setting pre-operation has been detected, wherein the target menu is used to set the hierarchy of document content.

9. A display device for hierarchical information, characterized in that, The device includes: The acquisition unit is used to acquire the target document; The first detection unit is used to detect the hierarchical setting pre-operation of the document content of the target document, wherein the hierarchical setting pre-operation is an operation performed before the hierarchical setting operation; The determining unit is configured to determine the target level information of the level setting pre-operation when the level setting pre-operation is detected; The first display unit is used to display setting prompt information for the target level indicated by the target level information, and the prompt information is used to prompt the user to set the document content as a level object with the target level; The step of determining the target level information for the pre-operation of the level setting includes: Obtain the cursor's position information within the target document; Based on the location information, the target level information for the pre-operation of the level setting is determined.

10. 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-8.

Citation Information

Patent Citations

  • Document editing method and device, equipment and storage medium

    CN114707470A