Integration Method, Device, Storage Medium, and Electronic Device for Document Resources

By integrating document resources across multiple tools and generating a unified directory, the method addresses the inefficiencies in document management, enabling centralized and efficient access to project documents.

CN112650712BActive Publication Date: 2025-07-15MICRO INSURANCE AGENCY LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011566139.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-25
Publication Date
2025-07-15
Estimated Expiration
2040-12-25

AI Technical Summary

Technical Problem

In the prior art, document resources are inefficient in management among different tools, resulting in difficulty in finding and sharing, lack of unified specifications, affecting development and collaboration efficiency.

Method used

By obtaining the document information of the target project, integrating document resources in different document tools, generating directory files, and storing their correspondence, providing a unified query and presentation method.

Benefits of technology

It realizes efficient management and sharing of document resources, improves project documents search and collaboration efficiency, and solves the problem of low management efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112650712B_ABST
    Figure CN112650712B_ABST
Patent Text Reader

Abstract

The present application relates to an integration method, device, storage medium, and electronic device for document resources. The method includes: obtaining target document information corresponding to a target project, where the target document information is used to indicate the storage information of the document resources of the target project in at least one document tool; obtaining the target document resources of the target project from at least one document tool according to the target document information; generating a directory file corresponding to the target document resources, where the directory file is used to display the target document resources according to a query request for the target document resources; and storing the target project and the directory file with a corresponding relationship. The present application solves the technical problem of low management efficiency of document resources in the related art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computers, and in particular, to a method, apparatus, storage medium, and electronic device for integrating document resources. Background Art

[0002] Currently, the sharing tools for document resources vary from person to person, and it is very difficult for everyone in a unified project to use a certain tool. For developers, they relatively prefer to use a document tool that can write documents in the project, facilitate information transfer, and enable newcomers to quickly find the corresponding documents. For products, they like to use a document tool that is easy to use, but the biggest drawback of this kind of document tool is that it cannot be copied. For project managers, they will use a document tool that can conveniently manage requirements, make R & D more efficient, and collaboration more agile.

[0003] Most companies do not have a unified specification for document project management, resulting in developers creating documents randomly, with scattered and difficult-to-find documents. Various documents are scattered in various document tools and cannot be centrally managed. Due to security considerations, each document tool has corresponding read and write permissions, making it very troublesome to share documents.

[0004] In response to the above problems, no effective solution has been proposed yet. Summary of the Invention

[0005] This application provides a method, apparatus, storage medium, and electronic device for integrating document resources to at least solve the technical problem of low management efficiency of document resources in related technologies.

[0006] According to one aspect of an embodiment of this application, a method for integrating document resources is provided, including: obtaining target document information corresponding to a target project, where the target document information is used to indicate storage information of document resources of the target project in at least one document tool; obtaining target document resources of the target project from at least one of the document tools according to the target document information; generating a directory file corresponding to the target document resources, where the directory file is used to display the target document resources according to a query request for the target document resources; and storing the target project and the directory file with a corresponding relationship.

[0007] According to another aspect of the embodiments of the present application, there is also provided an integration device for document resources, including: a first acquisition module, configured to acquire target document information corresponding to a target project, where the target document information is used to indicate storage information of the document resources of the target project in at least one document tool; a second acquisition module, configured to acquire the target document resources of the target project from at least one of the document tools according to the target document information; a generation module, configured to generate a directory file corresponding to the target document resources, where the directory file is used to display the target document resources according to a query request of the target document resources; and a storage module, configured to store the target project and the directory file with a corresponding relationship.

[0008] Optionally, the second acquisition module includes: a first processing unit, configured to, when there is a first document tool in at least one of the document tools whose resource format of the document resources is a target format, clone and store a document file of the target project from the first document tool as the target document resources according to the target document information, where the target format is a document resource format that allows being rendered onto a page; a second processing unit, configured to, when there is a second document tool in at least one of the document tools whose resource format of the document resources is a non-target format, generate and store a document file in the target format corresponding to the target project as the target document resources by using a target address link of the document resources of the target project in the second document tool, where the target document information includes the target address link.

[0009] Optionally, the first processing unit is configured to: access a target document access address included in the target document information in the first document tool by using a permission account, where the permission account is an account having global read permission in the first document tool; clone a document file indicated by a target pull directory included in the target document information from the target document access address as the target document resources; and store the target project and the target document resources with a corresponding relationship in a database.

[0010] Optionally, the second processing unit is configured to: generate an initial document file in the target format corresponding to the target project according to an item identifier of the target project; add the target address link under a target tag in the initial document file to obtain the target document resources, where the target tag is used to mark an operation of loading a page indicated by the content added in the target tag; and store the target project and the target document resources with a corresponding relationship in a database.

[0011] Optionally, the generating module includes: a generating unit configured to generate an initial directory file corresponding to the target project according to the project identifier of the target project; and an adding unit configured to add the document title of the target document resource having a corresponding relationship and the resource path of the target document resource to the initial directory file to obtain the directory file.

[0012] Optionally, the adding unit is configured to: add the document title of the target document resource having a corresponding relationship and the resource path of the target document resource to the initial directory file to obtain a candidate directory file; in response to a second editing operation performed on the candidate directory file, edit the candidate directory file in response to the second editing operation to obtain an edited file; and in response to a confirmation operation performed on the candidate directory file or the edited file, determine the candidate directory file or the edited file as the directory file.

[0013] Optionally, the apparatus further includes: a third obtaining module configured to, after storing the target project and the directory file having a corresponding relationship, obtain the directory file corresponding to the target project when a target query request triggered by the target project is detected on a document display page; a first rendering module configured to render the directory file in a first area on the document display page; a fourth obtaining module configured to obtain a document file corresponding to the target document title when a selection operation performed on the target document title in the displayed document titles is detected in the first area; and a second rendering module configured to render the document file corresponding to the target document title in a second area on the document display page.

[0014] Optionally, the apparatus further includes: a fifth obtaining module configured to, after storing the target project and the directory file having a corresponding relationship, obtain an updated document resource in the document resources of the target project from at least one of the document tools when it is detected that the document resources corresponding to the target project in at least one of the document tools are updated; a first updating module configured to update the updated document resource to the target document resource; and a second updating module configured to update the directory file using the resource information of the updated document resource.

[0015] On the other hand, according to an embodiment of the present application, there is also provided a storage medium including a stored program, where the program executes the method described above when running.

[0016] On the other hand, according to an embodiment of the present application, there is also provided an electronic device including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the method described above through the computer program.

[0017] According to another aspect of the embodiments of the present application, there is also provided a computer program product or a computer program. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the steps of any one of the above-described document resource integration methods.

[0018] In the embodiments of the present application, the method includes obtaining target document information corresponding to a target project, where the target document information is used to indicate storage information of the document resources of the target project in at least one document tool; obtaining target document resources of the target project from at least one document tool according to the target document information; generating a directory file corresponding to the target document resources, where the directory file is used to display the target document resources according to a query request for the target document resources; and storing the target project and the directory file with a corresponding relationship. By obtaining the target document information indicating the storage information of the document resources of the target project in at least one document tool, and obtaining the target document resources of the target project from at least one document tool as the target document resources, the purpose of integrating and storing project documents is achieved, and a directory file corresponding to the target document resources is generated to display the target document resources according to a query request for the target document resources, and the target project and the directory file with a corresponding relationship are stored, achieving the purpose of efficiently sharing project documents, thereby realizing the technical effect of improving the management efficiency of document resources, and further solving the technical problem of low management efficiency of document resources in the related art. Description of the Drawings

[0019] The accompanying drawings here are incorporated into the specification and form a part of the specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application.

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0021] Figure 1 is a schematic diagram of the hardware environment of the document resource integration method according to the embodiments of the present application;

[0022] Figure 2 is a flowchart of an optional document resource integration method according to the embodiments of the present application;

[0023] Figure 3It is a schematic diagram of a configuration process of document information according to an alternative embodiment of the present application;

[0024] Figure 4 It is a schematic diagram of a process of obtaining document resources from a document tool according to an alternative embodiment of the present application;

[0025] Figure 5 It is a schematic diagram of a process of generating a directory file according to an alternative embodiment of the present application;

[0026] Figure 6 It is a schematic diagram of rendering a document display page according to an alternative embodiment of the present application;

[0027] Figure 7 It is a schematic diagram of an update process of document resources according to an alternative embodiment of the present application;

[0028] Figure 8 It is a schematic diagram of an integrated management process of document resources according to an alternative embodiment of the present application;

[0029] Figure 9 It is a schematic diagram of an optional integrated device for document resources according to an embodiment of the present application;

[0030] Figure 10 It is a structural block diagram of an electronic device according to an embodiment of the present application. Detailed implementation manners

[0031] In order to enable those skilled in the art to better understand the solution of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

[0032] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0033] According to one aspect of the embodiments of the present application, an embodiment of a method for integrating document resources is provided.

[0034] Optionally, in this embodiment, the above method for integrating document resources can be applied to a hardware environment composed of a terminal 101 and a server 103 as shown in Figure 1 the figure. As shown in Figure 1 the figure, the server 103 is connected to the terminal 101 through a network and can be used to provide services (such as game services, application services, etc.) for the terminal or the client installed on the terminal. A database can be set on the server or independently of the server to provide data storage services for the server 103. The above network includes but is not limited to: wide area network, metropolitan area network or local area network. The terminal 101 is not limited to a PC, mobile phone, tablet computer, etc. The method for integrating document resources in the embodiments of the present application can be executed by the server 103, or can be executed by the terminal 101, or can also be jointly executed by the server 103 and the terminal 101. Among them, the execution of the method for integrating document resources in the embodiments of the present application by the terminal 101 can also be executed by the client installed thereon.

[0035] Figure 2 is a flowchart of an optional method for integrating document resources according to the embodiments of the present application. As shown in Figure 2 the figure, the method may include the following steps:

[0036] Step S202, obtaining target document information corresponding to a target project, where the target document information is used to indicate storage information of the document resources of the target project in at least one document tool;

[0037] Step S204, obtaining target document resources of the target project from at least one of the document tools according to the target document information;

[0038] Step S206, generating a directory file corresponding to the target document resources, where the directory file is used to display the target document resources according to a query request for the target document resources;

[0039] Step S208, storing the target project and the directory file with a corresponding relationship.

[0040] Through the above steps S202 to S208, the target document resources of the target project are obtained from at least one document tool according to the target document information obtained for indicating the storage information of the document resources of the target project in at least one document tool, achieving the purpose of integrating and storing project documents, and generating a directory file corresponding to the target document resources for displaying the target document resources according to the query request of the target document resources, and storing the target project and the directory file with the corresponding relationship, achieving the purpose of efficiently sharing project documents, thereby realizing the technical effect of improving the management efficiency of document resources, and further solving the technical problem of low management efficiency of document resources in the related art.

[0041] Optionally, in this embodiment, the above document resource integration method can be applied but not limited to on document resource integration tools, such as: document resource integration plugins, document resource integration websites, document resource integration applications, etc.

