CN112328678A - Document data processing method and device, electronic equipment and storage medium - Google Patents

Document data processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112328678A
CN112328678A CN202011049542.XA CN202011049542A CN112328678A CN 112328678 A CN112328678 A CN 112328678A CN 202011049542 A CN202011049542 A CN 202011049542A CN 112328678 A CN112328678 A CN 112328678A
Authority
CN
China
Prior art keywords
data
document
file
target
directory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011049542.XA
Other languages
Chinese (zh)
Other versions
CN112328678B (en
Inventor
王为
万振华
王颉
董燕
李华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Kaiyuan Internet Security Technology Co Ltd
Original Assignee
Shenzhen Kaiyuan Internet Security Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Kaiyuan Internet Security Technology Co Ltd filed Critical Shenzhen Kaiyuan Internet Security Technology Co Ltd
Priority to CN202011049542.XA priority Critical patent/CN112328678B/en
Publication of CN112328678A publication Critical patent/CN112328678A/en
Application granted granted Critical
Publication of CN112328678B publication Critical patent/CN112328678B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/26Visual data mining; Browsing structured data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2246Trees, e.g. B+trees
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/258Data format conversion from or to a database

Abstract

The invention discloses a method and a device for processing document data, electronic equipment and a storage medium, belonging to the field of application software development, wherein the method comprises the following steps: when detecting a document directory subentry clicked by a user, reading a data file in a file system pointed by at least one target file path in a preset document database table according to the document directory subentry, wherein the target file path comprises a mapping relation between the document directory subentry and the data file; binding the data nodes corresponding to the read data files to a preset chain tree structure to obtain target chain tree data; and analyzing the target chain tree data according to a preset document data format to obtain target document data. The scheme is suitable for various types of data files, and can realize the binding of the data nodes of the data files and the directory nodes of the document data, so that the front end can display the corresponding types of document directory data according to the requirements of users, and the user experience is improved.

Description

Document data processing method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the technical field of application software development, and in particular, to a method and an apparatus for processing document data, an electronic device, and a storage medium.
Background
With the increasing demand of people for processing document data by Web, the requirements on the logicality and the aesthetic property of data display are higher and higher. In the field, a common Web site adopts a hierarchical directory display mode to display data, so that a user can conveniently search. The user can click on the directory until the corresponding hierarchy level is derived to find the required document data. In the related technology, simple tree structure data is provided through the development of the JAVA of the back end, the front end is responsible for analyzing and generating a catalogue, such as an urban hierarchical catalogue, and uniform structured data is formed at the back end and is consistent with the content seen by a user; however, the related art is only suitable for single document data, and cannot be moved and copied, and the type of the document can only meet the ordinary text reading requirement, which causes the phenomena that the type of document directory data displayed at the front end is single, the dependence degree on the original data is high, and the like, and special documents such as PDF, Word, Excel, audio, video, and the like cannot be read according to the user requirements.
Therefore, a new data processing technology is needed.
Disclosure of Invention
The invention provides a document data processing method and device, electronic equipment and a storage medium, which can solve the technical problems that the type of document directory data displayed at the front end is single and the dependence degree on original data is high in the prior art.
The first aspect of the present invention provides a method for processing document data, which is applied to a backend and includes:
when a document directory subentry clicked by a user is detected, reading a data file in a file system pointed by at least one target file path in a preset document database table according to the document directory subentry, wherein the target file path comprises a mapping relation between the document directory subentry and the data file;
binding the read data nodes corresponding to the data files to a preset chain tree structure to obtain target chain tree data;
and analyzing the target chain tree data according to a preset document data format to obtain target document data.
Optionally, the preset document database table includes: the step of reading the data file in the file system pointed by at least one target file path in the preset file database table according to the document directory sub-item comprises the following steps:
acquiring a file type, a target file path and a file name corresponding to each data file prestored in a file system;
establishing the document directory data table and establishing the file database table;
storing the target file path and the file name corresponding to each data file to the file database table;
and storing the file database table to a document directory database table according to the file type corresponding to the data file.
Optionally, the step of reading, according to the document directory sub-entry, the data file in the file system pointed to by the at least one target file path in the preset document database table includes:
when detecting that a user adds a document, acquiring document data corresponding to the document;
converting the document data into a data file according to a preset document data format;
and storing the data file to the file system.
Optionally, the step of binding the read data nodes corresponding to the data file to a preset chain tree structure to obtain target chain tree data further includes:
responding to a request of the document directory itemized name acquired by the user, and acquiring a name node corresponding to the data file;
the step of binding the read data nodes corresponding to the data file to a preset chain tree structure to obtain target chain tree data includes:
binding the read data nodes and the name nodes corresponding to the data files to a preset chain tree structure;
acquiring configuration data parameters corresponding to a target chain tree node of the chain tree structure;
and encapsulating the configuration data parameters into the target chain tree data.
Optionally, the step of analyzing the target chain tree data according to a preset document data format to obtain target document data includes:
paging the target chain tree data to obtain paged target tree data;
storing the target tree data as single directory data;
and analyzing the directory data according to a preset document data format to obtain target document data.
Optionally, after the step of analyzing the target chain tree data according to a preset document data format to obtain target document data, the method includes:
and responding to a display request of the document catalog items of a user, and sending the target document data to a front end, wherein the front end is used for displaying the document corresponding to the target document data.
A second aspect of the present invention provides a document data processing apparatus applied to a backend, including:
the reading module is used for reading a data file pointed by at least one target file path in a preset document database table according to a document directory sub-item when the document directory sub-item clicked by a user is detected, wherein the target file path comprises a mapping relation between the document directory sub-item and the data file;
the binding module is used for binding the read data nodes corresponding to the data files to a preset chain tree structure to obtain target chain tree data;
and the analysis module is used for analyzing the target chain tree data according to a preset document data format to obtain target document data.
Optionally, the preset document database table includes: document directory data table and file database table, the apparatus also includes:
the acquisition module is used for acquiring the file type, the target file path and the file name corresponding to each data file prestored in a file system;
the establishing module is used for establishing the document directory data table and the file database table;
the storage module is used for storing the target file path and the file name corresponding to each data file to the file database table;
and the storage module is also used for storing the file database table to a document directory database table according to the file type corresponding to the data file.
A third aspect of the present invention provides an electronic device, including a memory, a processor, and a communication bus, where the communication bus is respectively connected to the memory and the processor in a communication manner, the memory stores a computer program thereon, and the processor executes the computer program to implement each step in the method for processing stored document data described above.
A fourth aspect of the present invention provides a storage medium which is a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program realizes each step in processing of document data according to any one of the above items.
The invention provides a method for processing document data, which comprises the following steps: when detecting a document directory subentry clicked by a user, reading a data file in a file system pointed by at least one target file path in a preset document database table according to the document directory subentry, wherein the target file path comprises a mapping relation between the document directory subentry and the data file; binding the data nodes corresponding to the read data files to a preset chain tree structure to obtain target chain tree data; and analyzing the target chain tree data according to a preset document data format to obtain target document data. By implementing the scheme, when a user inquires the document directory sub-items, the data files pointed by the target file path in the file database table are read so as to read each data file, the data nodes corresponding to the read data files are bound to the chain tree structure, the binding of the data nodes of the data files and the directory nodes of the document data is realized so as to obtain corresponding target chain tree data, and the target chain tree data is analyzed into target document data for front-end display of the document directory data; the scheme is suitable for various types of data files, so that the front end can display the document directory data of the corresponding type according to the requirements of the user, and the user experience is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of steps of a method for processing document data according to an embodiment of the present invention;
fig. 2 is a flowchart of another step of a method for processing document data according to an embodiment of the present invention;
fig. 3 is a block diagram of a module of a document data processing apparatus according to an embodiment of the present invention;
fig. 4 is an architecture diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The document directory displayed at the front end in the prior art is single in data type and high in dependence degree on original data.
In order to solve the technical problem, the invention provides a method and a device for processing document data, an electronic device and a storage medium.
An embodiment of the present invention provides a system for processing document data, including: the system comprises a user inquiry end, a data processing back end and a document directory front end. The user query end is used for receiving query requirements of a user, and when the user clicks the document directory clause is detected, the user query end generates a query request containing information or data information or signals of the document directory clause clicked by the user, and sends the query request to the data processing back end.
After receiving the query request, that is, when detecting a document directory entry clicked by a user, a data processing back end (for simplicity, may be referred to as a "back end") responds to the query request, reads a data file in a file system to which at least one target file path in a preset document database table points, binds data nodes corresponding to the read data file to a preset chain tree structure to obtain target chain tree data, analyzes the target chain tree data according to a preset document data format to obtain target document data, and sends the target document data to a front end.
The front end of the document directory (called the front end for short) receives the target document data sent by the back end, and displays the corresponding document or the target document or the document data according to the target document data.
The system belongs to the field of application program development, and can read a data file pointed by a target file path in a file database table according to user requirements, bind data nodes corresponding to the read data file to a chain tree structure, and bind the data nodes of the data file with directory nodes of file data to obtain corresponding target chain tree data; the front end can display the document directory data of the corresponding type according to the requirements of the user, and the user experience is improved.
Referring to fig. 1, a flowchart of steps of a method for processing document data according to an embodiment of the present invention is shown, where the method for processing document data is provided, a program corresponding to the method is executed by a processor, and when the processor executes the program, the method for processing document data according to the embodiment is implemented, and the method for processing document data is applied to a backend, and the method includes:
step S101: when detecting a document directory subentry clicked by a user, reading a data file in a file system pointed by at least one target file path in a preset document database table according to the document directory subentry, wherein the target file path comprises a mapping relation between the document directory subentry and the data file.
Specifically, the present embodiment sets a total directory, and divides a plurality of document directory sub-items in the total directory according to different types of documents, where each document directory sub-item represents a type of document directory item, the document directory sub-item may include one or more documents, a storage format corresponding to the document is a data file, and the data file is pre-stored in a file system, that is, the file system may include a plurality of different types of data files, for example, the total directory may not be limited to include: text, PDF, Word, Excel, audio, video, etc. In order to enable the front end to effectively read and display the data files of special types in the file system, but not only limited to reading of ordinary texts, firstly, abstracting the data files of various types stored in the file system, or abstracting the documents of various types before the storage of the documents of various types, and then storing the data files obtained after the abstraction in the file system; then, obtaining the storage path of the data file in the file system, or referring the storage path as the 'target file path', the target file path is stored in the document database table, the document database table contains a plurality of document directory sub-items, and also can include the target file path of one or more documents in the document directory sub-items, so as to obtain the mapping relation between the document directory sub-items of each type or one or more documents in the document directory sub-items and the corresponding data file in the file system.
Furthermore, when a document directory subentry clicked by a user is detected, reading data files in a file system pointed by one or more target file paths in a preset document database table according to the document directory subentry to read the data files.
Further, when reading the data file in the file system, the embodiment may use SQL (Structured Query Language) Language for querying or reading, where the SQL Language is a database Query and programming Language, and is used to access data, Query, update, and manage the relational database system, and may also be used for the extension of the database script file. The SQL language is a high-level, non-procedural programming language that allows users to work on high-level data structures, and different database systems with disparate underlying structures can use the same structured query language as an interface for data input and management. The SQL language is used for inquiring or reading the data files of the corresponding types in the file system, so that the method has flexibility and meets the requirement of reading the data files in the inquiring process of a user.
In addition, in the process of reading a data file in a file system pointed by one or more target file paths in a preset file database table, the stored data is transmitted in a streaming mode. Specifically, the input and output of data are regarded as the inflow and outflow of data, the input and output of data are used as operation objects and are abstracted into a stream, and a method of designing the output operation of the stream is favorable for programming regardless of the concrete structure of the stream, and the function can be used for various objects and has universality. Further, the present embodiment reads the data file in the form of a binary stream (binary stream), where the binary stream refers to a stream of binary digit sequences, and if there are characters in the stream, the binary stream is represented by one byte of binary ASCII code, and if there are digits in the stream, the binary stream is represented by one byte of binary number; specifically, the '\ n' symbol is not transformed during the inflow and outflow, for example: for example 2001, the binary ASCII code in the text stream represented as '2 "0" 1', i.e. 50, 48, 49, occupies a total of 4 bytes, while the binary stream represented as 0000011111010001 is 07D1 in hexadecimal, which occupies only 2 bytes. Therefore, for digital streams containing a large amount of digital information, a binary stream mode can be adopted, the space can be effectively saved, and the conversion of \ n is not needed, so that the stream speed can be greatly increased, and the efficiency is improved. Therefore, when reading a data file in a file system, reading efficiency can be improved by reading in the form of a binary stream.
Step S102: and binding the data nodes corresponding to the read data files to a preset chain tree structure to obtain target chain tree data.
Specifically, after reading a corresponding data file according to a target file path, acquiring a data node corresponding to the read data file, and binding the data node with a chain tree structure to realize communication of a transmission path between the data node corresponding to the data file and the target chain tree node of the chain tree structure, realize association of the data node, and thus realize binding between the data node corresponding to the data and a document directory node; furthermore, the queried data file is generated into target chain tree data according to a preset recursion mode, it should be noted that recursion refers to a reentry phenomenon caused by a function/process/subprogram directly or indirectly calling itself in a running program, and the recursion mode refers to: the function continually refers to itself until the referenced object is known; in this embodiment, data transmission path communication between a data node corresponding to the data file and a target chain tree node of the chain tree structure can be realized in a recursive manner, so as to realize data transmission connection.
In one embodiment of this step, this step is preceded by: and responding to a request of the document directory itemized item name acquired by the user, and acquiring a name node corresponding to the data file.
Then this step includes: binding the data nodes and the name nodes corresponding to the read data files to a preset chain tree structure; acquiring configuration data parameters corresponding to a target chain tree node of a chain tree structure; and encapsulating the configuration data parameters into target chain tree data.
Specifically, when it is detected that a user needs to acquire a data file and a name of a document directory subentry included in a document directory subentry, reading the data file in a file system to which at least one target file path in a preset document database table points according to the document directory subentry, acquiring a data node and a name node of the data file, and binding the data node and the name node to a preset chain tree structure, so that the target chain tree node of the chain tree structure is communicated with transmission paths of the data node and the name node; further, the target chain tree node may obtain configuration data parameters corresponding to the document directory entries, where the configuration data parameters are configuration parameters of a data file generated according to a user's requirement, for example, the user's requirement is to query a name, a name and a content of a certain document, or a picture in a document, and according to the user's query requirement, the data file to which the target file path points is read, and obtain related information of the data file. Further, the configuration data parameters are encapsulated into target chain-like tree-shaped data, that is, the configuration parameters corresponding to one or more data nodes are encapsulated or packaged to obtain the target chain-like tree-shaped data. In practical application, the constructed data file can be dynamically provided for the user only when the user selects to view the data file, and is dynamically linked to the target chain tree data according to the user state, so that the pressure of a database is reduced, and the burden of system operation is effectively relieved.
Step S103: and analyzing the target chain tree data according to a preset document data format to obtain target document data.
In this step, the target chain tree data is analyzed according to a preset document data format to obtain target document data, the preset document data format is a Json data format, the Json data is analyzed according to the Json data format to obtain Json data, and the Json data can be used for front-end display.
In one embodiment of this step, the method includes: paging the target chain tree data to obtain paged target tree data; storing the target tree data as single directory data; and analyzing the directory data according to a preset document data format to obtain target document data.
Specifically, the packaged or packaged target document data may have a large data amount or information amount, and the target tree data may be obtained by performing paging on the target chain tree data, for example, performing secondary paging, and sorting the paged target data; furthermore, single directory data are stored in the target tree data through Map, then the directory data are analyzed into the same List (directory or List), and the directory data in the List are analyzed according to the Json data format to obtain the Json data for front-end display.
The invention provides a method for processing document data, which comprises the following steps: when detecting a document directory subentry clicked by a user, reading a data file in a file system pointed by at least one target file path in a preset document database table according to the document directory subentry, wherein the target file path comprises a mapping relation between the document directory subentry and the data file; binding the data nodes corresponding to the read data files to a preset chain tree structure to obtain target chain tree data; and analyzing the target chain tree data according to a preset document data format to obtain target document data. By implementing the scheme, when a user inquires the document directory sub-items, the data files pointed by the target file path in the file database table are read so as to read each data file, the data nodes corresponding to the read data files are bound to the chain tree structure, the binding of the data nodes of the data files and the directory nodes of the document data is realized so as to obtain corresponding target chain tree data, and the target chain tree data is analyzed into target document data for front-end display of the document directory data; the scheme is suitable for various types of data files, so that the front end can display the document directory data of the corresponding type according to the requirements of the user, and the user experience is improved.
Referring to fig. 2, a flowchart of another step of a method for processing document data according to an embodiment of the present invention is provided, where the method includes:
step S201: acquiring file types, target file paths and file names corresponding to data files prestored in a file system;
specifically, the file system may be a storage unit that performs data interaction with a processor or a data processing unit, and is a system for storing an entity file, that is, a data file, where the data file is a data file with a specific format, for example, an Html document that can be directly opened and accessed, and the Html document is pre-stored in the file system. After the data files are pre-stored in the file system, the file types, the target files and the file names corresponding to the data files are obtained.
Step S202: establishing a document directory data table and a file database table;
specifically, two database tables, namely a Menu table and a Document table, are established, wherein the Menu table is a Document directory database table, and the Document table is a file database table. Wherein, the core table structure of the Menu table is as follows: menu (parent _ ID, Menu _ ID, type, Menu _ name), specifically, using a parentID to identify an upper-layer directory of the directory, and obtaining an ID number of a directory total item or a total directory; identifying the type of the catalog total item or the catalog in the total catalog by using the type to obtain catalog sub items, namely document catalog sub items; the ID number of the document directory subentry is identified by menu _ ID, and the name of the document directory subentry is identified by menu _ name. And the table structure of the Document table core is: document (menu _ ID, name, path), specifically, menu _ ID represents an ID number of a Document directory sub-item on a layer above a current Document or data file, name represents a name of the Document or data file, and path represents a storage path of the Document or data file, that is, a target file path.
Step S203: storing the target file path and the file name corresponding to each data file in a file database table;
step S204: and storing the file database table to a document directory database table according to the file type corresponding to the data file.
The preset document database table comprises: document directory tables and file database tables. Specifically, the present embodiment sets a total directory, and divides a plurality of document directory sub-items in the total directory according to different types of documents, where each document directory sub-item represents a type of document directory item, the document directory sub-item may include one or more documents, a storage format corresponding to the document is a data file, and the data file is pre-stored in a file system, that is, the file system may include a plurality of different types of data files, for example, the total directory may not be limited to include: text, PDF, Word, Excel, audio, video and the like, and the different types of data files are converted into data files with specific formats and then stored in a file system. Further, the document directory data table is used for storing the document directory entries or the document directory sub-entries of different types; the file database table is used for storing a storage path of a data file in the file system, that is, storing a target file path, and is also used for storing a name, a number, and the like of the data file.
Further, before step S101 or step S201, the method further includes: when detecting that a user adds a document, acquiring document data corresponding to the document; converting the document data into a data file according to a preset document data format; and storing the data file to a file system.
Specifically, in order to enable the front end to effectively read and display data files of special types in the file system, rather than being limited to reading of ordinary texts, firstly, the data files of various types stored in the file system are abstracted, or before the files of various types are stored, the files of various types are abstracted, for example, the files of various formats are uniformly converted into Html documents which can be directly opened and accessed, and the data files are not limited to including the Html documents; then storing the data file obtained after the abstraction processing in a file system; then, obtaining the storage path of the data file in the file system, or referring the storage path as the 'target file path', the target file path is stored in the document database table, the document database table contains a plurality of document directory sub-items, and also can include the target file path of one or more documents in the document directory sub-items, so as to obtain the mapping relation between the document directory sub-items of each type or one or more documents in the document directory sub-items and the corresponding data file in the file system.
Step S205: when detecting a document directory subentry clicked by a user, reading a data file in a file system pointed by at least one target file path in a preset document database table according to the document directory subentry, wherein the target file path comprises a mapping relation between the document directory subentry and the data file.
Step S206: and binding the data nodes corresponding to the read data files to a preset chain tree structure to obtain target chain tree data.
Step S207: and analyzing the target chain tree data according to a preset document data format to obtain target document data.
Specifically, the method steps described in steps S206, and S207 are similar to or similar to the method steps described in steps S101, S102, and S103, and the content description of the partial flow is consistent with the content description of steps S101 to S103, which is not further described in this embodiment.
Step S207: and responding to a display request of the document catalog items of the user, and sending the target document data to the front end, wherein the front end is used for displaying the document corresponding to the target document data.
Specifically, in response to a display request of a document directory sub-item of a user, target document data is sent to a front end, and preferably, the target document data is Json data in a Json data format; and after the front end receives the Json data, displaying a data document or a data catalog corresponding to the target document data.
Referring to fig. 3, a block diagram of a document data processing apparatus according to an embodiment of the present invention is a module block diagram, where the management apparatus corresponds to an execution main body processor of the above document data processing method, and the apparatus 400 is applied to a backend, and includes:
the reading module 301 is configured to, when a document directory sub-item clicked by a user is detected, read a data file pointed by at least one target file path in a preset document database table according to the document directory sub-item, where the target file path includes a mapping relationship between the document directory sub-item and the data file;
a binding module 302, configured to bind the data nodes corresponding to the read data files to a preset chain tree structure, so as to obtain target chain tree data;
and the analyzing module 303 is configured to analyze the target chain tree data according to a preset document data format to obtain target document data.
The invention provides a document data processing device, comprising: the reading module 301, the binding module 302 and the parsing module 303, specifically, when detecting a document directory sub-item clicked by a user, the reading module 301 reads a data file in a file system pointed by at least one target file path in a preset document database table according to the document directory sub-item, where the target file path includes a mapping relationship between the document directory sub-item and the data file; binding the data nodes corresponding to the read data files to a preset chain tree structure through a binding module 302 to obtain target chain tree data; and analyzing the target chain tree data according to a preset document data format through an analysis module 303 to obtain target document data. By implementing the scheme, when a user inquires the document directory sub-items, the data files pointed by the target file path in the file database table are read so as to read each data file, the data nodes corresponding to the read data files are bound to the chain tree structure, the binding of the data nodes of the data files and the directory nodes of the document data is realized so as to obtain corresponding target chain tree data, and the target chain tree data is analyzed into target document data for front-end display of the document directory data; the scheme is suitable for various types of data files, so that the front end can display the document directory data of the corresponding type according to the requirements of the user, and the user experience is improved.
Further, the preset document database table includes: the document directory data table and the file database table, the device 300 for processing document data further includes:
an obtaining module 304, configured to obtain a file type, a target file path, and a file name corresponding to each data file prestored in the file system;
an establishing module 305, configured to establish a document directory data table and a file database table;
a storage module 306, configured to store the target file path and the file name corresponding to each data file in a file database table; and
the storage module 306 is further configured to store the file database table into the document directory database table according to the file type corresponding to the data file.
Further, the apparatus 300 for processing document data further includes: and a sending module 307, configured to send the target document data to a front end in response to a display request of the document directory sub-item of the user, where the front end is used to display a document corresponding to the target document data.
It should be noted that, the processing apparatus for document data provided in this embodiment is an apparatus item corresponding to the aforementioned method for processing document data, and the technical features of this portion are similar or similar to the aforementioned method steps, and for the description of the technical feature portion of this apparatus, reference may be made to the description of the method for processing document data in the foregoing embodiment, which is not further described in this embodiment.
An electronic device according to an embodiment of the present invention is further provided, and specifically refer to fig. 4, which is an architecture diagram of the electronic device according to the embodiment of the present invention, the electronic device includes a memory 401, a processor 402 and a communication bus 403, the communication bus 403 is respectively connected to the memory 401 and the processor in a communication manner 402, the memory 402 stores a computer program, and when the processor executes the computer program, each step in the method for processing the document data according to any item is implemented.
Illustratively, the computer program of the method for processing document data mainly includes: when detecting a document directory subentry clicked by a user, reading a data file in a file system pointed by at least one target file path in a preset document database table according to the document directory subentry, wherein the target file path comprises a mapping relation between the document directory subentry and the data file; binding the data nodes corresponding to the read data files to a preset chain tree structure to obtain target chain tree data; and analyzing the target chain tree data according to a preset document data format to obtain target document data. In addition, the computer program may also be divided into one or more modules, which are stored in the memory and executed by the processor to accomplish the present invention. One or more of the modules may be a series of computer program instruction segments capable of performing certain functions, the instruction segments being used to describe the execution of a computer program in a computing device. For example, the computer program may be divided into a reading module 301, a binding module 302, a parsing module 303, an obtaining module 304, a building module 305, a storing module 306, and a sending module 307 as shown in fig. 4.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
An embodiment of the present invention further provides a storage medium, which is a computer-readable storage medium, and is characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, each step in the method for processing document data in any item is implemented.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of modules is merely a division of logical functions, and an actual implementation may have another division, for example, a plurality of modules or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may be in an electrical, mechanical or other form.
Modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
The integrated module, if implemented in the form of a software functional module and sold or used as a separate product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It should be noted that, for the sake of simplicity, the above-mentioned method embodiments are described as a series of acts or combinations, but those skilled in the art should understand that the present invention is not limited by the described order of acts, as some steps may be performed in other orders or simultaneously according to the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no acts or modules are necessarily required of the invention.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
The above description is provided for the document data processing method, apparatus, electronic device and storage medium, and for those skilled in the art, there may be variations in the specific implementation and application scope according to the ideas of the embodiments of the present invention, and in summary, the content of the present specification should not be construed as limiting the present invention.

Claims (10)

1. A method for processing document data, applied to a backend, the method comprising:
when a document directory subentry clicked by a user is detected, reading a data file in a file system pointed by at least one target file path in a preset document database table according to the document directory subentry, wherein the target file path comprises a mapping relation between the document directory subentry and the data file;
binding the read data nodes corresponding to the data files to a preset chain tree structure to obtain target chain tree data;
and analyzing the target chain tree data according to a preset document data format to obtain target document data.
2. The method for processing document data according to claim 1, wherein the preset document database table includes: the step of reading the data file in the file system pointed by at least one target file path in the preset file database table according to the document directory sub-item comprises the following steps:
acquiring a file type, a target file path and a file name corresponding to each data file prestored in the file system;
establishing the document directory data table and establishing the file database table;
storing the target file path and the file name corresponding to each data file to the file database table;
and storing the file database table to a document directory database table according to the file type corresponding to the data file.
3. The method for processing document data according to claim 1 or 2, wherein the step of reading the data file in the file system pointed to by at least one target file path in the preset document database table according to the document directory sub-entry comprises:
when detecting that a user adds a document, acquiring document data corresponding to the document;
converting the document data into a data file according to a preset document data format;
and storing the data file to the file system.
4. The method for processing document data according to claim 3, wherein the step of binding the data nodes corresponding to the read data files to a preset chain tree structure to obtain target chain tree data further comprises:
responding to a request of the document directory itemized name acquired by the user, and acquiring a name node corresponding to the data file;
the step of binding the read data nodes corresponding to the data file to a preset chain tree structure to obtain target chain tree data includes:
binding the read data nodes and the name nodes corresponding to the data files to a preset chain tree structure;
acquiring configuration data parameters corresponding to a target chain tree node of the chain tree structure;
and encapsulating the configuration data parameters into the target chain tree data.
5. The method for processing document data according to claim 1 or 4, wherein the step of parsing the target chain tree data according to a preset document data format to obtain target document data includes:
paging the target chain tree data to obtain paged target tree data;
storing the target tree data as single directory data;
and analyzing the directory data according to a preset document data format to obtain target document data.
6. The method for processing document data according to claim 1, wherein the step of parsing the target chain tree data according to a preset document data format to obtain target document data comprises:
and responding to a display request of the document catalog items of a user, and sending the target document data to a front end, wherein the front end is used for displaying the document corresponding to the target document data.
7. A document data processing apparatus applied to a backend, comprising:
the reading module is used for reading a data file pointed by at least one target file path in a preset document database table according to a document directory sub-item when the document directory sub-item clicked by a user is detected, wherein the target file path comprises a mapping relation between the document directory sub-item and the data file;
the binding module is used for binding the read data nodes corresponding to the data files to a preset chain tree structure to obtain target chain tree data;
and the analysis module is used for analyzing the target chain tree data according to a preset document data format to obtain target document data.
8. The apparatus for processing document data according to claim 7, wherein the preset document database table includes: the document directory data table and the file database table further comprise:
the acquisition module is used for acquiring the file type, the target file path and the file name corresponding to each data file prestored in a file system;
the establishing module is used for establishing the document directory data table and the file database table;
the storage module is used for storing the target file path and the file name corresponding to each data file to the file database table;
and the storage module is also used for storing the file database table to a document directory database table according to the file type corresponding to the data file.
9. An electronic device comprising a memory, a processor and a communication bus, wherein the communication bus is respectively connected with the memory and the processor in a communication manner, and the memory stores a computer program thereon, and the processor executes the computer program to realize each step in the method for processing document data according to any one of claims 1 to 6.
10. A storage medium which is a computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program realizes each step in the method for processing document data according to any one of claims 1 to 6.
CN202011049542.XA 2020-09-29 2020-09-29 Document data processing method and device, electronic equipment and storage medium Active CN112328678B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011049542.XA CN112328678B (en) 2020-09-29 2020-09-29 Document data processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011049542.XA CN112328678B (en) 2020-09-29 2020-09-29 Document data processing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112328678A true CN112328678A (en) 2021-02-05
CN112328678B CN112328678B (en) 2021-08-20

Family

ID=74313139

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011049542.XA Active CN112328678B (en) 2020-09-29 2020-09-29 Document data processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112328678B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113010490A (en) * 2021-02-22 2021-06-22 北京字节跳动网络技术有限公司 Data storage method and device and electronic equipment

Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020138502A1 (en) * 2001-03-20 2002-09-26 Gupta Uday K. Building a meta file system from file system cells
US20020165864A1 (en) * 2001-01-08 2002-11-07 International Business Machines Corporation Efficient application deployment on dynamic clusters
CN101236571A (en) * 2008-03-06 2008-08-06 北京乾坤化物数字技术有限公司 Method for managing mass network substation web page by dendritical structure catalog
CN101290625A (en) * 2008-06-11 2008-10-22 华东师范大学 XML document storage and search method
CN101320368A (en) * 2007-06-06 2008-12-10 佳能株式会社 Document management method system and apparatus
CN101404029A (en) * 2008-11-04 2009-04-08 深圳市蓝韵实业有限公司 DICOM image file storage method
CN101447937A (en) * 2009-02-27 2009-06-03 北京理工大学 Rapid data positioning method based on path division and multi-distributed-directory
CN101510275A (en) * 2008-12-30 2009-08-19 北京环太中科软件股份有限公司 System and method for constructing management system
CN101895834A (en) * 2010-06-21 2010-11-24 杭州热点信息技术有限公司 Method for producing and distributing contents of wireless multimedia system
CN102122306A (en) * 2011-03-28 2011-07-13 中国人民解放军国防科学技术大学 Data processing method and distributed file system applying same
CN102253985A (en) * 2011-06-30 2011-11-23 深圳市江波龙电子有限公司 File system data management method and system
CN102682015A (en) * 2011-03-15 2012-09-19 中国科学院声学研究所 High-definition media-oriented embedded file storage structure and method
CN104036773A (en) * 2014-05-22 2014-09-10 立德高科(北京)数码科技有限责任公司 Method and system for playing recorded text content through anti-counterfeiting identification device
US20150248420A1 (en) * 2014-03-03 2015-09-03 Netapp, Inc. Distributed file system snapshot
CN110110150A (en) * 2018-01-04 2019-08-09 北大医疗信息技术有限公司 Read method, reading device, computer equipment and the storage medium of XML data
US10437809B1 (en) * 2015-09-28 2019-10-08 Amazon Technologies, Inc. Projection-based updates
CN111209256A (en) * 2020-01-07 2020-05-29 深信服科技股份有限公司 File monitoring method and device, electronic equipment and storage medium

Patent Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020165864A1 (en) * 2001-01-08 2002-11-07 International Business Machines Corporation Efficient application deployment on dynamic clusters
US20020138502A1 (en) * 2001-03-20 2002-09-26 Gupta Uday K. Building a meta file system from file system cells
CN101320368A (en) * 2007-06-06 2008-12-10 佳能株式会社 Document management method system and apparatus
CN101236571A (en) * 2008-03-06 2008-08-06 北京乾坤化物数字技术有限公司 Method for managing mass network substation web page by dendritical structure catalog
CN101290625A (en) * 2008-06-11 2008-10-22 华东师范大学 XML document storage and search method
CN101404029A (en) * 2008-11-04 2009-04-08 深圳市蓝韵实业有限公司 DICOM image file storage method
CN101510275A (en) * 2008-12-30 2009-08-19 北京环太中科软件股份有限公司 System and method for constructing management system
CN101447937A (en) * 2009-02-27 2009-06-03 北京理工大学 Rapid data positioning method based on path division and multi-distributed-directory
CN101895834A (en) * 2010-06-21 2010-11-24 杭州热点信息技术有限公司 Method for producing and distributing contents of wireless multimedia system
CN102682015A (en) * 2011-03-15 2012-09-19 中国科学院声学研究所 High-definition media-oriented embedded file storage structure and method
CN102122306A (en) * 2011-03-28 2011-07-13 中国人民解放军国防科学技术大学 Data processing method and distributed file system applying same
CN102253985A (en) * 2011-06-30 2011-11-23 深圳市江波龙电子有限公司 File system data management method and system
US20150248420A1 (en) * 2014-03-03 2015-09-03 Netapp, Inc. Distributed file system snapshot
CN104036773A (en) * 2014-05-22 2014-09-10 立德高科(北京)数码科技有限责任公司 Method and system for playing recorded text content through anti-counterfeiting identification device
US10437809B1 (en) * 2015-09-28 2019-10-08 Amazon Technologies, Inc. Projection-based updates
CN110110150A (en) * 2018-01-04 2019-08-09 北大医疗信息技术有限公司 Read method, reading device, computer equipment and the storage medium of XML data
CN111209256A (en) * 2020-01-07 2020-05-29 深信服科技股份有限公司 File monitoring method and device, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113010490A (en) * 2021-02-22 2021-06-22 北京字节跳动网络技术有限公司 Data storage method and device and electronic equipment

Also Published As

Publication number Publication date
CN112328678B (en) 2021-08-20

Similar Documents

Publication Publication Date Title
CN107239479B (en) Block chain based data storage and query method and device
US7877682B2 (en) Modular distributed mobile data applications
AU2006200383B2 (en) Mapping of a file system model to a database object
US7509574B2 (en) Method and system for reducing delimiters
US20060195459A1 (en) Schema grammar and compilation
US8024353B2 (en) Method and system for sequentially accessing compiled schema
US7500184B2 (en) Determining an acceptance status during document parsing
WO2023029752A1 (en) Data query method and apparatus, server, and computer-readable storage medium
CN111198898B (en) Big data query method and big data query device
CN111708805A (en) Data query method and device, electronic equipment and storage medium
CN109656951A (en) Method and inquiry system based on expression formula inquiry data
CN112328678B (en) Document data processing method and device, electronic equipment and storage medium
CN111563199A (en) Data processing method and device
CN114995859A (en) Page hot updating method, device, equipment and storage medium
CN112307369A (en) Short link processing method, device, terminal and storage medium
KR100417569B1 (en) Search method of distributed/heterogeneous gis databases using metadata interchange standard
US20060184562A1 (en) Method and system for decoding encoded documents
JP2013008395A (en) Display system and method for acceptance state
CN112905600A (en) Data query method and device, storage medium and electronic equipment
CN112947900A (en) Web application development method and device, server and development terminal
US20060212799A1 (en) Method and system for compiling schema
CN115002072A (en) JMX-based data acquisition method, device and medium
Westhead et al. Describing data on the grid
CN113779068A (en) Data query method, device, equipment and storage medium
CN115905274A (en) Data processing method and device, electronic equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant