Content block display and hiding control method and device in a document, equipment and storage medium

CN122816504APending Publication Date: 2026-09-25SHENZHEN ZHIHEXING TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610666172.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-14
Publication Date
2026-09-25

AI Technical Summary

Technical Problem

[0005]本申请实施例提供了一种文档中内容块的显隐控制方法、装置、设备及存储介质,旨在解决传统的单选按钮只能在文档内控制关联的内容的显示隐藏的问题

Benefits of technology

[0017]本申请实施例提供了一种文档中内容块的显隐控制方法、装置、设备及存储介质。其中,所述方法包括:响应于用户对当前操作文档中目标单选按钮的选择操作;确定所述目标单选按钮的父级单选按钮,以及所述父级单选按钮的显隐状态;基于所述目标单选按钮的引用信息以及预设的映射关系标签表,确定所述目标单选按钮所关联的目标内容,其中,所述目标内容包括所述当前操作文档中的内容块和/或跨文档内容块;基于所述父级单选按钮的显隐状态,控制所述目标内容的显示或隐藏。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122816504A_ABST
    Figure CN122816504A_ABST
Patent Text Reader

Abstract

The application relates to a display and hiding control method and device of a content block in a document, equipment and a storage medium. The method comprises the following steps: in response to a selection operation of a target single selection button in a current operation document by a user; determining a parent single selection button of the target single selection button and a display and hiding state of the parent single selection button; determining a target content associated with the target single selection button based on reference information of the target single selection button and a preset mapping relationship label table, wherein the target content comprises a content block in the current operation document and / or a cross-document content block; and controlling display or hiding of the target content based on the display and hiding state of the parent single selection button. The application can realize synchronous control of a content block in a document and a cross-document associated content block according to the display and hiding state of the parent single selection button, thereby realizing unified display and hiding control of the content block in multiple documents.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of digital processing technology, and in particular to a method, apparatus, device, and storage medium for controlling the visibility of content blocks in a document. Background Technology

[0002] In modern digital office and information management systems, document processing tools (such as Word and Excel), as well as various rich text editors and form designers, are the core carriers for realizing the digitalization of business processes.

[0003] To enhance the interactivity and intelligence of documents, developers typically use radio buttons and similar methods to collect user intent and switch interface states.

[0004] However, in existing technical solutions, the control logic of radio buttons is usually strictly limited to the closed domain of the current document. Specifically, when a user triggers a radio button, its associated show / hide action can only be applied to specific content blocks (such as text boxes, table rows, or images) within the same document. While this "intra-document linkage" mechanism can meet basic interaction needs, it cannot handle complex cross-document business logic. Summary of the Invention

[0005] This application provides a method, apparatus, device, and storage medium for controlling the display and hiding of content blocks in a document, aiming to solve the problem that traditional radio buttons can only control the display and hiding of associated content within a document.

[0006] In a first aspect, embodiments of this application provide a method for controlling the visibility of content blocks in a document, the method comprising the following steps: Responds to the user's selection of a target radio button in the currently active document; Determine the parent radio button of the target radio button, and the display state of the parent radio button; Based on the reference information of the target radio button and the preset mapping relationship label table, the target content associated with the target radio button is determined, wherein the target content includes content blocks in the currently operated document and / or cross-document content blocks; Based on the visibility state of the parent radio button, the display or hiding of the target content is controlled.

[0007] A further technical solution is that determining the parent radio button of the target radio button includes: Determine the radio button group to which the target radio button belongs; Determine whether the content block containing the radio button group contains a numbered cell; In response to the existence of a numbered cell in the content block and the cell content type being number, the system traverses forward block by block from the preset content block position and compares the previous content block according to the level of the numbered cell. If the level of the numbered cell is the highest level, then check whether the previous content block has a letter number; In response to the existence of a letter number in the previous content block and the first radio button cell in the previous content block being horizontal, it is determined whether the first radio button cell is selected. If the first radio button cell is selected, and the associated block tag list of the first radio button cell contains the content block where the radio button group is located, then the first radio button cell is determined to be the parent radio button of the radio button group.