[0042] In an alternative implementation manner, a document system can be provided to execute the document resource integration method. The document system can be divided into a document system management front end, a document system management back end, and a document system display front end. The document system management front end can be provided but not limited to users with management accounts for using documents to configure the information of document resources. The document system management back end executes the document resource integration process according to the configuration of the user in the document system management front end. The document system display front end is provided to users who need to view document resources to display the document resources for them.

[0043] In the technical solution provided in step S202, the target project can be but not limited to include various projects that require interaction using documents. Such as: product R & D projects, marketing projects, operation projects, etc.

[0044] Optionally, in this embodiment, at least one document tool can be but not limited to include various types of document tools, such as: tapd, LeXiang, git, etc.

[0045] Optionally, in this embodiment, the above document tools have different characteristics and can be divided into different types. For example: they can be divided according to the format of the document resources in the document tool, and can be divided into a first document tool with the resource format of the document resources being the target format and a second document tool with the resource format of the document resources being a non-target format. The above target format can be but not limited to a format that can be rendered on the page, such as:.md format. Among them, git belongs to the first document tool, and tapd and LeXiang belong to the second document tool.

[0046] As an alternative embodiment, obtaining the target document information corresponding to the target project includes:

[0047] S11. Display a configuration page, where the configuration page is used to configure the document information of the document resource to be acquired.

[0048] S12. Edit the configuration page in response to a first editing operation performed on the configuration page.

[0049] S13. When a target operation performed on the configuration page is detected, obtain the edited content in the document information from the configuration page as the target document information.

[0050] Optionally, in this embodiment, the document information can be configured through the above process, but not limited to this. A configuration page for document information can be provided on the integration tool for document resources. An administrator can use an administrator account to edit on the configuration page according to the content provided on the configuration page, such as filling in the document title, document source, document address, etc.

[0051] Optionally, in this embodiment, the first editing operation can include, but not limited to, text input operation, path selection operation, tick operation, etc.

[0052] Optionally, in this embodiment, the target operation can refer to, but not limited to, a confirmation operation performed on the configuration page, such as clicking a confirmation button, triggering a confirmation icon, etc.

[0053] As an alternative embodiment, displaying the configuration page includes:

[0054] S21. When there is a first document tool among at least one of the document tools whose resource format of the document resource is the target format, display a first configuration page, where the first configuration page is used to configure the document access address and pull directory of the document resource to be acquired, and the target format is a document resource format that allows being rendered onto the page.

[0055] S22. When there is a second document tool among at least one of the document tools whose resource format of the document resource is a non-target format, display a second configuration page, where the second configuration page is used to configure the document address link of the document resource to be acquired.

[0056] Optionally, in this embodiment, different types of document tools can provide different types of configuration pages to obtain document information, but not limited to this. For the first document tool whose resource format of the document resource is the target format, positions for configuring the document access address and pull directory of the document resource to be acquired can be provided in the displayed first configuration page. For the second document tool whose resource format of the document resource is a non-target format, positions for configuring the document address link of the document resource to be acquired can be provided in the displayed second configuration page.

[0057] Optionally, in this embodiment, before displaying the configuration page, options of the document tool type may also be provided, and then the corresponding configuration page is displayed according to the selection of the document tool type. Alternatively, the first configuration page may also be displayed first. If no first editing operation performed on the first configuration page is detected but a target operation is directly detected, the second configuration page is displayed, and the first editing operation performed on the second configuration page is detected.

[0058] In an alternative embodiment, a configuration method for document information is provided. Figure 3 It is a schematic diagram of a configuration process for document information according to an alternative embodiment of the present application. As Figure 3 shown, the document information of Service 1, Service 2, Service 3, and Service 4 has been configured. Clicking the edit button corresponding to each service can jump to the edit page of each service, and clicking the delete button corresponding to each service can delete each service. Clicking the new document button can jump to the first configuration page to configure the document information of the new document. On the first configuration page, the document title, weight (used to indicate the display order of the document), document address, and pull directory can be filled in. Clicking the next button can generate the left-side navigation bar according to the md file name obtained from git and jump to the edit page of the left-side navigation bar. Among them, if the document address and pull directory are not filled in on the first configuration page and the next button is clicked, it can also jump to the edit page of the left-side navigation bar. At this time, the edit page of the left-side navigation bar can be embedded in the iframe as the second configuration page. On the left side of the edit page of the left-side navigation bar, the navigation bar code in json format can be displayed, and the person filling it in can edit the navigation bar code in json format. The json format can be used to modify the navigation bar structure. On the right side of the edit page of the left-side navigation bar, the rendering effect of the code can be displayed. Clicking the previous step on the edit page of the left-side navigation bar can return to the first configuration page, and clicking the next step can complete the configuration and view the effect.

[0059] Through the above process, the document resources scattered in various document tools in the project are uniformly configured and centrally managed in the document resource integration tool, improving the management efficiency of the documents.

[0060] In the technical solution provided in step S204, different types of document tools may, but are not limited to, obtain the target document resources in different ways.

[0061] As an alternative embodiment, obtaining the target document resources of the target project from at least one of the document tools according to the target document information includes:

[0062] S31. When there is a first document tool among at least one of the said document tools whose resource format of the document resources included is the target format, clone and store the document file of the target project from the first document tool as the target document resource according to the said target document information, where the target format is a document resource format that allows being rendered onto a page.

[0063] S32. When there is a second document tool among at least one of the said document tools whose resource format of the document resources included is a non-target format, generate and store the document file in the target format corresponding to the target project as the target document resource by using the target address link of the document resources of the target project in the second document tool, where the target document information includes the target address link.

[0064] Optionally, in this embodiment, for the first document tool whose resource format of the document resources is the target format, the saved document resources can be directly rendered onto a page. Therefore, the document file of the target project can be cloned and stored from the first document tool as the target document resource and can be directly rendered onto a page when it needs to be displayed.

