File management method and device, medium, electronic equipment and program product

By providing file management methods in the field of computer technology, and using the relationship tree to edit JSON files or YAML files nodes, it solves the problem that users have difficulty editing and configuring these files, and improves the efficiency and accuracy of file configuration.

CN119903026APending Publication Date: 2025-04-29BEIJING YOUZHUJU NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510128772.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-27
Publication Date
2025-04-29

AI Technical Summary

Technical Problem

In the field of computer technology, it is difficult for users to edit and configure JSON files or YAML files, especially complex text editing tasks, and needs to be formatted in the original document to ensure the code is neat and standardized.

Method used

Provides a file management method, by displaying the relationship tree corresponding to the target file, allowing users to edit nodes in the tree structure, update the relationship tree in response to editing operations, and update the target file according to the current relationship tree when publishing operations.

Benefits of technology

Through intuitive tree structure editing, users can easily manage nodes in JSON files or YAML files, improving file configuration efficiency and accuracy and reducing the need for original document editing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119903026A_ABST
    Figure CN119903026A_ABST
Patent Text Reader

Abstract

A file management method and apparatus, a medium, an electronic device and a program product, relating to the technical field of computers, the method comprising: displaying a relationship tree corresponding to a target file, the target file being used for describing structured data, the relationship tree comprising nodes and a directed edge connecting the two nodes, the nodes in the relation tree correspond to the nodes in the target file, and the relation tree is used for describing the nesting relation of the nodes in the target file; in response to an editing operation for a target node in the relation tree, updating the relation tree; according to the method, the release operation is responded, the target file is updated according to the currently displayed relation tree, editing is visually carried out based on the tree structure, editing does not need to be carried out in an original document corresponding to the target file, and the efficiency of managing the file used for describing the structured data is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular, to a file management method, device, medium, electronic device and program product. Background Art

[0002] In the field of computer technology, JSON (JavaScript Object Notation) or YAML (YAML Ain'tMarkup Language) is suitable for describing structured data.

[0003] While machines can quickly understand, read, and store JSON files or YAML files, it is difficult for users to configure JSON files or YAML files by editing the original documents corresponding to the JSON files or YAML files. Summary of the invention

[0004] This summary is provided to introduce concepts in a brief form that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.

[0005] In a first aspect, the present disclosure provides a file management method, comprising: Displaying a relationship tree corresponding to a target file, the target file being used to describe structured data, the relationship tree comprising nodes and directed edges connecting two of the nodes, the nodes in the relationship tree corresponding to the nodes in the target file, and the relationship tree being used to describe the nested relationship of the nodes in the target file; In response to an edit operation on a target node in the relationship tree, updating the relationship tree; In response to the publishing operation, the target file is updated according to the currently displayed relationship tree.

[0006] In a second aspect, the present disclosure provides a file management device, comprising: A display module, used for displaying a relationship tree corresponding to a target file, the target file is used for describing structured data, the relationship tree comprises nodes and directed edges connecting two nodes, the nodes in the relationship tree correspond to nodes in the target file, and the relationship tree is used for describing the nested relationship of the nodes in the target file; A first management module, configured to update the relationship tree in response to an edit operation on a target node in the relationship tree; The second management module is used to respond to the publishing operation and update the target file according to the currently displayed relationship tree.

[0007] In a third aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which implements the steps of the method described in the first aspect when the computer program is executed by a processing device.

[0008] In a fourth aspect, the present disclosure provides an electronic device, including: a storage device having a computer program stored thereon; A processing device is used to execute the computer program in the storage device to implement the steps of the method described in the first aspect.

[0009] In a fifth aspect, the present disclosure provides a computer program product, including a computer program, which implements the steps of the method described in the first aspect when executed by a processor.

[0010] Through the above scheme, the nodes in the relationship tree of the target file correspond to the nodes in the target file, that is, the nested relationship of the nodes in the target file is displayed in the form of a tree, so that the relationship tree can be updated by performing editing operations on the target nodes in the relationship tree, and the target file is further updated according to the currently displayed relationship tree after the publishing operation is triggered, that is, editing is intuitively performed based on the tree structure, and there is no need to edit in the original document corresponding to the target file, thereby improving the efficiency of managing files used to describe structured data.

[0011] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale. In the drawings: Figure 1 The figure is a flowchart of a file management method according to an embodiment of the present disclosure.

[0013] Figure 2 It is a schematic diagram of a relationship tree according to an embodiment of the present disclosure.

[0014] Figure 3 It is a schematic diagram of an interface showing a target interface according to an embodiment of the present disclosure.

[0015] Figure 4a It is a schematic diagram showing the positions of a second target node and a third target node in a relationship tree before performing an exchange according to an embodiment of the present disclosure.

[0016] Figure 4bThis is another schematic diagram showing the positions of a second target node and a third target node in a relationship tree after an exchange is performed according to an embodiment of the present disclosure.

[0017] Figure 5 is another schematic diagram of a relationship tree according to an embodiment of the present disclosure.

[0018] Figure 6a is another schematic diagram of a relationship tree according to an embodiment of the present disclosure.

[0019] Figure 6b is another schematic diagram of a relationship tree according to an embodiment of the present disclosure.

[0020] Figure 7 is another schematic diagram of a relationship tree according to an embodiment of the present disclosure.

[0021] Figure 8 It is a block diagram of a file management device according to an embodiment of the present disclosure.

[0022] Fig. 9 It is a schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0023] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0024] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0025] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0026] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0027] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0028] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0029] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0030] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0031] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0032] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0033] At the same time, it is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