[0008] A further technical solution is that, after detecting whether the previous content block has a letter code, the method further includes: In response to the existence of a letter number in the previous content block and the fact that the first radio button cell in the previous content block is vertical, the associated block tag list of the selected radio button and the unselected radio button in the radio button group is obtained respectively. If the associated content type of the selected radio button is an associated content block, and the corresponding associated block tag list contains the content block where the radio button group is located, then the selected radio button is determined to be the parent radio button. If the associated content type of the unselected radio button is an associated content block, and the corresponding associated block tag list contains the content block where the radio button group is located, then the unselected radio button is determined to be the parent radio button.

[0009] A further technical solution is that, based on the display / hiding state of the parent radio button, controlling the display or hiding of the target content associated with the target radio button includes: In response to the parent radio button being in a hidden state, the corresponding child radio button group and the content block containing the child radio button group are hidden. In response to the parent radio button being in a displayed state, the selected radio button in the radio button group is obtained; Determine the associated content type of the selected radio button; Based on the associated content type, control the display or hiding of the target content associated with the target radio button.

[0010] A further technical solution is that the method further includes: When the cell reference type of the selected radio button is an external reference, in response to the parent radio button being hidden, the entire content block containing the child radio button group is hidden. In response to the parent radio button being in a show state, the child radio button group is hidden, and the target block where the selected button is located is determined based on the coordinates of the selected radio button. If the selected radio button is a horizontal radio button with a positive attribute, then determine whether the target block has an associated radio button group; If the target block does not have an associated radio button group, then the target block is displayed and the row containing the selected radio button is hidden; If the target block has an associated radio button group, then determine whether the associated radio button group is selected; If the associated radio button group is not selected, the content block associated with the selected radio button is hidden.

[0011] A further technical solution is that the method further includes: When the target radio button is a horizontal radio button with a positive attribute, then find the numbered cell associated with the content block containing the target radio button; Based on the existence of the numbered cells and the cell content type, determine the child content blocks of the target radio button, and add the block marker of the child content block to the associated block marker list.

[0012] Determine whether the target radio button carries a specific keyword annotation; if it carries the specific keyword annotation, then obtain the function block to which the target content belongs; Add the block tag of the function block to the data storage object, and configure the hidden attribute of the function block to true; wherein, the hidden attribute is used to indicate that the function block is hidden when all radio buttons corresponding to all child content blocks within the function block are in a hidden state.

[0013] A further technical solution is that, based on the existence of the numbered cell and the cell content type, determining the child content block of the target radio button includes: If a numbered cell exists and its content type is numeric, then obtain the current number level; traverse the subsequent content blocks downwards from the current content block until a content block with a number level equal to the current number level, a letter-numbered content block, or the document ends is found and the traversal stops; within the traversal range, content blocks with a number level lower than the current number level are identified as child content blocks; If a numbered cell exists and its content type is letters, then traverse downwards from its own content block to the subsequent content blocks until another letter-numbered content block is found or the document ends; within the traversal range, content blocks whose numbered cells have a numeric content type are identified as child content blocks. If no numbered cell exists, determine whether the target content is the first content block in the currently operating document; If the target content is the first content block in the currently operating document, then all content blocks below the target content are determined as child content blocks.

[0014] Secondly, embodiments of this application also provide a device for controlling the visibility of content blocks in a document, which includes a unit for performing the above-described method.

[0015] Thirdly, embodiments of this application also provide a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-described method.

[0016] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the above-described method.

[0017] This application provides a method, apparatus, device, and storage medium for controlling the display and hiding of content blocks in a document. The method includes: responding to a user's selection of a target radio button in the currently accessed document; determining the parent radio button of the target radio button and its display / hiding state; determining the target content associated with the target radio button based on its reference information and a preset mapping relationship label table, wherein the target content includes content blocks in the currently accessed document and / or cross-document content blocks; and controlling the display or hiding of the target content based on the display / hiding state of the parent radio button.

[0018] This application constructs a mapping label table, pre-storing the correspondence between radio buttons and content blocks, as well as the document location information of each content block. Based on this, the target content associated with a radio button can be accurately located according to its reference information. Furthermore, based on the display status of the parent radio button, synchronous control of content blocks within and across documents can be achieved, thereby realizing unified display control of content blocks across multiple documents. Attached Figure Description

[0019] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0020] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] One or more embodiments are illustrated by way of example with reference numerals in the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are denoted as similar elements. Unless otherwise stated, the figures in the drawings are not to be limited by scale.

[0022] Figure 1 A flowchart illustrating a first embodiment of a method for controlling the visibility of content blocks in a document, as provided in this application; Figure 2 A schematic diagram illustrating the setting of radio buttons in an interactive interface provided in this application; Figure 3 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0023] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0024] The following disclosure provides numerous different embodiments or examples for implementing various structures of this application. To simplify the disclosure, specific examples of components and arrangements are described below. These are merely examples and are not intended to limit the scope of this application. Furthermore, reference numerals and / or letters may be repeated in different examples. Such repetition is for simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or arrangements discussed.

[0025] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.

[0026] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0027] It should also be further understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0028] As used in this specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if [described condition or event] is detected" may be interpreted, depending on the context, as "once determined," "in response to determination," "once [described condition or event] is detected," or "in response to detection of [described condition or event]."

[0029] To address the aforementioned issues, this application provides a method for controlling the visibility of content blocks in a document, which enables unified control over the visibility of content blocks across multiple documents.

[0030] See Figure 1 , Figure 1 A flowchart illustrating a first embodiment of a method for controlling the visibility of content blocks in a document, provided in this application, is shown. The method includes the following steps: Example 1, see Figure 1 , Figure 1 This is a flowchart of Example 1. The method includes the following steps: Step 110: Respond to the user's selection of the target radio button in the currently active document.

[0031] The current document contains many interactive radio button controls. These radio button controls control their associated content blocks, helping users to more easily define requirements and edit documents. The target radio button can be any one of the currently triggered radio button controls.

[0032] In some embodiments, the radio button can be of the following types: 1) Horizontal radio button group, wherein the horizontal radio button group includes two radio buttons arranged side by side in the same row.

[0033] 2) Vertical radio button group, wherein the vertical radio button group includes two or more radio buttons arranged left-aligned along the vertical direction.

[0034] 3) Radio buttons containing specific characters. These specific characters include words expressing the semantic meaning of "have," such as "have," "already exist," "require," "involves," and "adopt," and their attribute is "have." For example, the specific character in "have circuit board design" is "have."

[0035] 4) Radio buttons containing keyword annotations. The keywords can be the titles of the radio buttons that control the display of hidden content blocks.

[0036] 5) Radio buttons that include parent-child content relationships.

[0037] like Figure 2 As shown, when the mouse moves to the dot in front of the radio button, the mouse cursor will change to a hand pointer to indicate to the user that this area is operable, and the selection operation can be to select "Yes" or "No" for the radio button.

[0038] Step 120: Determine the parent radio button of the target radio button, and the visibility state of the parent radio button.

[0039] Step 130: Based on the reference information of the target radio button and the preset mapping relationship label table, determine the target content associated with the target radio button.

[0040] The target content may include content blocks in the currently operating document and / or cross-document content blocks.

[0041] Step 140: Based on the visibility state of the parent radio button, control the display or hiding of the target content.

[0042] This embodiment constructs a mapping label table, pre-storing the correspondence between radio buttons and content blocks, as well as the document location information of each content block. Based on this, the target content associated with a radio button can be accurately located according to its reference information. Furthermore, based on the display status of the parent radio button, synchronous control of content blocks within and across documents can be achieved, thereby realizing unified display control of content blocks across multiple documents.

[0043] The implementation of the technical solution of this invention mainly relies on the attributes and data of the radio buttons read and stored when parsing the document template tag table.

[0044] For example, you can first determine the associated content type, block tag, child block tag, and logical line block identifier of the radio button.

[0045] The target content associated with the radio button can be a content block or a line block. There are three types of associated content: 'REL_BLOCK', 'REL_BELOW_ROW', and 'REL_BETWEEN_ROW', which are assigned to the radio button during parsing. Specifically, when a unit button has a comment indicating the keyword of its associated content block, its displayed / hidden associated content type is 'REL_BLOCK' (i.e., associated content block); when the radio button is in the horizontal radio button group, and the next line of the horizontal radio button group is not empty and is not a radio button, then the line block up to the end of the content block is the displayed / hidden associated content of the radio button, and the corresponding associated content type is 'REL_BELOW_ROW' (i.e., associated with the line below); when the selected radio button is in the vertical radio button group, and there is an associated line block between two radio buttons in the vertical radio button group, then the displayed / hidden associated content type of the radio button above is 'REL_BETWEEN_ROW' (i.e., associated with the line area between the two radio buttons).

[0046] Here, a block tag can be defined as an ID assigned to an associated content block. The associated content block can include the content block pointed to by the keyword in the annotation of the radio button, as well as the child content blocks below the radio button.

[0047] For a horizontal radio button group containing two radio buttons, its associated child block tag is the block ID assigned to the child content block located below the group.

[0048] The LOGIC row block for radio buttons refers to the range from the next line of a horizontal radio button group to the end of the content block, or the line between two buttons in a vertical radio button group, or from the bottom radio button in a vertical radio button group to the end of the content block. This type of row block stores attributes such as the row block identifier associated with the radio button and whether it is displayed. When initializing the LOGIC row block associated with a radio button, a specific ID is assigned for identification; this specific ID is the logical row block identifier (LOGIC row block ID).

[0049] After parsing the entire document template tag table, you can obtain the titles of the numbered content blocks within the document and a search list of radio buttons. Only radio buttons with the attribute "Yes" will be added to this search list. If you can find the annotation keyword for a radio button, and the keyword matches the content block title, it means the button is associated with that content block. The content block's block tag should be added to the list of radio button associated block tags for subsequent operations.

[0050] After determining the associated blocks of the radio button group, determine the child content blocks associated with the radio button group, as detailed below: 1) When the target radio button is a horizontal radio button with a positive attribute, then find the numbered cell associated with the content block where the target radio button is located.

[0051] Among them, the horizontal radio buttons with affirmative attributes are those with the attribute "Yes".

[0052] 2) Based on the existence of the numbered cells and the cell content type, determine the child content blocks of the target radio button, and add the block marker of the child content blocks to the associated block marker list.

[0053] 2-1) If a numbered cell exists and the cell content type is number, then obtain the current level number digitNumberLevel; traverse the subsequent content blocks downwards from the current content block until a content block with a number level equal to the current level number, a letter-numbered content block, or the end of the document is found and the traversal stops; within the traversal range, content blocks with a number level lower than the current level number are identified as child content blocks.

[0054] The process starts from the current content block and searches downwards, checking if any of the content blocks below it are children. The search continues until a numeric level equal to the current level, an alphabetical level, or the end of the document is found. It then iterates through the content blocks below, retrieving their number cells and checking if the number level is less than `digitNumberLevel`. If so, the content block is considered a child, and its block tag is added to both the list of associated block tags for radio buttons and the list of associated children for subsequent operations.

[0055] 2-2) If there is a numbered cell and the cell content type is letter, then traverse the subsequent content blocks downwards from its own content block until another letter-numbered content block is found or the document ends. Within the traversal range, the content block with the numbered cell content type being number is determined as the child content block.

[0056] This involves starting from the current content block and searching downwards, checking if the content blocks below it are child blocks, until another letter code is found or the document ends. Then, it iterates through the content blocks below, retrieving their number cells and checking if the content type of the number cell is a number. If so, that content block is a child block, and its block tag is added to both the list of radio button associated block tags and the list of radio button associated children, for later use.

[0057] 2-3) If no numbered cell exists, determine whether the target content is the first content block in the current operation document; in response to the target content being the first content block in the current operation document, determine all content blocks below the target content as child content blocks, and add the block markers of the child content blocks to the list of radio button associated block markers and the list of radio button associated children for subsequent operations.

[0058] 3) Determine whether the target radio button carries a specific keyword annotation; if it carries the specific keyword annotation, then obtain the function block to which the target content belongs.

[0059] Among them, a specific keyword annotation could be "If all child elements in a function block are empty, then hide the function block."

[0060] Among them, a function block refers to a content block with specific annotations, which are used by the software to configure, hide, and show the attributes of the content block.

[0061] 4) Add the block tag of the function block to the data storage object, and configure the hidden attribute of the function block to true; wherein, the hidden attribute is used to indicate that the function block is hidden when all radio buttons corresponding to all child content blocks in the function block are in a hidden state.

[0062] This involves adding the block tag of the function block to the object used to store data during parsing, and setting one of the function block's properties, `childAllNoToHide`, to true. Based on this, if all radio buttons in the child function blocks of a first-level numbered function block in the document are selected to be hidden, then this function block needs to be hidden.