[0065] Optionally, in this embodiment, for the second document tool whose resource format of the document resources is a non-target format, the saved document resources may not be directly rendered onto a page. The way of generating a document file in the target format can be adopted to obtain the target document resource.

[0066] As an optional embodiment, cloning and storing the document file of the target project from the first document tool as the target document resource according to the said target document information includes:

[0067] S41. Use the permission account to access the target document access address included in the said target document information in the first document tool, where the permission account is an account with global read permission in the first document tool;

[0068] S42. Clone the document file indicated by the target pull directory included in the said target document information from the target document access address as the target document resource;

[0069] S43. Store the target project and the target document resource with a corresponding relationship into a database.

[0070] Optionally, in this embodiment, the permission account is an account with global read permission in the first document tool. The crawler technology is used to crawl the location indicated by the target document access address in the first document tool by using the permission account.

[0071] Optionally, in this embodiment, the above-mentioned target document access address may be, but is not limited to, an SSH (Secure Shell) address.

[0072] For example, for project documents in a first document tool such as GitLab, since each Git project has corresponding read and write permissions, a globally readable permission account for GitLab (a fixed account with the permission to pull the code of any repository) can be generated. A crawler program uses this globally readable permission account to pull the document data of the project according to the project configuration (the SSH address of the GitLab project).

[0073] As an alternative embodiment, using the target address link of the document resources of the target project in the second document tool to generate and store the document file in the target format corresponding to the target project as the target document resources includes:

[0074] S51, generating an initial document file in the target format corresponding to the target project according to the project identifier of the target project;

[0075] S52, adding the target address link under a target tag in the initial document file to obtain the target document resources, where the target tag is used to mark the operation of loading the page indicated by the content added in the target tag;

[0076] S53, storing the target project and the target document resources with a corresponding relationship in a database.

[0077] Optionally, in this embodiment, the target tag may be, but is not limited to, an iframe tag. The iframe tag is a kind of frame tag that can be used to contain other pages. By configuring the addresses of other websites in the iframe tag, the content of other websites can be loaded on the rendered website page.

[0078] Optionally, in this embodiment, the above-mentioned target address link may be, but is not limited to, the access address of the document resources in the second document tool, such as a URL (Uniform Resource Locator) address.

[0079] For example, for second document tools such as Tapd and Lexiang, the target document resources can be generated in the iframe mode. Users can actively add an iframe tab (tag) in the background of the document system and then fill in the document address links of Tapd and Lexiang. The front end of the document system will automatically detect that if it is an iframe tab, it will load the content of the corresponding document address.

[0080] In an alternative embodiment, a process for obtaining document resources from a document tool is provided. Figure 4 FIG. Figure 4 is a schematic diagram of a process for obtaining document resources from a document tool according to an alternative embodiment of the present application. As Figure 4 shown, for the first document tool, configure the gitlab address and the pull directory, crawl the gitlab project content through a crawler to obtain the target document resources, and the gitlab can also be updated regularly to keep synchronous updates. For the second document tool 1 and the second document tool 2, the document url can be configured in the src attribute of the iframe, and an md file embedding the iframe is generated according to the configuration to obtain the target document resources. The target document resources can be rendered to the front end through docsify for the user to query.

[0081] Through the above process, different methods are provided for different types of document tools to extract the document resources therein, enabling the extraction process of the document resources to be adapted to various types of document tools, so as to integrate and manage the document resources in different types of document tools, improving the adaptability of the document integration tool and enabling the document integration tool to have a wider scope of application.

[0082] In the technical solution provided in step S206, the directory file may but is not limited to record information such as the identifier of the target project, the document title of the target document resources, and the document address. The directory file may but is not limited to be a file in the above target format and can be rendered to the page.

[0083] Optionally, in this embodiment, the directory file is used to display the target document resources according to a query request for the target document resources. The user can select the document resources to view in the directory file rendered on the page, which is equivalent to triggering a query request for the document resources, and the corresponding document resources can be found and displayed according to the query request.

[0084] As an alternative embodiment, generating the directory file corresponding to the target document resources includes:

[0085] S61, generating an initial directory file corresponding to the target project according to the project identifier of the target project;

[0086] S62, adding the document title of the target document resources and the resource path of the target document resources with a corresponding relationship to the initial directory file to obtain the directory file.

[0087] Optionally, in this embodiment, the project identifier of the target project may be recorded in the initial directory file, so as to establish a corresponding relationship between the initial directory file and the target project.

[0088] Optionally, in this embodiment, the directory file may be, but is not limited to, a code file in.md format. In the initial directory file, the identifier of the target project is recorded through the main title tag (maintitle), and the position for adding the document title is reserved through the subtitle tag (subtitle). The positions for adding resource paths of different types are reserved through the file address tag (filepath) and the embedded frame tag (iframesrc). For the document resources from the first document tool, the document access address and the pull directory may be added under the file address tag (filepath). For the document resources from the second document tool, the document address link may be added under the embedded frame tag (iframesrc).

[0089] As an optional embodiment, adding the document title of the target document resource with a corresponding relationship and the resource path of the target document resource to the initial directory file to obtain the directory file includes:

[0090] S71, adding the document title of the target document resource with a corresponding relationship and the resource path of the target document resource to the initial directory file to obtain a candidate directory file;

[0091] S72, in the case of detecting a second editing operation performed on the candidate directory file, editing the candidate directory file in response to the second editing operation to obtain an edited file;

[0092] S73, in the case of detecting a confirmation operation performed on the candidate directory file or the edited file, determining the candidate directory file or the edited file as the directory file.

[0093] Optionally, in this embodiment, in the above step S71, for the configured target document resources, the document titles are added to the subtitle tag (subtitle) one by one, and the resource paths are added to the corresponding file address tag (filepath) or embedded frame tag (iframesrc) to obtain a candidate directory file.

[0094] Optionally, in this embodiment, the second editing operation may include, but is not limited to, various types of operations for editing the candidate directory file, such as input operation, deletion operation, modification operation, cut operation, paste operation, sequence adjustment operation, etc.

[0095] Optionally, in this embodiment, the directory file generated after adding the document title of the target document resource with a corresponding relationship and the resource path of the target document resource to the initial directory file may be referred to as a candidate directory file. The user can edit the generated candidate directory file to obtain the final directory file, or directly confirm the candidate directory file as the final directory file.

[0096] In an alternative embodiment, a process for generating a directory file is provided. Figure 5 It is a schematic diagram of a process for generating a directory file according to an alternative embodiment of the present application. As Figure 5 shown, taking a git document as an example, in (A) is the document directory structure of a certain git repository. It can be seen that the pulled directory docs in this git repository includes document resources api-doc.md and document resources architecture.md. After configuring the gitlab address (git@gitlab.oa.com:xxx / yixiu-service.git) and the corresponding pulled directory (docs) in the configuration background, when the backend receives the instruction, it clones the document information to the server side and automatically generates the sidebar configuration as shown in (C). The automatic generation process may be: generating an initial directory file as shown in (B) with the main title tag (maintitle) being yixiu-service according to the project identifier yixiu-service of the target project, and then adding the document title of the target document resource with a corresponding relationship and the resource path of the target document resource to this initial directory file. That is, adding api-doc to a subtitle tag, adding its resource path yixiu-service / api-doc.md to the corresponding file address tag (filepath), adding architecture to another subtitle tag, and adding its resource path yixiu-service / architecture / architecture.md to the corresponding file address tag (filepath) to obtain the candidate directory file as shown in (C), and displaying a preview effect on the interface. In the case where no second editing operation performed on the candidate directory file is detected, if the sidebar configuration is confirmed to be correct, a _sidebar.md file will be created on the server side for rendering the sidebar, that is, the directory file is obtained.

[0097] In the technical solution provided in step S208, the target project with a corresponding relationship and the directory file are stored for the user to query the document resources in the target project.

[0098] Optionally, in this embodiment, the correspondence between the target project and the directory file can be stored in, but not limited to, a key-value manner. Using the project identifier of the target project (such as: number, name, etc.) as the key and the target file as the value, the stored project identifier is displayed on the front-end application. The user can select the project to be queried by clicking on the project identifier, and use the directory file of the selected project by the user to render the page to display all the document resources included in the project for the user to view, enabling quick query of data in different document tools.

[0099] As an alternative embodiment, after storing the target project and the directory file with the corresponding relationship, it further includes:

[0100] S81, when a target query request triggered for the target project is detected on the document display page, obtain the directory file corresponding to the target project;

[0101] S82, render the directory file in a first area on the document display page;

[0102] S83, when a selection operation performed on a target document title among the displayed document titles is detected in the first area, obtain the document file corresponding to the target document title;

[0103] S84, render the document file corresponding to the target document title in a second area on the document display page.

[0104] Optionally, in this embodiment, the document display page can be divided into, but not limited to, multiple areas, each area for rendering corresponding content. For example: the first area is for rendering the directory file, and the first area can be located on the left or right side of the document display page, which can be called a sidebar.

[0105] Optionally, in this embodiment, the selection operation performed on the target document title among the displayed document titles can include, but not limited to, an operation of clicking on the title, sliding the title, an operation of checking a selection box, etc.

[0106] Optionally, in this embodiment, the way of rendering the document display page can be, but not limited to, a way of using the docsify tool to dynamically parse markdown (md) format files in the server.

[0107] In an alternative implementation manner, a rendered document display page is provided. Figure 6 It is a schematic diagram of rendering a document display page according to an alternative implementation manner of the present application, as Figure 6As shown in the figure, the left navigation bar of the document display page is generated using the directory file _sidebar.md. When the user clicks and selects api-doc among them, the api-doc.md document pulled from git is rendered on the right side of the document display page.

[0108] Through the above process, a document display method for providing users with a unified way to query the document resources of a certain project is provided, saving the time for querying document resources in various different document tools and improving the query efficiency of document resources.

[0109] As an optional embodiment, after storing the target project and the directory file with a corresponding relationship, it further includes:

[0110] S91, when it is detected that there is an update to the document resources corresponding to the target project in at least one of the document tools, obtain the updated document resources in the document resources of the target project from at least one of the document tools;

[0111] S92, update the updated document resources to the target document resources;

[0112] S93, update the directory file using the resource information of the updated document resources.

[0113] Optionally, in this embodiment, after obtaining the target project and the directory file with a corresponding relationship, the document resources in the target project can be automatically updated. The updated document resources newly pushed by the user are pulled from the document tool, updated to the target document resources, and their resource information is updated to the directory file.

[0114] For example: For the git tool, one way is to establish a scheduled task to regularly obtain the SSH address configured by the user to synchronize and update the latest document content. Another way is based on the webhook method. When hooking the operation of pushing documents to git, the SSH address of the project is sent to the background server. The background server will perform verification based on the SSH address. If the SSH address exists, it will pull the project documents under this SSH address and synchronize them to the target document resources, and synchronize and update the resource information to the directory file.