[0034] In the field of computer technology, JSON (JavaScript Object Notation) or YAML (YAML Ain'tMarkup Language) is suitable for describing structured data.

[0035] For machines, they can quickly understand, read, and store JSON files or YAML files. For users, it is difficult to configure JSON files or YAML files by editing the original documents corresponding to the JSON files or YAML files. Especially for some complex text editing, such as code editing, formatting is required before editing to ensure that the code format is neat and standardized, so as to facilitate reading and maintenance.

[0036] In view of this, the embodiments of the present disclosure disclose a file management method, device, medium, electronic device and program product.

[0037] The embodiments of the present disclosure are further explained and illustrated below in conjunction with the accompanying drawings.

[0038] Figure 1 1 is a flowchart of a file management method according to an embodiment of the present disclosure. The file management method can be applied to an electronic device, and the file management method can be executed by a file management device, wherein the file management device can be implemented by software and / or hardware, and the software and / or hardware can be configured in the electronic device. Figure 1 , the file management method may include the following steps: Step 110, displaying a relationship tree corresponding to the target file, the target file is used to describe structured data, the relationship tree includes nodes and directed edges connecting two nodes, the nodes in the relationship tree correspond to the nodes in the target file, and the relationship tree is used to describe the nested relationship of the nodes in the target file; Step 120, in response to an edit operation on a target node in the relationship tree, updating the relationship tree; Step 130, in response to the publishing operation, updating the target file according to the currently displayed relationship tree.

[0039] Through the above scheme, the nodes in the relationship tree of the target file correspond to the nodes in the target file, that is, the nested relationship of the nodes in the target file is displayed in the form of a tree, so that the relationship tree can be updated by performing editing operations on the target nodes in the relationship tree, and the target file is further updated according to the currently displayed relationship tree after the publishing operation is triggered, that is, editing is intuitively performed based on the tree structure, and there is no need to edit in the original document corresponding to the target file, thereby improving the efficiency of managing files used to describe structured data.

[0040] The target file can be a JSON file or a YAML file. Taking the JSON file as an example, the data in the JSON file is similar to a tree structure. By traversing the tree, each node in the JSON file is turned into a node of the relationship tree, and the traversed nodes are assembled into a complete relationship tree. In this way, the target node in the relationship tree can be operated intuitively, so as to achieve the purpose of operating the corresponding node in the JSON file. For complex nodes in the JSON file, you can directly edit the nodes in the relationship tree without making changes in the document corresponding to the target file.

[0041] Taking JSON files as an example, the node types of nodes in JSON files can include basic types, object types, and array types. Among them, the basic type corresponds to the basic type value, such as string, number, Boolean value and NULL, and the basic node corresponding to the basic type has no child nodes. The object node corresponding to the object type and the array node corresponding to the array type are both nodes with child nodes. For object nodes, the object node corresponds to an object in the JSON file. Each object is surrounded by curly brackets. Each key in the object can be regarded as the name of the node, and the value can be the child node of the node, and the value can be another object, array or basic type value. That is, in the relationship tree, each key in the object corresponds to a node, and the value of the key corresponds to the child node of the node, and the child node is connected to the node through a directed edge.

[0042] An array node corresponds to an array in a JSON file, and the array is surrounded by square brackets. It contains a set of ordered elements, each of which can be regarded as a child node. That is, in the relational tree, the key of the array corresponds to a node, and the value of the key corresponds to the child node of the node, which is connected to the node through a directed edge.

[0043] Figure 2 FIG. 1 is a schematic diagram of a relationship tree according to an embodiment of the present disclosure. Figure 2 In the relation tree, each rectangular box is a node. In the relation tree, a node including key-value pair data (e.g., field 1: value 1) can be understood as a basic node 201. Key 1 can be understood as a key of an object node 202 in a JSON file. Key 6 can be understood as a key of an array node 203 in a JSON file. Element 1, element 2, and element 3 are child nodes of the array node 203. The child nodes can be understood as basic nodes corresponding to basic type values. In addition, key 2, key 3, key 4, and key 5 can be understood as a type of object node.

[0044] In a possible manner, for a node that has child nodes, the node may also include information about the number of its child nodes. For example, Figure 2The “(2)” in the object node 202 shown is the number of child nodes of the object node 202, which increases the diversity of information displayed by the relationship tree.

[0045] The editing operation of the target node can achieve the deletion, addition, data modification, and position adjustment of the node in the relationship tree, etc. The above step S120 is exemplarily described below.

[0046] In a possible manner, the above-mentioned step S120 can be implemented in the following manner: in response to a trigger operation on a first target node in the relationship tree, a target interface is displayed, the first target node includes data represented by a target code language; in response to a trigger operation on the target interface, the data represented by the target code language in the first target node is displayed through a target code editor; in response to an editing operation triggered by the target code editor, the data represented by the target code language in the first target node is updated.

[0047] The triggering operation of the first target node may be achieved by single-clicking or double-clicking the first target node.

[0048] The target interface may be displayed in an interface superimposed on the relationship tree, and the interface may include the content in the node and the target interface. Figure 3 It is a schematic diagram of an interface showing a target interface according to an embodiment of the present disclosure. Figure 3 The control “Edit” shown can be regarded as a target interface, and the triggering operation of the target interface can be realized by clicking the control “Edit”.

[0049] It is worth noting that in the target file, the data represented by the target code language is displayed in the form of a string without formatting, so there is no comment information or highlight information to assist users in understanding the code.

[0050] It is worth noting that the data represented by the target code language in the first target node displayed by the target code editor is formatted.

[0051] Therefore, the formatted data can include annotation information or highlight information to assist users in editing, and the information takes effect directly after the editing is completed, thereby solving the problem of complex editing of complex content and improving the configuration efficiency of the target file.

[0052] In a possible manner, when the first target node does not include data represented by the target code language, such as a base node, the content in the first target node can be edited directly, for example, Figure 2 The target node 201 shown is the first target node as an example, and can be directly edited Figure 2The content in the target node 201 shown is used to change the node content in the target node 201, for example, deleting "field 1: value 1" in the target node 201.

[0053] In a possible manner, the above step S120 can be implemented in the following manner: in response to a drag operation on the second target node in the relationship tree, according to the third target node in the relationship tree targeted when the drag operation is stopped, the positions of the second target node and the third target node in the relationship tree before the drag operation is performed are exchanged.

[0054] It should be noted that the third target node and the second target node are target nodes that need to exchange positions. The third target node in the relationship tree targeted when the dragging operation is stopped can be determined based on the target nodes within the position range of the second target node when the dragging operation is stopped.

[0055] Figure 4a is a schematic diagram showing the positions of a second target node and a third target node in a relationship tree before performing an exchange according to an embodiment of the present disclosure, Figure 4b is another schematic diagram showing the positions of the second target node and the third target node in the relationship tree after the exchange is performed according to an embodiment of the present disclosure. Figure 4a and Figure 4b , the user can select the second target node 401 in the relationship tree and drag the second target node 401 along the dragging track 403 until it reaches Figure 4a The dragging operation is stopped in the area where the dotted ellipse 404 is located, and then the third target node 402 is determined according to the dotted ellipse 404. Then, the positions of the second target node 401 and the third target node 402 are switched. The relationship tree after the switching position can be referred to Figure 4b The relationship tree shown.

[0056] It is worth mentioning that in the related technology, it is necessary to complete the exchange of content between nodes through a copy operation, that is, copy the content of the second target node to the location of the document in the third target node, and then copy the content of the third target node to the location of the document in the second target node, and delete the content before copying in the second target node and the third target node. Since multiple steps are required, this method is more cumbersome.

[0057] Through the above method, the position switching between two target nodes can be completed by simply dragging, thereby realizing the exchange of the structures of the contents corresponding to the nodes in the target file, simplifying the content exchange operation and improving the configuration efficiency of the target file.

[0058] In a possible manner, the above step S120 may be implemented in the following manner: in response to an add operation on the fourth target node in the relationship tree, a child node of the fourth target node is added in the relationship tree.

[0059] It is worth noting that the fourth target node is a node that supports adding child nodes, that is, the fourth target node is a non-basic node.

[0060] Figure 5 is another schematic diagram of a relationship tree according to an embodiment of the present disclosure. Figure 5 The child node 502 of the fourth target node 501 in the relationship tree is added in response to an adding operation on the fourth target node 501 in the relationship tree. The added child node 502 can support editing by a user to add content of the child node 502.

[0061] Furthermore, when adding a child node, its node type may be configured, for example, configured as an object type.

[0062] Through the above method, the addition of nodes in the relationship tree is realized, and then the synchronous addition of content in the target file is realized.

[0063] In a possible manner, the above step S120 may be implemented in the following manner: in response to a deletion operation on the fifth target node in the relationship tree, the fifth target node is deleted in the relationship tree.

[0064] When the fifth target node includes child nodes, when the fifth target node in the relationship tree is deleted, the child nodes of the fifth target node in the relationship tree may be deleted synchronously.

[0065] Through the above method, the nodes in the relationship tree are deleted, and then the content in the target file is synchronously deleted.

[0066] In a possible manner, after executing the deletion operation on the fifth target node, a prompt message for confirming the deletion may be displayed. When the user confirms the deletion in response to the prompt message, the fifth target node is deleted from the relationship tree to avoid accidental deletion of content in the target file.

[0067] It is understandable that when a node in the relationship tree is deleted or added, the number of child nodes of the node may change. When the number is displayed in the node, the display of the number of child nodes of the relevant node may be synchronously updated when the node in the relationship tree is deleted or added.

[0068] In a possible manner, the above-mentioned file management method may further include the following steps: in response to an adaptive operation triggered on a relationship tree, adjusting a position of a target element in the relationship tree, the target element including nodes and / or edges, and the readability of the relationship tree before adjusting the position of the target element is lower than the readability after adjusting the position of the target element.

[0069] The adaptive operation can be done by clicking Figure 2 The adaptive control 204 implementation is shown.

[0070] It is worth noting that the interface that displays the relationship tree supports users to drag the position of each node, so that the position of each node and the trend of the edge can change. When the number of nodes is large, the position of the node or the trend of the edge will affect the readability of the relationship tree. It should also be noted that readability can be evaluated from multiple dimensions, such as the trend of the edge or whether the nodes at the same level are in the same horizontal or vertical direction. Obviously, the readability of nodes at the same level in the same horizontal or vertical direction is higher than the readability of nodes at the same level that are not in the same horizontal or vertical direction.

[0071] For example, whether nodes at the same level are in the same horizontal direction is used as a dimension to evaluate readability. Figure 6a is another schematic diagram of a relationship tree according to an embodiment of the present disclosure, Figure 6b FIG. 1 is another schematic diagram of a relationship tree according to an embodiment of the present disclosure. Figure 6a and Figure 6b , target node 601 and target node 602 are nodes of the same level. From top to bottom, target node 601 and target node 602 are in Figure 6a The nodes in the same level are not displayed in the same vertical direction, which affects the readability of the relationship tree.

[0072] By clicking the adaptive control 204 to trigger the adaptive operation, you can get Figure 6b In the relationship tree shown, target node 601 and target node 602 are automatically adjusted to improve the readability of the relationship tree.

[0073] In a possible manner, the above-mentioned file management method may further include the following steps: in response to a switching operation on the display style of the relationship tree, switching the first display style of the relationship tree to a second display style, the first display style being one of a style for displaying nested relationships in a horizontal direction and a style for displaying nested relationships in a vertical direction, and the second display style being the other of a style for displaying nested relationships in a horizontal direction and a style for displaying nested relationships in a vertical direction.

[0074] The interface for displaying the relationship tree provides a control for triggering the switching operation. Figure 2The control 205 and the control 206 are shown. The control 205 corresponds to one of the first display style and the second display style, and the control 206 corresponds to the other of the first display style and the second display style. Specifically, the control 205 corresponds to a style that displays the nested relationship in a horizontal direction (e.g., from left to right), and the control 206 corresponds to a style that displays the nested relationship in a vertical direction (e.g., from top to bottom).

[0075] Figure 2 The displayed relationship tree is a style that displays nested relationships in a horizontal direction. It can be understood that the user browses the displayed nested relationships in a horizontal direction, that is, from a left to right perspective.

[0076] Figure 7 is another schematic diagram of a relationship tree according to an embodiment of the present disclosure. Specifically, Figure 7 The relationship tree is displayed in a vertical nested relationship style. Users browse the displayed nested relationships in a vertical direction, that is, from a top-down perspective.

[0077] Through the above method, multiple styles of displaying the relationship tree are supported to adapt to the different browsing habits of different users.

[0078] In a possible manner, the above file management method may further include the following step: in response to a search operation for a sixth target node in the relationship tree, highlighting the sixth target node in a window displaying the relationship tree.

[0079] The highlighting may be centered in the window, highlighted, and the like.

[0080] Through the above method, users are supported to search for target nodes, so as to improve the efficiency of users in finding nodes when the number of target nodes is large.

[0081] In a possible manner, the above step 130 can be implemented in the following manner: in response to a first publishing operation, a prompt message is displayed, where the prompt message is used to indicate the difference information between the target file that was last published and the target file corresponding to the currently displayed relationship tree; in response to a second publishing operation triggered by the prompt message, the target file is updated according to the currently displayed relationship tree.

[0082] It is understandable that when the prompt information is displayed, a control supporting triggering the second publishing operation is further displayed.

[0083] It is worth noting that updating the target file means that the new target file takes effect, and the application that depends on the target file will be supported based on the updated target file.

[0084] Therefore, the difference information between the target file that was published last time and the target file corresponding to the currently displayed relationship tree is displayed, so that users can view all updated content, and support secondary confirmation operations for updating target files, thereby improving the fault tolerance of target file configuration.

[0085] In possible ways, continue to refer to Figure 2 The electronic device can respond to the trigger operation on the control 208 and withdraw the last editing operation on the target node, or cancel the withdrawal. It is worth noting that the editing operation here can be understood as the above-mentioned operation of adding a node and deleting a node, etc.

[0086] In possible ways, continue to refer to Figure 2 The relationship tree can be enlarged or reduced through the control 209 to change the view of the relationship tree.

[0087] Figure 8 is a block diagram of a file management device according to an embodiment of the present disclosure. Figure 8 , the file management device 800 may include: Display module 801, used to display a relationship tree corresponding to a target file, the target file is used to describe structured data, the relationship tree includes nodes and directed edges connecting two nodes, the nodes in the relationship tree correspond to nodes in the target file, and the relationship tree is used to describe the nested relationship of the nodes in the target file; A first management module 802, configured to update the relationship tree in response to an edit operation on a target node in the relationship tree; The second management module 803 is used to respond to the publishing operation and update the target file according to the currently displayed relationship tree.

[0088] Optionally, the first management module 802 is further configured to: In response to a trigger operation on a first target node in the relationship tree, displaying a target interface, wherein the first target node includes data represented by a target code language; In response to a trigger operation on the target interface, displaying data represented by the target code language in the first target node through a target code editor; In response to an editing operation triggered by the target code editor, data represented by the target code language in the first target node is updated.

[0089] Optionally, the first management module 802 is further configured to: In response to a drag operation on a second target node in the relationship tree, positions of the second target node and the third target node in the relationship tree before the drag operation is performed are exchanged according to a third target node in the relationship tree targeted when the drag operation is stopped.

[0090] Optionally, the first management module 802 is further configured to: In response to an adding operation on a fourth target node in the relationship tree, a child node of the fourth target node is added in the relationship tree.

[0091] Optionally, the first management module 802 is further configured to: In response to a deletion operation on a fifth target node in the relationship tree, the fifth target node is deleted in the relationship tree.

[0092] Optionally, the file management device 800 further includes: An adaptive module is used to adjust the position of a target element in the relationship tree in response to an adaptive operation triggered on the relationship tree, wherein the target element includes the node and / or the edge, and the readability of the relationship tree before adjusting the position of the target element is lower than the readability after adjusting the position of the target element.

[0093] Optionally, the file management device 800 further includes: A style switching module is used to switch a first display style of the relationship tree to a second display style in response to a switching operation on the display style of the relationship tree, wherein the first display style is one of a style for displaying the nested relationship in a horizontal direction and a style for displaying the nested relationship in a vertical direction, and the second display style is the other of a style for displaying the nested relationship in the horizontal direction and a style for displaying the nested relationship in the vertical direction.

[0094] Optionally, the file management device 800 further includes: The search module is configured to, in response to a search operation for a sixth target node in the relationship tree, highlight the sixth target node in a window displaying the relationship tree.

[0095] Optionally, the second management module 803 is further used to: In response to the first publishing operation, displaying prompt information, the prompt information is used to indicate the difference information between the target file that was published last time and the target file corresponding to the currently displayed relationship tree; In response to a second publishing operation triggered by the prompt information, the target file is updated according to the currently displayed relationship tree.

[0096] The implementation of each module in the above-mentioned file management device 800 can refer to the above-mentioned related embodiments, and this embodiment will not be described in detail here.

[0097] The embodiment of the present disclosure also provides a computer-readable medium on which a computer program is stored. When the computer program is executed by a processing device, the steps of the above-mentioned file management method are implemented.

[0098] The embodiment of the present disclosure also provides a computer program product, including a computer program, which implements the steps of the above-mentioned file management method when executed by a processor.

[0099] The present disclosure also provides an electronic device, including: a storage device having a computer program stored thereon; A processing device is used to execute the computer program in the storage device to implement the steps of the above-mentioned file management method.

[0100] Reference below Fig. 9 , which shows a schematic diagram of the structure of an electronic device 900 suitable for implementing the embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig. 9 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0101] like Fig. 9 As shown, the electronic device 900 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage device 908 into a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the electronic device 900 are also stored. The processing device 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.

[0102] Typically, the following devices may be connected to the I / O interface 905: an input device 906 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 907 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 908 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 909. The communication device 909 may allow the electronic device 900 to communicate with other devices wirelessly or by wire to exchange data. Although Fig. 9 The electronic device 900 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0103] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 909, or installed from a storage device 908, or installed from a ROM 902. When the computer program is executed by the processing device 901, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0104] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0105] In some embodiments, the electronic devices may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0106] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0107] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: displays a relationship tree corresponding to a target file, the target file is used to describe structured data, the relationship tree includes nodes and directed edges connecting two nodes, the nodes in the relationship tree correspond to the nodes in the target file, and the relationship tree is used to describe the nested relationship of the nodes in the target file; in response to an editing operation on a target node in the relationship tree, the relationship tree is updated; in response to a publishing operation, the target file is updated according to the currently displayed relationship tree.

[0108] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0109] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0110] The modules involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a module does not, in some cases, limit the module itself.

[0111] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0112] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0113] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0114] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0115] Although the subject matter has been described in language specific to structural features and / or method logic actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims. Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.

Claims

1. A file management method, characterized in that: include: Displaying a relationship tree corresponding to a target file, the target file being used to describe structured data, the relationship tree comprising nodes and directed edges connecting two of the nodes, the nodes in the relationship tree corresponding to the nodes in the target file, and the relationship tree being used to describe the nested relationship of the nodes in the target file; In response to an edit operation on a target node in the relationship tree, updating the relationship tree; In response to the publishing operation, the target file is updated according to the currently displayed relationship tree.