[0063] After completing the above processing of the associated blocks and associated sub-levels of the radio button group, it is necessary to operate the associated display of the content blocks. Please refer to the following examples for details.

[0064] Example 2: In some embodiments, if there is a parent-child relationship between radio button groups, then when a radio button is associated with another radio button group within its block, that radio button is the parent of the radio button group (here, radio buttons refer to those with the attribute "Yes"; otherwise, radio buttons are not involved in association configuration). Specifically, based on Embodiment 1, a detailed description is provided of how to determine the parent radio button of the target radio button. Step 120 may include the following: Step 11: Determine the radio button group to which the target radio button is located.

[0065] The radio button group to which the target radio button is located is the incoming radio button group radioCells.

[0066] If the passed-in radio button group radioCells has a size of 2, then the radio button group is a horizontal radio button group in the document.

[0067] Step 12: Determine whether the content block containing the radio button group has a numbered cell.

[0068] First, locate the content block containing the radio button group, and then determine whether the content block contains a numbered cell.

[0069] Step 13: In response to the existence of a numbered cell in the content block and the cell content type being number, traverse forward block by block from the preset content block position and compare with the previous content block according to the level of the numbered cell.

[0070] The preset content block position can be position -1.

[0071] This means that the content block can be compared block by block with the previous content block, prevBlock, starting from the preset content block position -1.

[0072] Step 14: If the level of the numbered cell is the highest level, then check whether the previous content block has a letter number.

[0073] The highest level can be level 1, which is the highest numerical code.

[0074] In some embodiments, if the preceding content block prevBlock has no letter number, it means that the radio button group radioCells has no parent radio button.

[0075] Step 15: In response to the existence of a letter number in the previous content block prevBlock and the first radio button cell haveRadio in the previous content block prevBlock being horizontal, determine whether the first radio button cell is selected.

[0076] Step 16: If the first radio button cell is selected, and the associated block tag list of the first radio button cell contains the content block where the radio button group is located, then the first radio button cell is determined to be the parent radio button of the radio button group.

[0077] For steps 15-16, the horizontal radio button group has two horizontal radio buttons. Based on this, we can first select the first radio button cell "haveRadio" in the horizontal radio button group of the preceding content block "prevBlock". If the first radio button cell in the horizontal button group is selected, it means that the radio button with the attribute "have" has been selected. Furthermore, if the content block containing the radio button group "radioCells" is in the list of associated block tags (keywords and children) of the first radio button cell "haveRadio", then the first radio button cell "haveRadio" is the parent radio button of "radioCells".

[0078] If the content block containing radioCells has a level number less than 1, you can further search for the letter or number of the preceding content block, prevBlock. Content blocks with a level number greater than the radioCells's level number may be the parent radio button of radioCells.

[0079] In some embodiments, after detecting whether the previous content block has a letter number, the method further includes: Step 21: In response to the existence of a letter number in the previous content block and the fact that the first radio button cell in the previous content block is vertical, obtain the associated block tag list of the selected radio button and the unselected radio button in the radio button group respectively.

[0080] In other words, if the first radio button group of the previous content block prevBlock is vertical, then it is necessary to look up the list of associated block tags (keywords and children) for the selected and unselected radio buttons in the vertical radio button group respectively.

[0081] You can first check the selected radio button (checkedRadioCell), and then check the unselected radio button (noCheckRadios).

[0082] Step 22: If the associated content type of the selected radio button is an associated content block, and the corresponding associated block tag list contains the content block where the radio button group is located, then the selected radio button is determined to be the parent radio button.

[0083] In other words, if the selected radio button checkedRadioCell has a display / hide associated content type of 'REL_BLOCK' (i.e., associated content block), and the list of associated block markers contains the content block where the radio button group radioCells is located, then the selected radio button checkedRadioCell is the parent radio button.

[0084] Step 23: If the associated content type of the unselected radio button is an associated content block, and the corresponding associated block tag list contains the content block where the radio button group is located, then the unselected radio button is determined to be the parent radio button.

[0085] In other words, if the unselected radio button noCheckRadios has a display / hide associated content type of 'REL_BLOCK' (i.e., associated content block), and the list of associated content blocks includes the content block containing the radio button group radioCells, then the unselected radio button noCheckRadios is the parent radio button.

[0086] Additionally, it checks whether the content block containing the parent radio button is displayed. If the content block containing the parent radio button is not displayed, it returns a Boolean variable parseParentRadioCheckNo with the value true; if the content block containing the parent radio button is displayed, it returns false. This is used to handle the display and hiding of radio buttons (radioCells).

[0087] In some embodiments, a radio button group may have multiple parents, and a radio button may have multiple children. The visibility of a child depends on the visibility of its parent. If the parent is visible, the child is hidden based on its own visibility attribute. If any parent is hidden, all its children are hidden, as detailed in Example 3 below.

[0088] Example 3: Based on Example 2, this paper describes how to control the display or hiding of the target content associated with the target radio button based on the display state of the parent radio button. Specifically, it may include the following: Step 31: In response to the parent radio button being in a hidden state, the corresponding child radio button group and the content block containing the child radio button group are hidden.

[0089] The selected radio button (checkedRadioCell) and the unselected radio button (noCheckRadios) are both passed to the method that handles the associated block markers (keywords and children). If parseParentRadioCheckNo is true, all radio buttons are hidden.

[0090] Step 32: In response to the parent radio button's display state being changed to display state, obtain the selected radio button in the radio button group.

[0091] Step 33: Determine the associated content type of the selected radio button.

[0092] In other words, if `parseParentRadioCheckNo` is not true, the visibility of the associated block is determined based on the "Yes" attribute of the radio button. If the associated content type of the radio button is 'REL_BLOCK' (i.e., associated content block), the associated content block of the radio button is searched. If the associated content type of the radio button is 'REL_BELOW_ROW' (i.e., associated with the row below) or 'REL_BETWEEN_ROW' (i.e., associated with the row area between two radio buttons), the LOGIC row block associated with the radio button is searched.

[0093] Step 34: Based on the associated content type, control the display or hiding of the target content associated with the target radio button.

[0094] Example 4 In some embodiments, when the cell reference type of the selected radio button checkedRadioCell is external reference, it means that this radio button references a parent radio button across the document. The specific steps for showing or hiding the associated target content can be found in the following steps.

[0095] Step 41: In response to the parent radio button being in a hidden state, hide all the content blocks containing the child radio button group.

[0096] Step 42: In response to the parent radio button being in a show state, only the child radio button group is hidden, and the target block where the selected button is located is determined according to the coordinates of the checkedRadioCell of the selected radio button.

[0097] Step 43: If the selected radio button is a horizontal radio button with a positive attribute, then determine whether the target block has an associated radio button group.

[0098] If the selected radio button is horizontal and its attribute is "yes", then first find all radio button groups associated with the block; otherwise, set the block's show / hide attribute to hidden.

[0099] One content block may be associated with multiple radio button groups.

[0100] Step 44: If the target block does not have an associated radio button group, then display the target block and hide the row containing the selected radio button.

[0101] In other words, if there is no associated radio button group, setting the target block's show / hide property to show will hide the row containing the checkedRadioCell.

[0102] Step 45: If the target block has an associated radio button group, determine whether the associated radio button group is selected.

[0103] Step 46: If the associated radio button group is not selected, hide the content block associated with the selected radio button.

[0104] In other words, if there is an associated radio button group, it checks whether there is a selected radio button in the associated radio button group. If none of the associated radio buttons are selected, the content block associated with the selected radio button checkedRadioCell will not be displayed.

[0105] If the associated radio button is selected, but the parent radio button is selected as "None" or "Hidden," it will not be displayed. Otherwise, it will display normally.

[0106] In some embodiments, when radio button groups are arranged vertically, according to document formatting rules, three or more radio buttons typically correspond to levels or states from "none" to "present" in a top-to-bottom order. Under this logic, if the selected radio button `checkedRadioCell` is at the top of the vertical group, it is determined that the user has selected the "none" state, and the corresponding target block is not displayed. Furthermore, content blocks without associated reference information are also not displayed. In other cases, the target block is displayed normally, while the row containing the selected radio button `checkedRadioCell` is hidden to avoid displaying redundant information.

