CN115905213A - Report storage method and device and electronic equipment - Google Patents

Report storage method and device and electronic equipment Download PDF

Info

Publication number
CN115905213A
CN115905213A CN202211137575.9A CN202211137575A CN115905213A CN 115905213 A CN115905213 A CN 115905213A CN 202211137575 A CN202211137575 A CN 202211137575A CN 115905213 A CN115905213 A CN 115905213A
Authority
CN
China
Prior art keywords
node
report
association
information table
stored
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.)
Pending
Application number
CN202211137575.9A
Other languages
Chinese (zh)
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.)
Apollo Intelligent Technology Beijing Co Ltd
Original Assignee
Apollo Intelligent Technology Beijing 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 Apollo Intelligent Technology Beijing Co Ltd filed Critical Apollo Intelligent Technology Beijing Co Ltd
Priority to CN202211137575.9A priority Critical patent/CN115905213A/en
Publication of CN115905213A publication Critical patent/CN115905213A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The disclosure provides a report storage method and device and electronic equipment, relates to the technical field of artificial intelligence, and particularly relates to the technical field of databases and automatic driving. The specific implementation scheme is as follows: the method comprises the steps of obtaining a report to be stored, wherein the report to be stored comprises at least one link, and each link comprises a plurality of layers of nodes; the method comprises the steps that a first incidence relation of a first node of a report to be stored is contained in an incidence information table of a database, and a second incidence relation of the first node is added in a special information table of the database under the condition that the first incidence relation of the first node is not matched with the incidence relation of the first node in the report to be stored, wherein the second incidence relation of the first node is used for indicating the incidence relation of the first node in the report to be stored. The storage space can be saved.

Description