2. The method according to claim 1, characterized in that The updating of the relationship tree in response to the editing operation on the target node in the relationship tree comprises: In response to a trigger operation on a first target node in the relationship tree, displaying a target interface, wherein the first target node includes data represented by a target code language; In response to a trigger operation on the target interface, displaying data represented by the target code language in the first target node through a target code editor; In response to an editing operation triggered by the target code editor, data represented by the target code language in the first target node is updated.

3. The method according to claim 1, characterized in that The updating of the relationship tree in response to the editing operation on the target node in the relationship tree comprises: In response to a drag operation on a second target node in the relationship tree, positions of the second target node and the third target node in the relationship tree before the drag operation is performed are exchanged according to a third target node in the relationship tree targeted when the drag operation is stopped.

4. The method according to claim 1, characterized in that The updating of the relationship tree in response to the editing operation on the target node in the relationship tree comprises: In response to an adding operation on a fourth target node in the relationship tree, a child node of the fourth target node is added in the relationship tree.

5. The method according to claim 1, characterized in that The updating of the relationship tree in response to the editing operation on the target node in the relationship tree comprises: In response to a deletion operation on a fifth target node in the relationship tree, the fifth target node is deleted in the relationship tree.

6. The method according to claim 1, characterized in that The method further comprises: In response to an adaptive operation triggered on the relationship tree, a position of a target element in the relationship tree is adjusted, the target element including the node and / or the edge, and the readability of the relationship tree before the position of the target element is adjusted is lower than the readability after the position of the target element is adjusted.