[0107] In some embodiments, after processing the associated blocks and children of radio button groups, it has been determined that some function blocks with radio buttons have the attribute `childAllNoToHide` which is true. These function blocks require special handling during automatic numbering. When users edit documents, add or delete content blocks, or check radio buttons, the numbering of content blocks in the document is modified. Automatic numbering is the method used to modify the numbering. Whenever a numbering needs to be modified, it must first be determined whether these function blocks need to be hidden before renumbering to avoid numbering errors.

[0108] Specifically, we can identify the functional blocks in the document whose `childAllNoToHide` property is true, and store their IDs in the `needSpecialHandFunBlockIds` list for special handling. This list is then passed to the `leaderBlockBaseLevelBockShowHide` method, which uses the IDs to find all corresponding functional blocks in the document (first-level numbered functional blocks and their child functional blocks have the same ID, so one functional block ID can identify a group of functional blocks). We iterate through these functional blocks, finding radio buttons with the "Yes" attribute in all horizontal radio button groups. If these radio buttons are all selected as hidden, the first-level numbered functional block is hidden. Otherwise, the first-level numbered functional block is displayed.

[0109] This application not only establishes the association between radio buttons and content blocks, and between child radio buttons and parent radio buttons, but also enables the display and hiding of associated content controlled by radio buttons within and across documents.

[0110] Corresponding to the above-described method for controlling the visibility of content blocks in a document, this application also provides a device for controlling the visibility of content blocks in a document. This device includes a unit for executing the above-described method for controlling the visibility of content blocks in a document, and can be configured in a desktop computer, tablet computer, laptop computer, or other terminal.

[0111] like Figure 3 As shown in the figure, this application provides a computer device including a processor 111, a communication interface 112, a memory 113, and a communication bus 114, wherein the processor 111, the communication interface 112, and the memory 113 communicate with each other through the communication bus 114. Memory 113 is used to store computer programs; In one embodiment of this application, when the processor 111 executes a program stored in the memory 113, it implements the method for controlling the visibility of content blocks in a document provided in any of the foregoing method embodiments, including: Responds to the user's selection of a target radio button in the currently active document; Determine the parent radio button of the target radio button, and the display state of the parent radio button; Based on the reference information of the target radio button and the preset mapping relationship label table, the target content associated with the target radio button is determined, wherein the target content includes content blocks in the currently operated document and / or cross-document content blocks; Based on the visibility state of the parent radio button, the display or hiding of the target content is controlled.

[0112] It will be understood by those skilled in the art that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program may be stored in a storage medium, which is a computer-readable storage medium. The computer program is executed by at least one processor in the computer system to implement the process steps of the embodiments of the above methods.

[0113] Therefore, embodiments of this application also provide a computer-readable storage medium storing a computer program thereon, wherein when the computer program is executed by a processor, it implements the steps of the document content block display / hiding control method as provided in any of the foregoing method embodiments, including: Responds to the user's selection of a target radio button in the currently active document; Determine the parent radio button of the target radio button, and the display state of the parent radio button; Based on the reference information of the target radio button and the preset mapping relationship label table, the target content associated with the target radio button is determined, wherein the target content includes content blocks in the currently operated document and / or cross-document content blocks; Based on the visibility state of the parent radio button, the display or hiding of the target content is controlled.

[0114] The storage medium is a physical, non-transient storage medium, such as a USB flash drive, external hard drive, read-only memory (ROM), magnetic disk, or optical disk, or any other physical storage medium capable of storing program code. The computer-readable storage medium can be non-volatile or volatile.

[0115] Those skilled in the art will 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 implementations should not be considered beyond the scope of this application.

[0116] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For example, the division of each unit is merely a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.

[0117] The steps in the methods of this application embodiment can be adjusted, merged, or deleted according to actual needs. The units in the apparatus of this application embodiment can be merged, divided, or deleted according to actual needs. Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0118] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a terminal, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.

[0119] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0120] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Since these modifications and variations fall within the scope of the claims and their equivalents, this application also intends to include these modifications and variations.

[0121] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for controlling the visibility of content blocks in a document, characterized in that, The method includes the following steps: Responds to the user's selection of a target radio button in the currently active document; Determine the parent radio button of the target radio button, and the display state of the parent radio button; Based on the reference information of the target radio button and the preset mapping relationship label table, the target content associated with the target radio button is determined, wherein the target content includes content blocks in the currently operated document and / or cross-document content blocks; Based on the visibility state of the parent radio button, the display or hiding of the target content is controlled.