Report storage method and device and electronic equipment
Technical Field
The disclosure relates to the technical field of artificial intelligence such as databases and automatic driving, in particular to a report storage method and device and electronic equipment.
Background
Much of the data is presented in the form of a report, which often includes one or more links, each of which may include multiple levels of nodes. Currently, the storage of the report is mainly performed according to links, that is, each link in the report is stored separately.
Disclosure of Invention
The disclosure provides a report storage method and device and electronic equipment.
According to an aspect of the present disclosure, there is provided a report storing method, including:
the method comprises the steps of obtaining a report to be stored, wherein the report to be stored comprises at least one link, and each link comprises a plurality of layers of nodes;
adding a second association relation of a first node in a special information table of a database under the condition that the first association relation of the first node is not matched with the association node of the report to be stored of the first node in the association information table of the database, wherein the second association relation of the first node is used for indicating the association node of the first node in the report to be stored;
the association information table is used for storing the first association relationship of at least one node, and the first association relationship of each node is used for indicating an association node of the node.
According to an aspect of the present disclosure, there is provided a report storing apparatus including:
the report storage device comprises a first acquisition module, a second acquisition module and a report sending module, wherein the first acquisition module is used for acquiring a report to be stored, the report to be stored comprises at least one link, and each link comprises a plurality of layers of nodes;
a first adding module, configured to add a first association relationship of a first node of the report to be stored in an association information table of a database, where the first association relationship of the first node is not matched with an association node of the report to be stored of the first node, a second association relationship of the first node is added in a special information table of the database, and the second association relationship of the first node is used to indicate an association node of the first node in the report to be stored;
the association information table is used for storing the first association relationship of at least one node, and the first association relationship of each node is used for indicating an association node of the node.
According to another aspect of the present disclosure, there is provided an electronic device including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the report storing method provided by the present disclosure.
According to another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform a report storing method provided by the present disclosure.
According to another aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the report storing method provided by the present disclosure.
It should be understood that the statements in this section are not intended to identify key or critical features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is a flowchart of a report storage method provided by the present disclosure;
FIG. 2 is a schematic diagram of a reporting link provided by the present disclosure;
FIG. 3 is a schematic diagram of another reporting link provided by the present disclosure;
FIG. 4 is a schematic diagram of a report storage method provided by the present disclosure;
fig. 5a to 5f are structural diagrams of a report storing apparatus provided by the present disclosure;
FIG. 6 is a block diagram of an electronic device used to implement embodiments of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Referring to fig. 1, fig. 1 is a flowchart of a report storing method provided by the present disclosure, and as shown in fig. 1, the method includes the following steps:
step S101, a to-be-stored report is obtained, wherein the to-be-stored report comprises at least one link, and each link comprises a plurality of layers of nodes.
The report to be stored may be a report of an automatic driving service, or may be a report of a vehicle sensing service, or may be a report of services such as a computer and a mobile phone.
The report to be stored may be any report that needs to be stored currently, or may be a report in which multiple reports are stored at a time, that is, the report to be stored may be one or more reports.
The link included in the report to be stored may be as shown in fig. 2 or fig. 3.
As shown in fig. 2, the report to be stored is a report a, the report a associates the index a and the index B, the index a associates the field a and the field B, and the indication B associates the field C, the field D, and the field E, so that the following links exist in the report a:
a link of the report A, the index A and the field A;
a link of the report A, the index A and the field B;
a link of the report A, the index B and the field C;
a link of the report A, the index B and the field D;
report A, index B and field E.
As shown in fig. 3, the report to be stored is a report B, the report B associates an index a and an index B, the index a associates a field a, and indicates B associates a field C, a field D, and a field E, so that the following links exist in the report B:
a report B, an index A and a field A;
a link of the report B, the index B and the field C;
a link of the report B, the index B and the field D;
report B, index B and field E.
Each link includes three layers of nodes, for example, a top node of the link in the report a, the index a, and the field a is the report a, a second layer of the node is the index a, a third layer of the node is the field a, and the nodes in the other links are similar, which is not described herein again.
It should be noted that fig. 2 and fig. 3 are merely examples of reports, links, and nodes, and in this disclosure, the links in the reports and the nodes in the links are not limited, for example: four or more layers of links are also possible.
Step S102, when an association information table of a database contains a first association relationship of a first node of the report to be stored, and the first association relationship of the first node is not matched with an association node of the report to be stored of the first node, adding a second association relationship of the first node in a special information table of the database, wherein the second association relationship of the first node is used for indicating the association node of the first node in the report to be stored;
the association information table is used for storing the first association relationship of at least one node, and the first association relationship of each node is used for indicating an association node of the node.
In this disclosure, the database may be a local database or a cloud database, and the database may be a database of an automatic driving service, or may be a database of a vehicle sensing service, or may be a database of services such as a computer and a mobile phone.
The association information table may store a first association relationship of some or all nodes in the report stored by the database, where the first association relationship of each node is used to indicate an associated node of the node.
The special information table may be used to store a second association relationship of a special node that already contains the first association relationship in the association information table, the special node associating different nodes in different tables. And for the nodes of which the first incidence relation is matched with the incidence nodes of the report to be stored, adding a second incidence relation in the special information table is not needed.
Taking the report to be stored as the report B as an example, the association information table already includes the first association relationship between the index a and the index B. Wherein the first association relation of the index B indicates that the index B associates with the node, including: as can be seen, the first association relationship of the index B is matched with the association node of the index B in the report B, so that the second relationship association of the index B does not need to be added, and the repeated first association relationship of the index B does not need to be added in the information association table; and the first association of the indicator a indicates that the indicator a associated node includes: as can be seen, the first association relationship of the index a is not matched with the association node of the index a in the report B, that is, the index a is the first node. Therefore, a second association relation of the index A is added in the special information table, and the second association relation of the index A is used for indicating that the association node of the index A in the report B is the field A.
It should be noted that the second association relationship of any node in the special information table is used to indicate an association node of the node in the special table, and the association node indicated by the first association relationship of the node is different from the association node indicated by the second association relationship of the node. For example: the first association of index a indicates that index a associated nodes include: and the second incidence relation of the index A indicates that the index A incidence node is the field A.
In the present disclosure, the association information table and the special information table may also be referred to by other names, such as a first table and a second table, and the present disclosure is not limited thereto.
In addition, in the case where the report to be stored is the first report stored in the association information table and the special information table, the association information table and the special information table are information tables created when the report to be stored is stored, and in other cases, the base information table, the association information table, and the special information table may be information tables already created in the database.
In the disclosure, when the first association relationship of the first node in the association information table is not matched with the association node of the report to be stored of the first node, the second association relationship of the first node is added in the special information table. Therefore, when the first incidence relation of the node is matched with the incidence node of the report to be stored of the node, the second incidence relation of the node does not need to be added, and the storage space can be saved.
It should be noted that the above method provided by the present disclosure may be applied to an electronic device, that is, all the steps of the above method are performed by the electronic device, and the electronic device includes, but is not limited to, a server, an autonomous vehicle, a vehicle-mounted terminal, a computer, a mobile phone, and other electronic devices.
In one embodiment, the second association of the first node comprises:
the node identifier of the link top node of the report to be stored, the node identifier of the first node, the associated node identifier and type indication information are used for indicating whether the associated node of the report to be stored of the first node contains a node corresponding to the associated node identifier;
when the type indication information indicates that the first node contains a node corresponding to the associated node identifier in the associated node of the report to be stored, the node corresponding to the associated node identifier in the report to be stored in the first node;
under the condition that the type indication information indicates that the first node does not include a node corresponding to the associated node identifier in the associated node of the report to be stored, the first node in the associated node of the report to be stored is: and nodes left after the nodes corresponding to the associated node identification are removed from the associated nodes indicated by the first association relation of the first node.
The link top node of the report to be stored may be a report name of the report to be stored, for example: the top-level nodes of the links of the report A and the report B are the report A and the report B respectively. The top nodes of the multi-link links in the same report are the same.
In this disclosure, a link top node may also be referred to as a link root node.
The second association information includes a node identifier of a link top node of the report to be stored, so that the second association relationship of the first node can be indicated to be used for the report to be stored, that is, the association node is determined for the first node in the report to be stored according to the second association relationship.
For example: table 1 below shows:
table 1:
Figure BDA0003852012720000061
the top node identifier 6 of the link may indicate that the report to be stored is the report B, the current node identifier 2 may indicate that the first node is the index a, the node corresponding to the associated node identifier 4 is the field a, and the type indication information 0 indicates that the type indication information is used to indicate that the first node includes the node corresponding to the associated node identifier in the associated node of the report to be stored. Thus, it can be determined from table 2 that the index a is field a in the associated node of the report B.
Another example is: table 2 below shows:
table 2:
Figure BDA0003852012720000062
the type indication information 1 indicates that the type indication information is used for indicating that the first node does not include a node corresponding to the associated node identifier in the associated node of the report to be stored. Thus, it can be determined from table 2 that the associated node of the index a in the report B is:
subtracting the field B from the associated nodes (the field A and the field B) indicated by the first association relation of the index A to determine that the associated nodes of the index A in the report B are the field A.
It should be noted that the indexes in tables 1 and 2 are used to distinguish different association relationships in the special information table, and the indexes in the table may not be used in storage and search. In some embodiments, the special information table may not include the index column.
In this embodiment, the second association relationship of the first node may be flexibly indicated by the node identifier of the link top node, the node identifier of the first node, the association node identifier, and the type indication information, and under the condition that the second association relationship of the first node indicates a large number of association nodes, the storage space may be saved. For example: the association node indicated by the second association relationship of the first node comprises a field A, a field B and a field C, and the association node indicated by the first association relationship of the first node comprises the field A, the field B, the field C and the field D, so that the first node can indicate that the association node indicated by the second association relationship of the first node comprises no node corresponding to the association node identifier in the association node of the report to be stored through the type indication information, and the node identifier of the field D needs to be added, so that the association node indicated by the first node comprises the field A, the field B and the field C, that is, the field D is removed from the field A, the field B, the field C and the field D.
In one embodiment, the method further comprises:
under the condition that a basic information table of the database does not contain a second node of the report to be stored, adding a node identifier of the second node into the basic information table, wherein the basic information table is used for storing the node identifier of the node in the report corresponding to the database;
adding the first association relationship of the second node in the association information table, wherein the first association relationship of the second node is used for indicating the association node of the second node in the report to be stored, and the association information table is used for storing the first association relationship of the nodes in the basic information table.
The above two steps may be executed before step S102, and in some embodiments, may also be executed in synchronization with step S102.
The basic information table may store node identifiers of nodes in all reports corresponding to the database. For example: taking report a and report B as an example, the basic information table may be as shown in table 3 below:
table 3:
identification Node name
1 Report A
2 Index A
3 Index B
4 Field A
5 Field B
6 Report B
7 Field C
8 Field D
9 Field E
It can be seen that the table 3 includes all nodes in the report a and the report B, where a common node in the report a and the report B has the index a, the index B, the field a, the field C, the field D, and the field E, and only one common node needs to be stored.
Therefore, when the report A is a stored report and the report to be stored is a report B, the node identifiers of the following nodes are only required to be added in the basic information table when the report B is stored: a report form B;
because the rest nodes in the report B are already contained in the basic information table, the repeated storage of the same node can be avoided, and the storage space is saved.
The related node of the second node in the report to be stored may be a node related to the link where the second node is located in the report to be stored.
Taking the report to be stored as the report B as an example, as described above, when the report a is already stored, only one node of the report B in the report B is not included in the basic information table, so the first association relationship of the node of the report B is added to the association information table in the above step, and the association relationship is the association index a and the association index B of the report B.
For example: as shown in table 4 below:
table 4:
Index current node Association node
1 1
2 1 2
3 1 3
4 2 4
5 2 5
6 6
7 6 2
8 6 3
9 3 7
10 3 8
11 3 9
Only the first association relationship between the report B association index a and the report B association index B, i.e. the association relationship shown in the indexes 7 and 8, needs to be added to the association information table.
It should be noted that, in the index 1 and the index 6, the current node is empty, which indicates that the associated node is a link top node, that is, the report a and the report B are link top nodes. In some embodiments, the related information may not include a line corresponding to the index 1 and the index 6.
The index in table 4 is used to distinguish different association relationships in the association information table, and the index in the table may not be used in storage and search. In some embodiments, the column of the index may not be included in the association information table.
Because the nodes contained in the basic information table do not need to add the first association relationship, the storage space can be saved, for example, the index A and the index B in the report B are contained in the basic information table, that is, the first association relationship of the two nodes, namely the index A and the index B, is stored in the association information table, so that when the report B is stored, the first association relationship of the two nodes does not need to be stored in the association information table.
It should be noted that the first association relationship of any node in the association information table is used to indicate the association node of the node in the table.
In this embodiment, the node identifier of the second node, which is not included in the basic information table, is added to the database, and the first association relationship of the second node is added to the association information table. Therefore, node identification and the first incidence relation do not need to be added to the nodes contained in the basic information table, and storage space can be saved.
In one embodiment, the method further comprises:
deleting a third node in the basic information table under the condition that the report form to be deleted needs to be deleted, wherein the third node is a node which only belongs to the report form to be deleted in the basic information table;
and deleting the first association relation of the third node in the association information table.
The report to be deleted is any report already stored in the database, and specifically, the report to be deleted can be understood as a report which needs to be deleted currently. For example: the report to be deleted may be the report to be stored in step S101, that is, the report is deleted after being stored, or may be another stored report.
The report to be deleted may be deleted by receiving a deletion instruction to delete the report to be deleted.
The third node is a node in the basic information table that only belongs to the report to be deleted, and it can be understood that the basic information table includes the node identifier of the third node, but the node only exists in the report to be deleted.
The deleting of the first association relationship of the third node in the association information table may be deleting the first association relationship of the third node in the association information table when the first association relationship of the third node exists in the association information table.
In the embodiment, when the report is deleted, only the node only belonging to the report and the corresponding first association relation need to be deleted in the basic information table, and other nodes do not need to be deleted, so that the calculation amount can be saved.
In another embodiment, on the basis of the above embodiment, the method further includes:
if the second association relationship of the fourth node represents the association node of the fourth node in the report to be deleted, deleting the second association relationship of the fourth node in the special information table; or,
if the second association relationship of the fourth node represents an association node of the fourth node in other reports, determining whether the first association relationship of the fourth node is exclusively the association relationship of the fourth node in the report to be deleted; deleting the first association relation of the fourth node under the condition that the first association relation of the fourth node is exclusively the association relation of the fourth node in the report to be deleted; and under the condition that the first association relationship of the fourth node is the association relationship of the fourth node in a plurality of reports, storing the first association relationship of the fourth node in the association information table, wherein the plurality of reports comprise the report to be deleted.
The other report forms can be understood as report forms different from the report forms to be deleted.
In this embodiment, when the second association relationship of the fourth node indicates an association node of the fourth node in the report to be deleted, the second association relationship of the fourth node in the special information table is deleted, and the second association relationship of the first node is not deleted, so that the calculation amount in the report deleting process can be reduced. In addition, when the second association relationship of the fourth node does not represent the association node of the fourth node in the report to be deleted, the first association relationship of the fourth node is deleted only under the condition that the first association relationship of the fourth node exclusively belongs to the association relationship of the fourth node in the report to be deleted, and the first association relationship of the fourth node is not deleted under the condition that the first association relationship of the fourth node is the association relationship of the fourth node in a plurality of reports, so that the calculation amount in the report deleting process can be reduced. For example: in the association information table shown in table 4, there is a first association relationship of the node of the index a, and in the special information tables shown in tables 1 and 2, there may also be a second association relationship of the node of the index a, where, in this way, when the second association relationship of the node of the index a in the special information tables shown in tables 1 and 2 represents the association relationship of the node in the report B, when deleting the report B, only the second association relationship of the node of the index a in the special information tables shown in tables 1 and 2 needs to be deleted, and the first association relationship of the node in the association information table is retained.
In other embodiments, when the first association relationship of the fourth node only belongs to the report to be deleted by the fourth node, the first association relationship of the fourth node in the association information table is deleted, and the first association relationship corresponding to the second association relationship of the fourth node may be added to the association information table according to the second association relationship of the fourth node in the special information table, that is, the second association relationship of the fourth node in the special information table is transferred to the basic information table. For example: the second incidence relation of the fourth node indicates that the incidence node of the fourth node is the node X, the first incidence relation used for indicating that the incidence node of the fourth node is the node X is added into the basic information table, and the second incidence relation of the fourth node is deleted, so that the reading can be carried out from the incidence information table when the incidence relation of the fourth node is read subsequently, and the reading complexity is reduced.
In another embodiment, the method further comprises:
and under the condition that the fifth node of the report to be modified needs to be modified, modifying the fifth node in the basic information table.
The modification of the fifth node of the report to be modified may be performed by receiving a modification instruction for modifying the fifth node.
The report to be modified is any report stored in the database. Specifically, the report to be modified may be understood as a report that needs to be modified currently. For example: the report to be modified may be the report to be stored in step S101, that is, the report to be modified after being stored, or may be another report already stored.
The modification of the fifth node may be to modify the node content of the fifth node, such as the node name, the index content, the field content, and the like.
In the embodiment, when the node is modified, only the basic information table needs to be modified, and the associated information table and the special information table do not need to be modified, so that the modification calculation amount can be reduced.
In another embodiment, the method further comprises:
under the condition that the incidence relation in the report to be read needs to be read, acquiring the node identification of the target node of the report to be read from the basic information table;
determining a correlation node of the target node from at least one of the correlation information table and the special information table based on the node identifier of the target node; wherein, when the special information table does not contain the second association relationship of the target node, the association node of the target node is the association node indicated by the first association relationship of the target node; under the condition that the special information table contains the second incidence relation of the target node, the incidence node of the target node is an incidence node indicated by the second incidence relation of the target node;
and the target node is a node except the link bottom node in the report to be read.
The report to be read is any report stored in the database. Specifically, the report to be read can be understood as a report which needs to be read currently. For example: the report to be read may be the report to be stored in step S101, that is, the report is read after being stored, or may be another stored report.
The association relationship in the report to be read needs to be read by receiving a reading instruction for reading the association relationship of the report to be read.
The target node may be a top node of the link of the report to be read, or may be a second node of the link in the report to be read, such as an index node.
The determining the associated node of the target node from at least one of the associated information table and the special information table may include:
reading the first incidence relation of the target node in an incidence information table, and identifying whether a second incidence relation of the target node exists in a special information table;
if the second incidence relation of the target node does not exist in the special information table, determining the incidence node of the target node based on the first incidence relation of the target node;
if the second incidence relation of the target node exists in the special information table, performing deduplication operation based on the second incidence relation and the first incidence relation of the target node to determine the incidence node of the target node;
wherein, the operation of removing the duplicate includes:
determining the associated node of the target node in the report to be read as the node corresponding to the associated node identifier under the condition that the second associated relationship of the target node comprises type indicating information and the type indicating information indicates that the associated node of the report to be read contains the node corresponding to the associated node identifier in the second associated relationship;
and determining to delete the node corresponding to the associated node identifier in the first associated relationship of the target node under the condition that the second associated relationship of the target node comprises type indication information and the type indication information indicates that the target node does not comprise the node corresponding to the associated node identifier in the second associated relationship when the associated node of the report to be read does not comprise the node corresponding to the associated node identifier in the second associated relationship, wherein the rest nodes are the nodes corresponding to the associated node identifier when the associated node of the report to be read of the target node is the target node.
When the target node is a non-link top node, when reading in the special information table, the node identifier of the link top node and the node identifier of the target node of the report to be read need to be read.
For example: the report to be read is the report B as an example, and the relation reading of the report B comprises the following steps:
reading the link top node identifier =6 of the report B, wherein the current layer is the first layer;
reading all the associated nodes of the link top node identification (node identification = 6) to obtain an index A (node identification = 2) and an index B (node identification = 3);
reading the special association information table, specifically, reading the association relationship by using the link top node identifier (identifier = 6) and the node identifier (node identifier = 6) of the current node, as shown in table 3 or table 4, there is no second association relationship at present, which indicates that the second layer of the association relationship of the report B is an index a and an index B;
reading all the relevant nodes read by the current node (node identification = 2) to obtain a field A (node identification = 4) and a field B (node identification = 5);
reading a special association information table, wherein a special association relationship between a link top-level node identifier (node identifier = 6) and a node identifier (node identifier = 2) of a current node is an associated node identifier (node identifier = 4), and the type of the type indication information is 0 (namely, contained), so that duplication is removed from a result obtained in the previous step, and the fact that the associated node of the current node (node identifier = 2) only has a field a (node identifier = 4) is deduced; if the type of the type indication information is 1 (not included), the deduplication result is field B.
It should be noted that, in this embodiment, the determination of the associated node of the target node by the type indication information is not limited, and for example: in the case where the second association does not include the type indication information, the association node of the target node may be determined directly based on the second association.
In this embodiment, the associated node of the target node can be accurately read through the basic information table, the associated information table, and the special information table, and further, the association relationship of any report stored in the database can be read.
It should be noted that, the embodiments provided in the present disclosure can be implemented in combination with each other, for example: one embodiment may be as shown in FIG. 4, comprising the steps of:
step S401, data is obtained, and the data comprises a report form;
step S402, storing basic information of the report;
step S403, judging the operation type corresponding to the data based on the basic information;
step S404, only modifying the basic information table under the condition that the operation type is modified;
step S405, under the condition that the operation type is deletion, deleting the node identification of the current node in the basic information table and the special association information table, and deleting the association relation of the node in the association information table;
step S406, under the condition that the operation type is newly added, adding a node identifier of a node which is not included in the basic information table, and adding a first association relation of the node which is not included in the association information table;
step S407, judging whether the correlation information table contains all links in the report;
step S408, if the part contains the link, determining the link which is not contained in the association information table, and determining the node identification of the current node and the node identification of the association node;
step S409, a second association relationship corresponding to the current node not including the link is created in the special information table.
Referring to fig. 5a, fig. 5a is a report storing device provided by the present disclosure, as shown in fig. 5a, the report storing device 500 includes:
a first obtaining module 501, configured to obtain a report to be stored, where the report to be stored includes at least one link, and each link includes multiple layers of nodes;
a first adding module 502, configured to add a first association relationship of a first node of the report to be stored in an association information table of a database, and add a second association relationship of the first node in a special information table of the database when the first association relationship of the first node is not matched with an association node of the report to be stored of the first node, where the second association relationship of the first node is used to indicate an association node of the first node in the report to be stored;
the association information table is used for storing the first association relationship of at least one node, and the first association relationship of each node is used for indicating an association node of the node.
Optionally, the second association relationship of the second node includes:
the node identifier of the link top node of the report to be stored, the node identifier of the first node, the associated node identifier and type indication information are used for indicating whether the associated node of the report to be stored of the first node contains a node corresponding to the associated node identifier;
when the type indication information indicates that the first node contains a node corresponding to the associated node identifier in the associated node of the report to be stored, the node corresponding to the associated node identifier in the report to be stored in the first node;
under the condition that the type indication information indicates that the first node does not include a node corresponding to the associated node identifier in the associated node of the report to be stored, the first node, in the associated node of the report to be stored, is: and nodes left after the nodes corresponding to the associated node identification are removed from the associated nodes indicated by the first association relation of the first node.
Optionally, as shown in fig. 5b, the method further includes:
a second adding module 503, configured to add a node identifier of a second node to the basic information table of the database when the basic information table does not include the second node of the report to be stored, where the basic information table is used to store the node identifier of the node in the report corresponding to the database;
a third adding module 504, configured to add the first association relationship of the second node in the association information table, where the first association relationship of the second node is used to indicate an association node of the second node in the report to be stored, and the association information table is used to store the first association relationship of the node in the basic information table.
Optionally, as shown in fig. 5c, the method further includes:
a first deleting module 505, configured to delete a third node in the basic information table when the report to be deleted needs to be deleted, where the third node is a node in the basic information table that only belongs to the report to be deleted;
a second deleting module 506, configured to delete the first association relationship of the third node in the association information table.
Optionally, as shown in fig. 5d, the method further includes:
a third deleting module 507, configured to delete the second association relationship of the fourth node in the special information table if the second association relationship of the fourth node indicates an associated node of the fourth node in the report to be deleted, when the first association relationship of the fourth node in the report to be deleted exists in the associated information table, and the second association relationship of the fourth node in the report to be deleted exists in the special information table; or,
a fourth deleting module 508, configured to, when the first association relationship of the fourth node exists in the association information table and the second association relationship of the fourth node exists in the special information table, if the second association relationship of the fourth node represents an association node of the fourth node in another report, determine whether the first association relationship of the fourth node is exclusively associated with an association relationship of the fourth node in the report to be deleted; deleting the first association relation of the fourth node under the condition that the first association relation of the fourth node is exclusively the association relation of the fourth node in the report to be deleted; and under the condition that the first association relationship of the fourth node is the association relationship of the fourth node in a plurality of reports, storing the first association relationship of the fourth node in the association information table, wherein the plurality of reports comprise the report to be deleted.
Optionally, as shown in fig. 5e, the method further includes:
a modifying module 509, configured to modify the fifth node in the basic information table when the fifth node of the report to be modified needs to be modified.
Optionally, as shown in fig. 5f, the method further includes:
a second obtaining module 510, configured to obtain, from the basic information table, a node identifier of a target node of the report to be read when an association relationship in the report to be read needs to be read;
a second determining module 511, configured to determine, based on the node identifier of the target node, a relevant node of the target node from at least one of the relevant information table and the special information table; wherein, when the special information table does not contain the second association relationship of the target node, the association node of the target node is the association node indicated by the first association relationship of the target node; under the condition that the special information table contains the second incidence relation of the target node, the incidence node of the target node is an incidence node indicated by the second incidence relation of the target node;
and the target node is a node except the link bottom node in the report to be read.
The report storage device provided by the disclosure can realize each process realized by the report storage method provided by the disclosure, and achieve the same technical effect, and for avoiding repetition, the details are not repeated here.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
Wherein, above-mentioned electronic equipment includes: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the report storing method provided by the present disclosure.
The readable storage medium stores computer instructions, wherein the computer instructions are used for causing the computer to execute the report storing method provided by the present disclosure.
The computer program product comprises a computer program, and the computer program realizes the report storage method provided by the disclosure when being executed by a processor.
FIG. 6 illustrates a schematic block diagram of an example electronic device 600 that can be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic devices may also represent various forms of mobile devices, such as personal digital processors, cellular telephones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 6, the device 600 comprises a computing unit 601, which may perform various suitable actions and processes according to a computer program stored in a Read Only Memory (ROM) 602 or loaded from a storage unit 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 can also be stored. The calculation unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
A number of components in the device 600 are connected to the I/O interface 605, including: an input unit 606 such as a keyboard, a mouse, or the like; an output unit 607 such as various types of displays, speakers, and the like; a storage unit 608, such as a magnetic disk, optical disk, or the like; and a communication unit 609 such as a network card, modem, wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
Computing unit 601 may be a variety of general and/or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The calculation unit 601 executes the respective methods and processes described above, such as the report storing method. For example, in some embodiments, the report storage method may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 600 via the ROM 602 and/or the communication unit 609. When the computer program is loaded into RAM 603 and executed by computing unit 601, one or more steps of the report storing method described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform the report storing method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server with a combined blockchain.
It should be understood that various forms of the flows shown above, reordering, adding or deleting steps, may be used. For example, the steps described in the present disclosure may be executed in parallel or sequentially or in different orders, and are not limited herein as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the protection scope of the present disclosure.

Claims (17)

1. A report storage method comprises the following steps:
the method comprises the steps of obtaining a report to be stored, wherein the report to be stored comprises at least one link, and each link comprises a plurality of layers of nodes;
adding a second association relation of a first node in a special information table of a database under the condition that the first association relation of the first node is not matched with the association node of the report to be stored of the first node in the association information table of the database, wherein the second association relation of the first node is used for indicating the association node of the first node in the report to be stored;
the association information table is used for storing the first association relationship of at least one node, and the first association relationship of each node is used for indicating an association node of the node.
2. The method of claim 1, wherein the second association of the first node comprises:
the node identifier of the link top node of the report to be stored, the node identifier of the first node, the associated node identifier and type indication information, wherein the type indication information is used for indicating whether the first node contains a node corresponding to the associated node identifier in the associated node of the report to be stored;
when the type indication information indicates that the first node contains a node corresponding to the associated node identifier in the associated node of the report to be stored, the node corresponding to the associated node identifier in the report to be stored in the first node;
under the condition that the type indication information indicates that the first node does not include a node corresponding to the associated node identifier in the associated node of the report to be stored, the first node, in the associated node of the report to be stored, is: and nodes left after the nodes corresponding to the associated node identification are removed from the associated nodes indicated by the first association relation of the first node.
3. The method of claim 1, further comprising:
under the condition that a basic information table of the database does not contain a second node of the report to be stored, adding a node identifier of the second node into the basic information table, wherein the basic information table is used for storing the node identifier of the node in the report corresponding to the database;
adding the first association relationship of the second node in the association information table, wherein the first association relationship of the second node is used for indicating the association node of the second node in the report to be stored, and the association information table is used for storing the first association relationship of the nodes in the basic information table.
4. The method of claim 3, further comprising:
deleting a third node in the basic information table under the condition that the report to be deleted needs to be deleted, wherein the third node is a node which only belongs to the report to be deleted in the basic information table;
and deleting the first association relation of the third node in the association information table.
5. The method of claim 4, further comprising:
if the second association relationship of the fourth node represents the association node of the fourth node in the report to be deleted, deleting the second association relationship of the fourth node in the special information table; or,
if the second association relationship of the fourth node represents an association node of the fourth node in other reports, determining whether the first association relationship of the fourth node is exclusively the association relationship of the fourth node in the report to be deleted; when the first association relation of the fourth node is exclusively the association relation of the fourth node in the report to be deleted, deleting the first association relation of the fourth node; and under the condition that the first association relationship of the fourth node is the association relationship of the fourth node in a plurality of reports, storing the first association relationship of the fourth node in the association information table, wherein the reports comprise the report to be deleted.
6. The method of any of claims 3 to 5, further comprising:
and under the condition that the fifth node of the report to be modified needs to be modified, modifying the fifth node in the basic information table.
7. The method of any of claims 3 to 5, further comprising:
under the condition that the incidence relation in the report to be read needs to be read, acquiring a node identifier of a target node of the report to be read from the basic information table;
determining a correlation node of the target node from at least one of the correlation information table and the special information table based on the node identifier of the target node; wherein, when the special information table does not contain the second association relationship of the target node, the association node of the target node is the association node indicated by the first association relationship of the target node; under the condition that the special information table contains the second incidence relation of the target node, the incidence node of the target node is an incidence node indicated by the second incidence relation of the target node;
and the target node is a node except the link bottom node in the report to be read.
8. A report storage device comprising:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a report to be stored, the report to be stored comprises at least one link, and each link comprises a plurality of layers of nodes;
a first adding module, configured to add a first association relationship of a first node of the report to be stored in an association information table of a database, where the first association relationship of the first node is not matched with an association node of the report to be stored of the first node, a second association relationship of the first node is added in a special information table of the database, and the second association relationship of the first node is used to indicate an association node of the first node in the report to be stored;
the association information table is used for storing the first association relationship of at least one node, and the first association relationship of each node is used for indicating an association node of the node.
9. The apparatus of claim 8, wherein the second association of the first node comprises:
the node identifier of the link top node of the report to be stored, the node identifier of the first node, the associated node identifier and type indication information are used for indicating whether the associated node of the report to be stored of the first node contains a node corresponding to the associated node identifier;
when the type indication information indicates that the first node contains a node corresponding to the associated node identifier in the associated node of the report to be stored, the node corresponding to the associated node identifier in the report to be stored in the first node;
under the condition that the type indication information indicates that the first node does not include a node corresponding to the associated node identifier in the associated node of the report to be stored, the first node, in the associated node of the report to be stored, is: and removing nodes corresponding to the associated node identification from the associated nodes indicated by the first association relationship of the first node.
10. The apparatus of claim 8, further comprising:
a second adding module, configured to add a node identifier of a second node to the basic information table of the database when the basic information table does not include the second node of the report to be stored, where the basic information table is used to store the node identifier of the node in the report corresponding to the database;
a third adding module, configured to add the first association relationship of the second node in the association information table, where the first association relationship of the second node is used to indicate an association node of the second node in the report to be stored, and the association information table is used to store the first association relationship of the node in the basic information table.
11. The apparatus of claim 10, further comprising:
the first deleting module is used for deleting a third node in the basic information table under the condition that the report to be deleted needs to be deleted, wherein the third node is a node which only belongs to the report to be deleted in the basic information table;
and the second deleting module is used for deleting the first association relation of the third node in the association information table.
12. The apparatus of claim 11, further comprising:
a third deleting module, configured to delete the second association relationship of the fourth node in the special information table if the second association relationship of the fourth node indicates an associated node of the fourth node in the report to be deleted, when the first association relationship of the fourth node in the report to be deleted exists in the associated information table, and the second association relationship of the fourth node in the report to be deleted exists in the special information table; or,
a fourth deleting module, configured to, when the first association relationship of the fourth node exists in the association information table and the second association relationship of the fourth node exists in the special information table, if the second association relationship of the fourth node indicates an association node of the fourth node in another report, determine whether the first association relationship of the fourth node is specific to an association relationship of the fourth node in the report to be deleted; deleting the first association relation of the fourth node under the condition that the first association relation of the fourth node is exclusively the association relation of the fourth node in the report to be deleted; and under the condition that the first association relationship of the fourth node is the association relationship of the fourth node in a plurality of reports, storing the first association relationship of the fourth node in the association information table, wherein the plurality of reports comprise the report to be deleted.
13. The apparatus of any of claims 10 to 12, further comprising:
and the modification module is used for modifying the fifth node in the basic information table under the condition that the fifth node of the report to be modified needs to be modified.
14. The apparatus of any of claims 10 to 12, further comprising:
the second acquisition module is used for acquiring the node identifier of the target node of the report to be read from the basic information table under the condition that the incidence relation in the report to be read needs to be read;
a second determining module, configured to determine, based on the node identifier of the target node, a relevant node of the target node from at least one of the relevant information table and the special information table; wherein, when the special information table does not contain the second association relationship of the target node, the association node of the target node is the association node indicated by the first association relationship of the target node; under the condition that the special information table contains the second incidence relation of the target node, the incidence node of the target node is an incidence node indicated by the second incidence relation of the target node;
and the target node is a node except the link bottom node in the report to be read.
15. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.
16. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-7.
17. A computer program product comprising a computer program which, when executed by a processor, implements a method according to any one of claims 1-7, or vice versa.
CN202211137575.9A 2022-09-19 2022-09-19 Report storage method and device and electronic equipment Pending CN115905213A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211137575.9A CN115905213A (en) 2022-09-19 2022-09-19 Report storage method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211137575.9A CN115905213A (en) 2022-09-19 2022-09-19 Report storage method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN115905213A true CN115905213A (en) 2023-04-04

Family

ID=86484761

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211137575.9A Pending CN115905213A (en) 2022-09-19 2022-09-19 Report storage method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN115905213A (en)

Similar Documents

Publication Publication Date Title
CN113656315B (en) Data testing method and device, electronic equipment and storage medium
CN114021156A (en) Method, device and equipment for organizing vulnerability automatic aggregation and storage medium
CN112528067A (en) Graph database storage method, graph database reading method, graph database storage device, graph database reading device and graph database reading equipment
CN112860811A (en) Method and device for determining data blood relationship, electronic equipment and storage medium
CN113849581A (en) Alarm information processing method, device, equipment and storage medium
CN115099175A (en) Method and device for acquiring time sequence netlist, electronic equipment and storage medium
CN116860751A (en) Data processing method and device, electronic equipment and storage medium
CN115328917A (en) Query method, device, equipment and storage medium
CN115525659A (en) Data query method and device, electronic equipment and storage medium
CN115905213A (en) Report storage method and device and electronic equipment
CN115617800A (en) Data reading method and device, electronic equipment and storage medium
CN115544010A (en) Mapping relation determining method and device, electronic equipment and storage medium
CN115422275A (en) Data processing method, device, equipment and storage medium
CN114116924A (en) Data query method based on map data, map data construction method and device
CN113495891A (en) Data processing method and device
CN114064830A (en) Navigation data automatic production method, system, electronic equipment and storage medium
CN113360258B (en) Data processing method, device, electronic equipment and storage medium
CN115203246A (en) Linked list query method and device, electronic equipment and storage medium
CN115421665A (en) Data storage method, device, equipment and storage medium
CN113051313A (en) Information aggregation method, information aggregation device, electronic equipment, storage medium and program product
CN115658026A (en) Service processing method, device, equipment and storage medium
CN113434508A (en) Method and apparatus for storing information
CN117033148A (en) Alarm method, device, electronic equipment and medium of risk service interface
CN115470210A (en) Data query method, device, equipment and medium in OA system
CN118428865A (en) Material list processing method and device, electronic equipment and storage 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