Data updating method and device, equipment and storage medium
By determining the target data item and its data table in the data orchestration processed data table, the problem of inaccurate positioning and update data items is solved, and the accuracy and comprehensiveness of data updates are improved.
Patent Information
- Application Number
- CN202311114795.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-30
- Publication Date
- 2025-02-28
AI Technical Summary
In the prior art, after the data table is orchestrated, the location of the update data items is inaccurate, resulting in the update failure or the data is inconsistent.
By determining the target data item corresponding to the data item to be updated and its target data table in the upper data table of the result data table, the set of data items to be updated is determined in the lower data table based on the identification of the target data item and the update is performed.
Improve the accuracy and comprehensiveness of positioning and update data items to ensure the integrity and consistency of data updates.
Smart Images

Figure CN119537385A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a data updating method, device, equipment and storage medium. Background Art
[0002] When the data items in the data table obtained by arranging the data table need to be updated, the data items in the intermediate data table often need to be updated as well. Figure 1 As shown, Table 1 is processed by the first arrangement to obtain Table 2 and Table 3, and then Table 2 and Table 3 are processed by the second arrangement to obtain Table 4. At this time, if it is necessary to update "Zhang San, male, mathematics, 100" in Table 3 to "Zhang San, male, mathematics, 90", then "Zhang San, male, mathematics, 100" in Table 4 also needs to be updated together with Table 3. In the related art, when locating "Zhang San, male, mathematics, 100" in Table 4, a manual method is often used to locate the data to be updated, which will cause inaccurate positioning when facing a large number of data tables. Summary of the invention
[0003] The present application mainly provides a data updating method, apparatus, device and storage medium, which can overcome the problem of inaccurate positioning and updating of data in related technologies.
[0004] The technical solution of the embodiment of the present application is implemented as follows:
[0005] The present invention provides a data updating method, which includes:
[0006] In the case where there are data items to be updated in the result data table obtained after data arrangement processing, a target data item corresponding to the data item to be updated and a target data table where the target data item is located are determined in the upper-level data table of the result data table; in response to an update operation on the target data item, based on the identification of the target data item, a set of data items to be updated including the data item to be updated is determined in the lower-level data table of the target data table, and the target data item and the set of data items to be updated are updated.
[0007] In an embodiment of the present application, when it is determined that there are data items to be updated in the result data table obtained after data arrangement processing, the target data items corresponding to the data items to be updated can be determined in the upper-level data table of the result data table. In this way, the target data items corresponding to the data items to be updated existing in the upper-level data set table can be determined. Then, based on the identification of the target data items, a set of data items to be updated including the data items to be updated is determined in the lower-level data table of the target data table, and the target data items and the set of data items to be updated are updated. In this way, the data items to be updated can be accurately determined by the identification of the data items, thereby improving the accuracy of locating the updated data items.
[0008] In some embodiments, the identification of the target data item includes the output identification of the target data item; the set of data items to be updated includes a first data item; and in response to an update operation on the target data item, based on the identification of the target data item, in a subordinate data table of the target data table, determining the set of data items to be updated including the data item to be updated, and updating the target data item and the set of data items to be updated, comprises: in response to an update operation on the target data item, updating the target data item; based on the output identification of the target data item, determining in the subordinate data table a first data item whose input identification is the same as the output identification of the target data item, and updating the first data item; and updating the data item to be updated when the output identification of the first data item is the same as the input identification of the data item to be updated.
[0009] In the embodiment of the present application, after the target data item is updated, based on the output identifier of the target data item, a first data item whose input identifier is the same as the output identifier of the target data item can be determined in the subordinate data table, and the first data item can be updated; when the output identifier of the first data item is the same as the input identifier of the data item to be updated, the data item to be updated is updated. In this way, all data items that need to be updated between the target data item and the data item to be updated can be accurately located through the output identifier of the target data item, which not only improves the accuracy of locating and updating data, but also improves the comprehensiveness of the updated data.
[0010] In some embodiments, the parent data table includes an adjacent data table adjacent to the result data table and a target data table adjacent to the adjacent data table; determining the target data item in the parent data table of the result data table based on the input identifier of the data item to be updated includes: determining in the adjacent data table a first data item whose output identifier is the same as the input identifier of the data item to be updated based on the input identifier of the data item to be updated; and determining in the target data table the target data item whose output identifier is the same as the input identifier of the first data item based on the input identifier of the first data item.
[0011] In the embodiment of the present application, because the superior data table of the result data table includes multiple data tables, it is necessary to first determine the first data item whose output identifier is the same as the input identifier of the data item to be updated in the adjacent data table based on the input identifier of the data item to be updated, and then determine the target data item whose output identifier is the same as the input identifier of the first data item in the target data table based on the input identifier of the first data item. In this way, multiple data items corresponding to the data items to be updated in multiple superior data tables of the result data table can be located, which improves the comprehensiveness and accuracy of locating the data items corresponding to the data items to be updated in the result data table.
[0012] In some embodiments, determining the target data item in the parent data table of the result data table based on the input identifier of the data item to be updated includes: determining at least two second data items in the parent data table of the result data table based on the input identifier of the data item to be updated; and obtaining the target data item in response to a selection operation of selecting the target data item from the at least two second data items.
[0013] In the embodiment of the present application, at least two second data items can be determined in the parent data table of the result data table based on the input identifier of the data item to be updated, and then the target data item is determined in response to the selection operation of selecting the target data item in the at least two second data items. In this way, the second data item corresponding to the data item to be updated can be determined based on the input identifier of the data item to be updated, and then the target data item can be determined based on the user's selection operation, so that the user can determine which data item to start updating, thereby improving the flexibility of updating data items.
[0014] In some embodiments, determining the target data table where the target data item is located in the parent data table of the result data table includes: obtaining the input identifier of the result data table; and determining at least one data table in the parent data table whose output identifier is the same as the input identifier of the result data table as the target data table.
[0015] In the embodiment of the present application, the target data table can be first determined based on the input identifier of the result data table, and then the target data item corresponding to the data item to be updated can be determined in the target data table. In this way, compared with directly determining the target data item corresponding to the data item to be updated, the efficiency of determining the target data item can be improved.
[0016] The present application provides a data updating device, the device comprising:
[0017] a determining unit, configured to determine, when there is a data item to be updated in a result data table obtained by performing data arrangement processing, a target data item corresponding to the data item to be updated in a parent data table of the result data table, and a target data table where the target data item is located;
[0018] An updating unit is used to respond to an update operation on the target data item, determine a set of data items to be updated including the data item to be updated in a subordinate data table of the target data table based on an identifier of the target data item, and update the target data item and the set of data items to be updated.
[0019] An embodiment of the present application provides a data updating device, comprising: a memory for storing executable instructions; and a processor for implementing the data updating method provided in the embodiment of the present application when executing the executable instructions stored in the memory.
[0020] An embodiment of the present application provides a storage medium having executable instructions stored thereon. When the executable instructions are executed by a processor, the data updating method provided in the embodiment of the present application is implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 Schematic diagram for data update for related technologies;
[0022] Figure 2 A schematic diagram of a data updating method according to an embodiment of the present application;
[0023] Figure 3a A schematic diagram of a data updating method according to an embodiment of the present application;
[0024] Figure 3b A schematic diagram of a scenario of a data updating method provided in an embodiment of the present application;
[0025] Figure 4 It is a flowchart of a data updating method provided in an embodiment of the present application;
[0026] Figure 5 It is a flowchart of a data updating method provided in an embodiment of the present application;
[0027] Figure 6It is a flowchart of a data updating method provided in an embodiment of the present application;
[0028] Figure 7 A schematic diagram of the structure of a data updating device provided in an embodiment of the present application;
[0029] Figure 8 A schematic diagram of the composition structure of the data updating device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0030] The technical solution of the present application is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0031] In order to enable those skilled in the art to better understand the embodiments of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments.
[0032] The terms "first", "second", and "third" in the specification embodiments and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or precedence. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, including a series of steps or units. The method, system, product or device is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0033] In order to solve the problem of inaccurate positioning update data in the related art, the embodiment of the present application provides a data update method, which can be applied to a data update device. In some embodiments, the data update device can be set in an electronic device, which includes but is not limited to a fixed device and / or a mobile device. For example, the fixed device includes but is not limited to: a personal computer (PC), or a server, etc. The server can be a cloud server or an ordinary server. The mobile device includes but is not limited to: one or more of a mobile phone, a tablet computer or a wearable device. .
[0034] Figure 2 Schematic diagram of the data updating method according to the embodiment of the present application. Figure 2 As shown, the process may include:
[0035] In S201, when there are data items to be updated in the result data table obtained after data arrangement processing, a target data item corresponding to the data item to be updated and a target data table where the target data item is located are determined in the parent data table of the result data table.
[0036] Here, data arrangement processing refers to a processing method of arranging data according to a preset processing order and preset processing rules. For example, Figure 1 As shown, Table 1 is the initial data, and then the data is written into Table 1 according to the subject type to obtain Table 2 and Table 3, and then Table 2 and Table 3 are merged to obtain Table 4. In this way, the process from Table 1→Table 2, Table 3→Table 4 is called the data arrangement and processing process. In this process, there are different nodes, and there is a superior-subordinate relationship between the nodes. For example, the node where Table 1 is located is the superior node of the node where Table 2 and Table 3 are located, and the node where Table 2 and Table 3 are located is the superior node of the node where Table 4 is located. In the process of data arrangement and processing, the result data, such as Table 4, can be finally obtained according to the preset processing order.
[0037] Here, the result data table is a data table finally obtained by arranging and processing the initial data table according to a preset processing sequence. In some embodiments, the result data table can be a two-dimensional data table or a three-dimensional data table.
[0038] In some embodiments, the result data table includes at least one data item, which may be row data in the result data table. Figure 1 "Zhang San, male, mathematics, 100" in Table 3 in is a data item in Table 3. The data item includes at least one attribute information, that is, the data item in the embodiment of the present application can be described by at least one attribute information. Figure 1 The data items in Table 3 are described by name, subject, and score. In other words, Figure 1 The attribute information of the data items in Table 3 includes name, subject, and score.
[0039] Here, the data item to be updated refers to the data item in the result data table that needs to be updated. Here, the data item to be updated may include at least one of the following: a data item with the same attribute information as other data items in the data table, a data item in the data table with an error in attribute information, and a data item in the data table with a changed business type.
[0040] Here, when the data table is a data table in a relational database, the attribute information in the data table includes coding information. Since the relational database requires that two data items with the same coding information cannot appear in the same data table, when two data items with the same coding information appear in the data table in the relational database, the coding information of the data items needs to be deleted or modified.
[0041] In some embodiments, when the data table is Figure 1When the data table in the data table is in the same data table, the data item with the same attribute information as other data items in the data table means that there are two completely identical data items in the data table, that is, the attribute information of the two data items is completely identical. For example, when two completely identical data items "Zhang San, male, mathematics, 100" and "Zhang San, male, mathematics, 100" appear in the same data table, it means that one of the two data items needs to be modified.
[0042] Here, the parent data table of the result data table refers to the data table corresponding to the parent node of the node where the result data table is located. In some embodiments, the parent data table of the result data table may include at least one data table. Exemplarily, Figure 1 The parent data table of Table 4 in the example may include Table 1, Table 2, and Table 3.
[0043] In the embodiment of the present application, when it is determined that there are data items to be updated in the result data table, it is necessary to determine the corresponding target data item in the parent data table according to the data items to be updated, and the target data table where the target data item is located.
[0044] Here, the target data item corresponding to the data item to be updated means that the identifier of the target data item corresponds to the identifier of the data item to be updated. In some embodiments, the identifier of the target data item corresponds to the identifier of the data item to be updated, including the identifier of the target data item directly corresponding to the identifier of the data item to be updated, and the identifier of the target data item indirectly corresponding to the identifier of the data item to be updated. Exemplarily, when the target data table where the target data item is located is adjacent to the result data table where the data item to be updated is located, then the identifier of the target data item directly corresponds to the identifier of the data item to be updated, such as Figure 1 Tables 3 and 4 in; when the target data table where the target data item is located is not adjacent to the result data table where the data item to be updated is located, the identifier of the target data item corresponds indirectly to the identifier of the data item to be updated. At this time, it is necessary to first determine the directly corresponding data item in the parent data table adjacent to the result data table according to the identifier of the data item to be updated. When the data table where the data item is located is adjacent to the target data table, the target data item is determined based on the identifier of the data item.
[0045] In some embodiments, the target data table may be first determined in the parent data table of the result data table, and then the target data item corresponding to the data item to be updated may be determined in the target data table. In some embodiments, the target data item corresponding to the data item to be updated may be first determined in the parent data table of the result data table, and then the target data table where the target data item is located may be obtained.
[0046] In some embodiments, if the target data item corresponding to the data item to be updated does not exist in the parent data table of the result data table, it means that the data item to be updated is a newly added data item, rather than a data item transferred from the parent data table. In this case, the data item to be updated can be directly updated.
[0047] In S202, in response to an update operation on a target data item, based on an identification of the target data item, a set of data items to be updated including the data item to be updated is determined in a subordinate data table of the target data table, and the target data item and the set of data items to be updated are updated.
[0048] Here, the identifier of the target data item is used to characterize the destination and source of the target data item, and the identifier is unique, that is, different data items correspond to different identifiers, and the corresponding data item can be determined through the identifier.
[0049] Here, the subordinate data table of the target data table refers to the data table corresponding to the subordinate node of the node where the target data table is located. In some embodiments, the subordinate data table of the target data table may include at least one data table. Exemplarily, Figure 1 The subordinate data tables of Table 1 in the example may include Table 2, Table 3, and Table 4.
[0050] Because the identifier of the target data item can represent the destination of the target data item, the set of data items to be updated can be determined in the subordinate data table of the target data table based on the identifier of the target data item. The set of data items to be updated includes at least one data item to be updated. Since the target data item is a data item corresponding to the data item to be updated, when determining the data item to be updated based on the identifier of the target data item, the data item to be updated will be determined in the result data table. Therefore, the set of data items to be updated includes the data item to be updated.
[0051] In an embodiment of the present application, after each target data item that needs to be updated is determined, the data item can be updated, and then the next data item that needs to be updated is determined based on the identifier of the data item, and then the data item is updated, until the data item to be updated is determined in the result data table, the data item to be updated is updated, and the update of the data item is completed.
[0052] In some embodiments, all data items that need to be updated may be determined, and then all data items may be updated in sequence in response to an update operation on a target data item.
[0053] In an embodiment of the present application, when it is determined that there are data items to be updated in the result data table obtained after data arrangement processing, the target data items corresponding to the data items to be updated can be determined in the upper-level data table of the result data table. In this way, the target data items corresponding to the data items to be updated that exist in the upper-level data set table can be determined. Then, based on the identification of the target data items, a set of data items to be updated including the data items to be updated is determined in the lower-level data table of the target data table, and the target data items and the set of data items to be updated are updated. In this way, in an embodiment of the present application, the data items to be updated can be accurately determined by the identification of the data items, thereby improving the accuracy of locating the updated data items.
[0054] Figure 3a is a flow chart of a data updating method provided in an embodiment of the present application, based on Figure 2 , Figure 2 S201 in can be realized by S301 to S303, which will be combined Figure 3a The steps shown are explained.
[0055] In S301 , in response to an update operation on a target data item, the target data item is updated.
[0056] Here, the update operation may include at least one of a modification operation and a deletion operation.
[0057] In S302, based on the output identifier of the target data item, a first data item whose input identifier is the same as the output identifier of the target data item is determined in the subordinate data table, and the first data item is updated.
[0058] In an embodiment of the present application, after the target data item is updated, the updated target data item needs to be passed to a subordinate data table of the target data table, and then the output identifier of the target data item can be obtained. Based on the output identifier of the target data item, the first data item whose input identifier is the same as the output identifier of the target data item is determined in the subordinate data table, and the first data item is updated.
[0059] Here, the output identifier of the target data item is used to represent the destination of the target data item, that is, the position of the target data item in the subordinate data table can be determined through the output identifier of the target data item, thereby locating the first data item in the subordinate data table that needs to be updated together with the target data item.
[0060] Figure 3b A schematic diagram of a scenario of a data updating method provided in an embodiment of the present application, such as Figure 3bAs shown, the initial data table 301 includes data item 311 and data item 312. Because the initial data table 301 has no other data table to pass data, the input identifier of data item 311 is "null", and the output identifier is a dynamically generated unique "A"; the same is true for data item 312, the input identifier is "null", and the output identifier is a dynamically generated unique "B". Then the initial data table 301 is arranged and processed to obtain data table 302 and data table 303 respectively. Among them, data item 321 in data table 302 is passed by data item 311, so the input identifier of data item 321 is the same as the output identifier of data item 311, that is, "A", and the output identifier of data item 321 is dynamically generated. "A1". Data item 322 in data table 302 is transmitted by data item 312, so the input identifier of data item 322 is the same as the output identifier of data item 312, that is, "B", and the output identifier "B1" of data item 322 is dynamically generated; the same is true for data items 331 and 332 in data table 303, that is, the input identifier of data item 331 is the same as the output identifier of data item 311, the input identifier of data item 331 is "A", and the output identifier is "A2", and the input identifier of data item 332 is the same as the output identifier of data item 312, the input identifier of data item 332 is "B", and the output identifier is "B2".
[0061] Data table 302 and data table 303 are merged to obtain data table 304. Among them, data item 341 in data table 304 is transmitted by data item 321, so the input identifier of data item 341 is the same as the output identifier of data item 321, that is, "A1", and the output identifier "A11" of data item 341 is dynamically generated; data item 342 is transmitted by data item 322, so the input identifier of data item 342 is the same as the output identifier of data item 322, that is, "B1", and the output identifier "B11" of data item 342 is dynamically generated; data item 343 is transmitted by data item 322, so the input identifier of data item 342 is the same as the output identifier of data item 322, that is, "B1", and the output identifier "B11" of data item 342 is dynamically generated; data item 343 is transmitted by data item 322, so the input identifier of data item 342 is the same as the output identifier of data item 322. The output identifier of data item 322 is the same as that of data item 322, that is, "B1", and the output identifier of data item 342 is dynamically generated as "B11". Data item 343 is transmitted by data item 331, so the input identifier of data item 343 is the same as the output identifier of data item 331, that is, "A2", and the output identifier of data item 343 is dynamically generated as "A21". Data item 344 is transmitted by data item 332, so the input identifier of data item 344 is the same as the output identifier of data item 332, that is, "B2", and the output identifier of data item 343 is dynamically generated as "B21". Data item 345 is newly added, so the input identifier "C" and the output identifier "C11" are dynamically generated.
[0062] When the target data item in the above embodiment is data item 331 in data table 303, in response to the update operation on data item 331, "100" in data item 331 is modified to "90", and then the updated data item 331 is passed to data table 304. Because the identifiers of the data item before and after the update do not change, the output identifier of the acquired data item 331 is still "A2", and then the data item with the same input identifier as the output identifier "A2" of data item 331 is determined in the subordinate data table of data table 303 (that is, data table 304), that is, data item 343, and then "100" in data item 343 is updated to "90".
[0063] In S303, when the output identifier of the first data item is the same as the input identifier of the data item to be updated, the data item to be updated is updated.
[0064] In the embodiment of the present application, because the data table where the data item to be updated is located is a result data table, when the output identifier of the first data item is the same as the input identifier of the data item to be updated, it means that there are no other data items that need to be updated between the first data item and the data item to be updated. At this time, the data item to be updated is updated to complete the update of all data items. If the output identifier of the first data item is different from the input identifier of the data item to be updated, it means that there are other data items that need to be updated between the first data item and the data item to be updated. At this time, it is necessary to continue to determine other data items that need to be updated based on the output identifier of the first data item, and the determination method is the same as that of determining the first data item.
[0065] In the embodiment of the present application, after the target data item is updated, based on the output identifier of the target data item, a first data item whose input identifier is the same as the output identifier of the target data item can be determined in the subordinate data table, and the first data item can be updated; when the output identifier of the first data item is the same as the input identifier of the data item to be updated, the data item to be updated is updated. In this way, all data items that need to be updated between the target data item and the data item to be updated can be accurately located through the output identifier of the target data item, which not only improves the accuracy of locating and updating data, but also improves the comprehensiveness of the updated data.
[0066] Figure 4 is a flow chart of a data updating method provided in an embodiment of the present application, based on Figure 2 , Figure 2 In S201 of the method, "determining the target data item corresponding to the data item to be updated in the parent data table of the result data table" can be implemented by S401 to S402. Figure 4 The steps shown are explained.
[0067] In S401, when there are data items to be updated in the result data table obtained after the data arrangement processing, the input identifier of the data item to be updated is obtained.
[0068] Here, the input identifier is used to indicate the input source of the data item to be updated. Because the result data table where the data item to be updated is located is obtained based on data arrangement processing, the data item to be updated can be a data item passed down from the parent data set of the result data set, so through the input identifier of the data item to be updated, it can be determined from which data item it is passed down.
[0069] In S402, based on the input identifier of the data item to be updated, a target data item and a target data table where the target data item is located are determined in the parent data table of the result data table.
[0070] In an embodiment of the present application, the parent data table of the result data table can be determined based on the identifier of the result data table, and then the target data item and the target data table where the target data item is located can be determined in the parent data table of the result data table based on the input identifier of the data item to be updated.
[0071] In the embodiment of the present application, when the upper-level data table is a data table adjacent to the result data table, S402 may include the following steps:
[0072] In S421, based on the input identifier of the data item to be updated, a target data item having an output identifier identical to the input identifier of the data item to be updated is determined in the upper-level data table.
[0073] In an embodiment of the present application, each data item in the data table carries an input identifier and an output identifier. Among them, the input identifier and the output identifier are both unique. The output identifier is used to characterize the destination of the data item. In the case where the data item to be updated is not a newly added data item, the source of the data item to be updated is the data item in the upper-level data table adjacent to the result data table, and the destination of the data item in the upper-level data table adjacent to the result data table can also be the data item in the result data table. Therefore, the target data item whose output identifier is the same as the input identifier of the data item to be updated can be determined in the upper-level data table through the input identifier of the data item to be updated.
[0074] like Figure 3bAs shown, when the data table 304 is obtained by data arrangement, it is found that the data item 343 is wrong, and the "100" in the data item 343 needs to be modified to "90". At this time, the modification cannot be made directly on the data table 304, because the data item 343 is not a new data item, so after only modifying the data item 343, the parent data table of the data table 304 (i.e., the data table 303) still has the wrong data item. When the data table is arranged again, the wrong data item in the data table 303 will overwrite the modified data item 343, resulting in the failure of the update. Therefore, based on the input identifier of the data item 343, the target data item (i.e., data item 331) whose output identifier is the same as the input identifier of the data item to be updated can be determined in the parent data table (i.e., the data table 303).
[0075] In some embodiments, when the upper-level data table includes an adjacent data table adjacent to the result data table and a target data table adjacent to the adjacent data table, S402 may include the following steps:
[0076] In S422, based on the input identifier of the data item to be updated, a first data item having an output identifier identical to the input identifier of the data item to be updated is determined in the adjacent data table.
[0077] In S423, based on the input identifier of the first data item, a target data item having an output identifier identical to the input identifier of the first data item is determined in the target data table.
[0078] In the embodiment of the present application, because the parent data table of the result data table includes multiple data tables, it is necessary to first determine the first data item whose output identifier is the same as the input identifier of the data item to be updated in the adjacent data table based on the input identifier of the data item to be updated, and then determine the target data item whose output identifier is the same as the input identifier of the first data item in the target data table based on the input identifier of the first data item. In this way, multiple data items corresponding to the data items to be updated in the multiple parent data tables of the result data table can be located.
[0079] In some embodiments, S402 may further include the following steps:
[0080] In S424, at least two second data items are determined in the parent data table of the result data table based on the input identifier of the data item to be updated.
[0081] In S425 , in response to a selection operation of selecting a target data item from among at least two second data items, a target data item is obtained.
[0082] In an embodiment of the present application, when the parent data table of the result data table includes at least two data tables, at least two second data items can be determined in the parent data table of the result data table based on the input identifier of the data item to be updated, and then the determined at least two second data items are displayed, and the user can select from the at least two second data items to obtain the target data item. Exemplarily, in data table 1, it is determined that data item 1 needs to be updated, and the parent data table of data table 1 is data table 2, and the parent data table of data table 2 is data table 3, then based on the input identifier of data item 1, data item 2 can be determined in data table 2, and then based on the input identifier of data item 2, data item 3 can be determined in data table 3, at this time, both data item 2 and data item 3 can be displayed, and then in response to the user's selection operation, such as selecting data item 2, data 2 is used as the target data item, so as to start updating from the target data item.
[0083] In the embodiment of the present application, at least two second data items can be determined in the parent data table of the result data table based on the input identifier of the data item to be updated, and then the target data item is determined in response to the selection operation of selecting the target data item in the at least two second data items. In this way, the second data item corresponding to the data item to be updated can be determined based on the input identifier of the data item to be updated, and then the target data item can be determined based on the user's selection operation, so that the user can determine which data item to start updating, thereby improving the flexibility of updating data items.
[0084] Figure 5 is a flow chart of a data updating method provided in an embodiment of the present application, based on Figure 2 , Figure 2 S201 in can be realized by S501 to S503, which will be combined Figure 5 The steps shown are explained.
[0085] In S501, when there are data items to be updated in the result data table obtained after the data arrangement process, an input identifier of the result data table is obtained.
[0086] Here, the input identifier of the result data table is used to characterize the source of the result data table. In some embodiments, the data table also carries an output identifier, and the output identifier of the data table is used to characterize the destination of the data table. In some embodiments, the generation method of the input identifier and output identifier of each data table is the same as the generation method of the input identifier and output identifier of the data item in the data table. Exemplarily, if the input identifier of data table 1 is the same as the output identifier of data table 2, it means that data table 2 is the upper-level data table adjacent to data table 1. If the input identifier of data table 3 is the same as the output identifier of data table 1, it means that data table 3 is the lower-level data table adjacent to data table 1.
[0087] In S502, a data table in at least one upper-level data table whose output identifier is the same as the input identifier of the result data table is determined as a target data table.
[0088] In an embodiment of the present application, after obtaining the input identifier of the result data table, it can be compared with the output identifier of at least one parent data table of the result data table, and the data table whose output identifier is the same as the input identifier of the result data table is determined as the target data table, that is, the target data table is the parent data table adjacent to the result data table.
[0089] In S503, a target data item corresponding to the data item to be updated is determined in the target data table.
[0090] In the embodiment of the present application, after determining the upper-level data table adjacent to the result data table, i.e., the target data table, the target data item can be determined in the target data table based on the input identifier of the data item to be updated. The specific implementation method of determining the target data item based on the input identifier of the data item to be updated can refer to the above embodiment.
[0091] In the embodiment of the present application, the target data table can be first determined based on the input identifier of the result data table, and then the target data item corresponding to the data item to be updated can be determined in the target data table. In this way, compared with directly determining the target data item corresponding to the data item to be updated, the efficiency of determining the target data item can be improved.
[0092] Figure 6 is a flow chart of a data updating method provided in an embodiment of the present application, such as Figure 6 As shown, the process may include:
[0093] In S601, a first data table, a second data table, and a third data table are obtained.
[0094] In the embodiment of the present application, the first data table may be a material table, and the first data table is shown in Table 1:
[0095] Table 1
[0096]
[0097]
[0098] In the embodiment of the present application, the second data table may be a supplier list, and the second data table is shown in Table 2:
[0099] Table 2
[0100] Fields coding type Supplier Code gysdm VARCHAR Supplier Name gysmc VARCHAR
[0101] In the embodiment of the present application, the third data table may be a settlement table, and the third data table is shown in Table 3:
[0102] Table 3
[0103] Fields coding type Settlement order number settlement_code VARCHAR Parts Name part_number VARCHAR Part Number part_name VARCHAR Supplier Code vendor_code VARCHAR Supplier Name vendor_name VARCHAR
[0104] In the embodiment of the present application, the first data table, the second data table and the third data table are all data tables in a relational database.
[0105] In S602, the first data table and the second data table are connected to obtain a first connection table.
[0106] In the embodiment of the present application, the connection method of the first data table and the second data table can be a left join, wherein the connection condition is: the vendor code (vendor_code) is equal to the vendor code (gysdm).
[0107] The first connection table is shown in Table 4:
[0108] Table 4
[0109]
[0110]
[0111] In S603, the first connection table and the third data table are connected to obtain a second connection table.
[0112] In the embodiment of the present application, the connection method of the first connection table and the third data table can be a left join, wherein the connection condition is: the supplier name (gysmc) is equal to the supplier code (vendor_code).
[0113] The second connection table is shown in Table 5:
[0114] Table 5
[0115] Fields coding type source Component Description component_desc STRING First connection table Supplier Code vendor_code STRING First connection table Supplier Name vendor_name STRING First connection table Component Code component_code STRING First connection table Supplier Code gysdm VARCHAR First connection table Organization Name organization_name STRING First connection table Supplier Name gysmc VARCHAR First connection table Settlement order number settlement_code VARCHAR The third data table Parts Name part_number VARCHAR The third data table Part Number part_name VARCHAR The third data table Supplier Code vendor_code VARCHAR The third data table Supplier Name vendor_name VARCHAR The third data table
[0116] In S604, the row data to be updated is determined in the second connection table.
[0117] In the embodiment of the present application, because the first data table, the second data table and the third data table are all data tables in a relational database, and in a relational database, two identical field codes cannot appear in the same table. As shown in Table 5, the same codes appear in Table 5, namely, "vendor_code" and "vendor_name".
[0118] In S605, the row data corresponding to the row data to be updated is updated in the first connection table and the third data table.
[0119] In the embodiment of the present application, the row data containing "vendor_code" may be deleted in the first connection table, and the row data containing "vendor_name" may be deleted in the third data table.
[0120] The updated first connection table is shown in Table 6:
[0121] Table 6
[0122]
[0123]
[0124] The updated third data table is shown in Table 7:
[0125] Table 7
[0126] Fields coding type Settlement order number settlement_code VARCHAR Parts Name part_number VARCHAR Part Number part_name VARCHAR Supplier Code vendor_code VARCHAR
[0127] In S606, the data row to be updated in the second connection table is updated.
[0128] In the embodiment of the present application, based on the output identifier of the data row containing "vendor_code" in the first connection table, the data row to be updated can be determined in the second connection table, and the data row to be updated can be updated, that is, the data row to be updated containing "vendor_code" can be deleted; based on the output identifier of the data row containing "vendor_name" in the third data table, the data row to be updated can be determined in the second connection table, and the data row to be updated can be updated, that is, the data row to be updated containing "vendor_name" can be deleted.
[0129] The updated second connection table is shown in Table 8:
[0130] Table 8
[0131] Fields coding type source Component Description component_desc STRING First connection table Supplier Name vendor_name STRING First connection table Component Code component_code STRING First connection table Supplier Code gysdm VARCHAR First connection table Organization Name organization_name STRING First connection table Supplier Name gysmc VARCHAR First connection table Settlement order number settlement_code VARCHAR The third data table Parts Name part_number VARCHAR The third data table Part Number part_name VARCHAR The third data table Supplier Code vendor_code VARCHAR The third data table
[0132] In the embodiment of the present application, the data row in the downstream data table that needs to be updated together can be accurately located by identifying the updated data row. In this way, during the data twisting process, a single data row in the upstream data table is updated, the updated data row is passed downward, and the corresponding data row in the downstream data table can be updated synchronously.
[0133] The present application embodiment provides a data updating device, Figure 7 A schematic diagram of the structure of a data updating device 700 provided in an embodiment of the present application is shown in FIG. Figure 7 As shown, the device includes: a determination unit 701 and an update unit 702, wherein:
[0134] The determination unit 701 is used to determine, when there are data items to be updated in the result data table obtained after data arrangement processing, a target data item corresponding to the data item to be updated and a target data table where the target data item is located in the parent data table of the result data table.
[0135] The updating unit 702 is used to respond to the update operation on the target data item, determine a set of data items to be updated including the data item to be updated in a subordinate data table of the target data table based on the identification of the target data item, and update the target data item and the set of data items to be updated.
[0136] In some embodiments, the identifier of the target data item includes the output identifier of the target data item; the set of data items to be updated includes a first data item; the update unit 702 is used to update the target data item in response to an update operation on the target data item; based on the output identifier of the updated target data item, determine in the subordinate data table a first data item whose input identifier is the same as the output identifier of the target data item, and update the first data item; when the output identifier of the updated first data item is the same as the input identifier of the data item to be updated, update the data item to be updated.
[0137] In some embodiments, the determination unit 701 is used to obtain an input identifier of the data item to be updated; and determine a target data item in a parent data table of the result data table based on the input identifier of the data item to be updated.
[0138] In some embodiments, the upper-level data table includes an adjacent data table adjacent to the result data table and a target data table adjacent to the adjacent data table; a determination unit 701 is used to determine, in the adjacent data table, a first data item whose output identifier is the same as the input identifier of the data item to be updated based on the input identifier of the data item to be updated; and to determine, in the target data table, the target data item whose output identifier is the same as the input identifier of the first data item based on the input identifier of the first data item.
[0139] In some embodiments, the determination unit 701 is used to determine at least two second data items in the parent data table of the result data table based on the input identifier of the data item to be updated; in response to a selection operation of selecting the target data item from the at least two second data items, obtain the target data item.
[0140] In some embodiments, the determination unit 701 is used to obtain the input identifier of the result data table; determine at least one data table in the upper-level data table whose output identifier is the same as the input identifier of the result data table as the target data table; and determine the target data item corresponding to the data item to be updated in the target data table.
[0141] In some embodiments, the data items to be updated include at least one of the following: data items having the same attribute information as other data items in the data table, data items having erroneous attribute information in the data table, and data items having changed business types in the data table.
[0142] The description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the same method embodiment. In some embodiments, the functions or modules included in the device provided in the embodiment of the present application can be used to execute the method described in the above method embodiment. For technical details not disclosed in the device embodiment of the present application, please refer to the description of the method embodiment of the present application for understanding.
[0143] It should be noted that in the embodiment of the present application, if the above-mentioned data update method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, which is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a disk or an optical disk. In this way, the embodiment of the present application is not limited to any specific hardware, software or firmware, or any combination of hardware, software, and firmware.
[0144] An embodiment of the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the program, some or all of the steps in the above method are implemented.
[0145] The embodiment of the present application provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, some or all of the steps in the above method are implemented. The computer-readable storage medium can be transient or non-transient.
[0146] An embodiment of the present application provides a computer program, including a computer-readable code. When the computer-readable code is run in a computer device, a processor in the computer device executes some or all of the steps for implementing the above method.
[0147] The embodiment of the present application provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and when the computer program is read and executed by a computer, some or all of the steps in the above method are implemented. The computer program product can be implemented specifically by hardware, software or a combination thereof. In some embodiments, the computer program product is specifically embodied as a computer storage medium, and in other embodiments, the computer program product is specifically embodied as a software product, such as a software development kit (SDK) and the like.
[0148] It should be noted here that the description of the various embodiments above tends to emphasize the differences between the various embodiments, and the same or similar aspects can be referenced to each other. The description of the above device, storage medium, computer program and computer program product embodiments is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the embodiments of the device, storage medium, computer program and computer program product of this application, please refer to the description of the method embodiment of this application for understanding.
[0149] The present application embodiment provides a data updating device, Figure 8 A schematic diagram of the structure of the data updating device 800 provided in the embodiment of the present application is shown as follows: Figure 8 As shown, the device includes: a processor 801, a communication interface 802 and a memory 803, wherein:
[0150] The processor 801 generally controls the overall operation of the computer device 800. The overall operation may be to implement the data updating method provided in the embodiment of the present application, for example, Figures 1 to 6 The method shown.
[0151] The communication interface 802 enables the computer device to communicate with other terminals or servers through a network.
[0152] The memory 803 is configured to store instructions and applications executable by the processor 801, and can also cache data to be processed or processed by the processor 801 and each module in the computer device 800 (for example, image data, audio data, voice communication data, and video communication data), which can be implemented by flash memory (FLASH) or random access memory (Random Access Memory, RAM). Data can be transmitted between the processor 801, the communication interface 802, and the memory 803 through the bus 804.
[0153] The embodiment of the present application provides a computer program product or a computer program, which includes computer instructions stored in a readable storage medium. The processor of the computer device reads the computer instructions from the readable storage medium, and the processor executes the computer instructions, so that the computer device executes the data update method described in the embodiment of the present application.
[0154] The embodiment of the present application provides a readable storage medium storing executable instructions, wherein the executable instructions are stored. When the executable instructions are executed by a processor, the processor will execute the data update method provided in the embodiment of the present application, for example, Figures 1 to 6 The method shown.
[0155] It should be noted here that the description of the above storage medium and device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium and device embodiments of this application, please refer to the description of the method embodiments of this application for understanding.
[0156] The processor may be at least one of an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a Central Processing Unit (CPU), a controller, a microcontroller, and a microprocessor. It is understandable that the electronic device that implements the functions of the processor may also be other, and the embodiments of the present application are not specifically limited.
[0157] The above-mentioned computer storage medium / memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory (Flash Memory), a magnetic surface memory, an optical disk, or a compact disc read-only memory (CD-ROM) and the like; it can also be various terminals including one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.
[0158] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the serial number of each step / process mentioned above does not mean the order of execution, and the execution order of each step / process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application. The serial numbers of the embodiments of the present application mentioned above are for description only and do not represent the advantages and disadvantages of the embodiments.
[0159] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0160] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0161] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0162] In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be a separate unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0163] A person skilled in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, etc., various media that can store program codes.
[0164] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can essentially or in other words, the part that contributes to the relevant technology can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.
[0165] The above is only an implementation method of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.
Claims
1. A data updating method, characterized in that: include: In the case where there are data items to be updated in the result data table obtained after the data arrangement processing, determining a target data item corresponding to the data item to be updated in the parent data table of the result data table, and a target data table where the target data item is located; In response to an update operation on the target data item, based on the identification of the target data item, a set of data items to be updated including the data item to be updated is determined in a subordinate data table of the target data table, and the target data item and the set of data items to be updated are updated.
2. The method according to claim 1, characterized in that The identifier of the target data item includes an output identifier of the target data item; the set of data items to be updated includes a first data item; In response to the update operation on the target data item, based on the identifier of the target data item, in a subordinate data table of the target data table, determining a set of data items to be updated including the data item to be updated, and updating the target data item and the set of data items to be updated, including: In response to an update operation on the target data item, updating the target data item; Based on the output identifier of the target data item, determining in the subordinate data table a first data item whose input identifier is the same as the output identifier of the target data item, and updating the first data item; When the output identifier of the first data item is the same as the input identifier of the data item to be updated, the data item to be updated is updated.
3. The method according to claim 1, characterized in that: The step of determining the target data item corresponding to the data item to be updated in the parent data table of the result data table includes: Obtaining an input identifier of the data item to be updated; Based on the input identifier of the data item to be updated, a target data item is determined in the parent data table of the result data table.
4. The method according to claim 3, characterized in that The upper-level data table includes an adjacent data table adjacent to the result data table and a target data table adjacent to the adjacent data table; The step of determining the target data item in the parent data table of the result data table based on the input identifier of the data item to be updated includes: Based on the input identifier of the data item to be updated, determining in the adjacent data table a first data item whose output identifier is the same as the input identifier of the data item to be updated; Based on the input identifier of the first data item, the target data item having an output identifier identical to the input identifier of the first data item is determined in the target data table.
5. The method according to claim 3, characterized in that: The step of determining the target data item in the parent data table of the result data table based on the input identifier of the data item to be updated includes: Based on the input identifier of the data item to be updated, determining at least two second data items in the parent data table of the result data table; In response to a selection operation of selecting the target data item from among the at least two second data items, the target data item is obtained.
6. The method according to any one of claims 1 to 5, characterized in that: The step of determining the target data item corresponding to the data item to be updated in the parent data table of the result data table, and the target data table where the target data item is located, comprises: Obtaining an input identifier of the result data table; Determine at least one data table in the upper-level data table whose output identifier is the same as the input identifier of the result data table as the target data table; A target data item corresponding to the data item to be updated is determined in the target data table.
7. The method according to any one of claims 1 to 5, characterized in that: The data items to be updated include at least one of the following: data items having the same attribute information as other data items in the data table, data items having erroneous attribute information in the data table, and data items having changed business types in the data table.
8. A data updating device, characterized in that: include: a determination unit, configured to determine, when there is a data item to be updated in a result data table obtained after data arrangement processing, a target data item corresponding to the data item to be updated in a parent data table of the result data table, and a target data table where the target data item is located; An updating unit is used to respond to an update operation on the target data item, determine a set of data items to be updated including the data item to be updated in a subordinate data table of the target data table based on an identifier of the target data item, and update the target data item and the set of data items to be updated.
9. A data updating device, characterized in that: include: A memory for storing executable instructions; A processor, configured to implement the method according to any one of claims 1 to 7 when executing the executable instructions stored in the memory.
10. A storage medium, characterized in that: The storage medium stores executable instructions, which, when executed by a processor, implement the method according to any one of claims 1 to 7.