Report storage method and device, and electronic equipment
By using related information tables and special information tables in the database to manage the multi-level node relationships of reports, the problem of low storage efficiency in existing technologies is solved, and efficient and flexible report storage and querying are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- APOLLO INTELLIGENT DRIVING (BEIJING) TECHNOLOGY CO LTD
- Filing Date
- 2022-09-19
- Publication Date
- 2026-04-21
AI Technical Summary
In existing technologies, report storage is mainly based on the link, which results in low storage efficiency and lack of flexibility, and cannot effectively manage complex multi-layer node relationships.
By combining related information tables and special information tables, the relationship between multi-level nodes can be flexibly managed by storing the first and second relationships of reports in the database, saving storage space and improving query efficiency.
It enables efficient storage and management of complex reports, reduces storage space usage, lowers the complexity of calculation and query, and improves the flexibility of data processing.
Smart Images

Figure CN115905213B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the fields of artificial intelligence technology such as databases and autonomous driving, and in particular to a report storage method, device and electronic device. Background Technology
[0002] Much data appears in the form of reports, which often include one or more links, each of which can include multiple layers of nodes. Currently, reports are mainly stored according to links, that is, each link in the report is stored separately. Summary of the Invention
[0003] This disclosure provides a report storage method, apparatus, and electronic device.
[0004] According to one aspect of this disclosure, a report storage method is provided, comprising:
[0005] Obtain a report to be stored, wherein the report to be stored includes at least one link, and each link includes multiple layers of nodes;
[0006] If the first association relationship of the first node of the report to be stored is contained in the association information table of the database, and the first association relationship of the first node does not match the association node of the first node in the report to be stored, a second association relationship of the first node is added to the special information table of the database. The second association relationship of the first node is used to indicate the association node of the first node in the report to be stored.
[0007] The association information table is used to store the first association relationship of at least one node, and the first association relationship of each node is used to indicate the associated nodes of that node.
[0008] According to one aspect of this disclosure, a report storage device is provided, comprising:
[0009] The first acquisition module is used to acquire a report to be stored, wherein the report to be stored includes at least one link, and each link includes multiple layers of nodes;
[0010] The first adding module is used to include a first association relationship of the first node of the report to be stored in the association information table of the database, and when the first association relationship of the first node does not match the association node of the first node in the report to be stored, to add a second association relationship of the first node in the special information table of the database, wherein the second association relationship of the first node is used to indicate the association node of the first node in the report to be stored.
[0011] The association information table is used to store the first association relationship of at least one node, and the first association relationship of each node is used to indicate the associated nodes of that node.
[0012] According to another aspect of this disclosure, an electronic device is provided, comprising:
[0013] At least one processor; and
[0014] A memory communicatively connected to the at least one processor; wherein,
[0015] The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the report storage method provided in this disclosure.
[0016] According to another aspect of this disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause the computer to execute the report storage method provided in this disclosure.
[0017] According to another aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the report storage method provided in this disclosure.
[0018] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0019] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:
[0020] Figure 1 This is a flowchart of a report storage method provided in this disclosure;
[0021] Figure 2 This is a schematic diagram of a report chain provided in this disclosure;
[0022] Figure 3 This is a schematic diagram of another reporting chain provided in this disclosure;
[0023] Figure 4 This is a schematic diagram of a report storage method provided in this disclosure;
[0024] Figures 5a to 5f This is a structural diagram of the report storage device provided in this disclosure;
[0025] Figure 6 This is a block diagram of an electronic device used to implement embodiments of the present disclosure. Detailed Implementation
[0026] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0027] Please see Figure 1 , Figure 1 This is a flowchart of a report storage method provided in this disclosure, such as... Figure 1 As shown, it includes the following steps:
[0028] Step S101: Obtain the report to be stored, wherein the report to be stored includes at least one link, and each link includes multiple layers of nodes.
[0029] The aforementioned reports to be stored can be reports from autonomous driving business, vehicle perception business, or reports from computer, mobile phone, and other businesses.
[0030] The above-mentioned report to be stored can be understood as any report that needs to be stored at present, or multiple reports can be stored at once. That is, the above-mentioned report to be stored can be one or more reports.
[0031] The links included in the aforementioned reports to be stored can be as follows: Figure 2 or Figure 3 As shown.
[0032] like Figure 2 As shown, the report to be stored is report A. Report A is associated with indicator A and indicator B. Indicator A is associated with field A and field B. Indicator B is associated with field C, field D, and field E. Thus, the following links exist in report A:
[0033] The link between report A, metric A, and field A;
[0034] The link between report A, indicator A, and field B;
[0035] The link between report A, indicator B, and field C;
[0036] The link between report A, indicator B, and field D;
[0037] The link between report A, indicator B, and field E.
[0038] like Figure 3As shown, the report to be stored is report B. Report B is associated with indicator A and indicator B. Indicator A is associated with field A. Indicator B is associated with fields C, D, and E. Thus, the following chain exists in report B:
[0039] The link between report B, indicator A, and field A;
[0040] The link between report B, indicator B, and field C;
[0041] The link between report B, indicator B, and field D;
[0042] The link between report B, indicator B, and field E.
[0043] Each link consists of three layers of nodes. For example, in the link of report A, indicator A, and field A, the top-level node is report A, the second-level node is indicator A, and the third-level node is field A. The nodes in the other links are similar and will not be described in detail here.
[0044] It should be noted that, Figure 2 and Figure 3 This is merely an example of reports, links, and nodes. In this disclosure, there are no limitations on the links in the reports or the nodes in the links. For example, there can also be links with four or more layers.
[0045] Step S102: In the database's association information table, there is a first association relationship of the first node of the report to be stored. If the first association relationship of the first node does not match the association node of the first node in the report to be stored, a second association relationship of the first node is added to the database's special information table. The second association relationship of the first node is used to indicate the association node of the first node in the report to be stored.
[0046] The association information table is used to store the first association relationship of at least one node, and the first association relationship of each node is used to indicate the associated nodes of that node.
[0047] In this disclosure, the aforementioned database can be a local database or a cloud database, and the aforementioned database can be a database for autonomous driving business, or a database for vehicle perception business, or a database for computer, mobile phone, or other businesses, etc.
[0048] The aforementioned association information table can store the first association relationships of some or all nodes in the reports that have been stored in the aforementioned database. The first association relationship of each node is used to indicate the associated nodes of that node.
[0049] The aforementioned special information table can be used to store second associations for special nodes that already contain a first association in the association information table. These special nodes are associated with different nodes in different tables. For nodes whose first association matches the associated nodes in the report to be stored, it is not necessary to add a second association in the special information table.
[0050] Taking report B as an example, the association information table already contains the first association between indicator A and indicator B. The first association of indicator B indicates that the associated nodes of indicator B include fields C, D, and E. It is clear that the first association of indicator B matches the associated nodes of indicator B in report B. Therefore, it is not necessary to add a second association for indicator B, and there is no need to add a duplicate first association of indicator B in the association information table. However, the first association of indicator A indicates that the associated nodes of indicator A include fields A and B. It is clear that the first association of indicator A does not match the associated nodes of indicator A in report B, meaning that indicator A is the aforementioned first node. Therefore, a second association of indicator A is added to the aforementioned special information table. This second association of indicator A is used to indicate that the associated node of indicator A in report B is field A.
[0051] It should be noted that the second association of any node in the special information table is used to indicate the associated nodes of that node in the special table, and the associated nodes indicated by the first association of the node are different from the associated nodes indicated by the second association of the node. For example, the first association of indicator A indicates that the associated nodes of indicator A include field A and field B, and the second association of indicator A indicates that the associated node of indicator A is field A.
[0052] It should be noted that the aforementioned related information table and special information table in this disclosure may also be called by other names, such as Table 1 and Table 2, and this disclosure does not limit them.
[0053] In addition, if the report to be stored is the first report stored in the aforementioned related information table and special information table, the aforementioned related information table and special information table are information tables created when storing the report to be stored. In other cases, the aforementioned basic information table, related information table and special information table can be information tables that have already been created in the database.
[0054] In this disclosure, if the first association of a first node in the association information table does not match the associated node of the first node in the report to be stored, a second association of the first node is added in the special information table. This eliminates the need to add a second association when the first association of a node matches the associated node of that node in the report to be stored, thus saving storage space.
[0055] It should be noted that the above-described method provided in this disclosure can be applied to electronic devices, that is, all steps in the above method are performed by the electronic device, including but not limited to servers, autonomous vehicles, in-vehicle terminals, computers, mobile phones and other electronic devices.
[0056] In one embodiment, the second association relationship of the first node includes:
[0057] The node identifier of the top-level node of the report to be stored, the node identifier of the first node, the associated node identifier, and the type indication information, wherein the type indication information is used to indicate whether the first node contains the node corresponding to the associated node identifier in the associated nodes of the report to be stored;
[0058] Wherein, if the type indication information indicates that the first node contains the node corresponding to the associated node identifier in the associated node of the report to be stored, then the first node is the node corresponding to the associated node identifier in the associated node of the report to be stored.
[0059] If the type indication information indicates that the first node does not contain the node corresponding to the associated node identifier in the associated nodes of the report to be stored, then the associated nodes of the first node in the report to be stored are: the remaining nodes after removing the node corresponding to the associated node identifier from the associated nodes indicated by the first association relationship of the first node.
[0060] The top-level node of the link for the report to be stored can be the report name. For example, the top-level nodes for reports A and B are respectively "Report A" and "Report B". Multiple links within the same report may have the same top-level node.
[0061] In this disclosure, the top-level node of the link can also be referred to as the root node of the link.
[0062] The aforementioned second association information includes the node identifier of the top-level node of the link in the report to be stored. This indicates that the second association relationship of the first node is used for the report to be stored, that is, in the report to be stored, the associated node is determined for the first node based on the second association relationship.
[0063] For example, as shown in Table 1 below:
[0064] Table 1:
[0065]
[0066] In this context, the top-level node identifier 6 indicates that the report to be stored is report B, the current node identifier 2 indicates that the first node is indicator A, the associated node identifier 4 corresponds to field A, and the type indication information 0 indicates that the first node's associated nodes in the report to be stored include the node corresponding to the associated node identifier. Therefore, Table 2 above confirms that indicator A's associated node in report B is field A.
[0067] For example, as shown in Table 2 below:
[0068] Table 2:
[0069]
[0070] Specifically, type indication information 1 indicates that the first node does not contain a node corresponding to the associated node identifier in the associated nodes of the report to be stored. Therefore, based on Table 2 above, it can be determined that the associated node of indicator A in report B is:
[0071] The first association node (fields A and B) of indicator A is subtracted from field B to determine the association node of indicator A in report B as field A.
[0072] It should be noted that the indexes in Tables 1 and 2 above are used to distinguish different relationships in the special information table. The indexes in the tables may not be used during storage or retrieval. In some implementations, the special information table may not include an index column.
[0073] In this embodiment, the second association of the first node can be flexibly indicated by the node identifier of the top-level node, the node identifier of the first node, the associated node identifier, and the type indication information. Furthermore, storage space can be saved when the second association of the first node indicates many associated nodes. For example, if the associated nodes indicated by the second association of the first node include fields A, B, and C, and the associated nodes indicated by the first association of the first node include fields A, B, C, and D, then the type indication information can indicate that the first node does not contain the node corresponding to the associated node identifier in the report to be stored, and that the node identifier of field D needs to be added. This indicates that the associated nodes indicated by the second association of the first node include fields A, B, and C, i.e., removing field D from fields A, B, C, and D.
[0074] In one embodiment, the above method further includes:
[0075] If the basic information table of the database does not contain the second node of the report to be stored, the node identifier of the second node is added to the basic information table. The basic information table is used to store the node identifiers of the nodes in the report corresponding to the database.
[0076] The first association relationship of the second node is added to the association information table. The first association relationship of the second node is used to indicate the associated nodes of the second node in the report to be stored. The association information table is used to store the first association relationship of the nodes in the basic information table.
[0077] The two steps mentioned above can be performed before step S102, or in some embodiments, they can be performed synchronously with step S102.
[0078] The aforementioned basic information table can store the node identifiers of all nodes in all reports corresponding to the aforementioned database. For example, taking reports A and B as examples, the aforementioned basic information table can be shown in Table 3 below:
[0079] Table 3:
[0080] logo Node Name 1 Report A 2 Indicator A 3 Indicator B 4 Field A 5 Field B 6 Report B 7 Field C 8 Field D 9 Field E
[0081] As can be seen, Table 3 above includes all nodes in Report A and Report B. Among them, the common nodes in Report A and Report B are Indicator A, Indicator B, Field A, Field C, Field D, and Field E. Only one of the common nodes needs to be stored.
[0082] Thus, when the above report A is a stored report and the above report to be stored is report B, when storing report B, it is only necessary to add the node identifier of the following node to the above basic information table: report B;
[0083] Because the remaining nodes in report B have already been included in the aforementioned basic information table, this avoids storing the same nodes repeatedly, thus saving storage space.
[0084] The associated node of the second node in the report to be stored can be a node associated with the second node in the link of the report to be stored.
[0085] Taking the report to be stored as report B as an example, as mentioned above, when report A has already been stored, only the node of report B is not included in the basic information table. Therefore, in the above steps, the first association relationship of the node of report B is added to the association information table. This association relationship is that report B is associated with indicator A and indicator B.
[0086] For example, as shown in Table 4 below:
[0087] Table 4:
[0088] index Current node Related nodes 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
[0089] Simply add the first association between report B and indicator A and indicator B in the association information table, that is, the association shown in indexes 7 and 8 above.
[0090] It should be noted that in the above-mentioned indexes 1 and 6, an empty current node indicates that the associated node is a top-level node in the link, that is, report A and report B are top-level nodes in the link. In addition, in some implementations, the above-mentioned association information may not include the rows corresponding to indexes 1 and 6.
[0091] The indexes in Table 4 above are used to distinguish different relationships in the association information table. The indexes in the table may not be used during storage or retrieval. In some implementations, the association information table may not include an index column.
[0092] Since nodes already included in the basic information table do not need to have their first association added, storage space can be saved. For example, if indicator A and indicator B in report B are already included in the basic information table, the first association between the two nodes, indicator A and indicator B, has already been stored in the association information table. Therefore, when storing report B, the first association between these two nodes does not need to be stored in the association information table again.
[0093] It should be noted that the first association of any node in the association information table is used to indicate the associated nodes of that node in the table.
[0094] In this embodiment, a node identifier for a second node not included in the basic information table is added to the database, and a first association relationship for the second node is added to the association information table. This eliminates the need to add node identifiers or first association relationships for nodes already included in the basic information table, thus saving storage space.
[0095] In one embodiment, the above method further includes:
[0096] If it is necessary to delete the report to be deleted, delete the third node in the basic information table, where the third node is a node in the basic information table that belongs only to the report to be deleted.
[0097] Delete the first association relationship of the third node in the association information table.
[0098] The report to be deleted mentioned above is any report already stored in the database. Specifically, the report to be deleted can be understood as the report that needs to be deleted at present. For example, the report to be deleted can be the report to be stored in step S101 above, that is, stored and then deleted, or it can be other reports that have already been stored.
[0099] The above-mentioned report to be deleted can be deleted by receiving a deletion command to delete the above-mentioned report to be deleted.
[0100] The aforementioned third node, which is a node in the basic information table that belongs only to the report to be deleted, can be understood as the basic information table including the node identifier of the aforementioned third node, but this node only exists in the report to be deleted.
[0101] The above-mentioned deletion of the first association relationship of the third node in the association information table can be achieved by 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.
[0102] In this embodiment, when deleting a report, only the nodes belonging to that report and their corresponding first associations need to be deleted from the basic information table, while other nodes do not need to be deleted, thereby saving computational load.
[0103] In another embodiment, based on the above embodiments, the method further includes:
[0104] If the first association relationship of the fourth node in the report to be deleted exists in the association information table, and the second association relationship of the fourth node exists in the special information table, then if the second association relationship of the fourth node represents an associated node of the fourth node in the report to be deleted, then the second association relationship of the fourth node in the special information table is deleted; or,
[0105] If 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, and if the second association relationship of the fourth node represents an association node of the fourth node in other reports, then it is determined whether the first association relationship of the fourth node is exclusive to the association relationship of the fourth node in the report to be deleted; wherein, if the first association relationship of the fourth node is exclusive to the association relationship of the fourth node in the report to be deleted, the first association relationship of the fourth node is deleted; if the first association relationship of the fourth node is an association relationship of the fourth node in multiple reports, the first association relationship of the fourth node is saved in the association information table, and the multiple reports include the report to be deleted.
[0106] The other reports mentioned above can be understood as reports that are different from the reports to be deleted mentioned above.
[0107] In this embodiment, if the second association of the fourth node represents the associated node of the fourth node in the report to be deleted, then the second association of the fourth node in the special information table is deleted, but the second association of the first node is not deleted, thereby reducing the computational load in the report deletion process. Additionally, if the second association of the fourth node does not represent the associated node of the fourth node in the report to be deleted, then the first association of the fourth node is deleted only if it is exclusive to the fourth node in the report to be deleted. If the first association of the fourth node represents the fourth node in multiple reports, it is not deleted, thus reducing the computational load in the report deletion process. For example, if the first association of node A exists in the association information table shown in Table 4, and the second association of node A also exists in the special information tables shown in Tables 1 and 2, then when the second association of node A in the special information tables shown in Tables 1 and 2 represents the node's association in report B, then when deleting report B, only the second association of node A in the special information tables shown in Tables 1 and 2 needs to be deleted, while the first association of this node in the association information table is retained.
[0108] In other embodiments, if the first association of the fourth node only belongs to the fourth node in the report to be deleted, the first association of the fourth node in the association information table is deleted. Alternatively, based on the second association of the fourth node in the special information table, the first association corresponding to the second association of the fourth node can be added to the association information table, that is, the second association of the fourth node in the special information table is transferred to the basic information table. For example, if the second association of the fourth node indicates that the associated node of the fourth node is node X, a first association indicating that the associated node of the fourth node is node X is added to the basic information table, and the second association of the fourth node is deleted. This way, when reading the association of the fourth node later, it can be read from the association information table, thereby reducing the complexity of reading.
[0109] In another embodiment, it also includes:
[0110] If it is necessary to modify the fifth node of the report to be modified, modify the fifth node in the basic information table.
[0111] The above-mentioned need to modify the fifth node of the report to be modified can be due to receiving a modification instruction for the fifth node.
[0112] The report to be modified mentioned above is any report already stored in the database. Specifically, the report to be modified can be understood as the report that needs to be modified now. For example, the report to be modified can be the report to be stored in step S101 above, that is, to be stored and then modified, or it can be other reports that have already been stored.
[0113] The modifications made to the fifth node mentioned above can include changes to the node's content, such as the node name, indicator content, and field content.
[0114] In this embodiment, when modifying a node, only the basic information table needs to be modified, while the association information table and special information table do not need to be modified, thereby reducing the amount of computation required for modification.
[0115] Another embodiment also includes:
[0116] When it is necessary to read the relationships within the report to be read, obtain the node identifier of the target node of the report to be read from the basic information table;
[0117] Based on the node identifier of the target node, the associated node of the target node is determined from at least one of the association information table and the special information table; wherein, if the special information table does not contain the second association relationship of the target node, the associated node of the target node is the associated node indicated by the first association relationship of the target node; if the special information table contains the second association relationship of the target node, the associated node of the target node is the associated node indicated by the second association relationship of the target node.
[0118] The target node is any node in the report to be read, excluding the underlying nodes of the link.
[0119] The report to be read mentioned above is any report already stored in the database. Specifically, the report to be read can be understood as the report that needs to be read at present. For example, the report to be read can be the report to be stored in step S101 above, that is, stored and then read, or it can be other reports that have already been stored.
[0120] The aforementioned requirement to read the relationships within the report to be read can be achieved by receiving a read instruction to read the relationships within the report to be read.
[0121] The target node mentioned above can be the top-level node in the link of the report to be read, or it can be a second-level node in the link of the report to be read, such as an indicator node.
[0122] Determining the associated nodes of the target node from at least one of the associated information table and the special information table may include:
[0123] Read the first association of the target node in the association information table, and then identify whether there is a second association of the target node in the special information table;
[0124] If the target node does not have a second association relationship in the special information table, then the associated node of the target node is determined based on the first association relationship of the target node;
[0125] If a second association relationship exists for the target node in the special information table, a deduplication operation is performed based on the second and first association relationships of the target node to determine the associated nodes of the target node;
[0126] The deduplication operation includes:
[0127] If the second association relationship of the target node includes type indication information, and the type indication information indicates that the target node has a node corresponding to the associated node identifier in the second association relationship in the associated node of the report to be read, then the associated node of the target node in the report to be read is determined to be the node corresponding to the associated node identifier.
[0128] If the second association relationship of the target node includes type indication information, and the type indication information indicates that the target node does not contain the node corresponding to the associated node identifier in the second association relationship in the associated nodes of the report to be read, then the node corresponding to the associated node identifier in the first association relationship of the target node is deleted, and the remaining node is the node corresponding to the associated node identifier in the associated nodes of the target node in the report to be read.
[0129] In the case where the target node is not a top-level node of the link, when reading from the special information table, it is necessary to read based on the node identifier of the top-level node of the link in the report to be read and the node identifier of the target node.
[0130] For example, taking report B as an example, the relationship reading of report B includes the following steps:
[0131] The top-level node identifier of the link in report B is 6, indicating that the current layer is the first layer.
[0132] Read all associated nodes of the top-level node identifier (node identifier = 6) of the link to obtain index A (node identifier = 2) and index B (node identifier = 3);
[0133] Read the special association information table. Specifically, you can use the top-level node identifier (identifier = 6) and the node identifier of the current node (node identifier = 6) to read the association relationship, as shown in Table 3 or Table 4. There is no second association relationship at present, which means that the second level of the association relationship of report B is indicator A and indicator B.
[0134] Read all associated nodes of the current node (node identifier = 2) to obtain field A (node identifier = 4) and field B (node identifier = 5);
[0135] Read the special association information table. The special association relationship between the top-level node identifier (node identifier = 6) and the current node identifier (node identifier = 2) is the associated node identifier (node identifier = 4). The type of the type indicator information is 0 (i.e., contain). This is used to remove duplicates from the result obtained in the previous step, and it is deduced that the associated node of the current node (node identifier = 2) is only field A (node identifier = 4). If the type of the type indicator information is 1 (does not contain), the deduplication result is field B.
[0136] It should be noted that in this embodiment, the associated nodes of the target node are not limited to being determined by the type indication information mentioned above. For example, if the second association does not include type indication information, the associated nodes of the target node can be determined directly based on the second association.
[0137] In this embodiment, the associated nodes of the target node can be accurately read through the aforementioned basic information table, associated information table, and special information table, thereby enabling the reading of the association relationships of any report stored in the database.
[0138] It should be noted that the various embodiments provided in this disclosure can be implemented in combination with each other. For example, one embodiment can be implemented as follows: Figure 4 As shown, it includes the following steps:
[0139] Step S401: Obtain data, including reports;
[0140] Step S402: Store the basic information of the report;
[0141] Step S403: Determine the operation type corresponding to the data based on the basic information;
[0142] Step S404: When the operation type is modification, only modify the basic information table;
[0143] Step S405: If the operation type is deletion, delete the node identifier of the current node in the basic information table and the special association information table, and delete the association relationship of the node in the association information table.
[0144] Step S406: When the operation type is "add", add the node identifier that does not contain the node to the basic information table, and add the first association relationship that does not contain the node to the association information table.
[0145] Step S407: Determine whether the associated information table contains all the links in the above reports;
[0146] Step S408: If partially included, determine the links not included in the association information table, and determine the node identifier of the current node and the node identifier of the associated node.
[0147] Step S409: Create a second association in the special information table for the current node that does not contain a link.
[0148] Please see Figure 5a , Figure 5a This disclosure provides a report storage device, such as... Figure 5a As shown, the report storage device 500 includes:
[0149] The first acquisition module 501 is used to acquire a report to be stored, wherein the report to be stored includes at least one link, and each link includes multiple layers of nodes;
[0150] The first adding module 502 is used to include a first association relationship of the first node of the report to be stored in the association information table of the database, and when the first association relationship of the first node does not match the association node of the first node in the report to be stored, add a second association relationship of the first node in the special information table of the database, wherein the second association relationship of the first node is used to indicate the association node of the first node in the report to be stored.
[0151] The association information table is used to store the first association relationship of at least one node, and the first association relationship of each node is used to indicate the associated nodes of that node.
[0152] Optionally, the second association relationship of the second node includes:
[0153] The node identifier of the top-level node of the report to be stored, the node identifier of the first node, the associated node identifier, and the type indication information, wherein the type indication information is used to indicate whether the first node contains the node corresponding to the associated node identifier in the associated nodes of the report to be stored;
[0154] Wherein, if the type indication information indicates that the first node contains the node corresponding to the associated node identifier in the associated node of the report to be stored, then the first node is the node corresponding to the associated node identifier in the associated node of the report to be stored.
[0155] If the type indication information indicates that the first node does not contain the node corresponding to the associated node identifier in the associated nodes of the report to be stored, then the associated nodes of the first node in the report to be stored are: the remaining nodes after removing the node corresponding to the associated node identifier from the associated nodes indicated by the first association relationship of the first node.
[0156] Optional, such as Figure 5b As shown, it also includes:
[0157] The second adding module 503 is used to add the node identifier of the second node to the basic information table when the basic information table of the database does not contain the second node of the report to be stored. The basic information table is used to store the node identifiers of the nodes in the report corresponding to the database.
[0158] The third adding module 504 is used to add the first association relationship of the second node to the association information table. The first association relationship of the second node is used to indicate the associated nodes of the second node in the report to be stored. The association information table is used to store the first association relationship of the nodes in the basic information table.
[0159] Optional, such as Figure 5c As shown, it also includes:
[0160] The first deletion module 505 is used to delete the third node in the basic information table when it is necessary to delete the report to be deleted. The third node is a node in the basic information table that belongs only to the report to be deleted.
[0161] The second deletion module 506 is used to delete the first association relationship of the third node in the association information table.
[0162] Optional, such as Figure 5d As shown, it also includes:
[0163] The third deletion module 507 is configured to, when the first association relationship of the fourth node in the report to be deleted exists in the association information table, and the second association relationship of the fourth node exists in the special information table, delete the second association relationship of the fourth node in the special information table if the second association relationship of the fourth node represents an associated node of the fourth node in the report to be deleted; or,
[0164] The fourth deletion module 508 is 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, determine whether the first association relationship of the fourth node is exclusive to the association relationship of the fourth node in the report to be deleted if the second association relationship of the fourth node represents an association node of the fourth node in other reports; wherein, if the first association relationship of the fourth node is exclusive to the association relationship of the fourth node in the report to be deleted, the first association relationship of the fourth node is deleted; if the first association relationship of the fourth node is an association relationship of the fourth node in multiple reports, the first association relationship of the fourth node is stored in the association information table, and the multiple reports include the report to be deleted.
[0165] Optional, such as Figure 5e As shown, it also includes:
[0166] Modification module 509 is used to modify the fifth node in the basic information table when it is necessary to modify the fifth node of the report to be modified.
[0167] Optional, such as Figure 5f As shown, it also includes:
[0168] The second acquisition module 510 is used to obtain the node identifier of the target node of the report to be read from the basic information table when it is necessary to read the relationship within the report to be read.
[0169] The second determining module 511 is configured to determine the associated node of the target node from at least one of the association information table and the special information table based on the node identifier of the target node; wherein, if the special information table does not contain the second association relationship of the target node, the associated node of the target node is the associated node indicated by the first association relationship of the target node; if the special information table contains the second association relationship of the target node, the associated node of the target node is the associated node indicated by the second association relationship of the target node.
[0170] The target node is any node in the report to be read, excluding the underlying nodes of the link.
[0171] The report storage device provided in this disclosure can implement all the processes of the report storage method provided in this disclosure and achieve the same technical effect. To avoid repetition, it will not be described in detail here.
[0172] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0173] The aforementioned electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to execute the report storage method provided in this disclosure.
[0174] The aforementioned readable storage medium stores computer instructions, wherein the computer instructions are used to cause the computer to execute the report storage method provided in this disclosure.
[0175] The aforementioned computer program product includes a computer program that, when executed by a processor, implements the report storage method provided in this disclosure.
[0176] Figure 6 A schematic block diagram of an example electronic device 600 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0177] like Figure 6 As shown, device 600 includes a computing unit 601, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 602 or a computer program loaded from storage unit 608 into random access memory (RAM) 603. RAM 603 may also store various programs and data required for the operation of device 600. The computing unit 601, ROM 602, and RAM 603 are interconnected via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.
[0178] Multiple components in device 600 are connected to I / O interface 605, including: input unit 606, such as keyboard, mouse, etc.; output unit 607, such as various types of monitors, speakers, etc.; storage unit 608, such as disk, optical disk, etc.; and communication unit 609, such as network card, modem, wireless transceiver, etc. Communication unit 609 allows device 600 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0179] The computing unit 601 can be a variety of general-purpose 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 special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 601 performs the various methods and processes described above, such as the report storage method. For example, in some embodiments, the report storage method may be implemented as a computer software program tangibly contained 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 on device 600 via ROM 602 and / or communication unit 609. When the computer program is loaded into RAM 603 and executed by the computing unit 601, one or more steps of the report storage method described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform the report storage method by any other suitable means (e.g., by means of firmware).
[0180] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0181] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0182] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0183] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the 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 can be received in any form (including sound input, voice input, or tactile input).
[0184] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0185] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.
[0186] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0187] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A report storage method, comprising: Obtain a report to be stored, wherein the report to be stored includes at least one link, and each link includes multiple layers of nodes; If the first association relationship of the first node of the report to be stored is contained in the association information table of the database, and the first association relationship of the first node does not match the association node of the first node in the report to be stored, a second association relationship of the first node is added to the special information table of the database. The second association relationship of the first node is used to indicate the association node of the first node in the report to be stored. The association information table is used to store the first association relationship of at least one node, and the first association relationship of each node is used to indicate the associated nodes of that node. The second association relationship of the first node includes: The node identifier of the top-level node of the report to be stored, the node identifier of the first node, the associated node identifier, and the type indication information, wherein the type indication information is used to indicate whether the first node contains the node corresponding to the associated node identifier in the associated nodes of the report to be stored; Wherein, if the type indication information indicates that the first node contains the node corresponding to the associated node identifier in the associated node of the report to be stored, then the first node is the 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 does not contain the node corresponding to the associated node identifier in the associated nodes of the report to be stored, the associated nodes of the first node in the report to be stored are: the nodes remaining after removing the node corresponding to the associated node identifier from the associated nodes indicated by the first association relationship of the first node. The database also includes a basic information table, which stores the node identifiers of nodes in all reports corresponding to the database.
2. The method according to claim 1, further comprising: If the basic information table of the database does not contain the second node of the report to be stored, the node identifier of the second node is added to the basic information table. The basic information table is used to store the node identifiers of the nodes in the report corresponding to the database. The first association relationship of the second node is added to the association information table. The first association relationship of the second node is used to indicate the associated nodes of the second node in the report to be stored. The association information table is used to store the first association relationship of the nodes in the basic information table.
3. The method according to claim 2, further comprising: If it is necessary to delete the report to be deleted, delete the third node in the basic information table, where the third node is a node in the basic information table that belongs only to the report to be deleted. Delete the first association relationship of the third node in the association information table.
4. The method according to claim 3, characterized in that, Also includes: If the first association relationship of the fourth node in the report to be deleted 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 the associated node of the fourth node in the report to be deleted, then the second association relationship of the fourth node in the special information table is deleted. or, If 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, and if the second association relationship of the fourth node represents an association node of the fourth node in another report, then it is determined whether the first association relationship of the fourth node is exclusive to the association relationship of the fourth node in the report to be deleted; wherein, if the first association relationship of the fourth node is exclusive to the association relationship of the fourth node in the report to be deleted, the first association relationship of the fourth node is deleted. When the first association of the fourth node is the association of the fourth node in multiple reports, the first association of the fourth node is stored in the association information table, and the multiple reports include the report to be deleted.
5. The method according to any one of claims 2 to 4, further comprising: If it is necessary to modify the fifth node of the report to be modified, modify the fifth node in the basic information table.
6. The method according to any one of claims 2 to 4, further comprising: When it is necessary to read the relationships within the report to be read, obtain the node identifier of the target node of the report to be read from the basic information table; Based on the node identifier of the target node, the associated node of the target node is determined from at least one of the association information table and the special information table; wherein, if the special information table does not contain the second association relationship of the target node, the associated node of the target node is the associated node indicated by the first association relationship of the target node; if the special information table contains the second association relationship of the target node, the associated node of the target node is the associated node indicated by the second association relationship of the target node. The target node is any node in the report to be read, excluding the underlying nodes of the link.
7. A report storage device, comprising: The first acquisition module is used to acquire a report to be stored, wherein the report to be stored includes at least one link, and each link includes multiple layers of nodes; The first adding module is used to include a first association relationship of the first node of the report to be stored in the association information table of the database, and when the first association relationship of the first node does not match the association node of the first node in the report to be stored, to add a second association relationship of the first node in the special information table of the database, wherein the second association relationship of the first node is used to indicate the association node of the first node in the report to be stored. The association information table stores the first association relationships of at least one node, and the first association relationship of each node indicates the associated nodes of that node; wherein the second association relationship of the first node includes: The node identifier of the top-level node of the report to be stored, the node identifier of the first node, the associated node identifier, and the type indication information, wherein the type indication information is used to indicate whether the first node contains the node corresponding to the associated node identifier in the associated nodes of the report to be stored; Wherein, if the type indication information indicates that the first node contains the node corresponding to the associated node identifier in the associated node of the report to be stored, then the first node is the 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 does not contain the node corresponding to the associated node identifier in the associated nodes of the report to be stored, the associated nodes of the first node in the report to be stored are: the nodes remaining after removing the node corresponding to the associated node identifier from the associated nodes indicated by the first association relationship of the first node. The database also includes a basic information table, which stores the node identifiers of nodes in all reports corresponding to the database.
8. The apparatus according to claim 7, further comprising: The second adding module is used to add the node identifier of the second node to the basic information table when the basic information table of the database does not contain the second node of the report to be stored. The basic information table is used to store the node identifiers of the nodes in the report corresponding to the database. The third adding module is used to add the first association relationship of the second node to the association information table. The first association relationship of the second node is used to indicate the associated nodes of the second node in the report to be stored. The association information table is used to store the first association relationship of the nodes in the basic information table.
9. The apparatus according to claim 8, further comprising: The first deletion module is used to delete the third node in the basic information table when it is necessary to delete the report to be deleted. The third node is a node in the basic information table that belongs only to the report to be deleted. The second deletion module is used to delete the first association relationship of the third node in the association information table.
10. The apparatus according to claim 9, characterized in that, Also includes: The third deletion module is used to delete the second association relationship of the fourth node in the special information table if the second association relationship of the fourth node represents the associated node of the fourth node in the report to be deleted, and the special information table contains the second association relationship of the fourth node. or, The fourth deletion module is used to determine whether the first association relationship of the fourth node is exclusive to the association relationship of the fourth node in the report to be deleted 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; wherein, if the second association relationship of the fourth node represents an association node of the fourth node in another report, the first association relationship of the fourth node is deleted. When the first association of the fourth node is the association of the fourth node in multiple reports, the first association of the fourth node is stored in the association information table, and the multiple reports include the report to be deleted.
11. The apparatus according to any one of claims 8 to 10, further comprising: The modification module is used to modify the fifth node in the basic information table when it is necessary to modify the fifth node of the report to be modified.
12. The apparatus according to any one of claims 8 to 10, further comprising: The second acquisition module is used to obtain the node identifier of the target node of the report to be read from the basic information table when it is necessary to read the relationship within the report to be read. The second determining module is configured to determine the associated node of the target node from at least one of the association information table and the special information table based on the node identifier of the target node; wherein, if the special information table does not contain the second association relationship of the target node, the associated node of the target node is the associated node indicated by the first association relationship of the target node; if the special information table contains the second association relationship of the target node, the associated node of the target node is the associated node indicated by the second association relationship of the target node. The target node is any node in the report to be read, excluding the underlying nodes of the link.
13. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.
14. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-6.
15. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-6.
Citation Information
Patent Citations
Report configuration method and device
CN111444177A