7. The method according to claim 1, characterized in that The method further comprises: In response to a switching operation on the display style of the relationship tree, the first display style of the relationship tree is switched to a second display style, wherein the first display style is one of a style for displaying the nested relationship in a horizontal direction and a style for displaying the nested relationship in a vertical direction, and the second display style is the other of a style for displaying the nested relationship in the horizontal direction and a style for displaying the nested relationship in the vertical direction.

8. The method according to claim 1, characterized in that: The method further comprises: In response to a search operation for a sixth target node in the relationship tree, the sixth target node is highlighted in a window displaying the relationship tree.

9. The method according to claim 1, characterized in that: In response to the publishing operation, updating the target file according to the currently displayed relationship tree includes: In response to the first publishing operation, displaying prompt information, the prompt information is used to indicate the difference information between the target file that was published last time and the target file corresponding to the currently displayed relationship tree; In response to a second publishing operation triggered by the prompt information, the target file is updated according to the currently displayed relationship tree.

10. A file management device, characterized in that: include: A display module, used for displaying a relationship tree corresponding to a target file, the target file is used for describing structured data, the relationship tree comprises nodes and directed edges connecting two nodes, the nodes in the relationship tree correspond to nodes in the target file, and the relationship tree is used for describing the nested relationship of the nodes in the target file; A first management module, configured to update the relationship tree in response to an edit operation on a target node in the relationship tree; The second management module is used to respond to the publishing operation and update the target file according to the currently displayed relationship tree.

11. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processing device, the steps of the method according to any one of claims 1 to 9 are implemented.

12. An electronic device, characterized in that: include: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1 to 9.

13. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.