[0115] In an optional implementation manner, a process for updating document resources is provided. Figure 7 It is a schematic diagram of a process for updating document resources according to an optional implementation manner of the present application, as Figure 7As shown in the figure, the user submits a document on GitLab, and GitLab sends information about the changes to the document system management backend through a change notification. The document system management backend pulls the document information from GitLab according to the change notification and stores it (Store). The document system display frontend can read the document data from the document system management backend for display. The user can also update the configuration on the document system management frontend. The document system management frontend pushes the updated configuration of the user to the document system management backend. The document system management backend pulls the document information from GitLab according to the updated configuration and stores it (Store).

[0116] Through the above process, a method for automatically updating the created project documents is provided. Even if the user updates the project documents on various document tools according to their own habits, the updated content can be synchronized to a unified document integration tool, which facilitates the subsequent query process and also avoids changing the user's operation habits, making the integration management, query, and update process of document resources more convenient.

[0117] This application also provides an optional embodiment, which provides a process for integrating and managing document resources. Figure 8 It is a schematic diagram of a process for integrating and managing document resources according to an optional embodiment of this application. As Figure 8 shown, the user submits a document on GitLab and updates the configuration on the document system management frontend, enters the document information. The document system management frontend passes the updated configuration of the user to the document system management backend. The document system management backend pulls the document information from GitLab according to the configuration and stores the document information returned by GitLab. The document system display frontend can read the document data from the document system management backend for display. The document system management backend can also synchronize all documents from GitLab regularly later and store the document information returned by GitLab.

[0118] It should be noted that for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that this application is not limited by the described action sequence, because according to this application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0119] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases, the former is a better implementation. Based on such an understanding, the technical solution of the present application, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions for causing an electronic device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of the present application.

[0120] According to another aspect of the embodiments of the present application, there is also provided a document resource integration device for implementing the above-mentioned document resource integration method. Figure 9 is a schematic diagram of an optional document resource integration device according to an embodiment of the present application, as Figure 9 shown, the device may include:

[0121] A first acquisition module 92, configured to acquire target document information corresponding to a target project, where the target document information is used to indicate storage information of the document resources of the target project in at least one document tool;

[0122] A second acquisition module 94, configured to acquire the target document resources of the target project from at least one of the document tools according to the target document information;

[0123] A generation module 96, configured to generate a directory file corresponding to the target document resources, where the directory file is used to display the target document resources according to a query request for the target document resources;

[0124] A storage module 98, configured to store the target project and the directory file with a corresponding relationship.

[0125] It should be noted that the first acquisition module 92 in this embodiment may be used to execute step S202 in the embodiments of the present application, the second acquisition module 94 in this embodiment may be used to execute step S204 in the embodiments of the present application, the generation module 96 in this embodiment may be used to execute step S206 in the embodiments of the present application, and the storage module 98 in this embodiment may be used to execute step S208 in the embodiments of the present application.

[0126] It should be noted here that the examples and application scenarios implemented by the above modules and the corresponding steps are the same, but are not limited to the content disclosed in the above embodiments. It should be noted that the above modules, as part of the device, can run in a hardware environment as Figure 1 shown, and can be implemented by software or by hardware.

[0127] Through the above-mentioned module, according to the target document information obtained for indicating the storage information of the document resources of the target project in at least one document tool, the target document resources of the target project are obtained from at least one document tool as the target document resources, achieving the purpose of integrating and storing project documents, and generating a directory file corresponding to the target document resources for displaying the target document resources according to the query request of the target document resources. The target project and the directory file with a corresponding relationship are stored, achieving the purpose of efficiently sharing project documents, thereby realizing the technical effect of improving the management efficiency of document resources, and further solving the technical problem of low management efficiency of document resources in the related art.

[0128] As an optional embodiment, the second acquisition module includes:

[0129] A first processing unit, configured to, when the first document tool in at least one of the document tools has a resource format of a target format for the document resources, clone and store the document file of the target project from the first document tool according to the target document information as the target document resources, where the target format is a document resource format that allows being rendered onto a page;

[0130] A second processing unit, configured to, when the second document tool in at least one of the document tools has a resource format of a non-target format for the document resources, use the target address link of the document resources of the target project in the second document tool to generate and store the document file of the target format corresponding to the target project as the target document resources, where the target document information includes the target address link.

[0131] As an optional embodiment, the first processing unit is configured to:

[0132] Use a permission account to access the target document access address included in the target document information in the first document tool, where the permission account is an account with global read permission in the first document tool;

[0133] Clone the document file indicated by the target pull directory included in the target document information from the target document access address as the target document resources;

[0134] Store the target project and the target document resources with a corresponding relationship into a database.

[0135] As an optional embodiment, the second processing unit is configured to:

[0136] Generate an initial document file in the target format corresponding to the target project according to the project identifier of the target project;

[0137] Add the target address link under the target label in the initial document file to obtain the target document resource, where the target label is used to mark the operation of loading the page indicated by the content added in the target label;

[0138] Store the target project and the target document resource with a corresponding relationship in a database.

[0139] As an optional embodiment, the first acquisition module includes:

[0140] A display unit for displaying a configuration page, where the configuration page is used to configure document information of a document resource to be acquired;

[0141] An editing unit for editing the configuration page in response to a first editing operation performed on the configuration page;

[0142] An acquisition unit for, when detecting a target operation performed on the configuration page, acquiring the edited content in the document information from the configuration page as the target document information.

[0143] As an optional embodiment, the display unit is used for:

[0144] When at least one of the document tools includes a first document tool whose resource format of the document resource is the target format, display a first configuration page, where the first configuration page is used to configure the document access address and the pull directory of the document resource to be acquired;

[0145] When at least one of the document tools includes a second document tool whose resource format of the document resource is a non-target format, display a second configuration page, where the second configuration page is used to configure the document address link of the document resource to be acquired.

[0146] As an optional embodiment, the generation module includes:

[0147] A generation unit for generating an initial directory file corresponding to the target project according to the project identifier of the target project;

[0148] An adding unit for adding the document title of the target document resource and the resource path of the target document resource with a corresponding relationship to the initial directory file to obtain the directory file.

[0149] As an optional embodiment, the adding unit is used for:

[0150] Add the document title of the target document resource with the corresponding relationship and the resource path of the target document resource to the initial directory file to obtain a candidate directory file;

[0151] In the case of detecting a second editing operation performed on the candidate directory file, edit the candidate directory file in response to the second editing operation to obtain an edited file;

[0152] In the case of detecting a confirmation operation performed on the candidate directory file or the edited file, determine the candidate directory file or the edited file as the directory file.

[0153] As an optional embodiment, the device further includes:

[0154] A third acquisition module, configured to, after storing the target item and the directory file with the corresponding relationship, in the case of detecting a target query request triggered by the target item on the document display page, acquire the directory file corresponding to the target item;

[0155] A first rendering module, configured to render the directory file in a first area on the document display page;

[0156] A fourth acquisition module, configured to, in the case of detecting a selection operation performed on a target document title in the displayed document titles in the first area, acquire the document file corresponding to the target document title;

[0157] A second rendering module, configured to render the document file corresponding to the target document title in a second area on the document display page.

[0158] As an optional embodiment, the device further includes:

[0159] A fifth acquisition module, configured to, after storing the target item and the directory file with the corresponding relationship, in the case of detecting that the document resources corresponding to the target item in at least one of the document tools are updated, acquire the updated document resources in the document resources of the target item from at least one of the document tools;

[0160] A first update module, configured to update the updated document resources to the target document resources;

[0161] A second update module, configured to update the directory file using the resource information of the updated document resources.

[0162] It should be noted here that the examples and application scenarios implemented by the above modules and the corresponding steps are the same, but are not limited to the content disclosed in the above embodiments. It should be noted that the above modules, as a part of the device, can run on, for exampleFigure 1 In the hardware environment shown, it can be implemented by software or by hardware. Among them, the hardware environment includes a network environment.

[0163] According to another aspect of the embodiments of the present application, there is also provided an electronic device for implementing the above-mentioned integrated method of document resources.

[0164] Figure 10 is a structural block diagram of an electronic device according to an embodiment of the present application. As Figure 10 shown, the electronic device may include: at least one (only one is shown in the figure) processor 1001, a memory 1003, and a transmission device 1005. As Figure 10 shown, the electronic device may further include an input / output device 1007.

[0165] Among them, the memory 1003 can be used to store software programs and modules, such as program instructions / modules corresponding to the integrated method and device of document resources in the embodiments of the present application. The processor 1001 executes various functional applications and data processing by running the software programs and modules stored in the memory 1003, that is, implements the above-mentioned integrated method of document resources. The memory 1003 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic storage device, a flash memory, or other non-volatile solid-state memories. In some instances, the memory 1003 may further include a memory remotely provided relative to the processor 1001, and these remote memories can be connected to the electronic device through a network. Examples of the above-mentioned network include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.

[0166] The above-mentioned transmission device 1005 is used to receive or send data via a network, and can also be used for data transmission between the processor and the memory. Specific examples of the above-mentioned network may include a wired network and a wireless network. In one instance, the transmission device 1005 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers through a network cable, thereby enabling communication with the Internet or a local area network. In one instance, the transmission device 1005 is a radio frequency (Radio Frequency, RF) module, which is used to communicate with the Internet wirelessly.

[0167] Specifically, the memory 1003 is used to store application programs.

[0168] The processor 1001 can call the application programs stored in the memory 1003 through the transmission device 1005 to execute the following steps:

[0169] Obtain the target document information corresponding to the target project, where the target document information is used to indicate the storage information of the document resources of the target project in at least one document tool;

[0170] Obtain the target document resources of the target project from at least one of the document tools according to the target document information;

[0171] Generate a directory file corresponding to the target document resources, where the directory file is used to display the target document resources according to a query request for the target document resources;

[0172] Store the target project and the directory file with a corresponding relationship.

[0173] By adopting the embodiments of the present application, a solution for integrating document resources is provided. The target document resources of the target project are obtained from at least one document tool according to the target document information obtained, which is used to indicate the storage information of the document resources of the target project in at least one document tool, achieving the purpose of integrating and storing project documents, and generating a directory file corresponding to the target document resources for displaying the target document resources according to a query request for the target document resources, and storing the target project and the directory file with a corresponding relationship, achieving the purpose of efficiently sharing project documents, thereby realizing the technical effect of improving the management efficiency of document resources, and further solving the technical problem of low management efficiency of document resources in the related art.

[0174] Optionally, the specific examples in this embodiment can refer to the examples described in the above embodiments, and will not be elaborated herein.

[0175] Those of ordinary skill in the art can understand that Figure 10 The structure shown is only for illustration. The electronic device can be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a handheld computer, and a mobile Internet device (Mobile Internet Devices, MID), a PAD and other electronic devices. Figure 10 It does not limit the structure of the above electronic device. For example, the electronic device may further include more or fewer components (such as a network interface, a display device, etc.) than those shown Figure 10 in, or have a different configuration from that shown Figure 10 in.

[0176] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the electronic device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium can include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disc, etc.

[0177] An embodiment of the present application also provides a storage medium. Optionally, in this embodiment, the above storage medium can be used to execute the program code of the integrated method of document resources.

[0178] Optionally, in this embodiment, the above storage medium can be located on at least one of the multiple network devices in the network shown in the above embodiment.

[0179] Optionally, in this embodiment, the storage medium is set to store program code for performing the following steps:

[0180] Obtain target document information corresponding to a target project, where the target document information is used to indicate the storage information of the document resources of the target project in at least one document tool;

[0181] Obtain the target document resources of the target project from at least one of the document tools according to the target document information;

[0182] Generate a directory file corresponding to the target document resources, where the directory file is used to display the target document resources according to a query request for the target document resources;

[0183] Store the target project and the directory file with a corresponding relationship.

[0184] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments, and this embodiment will not be elaborated here.

[0185] Optionally, in this embodiment, the above storage medium can include but is not limited to: various media such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disc that can store program code.

[0186] The serial numbers of the embodiments of the present application above are only for description and do not represent the advantages and disadvantages of the embodiments.

[0187] If the integrated units in the above embodiments are implemented in the form of software function units and sold or used as independent products, they can be stored in the above computer-readable storage media. Based on such an understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of this 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 for causing at least one computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.

[0188] In the above embodiments of this application, the descriptions of the various embodiments have their own emphases. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0189] In the several embodiments provided in this application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of units or modules can be in electrical or other forms.

[0190] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place, or they can be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0191] In addition, the functional units in the various embodiments of this application can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated units can be implemented in the form of hardware or in the form of software function units.

[0192] The above are only the preferred embodiments of this application. It should be noted that for those of ordinary skill in the art, without departing from the principle of this application, several improvements and refinements can still be made, and these improvements and refinements should also be regarded as the protection scope of this application.

Claims

1. An integration method for document resources, characterized in that Including: Obtain target document information corresponding to a target project, where the target document information is used to indicate storage information of the document resources of the target project in at least one document tool; Obtain the target document resources of the target project from at least one of the document tools according to the target document information; Generate a directory file corresponding to the target document resources, where the directory file is used to display the target document resources according to a query request for the target document resources; Store the target project and the directory file with a corresponding relationship.

2. The method according to claim 1, characterized in that Obtaining the target document resources of the target project from at least one of the document tools according to the target document information includes: In the case where at least one of the document tools includes a first document tool whose resource format of the document resources is a target format, clone and store the document file of the target project from the first document tool as the target document resources, where the target format is a document resource format that allows being rendered onto a page; In the case where at least one of the document tools includes a second document tool whose resource format of the document resources is a non-target format, generate and store the document file in the target format corresponding to the target project using the target address link of the document resources of the target project in the second document tool as the target document resources, where the target document information includes the target address link.

3. The method according to claim 2, wherein Cloning and storing the document file of the target project from the first document tool as the target document resources according to the target document information includes: Use a permission account to access the target document access address included in the target document information in the first document tool, where the permission account is an account with global read permission in the first document tool; Clone the document file indicated by the target pull directory included in the target document information from the target document access address as the target document resources; Store the target project and the target document resources with a corresponding relationship in a database.

4. The method according to claim 2, wherein Generating and storing the document file in the target format corresponding to the target project using the target address link of the document resources of the target project in the second document tool as the target document resources includes: Generate an initial document file in the target format corresponding to the target project according to the project identifier of the target project; Add the target address link under a target label in the initial document file to obtain the target document resources, where the target label is used to mark an operation of loading a page indicated by the content added in the target label; Store the target project and the target document resources with a corresponding relationship in a database.

5. The method according to claim 1, wherein Generating the directory file corresponding to the target document resources includes: Generate an initial directory file corresponding to the target project according to the project identifier of the target project; Add the document title of the target document resources and the resource path of the target document resources with a corresponding relationship to the initial directory file to obtain the directory file.

6. The method according to claim 5, wherein Adding the document title of the target document resource with a corresponding relationship and the resource path of the target document resource to the initial directory file, the obtained directory file includes: Adding the document title of the target document resource with a corresponding relationship and the resource path of the target document resource to the initial directory file to obtain a candidate directory file; In the case where a second edit operation performed on the candidate directory file is detected, editing the candidate directory file in response to the second edit operation to obtain an edited file; In the case where a confirmation operation performed on the candidate directory file or the edited file is detected, determining the candidate directory file or the edited file as the directory file.

7. The method according to claim 1, characterized in that, After storing the target project and the directory file with a corresponding relationship, the method further includes: In the case where a target query request triggered by the target project is detected on the document display page, obtaining the directory file corresponding to the target project; Rendering the directory file in a first area on the document display page; In the case where a selection operation performed on a target document title in the displayed document titles in the first area is detected, obtaining the document file corresponding to the target document title; Rendering the document file corresponding to the target document title in a second area on the document display page.

8. The method according to claim 1, wherein After storing the target project and the directory file with a corresponding relationship, the method further includes: In the case where it is detected that the document resources corresponding to the target project in at least one of the document tools are updated, obtaining updated document resources from the document resources of the target project in at least one of the document tools; Updating the updated document resources to the target document resources; Updating the directory file using the resource information of the updated document resources.

9. An integrated device for document resources, characterized in that, Including: A first acquisition module for acquiring target document information corresponding to a target project, where the target document information is used to indicate the storage information of the document resources of the target project in at least one document tool; A second acquisition module for acquiring the target document resources of the target project from at least one of the document tools according to the target document information; A generation module for generating a directory file corresponding to the target document resources, where the directory file is used to display the target document resources according to a query request for the target document resources; A storage module for storing the target project and the directory file with a corresponding relationship.

10. A storage medium, characterized in that, The storage medium includes a stored program, where the program executes the method described in any one of claims 1 to 8 above when running.

11. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein, The processor executes the method described in any one of claims 1 to 8 above through the computer program.

Citation Information

Patent Citations

  • Document automatic creation method based on integration business model

    CN101216849A

  • Document management system

    CN108197260A