A data processing method and device, electronic equipment and storage medium
By locking the changed content in related documents and using computational chains or numerical storage methods, the problem of chaotic data management caused by synchronous changes in related documents is solved, and flexible and accurate data management is achieved.
Patent Information
- Application Number
- CN202210347792.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-01
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2042-04-01
AI Technical Summary
In existing technologies, when the data of associated documents changes, the corresponding associated documents will also change synchronously, leading to chaotic data management.
By determining the relationship between the first and second documents, changes in the second document are locked to keep the records in the first document unchanged. A computational chain or numerical storage method is used to avoid synchronous updates.
It achieves flexible and precise data management at the record level, avoiding data management chaos and ensuring data consistency and accuracy.
Smart Images

Figure CN114896242B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, and in particular to a data processing method and device, electronic equipment and storage medium. BACKGROUND
[0002] As a new generation of data processing tool, data collaboration document tools have developed rapidly in recent years. Association, as a core function of data collaboration documents, has been widely used in various business scenarios. When the data in the associated A document changes, the data in the B document associated with the A document will also change accordingly. For example, in the warehouse management scenario, the order data in the warehouse table will be synchronized with the data in the product table.
[0003] In the prior art, the design of association is to keep the associated data and the associated data synchronized, that is, when the associated data (such as the data in the product table) changes, the corresponding associated data (such as the corresponding associated data in the warehouse record) will also change, which may cause data confusion in some scenarios. For example, modifying the cost price in the product table will cause the cost price of the historical warehouse record to change, resulting in errors in the business data of the entire enterprise. Therefore, in the prior art, when the associated document data changes, the corresponding associated document will also change, which may cause data management confusion. SUMMARY
[0004] The present application provides a data processing method, device, electronic equipment and storage medium to solve the defect that when the associated document data changes, the corresponding associated document will also change, which may cause data management confusion.
[0005] The present application provides a data processing method, comprising:
[0006] determining a first document and a second document having an association relationship with the first document;
[0007] in the case where the content of a second record in the second document changes, the content of a first record in the first document having an association relationship with the second record remains unchanged; wherein the second record is at least part of the data in the second document.
[0008] Optionally, the method further comprises:
[0009] in the case where the content of a fourth record in the second document changes, the content of a third record in the first document having an association relationship with the fourth record changes synchronously; wherein the fourth record is at least other part of the data in the second document.
[0010] Optionally, the determining the first document and a second document having an association relationship with the first document comprises:
[0011] analyzing the association relationship of the first record in the first document to obtain positioning information of a second record;
[0012] determining the second document according to the positioning information of the second record, and determining a second record having an association relationship with the first record in the second document.
[0013] Optionally, in the case that the content of the second record in the second document changes, the content of the first record having an association relationship with the second record in the first document remains unchanged, comprising:
[0014] copying the content of the second record to obtain a fifth record;
[0015] changing the association relationship of the first record with the second record to the association relationship of the first record with the fifth record;
[0016] setting the fifth record to be invisible, and / or setting the first record to be uneditable.
[0017] Optionally, the changing the association relationship of the first record with the second record to the association relationship of the first record with the fifth record comprises:
[0018] canceling the association relationship of the first record with the second record;
[0019] establishing the association relationship of the first record with the fifth record.
[0020] Optionally, in the case that the content of the second record in the second document changes, the content of the first record having an association relationship with the second record in the first document remains unchanged, comprising:
[0021] obtaining the content corresponding to the first record according to the content of the second record and the calculation chain of the first record;
[0022] replacing the calculation chain of the first record with the content corresponding to the first record;
[0023] setting the first record to be uneditable.
[0024] Optionally, after the first record is set to be uneditable, the method further comprises:
[0025] receive a query instruction for a sixth record; wherein the sixth record is a record in the first document where the first record is located;
[0026] determine a storage mode of the sixth record;
[0027] in a case where the storage mode of the sixth record is numerical storage, obtain a query result according to a numerical value stored by the sixth record and return the query result;
[0028] in a case where the storage mode of the sixth record is calculation chain storage, obtain a query result according to a calculation chain of the sixth record and an associated value of the calculation chain of the sixth record and return the query result.
[0029] Optionally, the determining the storage mode of the sixth record comprises:
[0030] determining the storage mode of the sixth record according to an identifier of the sixth record and a preset corresponding relationship between identifiers and storage modes.
[0031] The application further provides a data processing apparatus, comprising:
[0032] a determining module configured to determine a first document and a second document having an associated relationship with the first document;
[0033] an archiving module configured to maintain the content of a first record in the first document unchanged in a case where the content of a second record in the second document changes; wherein the second record is at least part of data in the second document.
[0034] The application further provides an electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the data processing method according to any one of the above embodiments when executing the program.
[0035] The application further provides a computer readable storage medium having a computer program stored thereon, wherein the computer program is executable on a processor to implement the steps of the data processing method according to any one of the above embodiments.
[0036] The data processing method, apparatus, electronic device and storage medium provided by the application position the second document according to the associated relationship between the first document and the second document, and lock the content of the first record in the first document according to the content of the second record in the second document. The data in the data collaboration document which does not need to be changed synchronously is flexibly and accurately managed at the record level (granularity), and data management confusion is avoided. BRIEF DESCRIPTION OF DRAWINGS
[0037] In order to make the technical solutions in the present application or the prior art clearer, the accompanying drawings needed in the embodiments or prior art description will be briefly introduced. Obviously, the accompanying drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those of ordinary skill in the art without any creative effort.
[0038] Figure 1 To express the intention of warehouse-out in the warehouse-in and warehouse-out management scenario;
[0039] Figure 2 To express the intention of product in the warehouse-in and warehouse-out management scenario;
[0040] Figure 3 is a flowchart of a data processing method provided by the present application;
[0041] Figure 4 is a flowchart of a data processing method in a preferred embodiment of the present application;
[0042] Figure 5 is a flowchart of a data processing method in another preferred embodiment of the present application;
[0043] Figure 6 is a structural diagram of a data processing device provided by the present application;
[0044] Figure 7 is a structural diagram of an electronic device provided by the present application. DETAILED DESCRIPTION
[0045] In order to make the technical solutions in the present application or the prior art clearer, the accompanying drawings needed in the embodiments or prior art description will be briefly introduced. Obviously, the accompanying drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those of ordinary skill in the art without any creative effort.
[0046] The present application provides a convenient data processing method, and the user can realize flexible and accurate management of single records in a data collaboration document through simple operation or pre-setting.
[0047] The present application provides a convenient data processing method, and the user can realize flexible and accurate management of single records in a data collaboration document through simple operation or pre-setting. Figures 1-7 A data processing method, device, electronic equipment and storage medium are described below.
[0048] Figure 3 is a flowchart of a data processing method provided by the present application, as shown in Figure 3 the method comprises:
[0049] S31. Determine the first document and the second document that is associated with the first document;
[0050] S32. If the content of the second record in the second document changes, the content of the first record in the first document that is related to the second record remains unchanged; wherein the second record is at least a portion of the data in the second document.
[0051] Examples are given below. Figure 1 This is an outbound table for an inbound / outbound management scenario. Record A in the outbound table records: order number, product, product name, unit price, quantity, status, and total price. Figure 2 In an inventory management scenario, record B in the product table contains the following information: product name, supplier, cost, unit price, inventory, specifications, and (storage) warehouse. Record A in the outbound table is linked to record B in the product table, referencing the product name and unit price fields. This means that the product name and unit price in record A will not be updated synchronously based on changes to the product name and unit price in record B. Even after an order in record A of the outbound table is completed, the product name and unit price in record A will still not be updated based on changes to record B.
[0052] Specifically, after receiving an archiving instruction for a first record in a first document, the device identifies a second document that is associated with the first document. This facilitates archiving the first record in the first document based on the second record in the second document, while maintaining the value of the first record unchanged. Here, the association means that the first document references at least some data in the second document. The first record refers to a line of data entry in the first document. Figure 1 For example, the first record could be "100001, Product 1, Product 1, 200, 1, Not Shipped, 200"; the second record refers to a single data entry in the second document. Figure 2 For example, the second record can be "Product 1, Supplier 1, 100, 200, 50, catties, Warehouse 1". The aforementioned device is the executing entity of this method. The device can be a mobile electronic device such as a mobile phone, PDA (Personal Digital Assistant), or a computer. The archiving instruction can be a user-input instruction received through an interactive interface, such as an archiving instruction input by the user via keyboard, mouse, or touchscreen; the archiving instruction can also be an archiving instruction obtained according to a pre-set program, such as archiving completed orders / orders exceeding a preset period according to a pre-set program. The first record can be the stored content of a cell in a data table, or a row or column in a data table, which the user can set according to their needs.
[0053] Whether the content between the second record of the second document and the first record of the first document remains unchanged or not can be determined according to a preset. Alternatively, the determination can be made according to a user selection. For example, if the user selects to keep the content unchanged, even if the content of the second record of the second document changes, the content of the first record of the first document that has an association relationship with the second record remains unchanged. If the user selects to synchronize the content, even if the content of the second record of the second document changes, the content of the first record of the first document that has an association relationship with the second record also changes synchronously. Whether to synchronize or not can be adjusted in real time or appropriately according to the user's needs.
[0054] The first document is one document, and the second document can be one document or multiple documents.
[0055] The first record can include multiple specific record contents, and in the multiple record contents, part or all of the contents can have an association with the second record in the second document (i.e., part or all of the contents of the first record are updated according to the second record). The calculation chain is the underlying kernel formula of the data collaboration document, and the calculation chain does not directly store the content, but needs to obtain the corresponding calculation result through formula calculation. The association between the first record and the second record can be embodied in the form of a calculation chain, i.e., the content in the first record is determined according to the calculation result of the calculation chain, and the data required for the calculation of the calculation chain refers to the data in the second record.
[0056] After the device receives the archiving instruction for the first record in the first document, the second record having an association relationship with the first record is located, the corresponding second document and the second record in the second document are determined, and then the content of the first record is locked according to the second record. The content of the first record is locked, and even if the content of the second record is updated in real time subsequently, the content of the first record will not change, thereby avoiding data management confusion. In addition, the way of locking the content of the first record according to the second record can be: changing the first record to numerical storage; it can also be to keep the calculation chain storage, but associate the calculation chain of the first record to the non-changeable copy record; it can also be to set the second record as non-changeable and create another copy for real-time updating for the second record, and the like. The specific locking mode can be set as required, which is not limited here.
[0057] In addition, it should be noted that the first document and the second document in the present application are both documents containing multiple records, the first record in the above steps is only part of the records in the first document, and the second record is also only part of the records in the second document. After the above steps are performed, the content of the first record in the first document is no longer updated synchronously with the content of the second record in the second document. At the same time, it can be understood that there can be other partial records in the first document in addition to the first record, and the content of the partial record can still be updated synchronously with the record content in other documents. For each record in the first document, it can also be adjusted according to the preset program instruction or the user input instruction whether the record is updated synchronously according to the record in the other document. For example, when the current time point does not exceed the preset value (or no user input instruction is received), a record in the first document is updated synchronously according to the record in the second document; a record in the first document is updated synchronously according to the record in the second document, and when the current time point exceeds the preset value (or the user input instruction is received), the content of the record in the first document is maintained. In the embodiment, the second document is positioned according to the association relationship between the first document and the second document, and the content of the first record in the first document is locked according to the second record in the second document. The data that does not need to be synchronized in the data collaboration document is flexibly and accurately managed at the record level (granularity), and data management confusion is avoided.
[0058] Based on any of the above embodiments, in one embodiment, the method further comprises:
[0059] In the case that the content of the fourth record in the second document changes, the content of the third record in the first document having an association relationship with the fourth record changes synchronously; wherein the fourth record is at least other partial data in the second document.
[0060] Specifically, the first document and the second document both contain multiple records, the third record is a record different from the first record in the first document, the fourth record is a record different from the second record in the second document (i.e., at least other partial data), and the third record and the fourth record have an association relationship. At this time, in the case that the content of the fourth record in the second document changes, the content of the third record changes synchronously with the content of the fourth record. That is, for the first document and the second document having an association relationship, not only the records that do not change synchronously with the associated content exist, but also the records that change synchronously with the associated content exist.
[0061] In addition, for each record in the first document, it can also be adjusted according to the preset program instructions or user input instructions whether the record is updated synchronously according to the record in the other document. For example, when the current time point does not exceed the preset value (or no user input instruction is received), the record in the first document is updated synchronously according to the record in the second document; when the current time point exceeds the preset value (or the user input instruction is received), the content of the record in the first document is maintained unchanged.
[0062] In addition to locking the content of the first record in the first document according to the second record in the second document in the embodiment, the content of the third record in the first document is updated synchronously according to the fourth record in the second document, so that the user can flexibly set whether to update the data record in the collaborative data document according to the associated content on a single record level (granularity) according to the demand, and avoid data management confusion.
[0063] Based on any of the above embodiments, in one embodiment, the first document and the second document having an association relationship with the first document are determined, comprising:
[0064] The association relationship of the first record in the first document is analyzed to obtain the positioning information of the second record;
[0065] The second document is determined according to the positioning information of the second record, and the second record having an association relationship with the first record in the second document is determined.
[0066] Specifically, the association relationship between the first record and the second record can be embodied in the form of a calculation chain, the content of the first record is calculated (or directly referenced) according to the associated data in the calculation chain, and the positioning information of the record associated with the data in the calculation chain (corresponding to the second record) is obtained. The positioning information is used to obtain the corresponding associated data, and the positioning information can include the associated data collaboration document identifier (for example, table ID), the specific record identifier (for example, record ID, that is, the unique distinguishing identifier of each record) in the data collaboration document, and the like. It can be understood that if a row or a column is taken as a record, the record identifier can be the identifier of the corresponding row or the identifier of the corresponding column; if a cell is taken as a record, the record identifier can be the identifier of the corresponding row and the identifier of the corresponding column. By analyzing the calculation chain of the first record in the first document, the positioning information (such as table ID and record ID) of the second data is obtained, and then the associated second document is determined according to the positioning information (such as table ID) of the second record, and the second record is further determined according to the positioning information (such as record ID) of the second record, so as to obtain the current content of the second record.
[0067] In this embodiment, the positioning information of the second record is obtained by analyzing the association relationship of the first record, and the second record is accurately positioned.
[0068] Based on any of the above embodiments, in one embodiment, in the case that the content of the second record in the second document changes, the content of the first record associated with the second record in the first document remains unchanged, comprising:
[0069] copying the content of the second record to obtain a fifth record;
[0070] changing the association relationship between the first record and the second record to the association relationship between the first record and the fifth record;
[0071] setting the fifth record to be invisible, and / or setting the first record to be uneditable.
[0072] Specifically, the content of the second record is updated in real time, the content of the second record is copied to obtain the fifth record as a copy of the second record, and the storage location of the fifth record can be in the same data collaboration document as the second record (i.e., stored in the second document).
[0073] Then, the association relationship between the first record and the second record is changed to the association relationship between the first record and the fifth record. The specific implementation can change the positioning information pointing to the second record in the calculation chain of the first record to the positioning information pointing to the fifth record.
[0074] Further, in order to prevent the first record from being changed due to misoperation, the fifth record can be set to be invisible to avoid misoperation on the fifth record, and the first record associated with the third record is changed accordingly. It can be understood that in this embodiment, the fifth record is a record copied from the second record, and the first record is a record stored in the form of a calculation chain. After changing the association relationship, the content of the first record changes synchronously according to the content of the fifth record. In addition, the first record can also be set to be uneditable to prevent misoperation of directly changing the first record.
[0075] In this embodiment, the fifth record is obtained by establishing a copy according to the content of the second record, and then the first record is associated with the fifth record which is not updated in real time, so that the value of the first record is locked. By setting the fifth record to be invisible, and / or setting the first record to be uneditable, the case that the fifth record is changed due to misoperation is avoided. In this embodiment, the first record still exists in the association relationship, and the user can still understand the relationship between the records through the association relationship, which is convenient for query.
[0076] Based on any of the above embodiments, in one embodiment, in the case that the content of the second record in the second document changes, the content of the first record in the first document that has an association relationship with the second record remains unchanged, comprising:
[0077] copying the content of the second record to obtain a seventh record; wherein the seventh record is used for real-time updating;
[0078] changing the association relationship between the eighth record and the second record to the association relationship between the eighth record and the seventh record; wherein the eighth record is a record that has an association relationship with the second record except for the first record;
[0079] setting the second record as non-editable, and / or setting the first record as non-editable.
[0080] In the embodiment, the seventh record is obtained according to the content of the second record, and the association relationship between the eighth record and the second record is changed to the association relationship between the eighth record and the seventh record, so that the content corresponding to the second record can still be equivalent to achieve real-time updating. By setting the second record associated with the first record as non-editable, the adjusted second record is no longer real-time updated, thereby indirectly locking the content of the first record. By setting the first record as non-editable, the situation that the first record is changed due to misoperation is avoided.
[0081] Based on any of the above embodiments, in one embodiment, the association relationship between the first record and the second record is changed to the association relationship between the first record and the fifth record, comprising:
[0082] canceling the association relationship between the first record and the second record;
[0083] establishing the association relationship between the first record and the fifth record.
[0084] Specifically, the association relationship between the first record and the second record is canceled, that is, the positioning information pointing to the second record in the calculation chain of the first record is deleted; the association relationship between the first record and the third record is established, that is, the positioning information pointing to the second record in the calculation chain of the first record is changed to the positioning information pointing to the fifth record.
[0085] In the embodiment, the association relationship between the first record and the second record is canceled, and the association relationship between the first record and the fifth record is established, so that the content of the first record is determined according to the content locked in the fifth record, thereby locking the value of the first record, and avoiding the change of the content of the first record in the data collaboration document where the first record is located.
[0086] Based on any of the above embodiments, in one embodiment, the value of the first record is locked according to the second record, comprising:
[0087] According to the content of the second record and the calculation chain of the first record, the content corresponding to the first record is obtained;
[0088] The content corresponding to the first record is replaced by the calculation chain of the first record;
[0089] The first record is set as uneditable.
[0090] Specifically, the second record is a real-time updated record, the content of the first record is determined according to the calculation result of the calculation chain, and the calculation of the calculation chain needs to use the content in the second record. Therefore, according to the content of the second record and the calculation chain of the first record, the content corresponding to the first record can be obtained. Then, the content corresponding to the first record is replaced by the calculation chain of the first record, that is, the first record is no longer stored in the form of a calculation chain, but directly stored in the form of a numerical value. In this way, the first record is no longer associated with other records, thereby realizing the locking of the first record. In addition, the first record can also be set as uneditable to avoid changing the first record by mistake.
[0091] In the embodiment, the content corresponding to the first record is determined according to the content of the second record and the calculation chain of the first record, and the content corresponding to the first record is replaced by the calculation chain, so that the first record is no longer associated with other records, thereby realizing the locking of the first record. In addition, the first record is set as uneditable to avoid changing the first record by mistake.
[0092] Based on any of the above embodiments, in one embodiment, after the first record is set as uneditable, the method further includes:
[0093] receiving a query instruction for the sixth record; wherein the sixth record is a record in the first document where the first record is located;
[0094] determining the storage mode of the sixth record;
[0095] in the case where the storage mode of the sixth record is numerical storage, according to the numerical value corresponding to the sixth record, a query result is obtained and returned;
[0096] in the case where the storage mode of the sixth record is calculation chain storage, according to the calculation chain of the sixth record and the associated value of the calculation chain of the sixth record, a query result is obtained and returned.
[0097] Specifically, after the first record is archived according to the data processing method, there are records stored in the form of numerical values and records stored in the form of calculation chains in the data collaboration document where the first record is located. Due to the different data storage modes in the data collaboration document, different query steps need to be performed when data is queried.
[0098] The sixth record is a record in the data collaboration document where the first record is located. It can be understood that the sixth record can be the same record as the first record or a different record. After receiving the query instruction for the sixth record, the storage mode of the sixth record is determined. The storage mode includes numerical storage and calculation chain storage (which can be understood as a calculation formula).
[0099] When the sixth record is stored in the numerical mode, the record is directly restored according to the corresponding stored numerical value as the query result and returned. It can be understood that the stored numerical value needs to be restored to obtain a record with actual meaning. For example, when the fourth record is stored, only the product number is stored. At this time, the specific product name needs to be determined according to the product number, and the specific product name is returned as part of the record.
[0100] When the storage mode of the sixth record is calculation chain storage, the query result is obtained and returned according to the calculation chain of the sixth record and the associated value of the calculation chain of the sixth record. Specifically, the positioning information of the associated record of the sixth record can be determined according to the calculation chain of the sixth record, and then the corresponding associated value is obtained according to the positioning information, and the associated value is used for calculation in the calculation chain to obtain the calculation result. Then, the calculation result is further restored to a record with actual meaning as the query result.
[0101] The embodiment determines the storage mode of the sixth record, and performs the corresponding step of obtaining the query result according to the storage mode of the sixth record, to accurately and conveniently obtain the query result.
[0102] Based on any of the above embodiments, in one embodiment, the storage mode of the sixth record is determined, including:
[0103] According to the identifier of the sixth record, the storage mode of the sixth record is determined in combination with the preset correspondence between the identifier and the storage mode.
[0104] Specifically, when storing the record, the "identifier" field can be set in the storage structure of the data record to identify the storage mode of the record, so as to accurately store and query the data record. For example, for a numerical storage record, the storage structure of the record can be set as: "identifier + data + data type". For example, for a calculation chain storage record, the storage structure of the record can be set as: "identifier + calculation chain + positioning information of associated record". The "identifier" can be set to a fixed length, and has a preset correspondence with the storage mode, for example, the identifier "001" corresponds to numerical storage, and the identifier "010" corresponds to calculation chain storage. According to the identifier of the sixth record, the storage mode of the sixth record can be determined in combination with the preset correspondence between the identifier and the storage mode.
[0105] According to the identifier of the sixth record and the preset correspondence relationship between the identifier and the storage mode, the storage mode of the sixth record is determined accurately, and data management confusion is avoided.
[0106] A data processing method provided by the application is described below through a preferred embodiment.
[0107] Suppose there are two tables: Table 1 (still referring to Figure 1 ) and Table 2 (still referring to Figure 2 ).
[0108] Record A in Table 1 (outbound table) is associated with record B in Table 2 (product table) and references the product name / unit price field in Table 2:
[0109] Figure 4 is a flowchart of the data processing method in a preferred embodiment of the application, as Figure 4 shown, after the archiving instruction for record A in Table 1 is obtained, record A is locked according to the following steps in the embodiment:
[0110] Step 1: Analyze record A;
[0111] This step needs to first detect whether record A has associated records. If there is no associated record, the fourth step is directly executed.
[0112] If there is an association, the association of record A needs to be obtained, the table ID and record ID (i.e., the positioning information of the associated record) of the associated record are obtained, and then the table ID and record ID parsed out are used for the second step.
[0113] Step 2: Generate a backup associated record;
[0114] From the table ID and record ID parsed out in the first step, record B in Table 2 that is associated is located.
[0115] A record C is copied in the product table with the current value of record B as a copy, and the current value data of record C and record B is kept consistent;
[0116] The record ID and table ID of record C are used as parameters for the third step.
[0117] Step 3: Modify the association relationship of record A (i.e., the reference relationship in Figure 4 );
[0118] The association relationship between record A in Table 1 and record B in Table 2 is removed;
[0119] The association relationship between record A in Table 1 and record C in Table 2 is established, and the record ID of record A and the record ID of record C are used as parameters for the fourth step.
[0120] Step 4: Set permissions;
[0121] Set the visibility of record C to invisible for all users;
[0122] Set the edit permission of record A to not editable for all users;
[0123] End.
[0124] By the above method, record A is successfully archived, and no change is made to table 1, and users can still understand the association of records through table 1. When the user modifies the data of record B in table 2, for example, the product name / unit price, the information in record A will not be modified synchronously, but other records will remain synchronized.
[0125] The data processing method provided by the application is described below by another preferred embodiment:
[0126] Suppose there are two tables: table 1 (still refer to Figure 1 ), table 2 (still refer to Figure 2 ).
[0127] Among them, record A in table 1 is associated with record B in table 2, and is associated with the product name / unit price field in table 2:
[0128] Figure 5 is the flowchart of the data processing method in another preferred embodiment of the application, as Figure 5 shown, after obtaining the archiving instruction of record A in table 1, record A is locked according to the following steps in this embodiment:
[0129] Step 1: Modify the storage mode of the association field (i.e., the field associated with other records) in record A;
[0130] Calculate the value corresponding to the association field in record A;
[0131] Change the association field in record A from the original storage calculation chain to storage as a numerical value.
[0132] Step 2: Set permissions.
[0133] Set the editable permission of record A to not editable for all users.
[0134] In this embodiment, when the user archives record A, the storage mode of the association field of record A is changed from storage of calculation chain to storage of numerical value and recording of its corresponding data type. When the user queries and reads data, the numerical value storage and calculation chain storage are distinguished by constant identification, and the corresponding record is restored according to the corresponding numerical value or calculation result.
[0135] By the method, record A is successfully archived, and when a user modifies data of record B in Table 1, for example, product name / unit price, the information in record A is not synchronously modified. In the embodiment, record A is archived as a value, so that the space occupied by data storage is reduced, and record A is ensured not to be changed with other records.
[0136] A data processing apparatus provided by the present application is described below, and the data processing apparatus described below can be correspondingly referred to the data processing method described above.
[0137] Figure 6 is a structural schematic diagram of a data processing apparatus provided by the present application, as shown in the figure, the apparatus comprises a determination module 61 and an archiving module 62. Figure 6 The determination module 61 is configured to determine a second record having an association relationship with a first record to be archived, wherein the second record is a real-time updated record.
[0138] The determination module 61 is configured to determine a second record having an association relationship with a first record to be archived, wherein the second record is a real-time updated record.
[0139] The archiving module 62 is configured to lock the value of the first record according to the second record.
[0140] In the embodiment, the second document is positioned according to the association relationship between the first document and the second document, and the content of the first record in the first document is locked according to the second record in the second document. The data that does not need to be synchronously changed in the data collaboration document is flexibly and accurately managed on the record level (granularity), and data management confusion is avoided.
[0141] Based on any of the above embodiments, in one embodiment, the apparatus further comprises:
[0142] The updating module is configured to synchronously change the content of a third record in the first document having an association relationship with a fourth record in the second document, in a case that the content of the fourth record changes, wherein the fourth record is at least other part data in the second document.
[0143] In the embodiment, in addition to locking the content of the first record in the first document according to the second record in the second document, the content of the third record in the first document is synchronously updated according to the fourth record in the second document, so that the user can flexibly set whether to update the data record in the collaboration data document according to the associated content on the single record level (granularity) according to the demand, and data management confusion is avoided.
[0144] Based on any of the above embodiments, in one embodiment, the determination module 61 comprises:
[0145] The first determining unit is configured to analyze the association relationship of the first record in the first document to obtain positioning information of the second record.
[0146] The second determining unit is configured to determine the second record according to the positioning information of the second record, and determine the second record having the association relationship with the first record in the second record.
[0147] In the embodiment, the association relationship of the first record is analyzed to obtain the positioning information of the second record, and the second record is accurately positioned.
[0148] Based on any of the above embodiments, in one embodiment, the archiving module 62 comprises:
[0149] The first archiving unit is configured to copy the content of the second record to obtain a fifth record;
[0150] The second archiving unit is configured to change the association relationship between the first record and the second record to the association relationship between the first record and the fifth record;
[0151] The third archiving unit is configured to set the fifth record as invisible, and / or set the first record as uneditable.
[0152] In the embodiment, the copy is established according to the content of the second record to obtain the fifth record, and then the first record is associated with the fifth record which is not updated in real time, so that the value of the first record is locked. By setting the fifth record as invisible, and / or setting the first record as uneditable, the situation that the fifth record is changed due to misoperation is avoided. In the embodiment, the first record still exists the association relationship, and the user can still understand the relationship between the records through the association relationship, which is convenient for query.
[0153] Based on any of the above embodiments, in one embodiment, the archiving module 62 comprises:
[0154] The fourth archiving unit is configured to copy the content of the second record to obtain a seventh record; wherein the seventh record is used for real-time updating;
[0155] The fifth archiving unit is configured to change the association relationship between the eighth record and the second record to the association relationship between the eighth record and the seventh record; wherein the eighth record is a record having the association relationship with the second record except the first record;
[0156] The sixth archiving unit is configured to set the second record as uneditable, and / or set the first record as uneditable.
[0157] In the embodiment, the copy is established according to the content of the second record to obtain the seventh record, and the association relationship between the eighth record and the second record is changed to the association relationship between the eighth record and the seventh record, so that the content corresponding to the second record can still be equivalent to realize real-time updating. By setting the second record associated with the first record as uneditable, the adjusted second record is no longer updated in real time, thereby indirectly locking the content of the first record. By setting the first record as uneditable, the situation that the first record is changed due to misoperation is avoided.
[0158] Based on any of the above embodiments, in one embodiment, the second archiving unit comprises:
[0159] The releasing subunit is configured to release the association relationship between the first record and the second record.
[0160] The establishing subunit is configured to establish the association relationship between the first record and the fifth record.
[0161] In the embodiment, the association relationship between the first record and the second record is released, and the association relationship between the first record and the fifth record is established, so that the content of the first record is determined according to the content locked in the fifth record, thereby locking the value of the first record and avoiding the change of the content of the first record in the data collaboration document.
[0162] Based on any of the above embodiments, in one embodiment, the archiving module 62 comprises:
[0163] The fourth archiving unit is configured to obtain the content corresponding to the first record according to the content of the second record and the calculation chain of the first record.
[0164] The fifth archiving unit is configured to replace the calculation chain of the first record with the content corresponding to the first record.
[0165] The sixth archiving unit is configured to set the first record as uneditable.
[0166] In the embodiment, the content corresponding to the first record is determined according to the content of the second record and the calculation chain of the first record, and the calculation chain is replaced with the content corresponding to the first record, so that the first record is no longer associated with other records, thereby realizing the locking of the first record. By setting the first record as uneditable, the change of the first record due to misoperation is avoided.
[0167] Based on any of the above embodiments, in one embodiment, the device further comprises a query module, which comprises:
[0168] The first query unit is configured to receive a query instruction for the sixth record. The fourth record is a record in a data table in which the first record is located.
[0169] The second query unit is configured to determine the storage mode of the sixth record.
[0170] The third query unit is configured to, in the case that the storage mode of the sixth record is numerical storage, obtain a query result according to the numerical value stored in the sixth record and return the query result.
[0171] The fourth query unit is configured to, in the case that the storage mode of the sixth record is calculation chain storage, obtain a query result according to the calculation chain of the sixth record and the associated value of the calculation chain of the sixth record and return the query result.
[0172] The embodiment determines the storage mode of the sixth record, and performs the corresponding step of obtaining the query result according to the storage mode of the sixth record, so that the query result is accurately and conveniently obtained.
[0173] In any of the above embodiments, in an embodiment, the second query unit is further configured to:
[0174] The storage mode of the sixth record is determined according to the identifier of the sixth record and a preset correspondence between the identifier and the storage mode.
[0175] In the embodiment, the storage mode of the sixth record is accurately determined according to the identifier of the sixth record and the preset correspondence between the identifier and the storage mode, so that data management confusion is avoided.
[0176] Figure 7 An example of an entity structure diagram of an electronic device is shown in FIG. 1. Figure 7 As shown in FIG. 1, the electronic device can include a processor 710, a communications interface 720, a memory 730, and a communications bus 740, wherein the processor 710, the communications interface 720, and the memory 730 can communicate with each other through the communications bus 740. The processor 710 can invoke a logical instruction in the memory 730 to execute all or part of the steps of the data processing method provided above, and the method includes determining a first document and a second document having an association relationship with the first document, and in the case that the content of a second record in the second document changes, the content of a first record in the first document having an association relationship with the second record remains unchanged, wherein the second record is at least part of the data in the second document.
[0177] In addition, the logic instructions in the memory 730 described above can be implemented in the form of software function units and sold or used as independent products, and can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the parts that contribute to the prior art or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the embodiments of the method of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0178] In another aspect, the present application also provides a computer program product, which comprises a computer program stored on a computer readable storage medium, and the computer program comprises program instructions, and when the program instructions are executed by a computer, the computer can execute all or part of the steps of the data processing method provided above, and the method comprises: determining a first document and a second document having an association relationship with the first document; in a case where the content of a second record in the second document changes, the content of a first record in the first document having an association relationship with the second record remains unchanged; wherein the second record is at least part of the data in the second document.
[0179] In another aspect, the present application also provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement all or part of the steps of the data processing method provided above, and the method comprises: determining a first document and a second document having an association relationship with the first document; in a case where the content of a second record in the second document changes, the content of a first record in the first document having an association relationship with the second record remains unchanged; wherein the second record is at least part of the data in the second document.
[0180] The device embodiments described above are only schematic, and the units shown as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place, or distributed on multiple network units. Part or all of the modules can be selected to achieve the purpose of the embodiment according to actual needs. Those skilled in the art can understand and implement without creative labor.
[0181] Those skilled in the art can clearly understand the technical solutions of the various embodiments from the above description of the embodiments, and the various embodiments can be implemented by means of software with the necessary general hardware platforms, and of course, can also be implemented by hardware. Based on such understanding, the above technical solutions, essentially or in other words, the part of the prior art that makes a contribution, can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, and the like, and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0182] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for some technical features therein; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A data processing method, characterized by, The method comprises: determining a first document and a second document having an association relationship with the first document; in the case that the content of a second record in the second document changes, the content of a first record in the first document having an association relationship with the second record remains unchanged; wherein the second record is at least part of the data in the second document, the first record is the content locked after receiving an archiving instruction, and does not change with the real-time update of the content of the second record, wherein the association between the first record and the second record is realized in the form of a calculation chain.
2. The data processing method according to claim 1, characterized in that, The method further comprises: in the case that the content of a fourth record in the second document changes, the content of a third record in the first document having an association relationship with the fourth record changes synchronously; wherein the fourth record is at least other part of the data in the second document.
3. The data processing method of claim 1, wherein, The determination of the first document and the second document having an association relationship with the first document comprises: parsing the association relationship of the first record in the first document to obtain the positioning information of the second record; determining the second document according to the positioning information of the second record, and determining the second record having an association relationship with the first record in the second document.
4. The data processing method of claim 1, wherein, The case that the content of the second record in the second document changes, the content of the first record in the first document having an association relationship with the second record remains unchanged, comprises: copying the content of the second record to obtain a fifth record; changing the association relationship between the first record and the second record to the association relationship between the first record and the fifth record; setting the fifth record to be invisible, and / or setting the first record to be uneditable.
5. The data processing method according to claim 4, characterized in that, The changing of the association relationship between the first record and the second record to the association relationship between the first record and the fifth record comprises: canceling the association relationship between the first record and the second record; establishing the association relationship between the first record and the fifth record.
6. The data processing method of claim 1, wherein, The case that the content of the second record in the second document changes, the content of the first record in the first document having an association relationship with the second record remains unchanged, comprises: obtaining the corresponding content of the first record according to the content of the second record and the calculation chain of the first record; replacing the calculation chain of the first record with the corresponding content of the first record; setting the first record to be uneditable.
7. The data processing method according to claim 6, characterized in that, After setting the first record to be uneditable, the method further comprises: receiving a query instruction for a sixth record; wherein the sixth record is a record in the first document where the first record is located; determining the storage mode of the sixth record; in the case that the storage mode of the sixth record is numerical storage, obtaining a query result according to the corresponding stored numerical value of the sixth record and returning; in the case that the storage mode of the sixth record is calculation chain storage, obtaining a query result according to the calculation chain of the sixth record and the associated value of the calculation chain of the sixth record and returning.
8. The data processing method according to claim 7, characterized in that, The determining the storage mode of the sixth record comprises: According to the identifier of the sixth record, combining a preset corresponding relationship between the identifier and the storage mode, the storage mode of the sixth record is determined.
9. A data processing apparatus, characterized by, The device is used for implementing the data processing method in any one of claims 1 to 8, and the device comprises: A determining module is configured to determine a first document and a second document having an association relationship with the first document; An archiving module is configured to maintain the content of a first record in the first document unchanged in a case where the content of a second record in the second document changes, the second record being at least part of data in the second document, and the first record being content locked after receiving an archiving instruction and not being changed with real-time updating of the content of the second record.
10. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor implements the data processing method in any one of claims 1 to 8 when executing the program.
11. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program implements the data processing method in any one of claims 1 to 8 when executed by the processor.
Citation Information
Patent Citations
Information processing method, device, terminal and storage medium
CN113239049A
Data processing method and device and electronic equipment
CN113868260A