2. The method according to claim 1, characterized in that, Determining the parent radio button of the target radio button includes: Determine the radio button group to which the target radio button belongs; Determine whether the content block containing the radio button group contains a numbered cell; In response to the existence of a numbered cell in the content block and the cell content type being number, the system traverses forward block by block from the preset content block position and compares the previous content block according to the level of the numbered cell. If the level of the numbered cell is the highest level, then check whether the previous content block has a letter number; In response to the existence of a letter number in the previous content block and the first radio button cell in the previous content block being horizontal, it is determined whether the first radio button cell is selected. If the first radio button cell is selected, and the associated block tag list of the first radio button cell contains the content block where the radio button group is located, then the first radio button cell is determined to be the parent radio button of the radio button group.

3. The method according to claim 2, characterized in that, After detecting whether the previous content block contains a letter number, the method further includes: In response to the existence of a letter number in the previous content block and the fact that the first radio button cell in the previous content block is vertical, the associated block tag list of the selected radio button and the unselected radio button in the radio button group is obtained respectively. If the associated content type of the selected radio button is an associated content block, and the corresponding associated block tag list contains the content block where the radio button group is located, then the selected radio button is determined to be the parent radio button. If the associated content type of the unselected radio button is an associated content block, and the corresponding associated block tag list contains the content block where the radio button group is located, then the unselected radio button is determined to be the parent radio button.

4. The method according to claim 2, characterized in that, The control of the display or hiding of the target content associated with the target radio button based on the display / hiding state of the parent radio button includes: In response to the parent radio button being in a hidden state, the corresponding child radio button group and the content block containing the child radio button group are hidden. In response to the parent radio button being in a displayed state, the selected radio button in the radio button group is obtained; Determine the associated content type of the selected radio button; Based on the associated content type, control the display or hiding of the target content associated with the target radio button.

5. The method according to claim 4, characterized in that, The method further includes: When the cell reference type of the selected radio button is an external reference, in response to the parent radio button being hidden, the entire content block containing the child radio button group is hidden. In response to the parent radio button being in a show state, the child radio button group is hidden, and the target block where the selected button is located is determined based on the coordinates of the selected radio button. If the selected radio button is a horizontal radio button with a positive attribute, then determine whether the target block has an associated radio button group; If the target block does not have an associated radio button group, then the target block is displayed and the row containing the selected radio button is hidden; If the target block has an associated radio button group, then determine whether the associated radio button group is selected; If the associated radio button group is not selected, the content block associated with the selected radio button is hidden.

6. The method according to claim 5, characterized in that, The method further includes: When the target radio button is a horizontal radio button with a positive attribute, then find the numbered cell associated with the content block containing the target radio button; Based on the existence of the numbered cells and the cell content type, determine the child content blocks of the target radio button, and add the block marker of the child content block to the associated block marker list. Determine whether the target radio button carries a specific keyword annotation; if it carries the specific keyword annotation, then obtain the function block to which the target content belongs; Add the block tag of the function block to the data storage object, and configure the hidden attribute of the function block to true; wherein, the hidden attribute is used to indicate that the function block is hidden when all radio buttons corresponding to all child content blocks within the function block are in a hidden state.

7. The method according to claim 6, characterized in that, The step of determining the child content block of the target radio button based on the existence of the numbered cell and the cell content type includes: If a numbered cell exists and its content type is numeric, then obtain the current number level; traverse the subsequent content blocks downwards from the current content block until a content block with a number level equal to the current number level, a letter-numbered content block, or the document ends is found and the traversal stops; within the traversal range, content blocks with a number level lower than the current number level are identified as child content blocks; If a numbered cell exists and its content type is letters, then traverse downwards from its own content block to the subsequent content blocks until another letter-numbered content block is found or the document ends; within the traversal range, content blocks whose numbered cells have a numeric content type are identified as child content blocks. If no numbered cell exists, determine whether the target content is the first content block in the currently operating document; If the target content is the first content block in the currently operating document, then all content blocks below the target content are determined as child content blocks.

8. A device for controlling the visibility of content blocks in a document, characterized in that, Includes a unit for performing the method as described in any one of claims 1-7.

9. A computer device, characterized in that, The computer device includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program that, when executed by a processor, can implement the method as described in any one of claims 1-7.