Data field change processing method, electronic equipment and storage medium
By generating and storing change table information, the problem of field-level changes is not obvious when the data table is wide, the detailed display of field-level historical change data and the support of the approval process is realized, and the transparency and approval efficiency of data management are improved.
Patent Information
- Application Number
- CN202411333103.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2024-12-13
AI Technical Summary
The prior art cannot visually display field-level changes when the width of the data table is wide, and cannot view field-level historical change data and support approval before formal change can be officially changed.
By obtaining the original target table information before the change, generating the change table information. If the preset conditions are met, replace the original table and store it in the preset position. It supports the different change record scopes in the approval stage and the final stage. The approval is automatically passed and Enter the official change of historical data.
It realizes detailed information viewing of field-level historical change data, supports multi-dimensional conditional query, reduces code intrusion, and ensures the review ability of high-authorized managers.
Smart Images

Figure CN119127845A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data field change, and in particular to a data field change processing method, electronic equipment and storage medium. Background Art
[0002] When operators make data changes on the management system, they need to make change records for important data so that the reviewers can quickly and intuitively view the changes and facilitate subsequent tracing or traceability. However, row data is stored in the version number dimension, and it is not possible to intuitively display field-level changes to managers. Especially when the width of the data table is wide, if the same data has been changed multiple times, it will be impossible to intuitively distinguish which fields have been changed and which have not. It is impossible to view field-level historical change data (change time, changer, change channel, etc.), as well as which fields have been changed in the same batch of changes, and it does not support the storage of process data that requires approval before the changes can take effect. Summary of the invention
[0003] In view of the above technical problems, the technical solution adopted by the present invention is: According to a first aspect of the present application, a data field change processing method is provided, the method comprising the following steps: S100, in response to a user's change action on a target original table, obtain target original table information Q before the change; wherein Q=(Q_id, Q_no, Q_name); Q_id is the ID of the target original table, Q_no is the number of the target original table, and Q_name is the name of the target original table; the target original table is an original table changed by any user; the target original table includes a plurality of rows and a plurality of columns of data; each row corresponds to a target data subject name; S200, changing Q_id of Q to Q_applid to obtain target change table information Q' corresponding to Q; wherein Q_applid is the ID of Q'; S300, obtaining each change data corresponding to each target data subject name of the target original table corresponding to Q, and the change data subject name corresponding to the target data subject name, so as to obtain the change data table A corresponding to Q=(A 1 , A 2 , …, A i , …, A n ), i=1, 2,...,n; among them, A i is the row corresponding to the i-th changed data corresponding to Q, and n is the number of changed data corresponding to Q; A i Including Q_applid and A i The corresponding attributes; S400, if A meets the preset change condition, use A to replace the target original table corresponding to Q; S500, storing A in a preset storage location.
[0004] Furthermore, after step S400 and before step S500, the method further includes the following steps: S410: If A does not meet the preset change conditions, the target original table corresponding to Q is not changed.
[0005] Furthermore, A i =(A i,BIZID , A i,FLDID , A i,FLDNAME , A i,OLDVAL , A i,NEWVAL , A i,TYPE , Q_applid); where A i,BIZID , A i,FLDID , A i,FLDNAME , A i,OLDVAL , A i,NEWVAL and A i,TYPE The following are the name of the change subject of the i-th change data corresponding to Q, the ID of the change data, the name of the change data, the original data corresponding to the change data, the change data and the change type; Furthermore, step S400 includes the following steps: S420, A i A in i,BIZID Change to the target data subject name and change Q_applid to Q_id to obtain the intermediate change data table A'; S430, replace Q with A'.
[0006] Further, step S500 includes the following steps: S510, traverse A, if A i,OLDVAL Not empty and A i,NEWVAL If it is empty, then A i,BIZID Modify the corresponding value; S511, if A i,OLDVAL With A i,NEWVAL are not empty, and A i,OLDVAL With A i,NEWVAL If they are different, then A i,BIZID Modified to A i The corresponding original value; S512, if A i,OLDVAL is empty, and A i,NEWVAL If it is not empty, then A i,BIZID Modified to A i The corresponding original value; S513, change Q_applid to Q_id.
[0007] Further, step S500 includes the following steps: S520, traverse A, if A i The change type is the default deletion type, A i,OLDVAL Not empty and A i,NEWVAL If it is empty, then A i,BIZID The corresponding value is modified; otherwise, determine A i The corresponding data is abnormal; S521, if A i The change type is the preset change type, A i,OLDVAL With A i,NEWVAL are not empty, and A i,OLDVAL With A i,NEWVAL If they are different, then A i,BIZID Modified to A i The corresponding original value; otherwise, determine A i The corresponding data is abnormal; S522, if A i The change type is the default add type, A i,OLDVAL is empty, and A i,NEWVAL If it is not empty, then A i,BIZID Modified to A i The corresponding original value; otherwise, determine A i The corresponding data is abnormal.
[0008] According to another aspect of the present application, a non-transitory computer-readable storage medium is also provided, in which at least one instruction or at least one program is stored, and the at least one instruction or at least one program is loaded and executed by a processor to implement the above-mentioned data field change processing method.
[0009] According to another aspect of the present application, an electronic device is provided, including a processor and the above-mentioned non-transitory computer-readable storage medium.
[0010] The present invention has at least the following beneficial effects: The data field change processing method of the present invention, in response to the user's change action on the target original table, obtains the target original table information Q before the change; changes Q_id of Q to Q_applid to obtain the target change table information Q' corresponding to Q; obtains each change data corresponding to each target data subject name of the target original table corresponding to Q, and the change data subject name corresponding to the target data subject name, to obtain the change data table A corresponding to Q; if A meets the preset change conditions, use A to replace the target original table corresponding to Q; store A to a preset storage location; for core data that needs to be approved before it can be changed, it supports displaying different change record ranges in the approval stage and the final state stage. In the approval stage, the approver is more concerned about the content of this change, and the change information is displayed with the current change content; approval rejection does not affect the officially effective data; approval is automatically incorporated into the formal change history data, which is convenient for high-authority managers to review the historical change content.
[0011] Furthermore, through the method of the present invention, detailed information of field-level historical change data, such as change time, change person, change channel, etc., can be viewed; it supports querying historical change content with multi-dimensional conditions such as change batch, change time, change person, etc.; SDK encapsulation, after the business system is introduced, it can be used in various forms such as annotations and method calls, so that developers only need to focus on business logic, and the code intrusion is low. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0013] Figure 1 The present invention provides a flowchart of a method for processing data field changes according to an embodiment of the present invention. DETAILED DESCRIPTION
[0014] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0015] It should be noted that, based on the present disclosure, those skilled in the art should understand that an aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number of aspects described herein can be used to implement a device and / or practice a method. In addition, other structures and / or functionalities other than one or more of the aspects described herein can be used to implement this device and / or practice this method.
[0016] The following will refer to Figure 1 The flowchart of the data field change processing method shown in the figure introduces a data field change processing method.
[0017] The data field change processing method may include the following steps: S100, in response to the user's change action on the target original table, obtain the target original table information Q before the change; wherein, Q=(Q_id, Q_no, Q_name); Q_id is the ID of the target original table, Q_no is the number of the target original table, and Q_name is the name of the target original table; the target original table is the original table changed by any user; the target original table includes a number of rows and a number of columns of data; each row corresponds to a target data subject name.
[0018] In this embodiment, the user can be an operator or a channel party. The target original table is an effective data table, and the target original table is preset with an ID, number and name; the target original table includes several rows, each row corresponds to a data subject, for example: the ID of the target original table is classid001, the number is class001, and the name is Class 2, Grade 3; the data subject can be understood as a data object, for example: the original table with the ID classid001 includes a data subject with the id studentid001, the data subject number student001, and the data subject name Zhang San; before the user changes the original data table, there is a change action, for example: a change start button can be set, and the user clicks the button to start executing the change of the original table.
[0019] S200, changing Q_id of Q to Q_applid to obtain target change table information Q' corresponding to Q; wherein Q_applid is the ID of Q'.
[0020] In this embodiment, before the user changes the data in the target original table, the target original table can be copied, and then the ID of the target original table can be changed from Q_id to Q_applid, thereby generating target change table information Q' corresponding to Q.
[0021] S300, obtaining each change data corresponding to each target data subject name of the target original table corresponding to Q, and the change data subject name corresponding to the target data subject name, so as to obtain the change data table A corresponding to Q=(A 1 , A 2 , …, A i , …, A n ), i=1, 2,...,n; among them, A i is the row corresponding to the i-th changed data corresponding to Q, and n is the number of changed data corresponding to Q; A i Including Q_applid and A i The corresponding attributes.
[0022] In this embodiment, when the user changes the original table, several rows of data in the original table may be changed. Q and Q' may be compared row by row to determine which rows of data the user has changed. It should be noted that when the user changes the row data in Q, one column of data in a row of data may be changed, or multiple columns of data may be changed. Therefore, the dimension of each changed data in A is specific data, not the dimension of the row data. A i The corresponding attributes can be understood as different types of data, such as: the number of the data subject, the name of the data subject, etc.
[0023] S400: If A meets the preset change condition, A is used to replace the target original table corresponding to Q.
[0024] In this embodiment, after the user makes a change to Q, he needs to submit it for review. If the review is passed, it means that A meets the preset change conditions, and A can be used to replace the target original table corresponding to Q.
[0025] Furthermore, after step S400 and before step S500, the method further includes the following steps: S410: If A does not meet the preset change conditions, the target original table corresponding to Q is not changed.
[0026] In this embodiment, after the user changes Q, he needs to submit it for review. If the review fails, it means that A does not meet the preset change conditions. At this time, Q will not be changed.
[0027] Furthermore, A i =(A i,BIZID , A i,FLDID , A i,FLDNAME , A i,OLDVAL , A i,NEWVAL , A i,TYPE , Q_applid); where A i,BIZID , A i,FLDID , Ai,FLDNAME , A i,OLDVAL , A i,NEWVAL and A i,TYPE They are, in order, the name of the change subject of the i-th change data corresponding to Q, the ID of the change data, the name of the change data, the original data corresponding to the change data, the change data and the change type.
[0028] In this embodiment, each data subject corresponds to several attributes. After the ID of Q is changed, Q' is generated. Subsequent data changes are based on Q'. Q' is equivalent to a data change application form, which contains several attributes corresponding to the changed data. For example, if the original data of a certain data is changed from Zhang San to Li Si, then the corresponding A i,OLDVAL For Zhang San, A i,NEWVAL For Li Si.
[0029] Furthermore, step S400 includes the following steps: S420, A i A in i,BIZID Change to the target data subject name and change Q_applid to Q_id to get the intermediate change data table A'.
[0030] S430, replace Q with A'.
[0031] In this embodiment, it can be understood that the above data change is based on Q', and the ID of Q' has been changed. Therefore, it is necessary to change the ID of Q', that is, Q_applid, to Q_id, and then replace Q with A' to complete the data change.
[0032] Furthermore, before Q_applid is changed to Q_id, a change data table may be stored to facilitate the user to view the data change process later.
[0033] S500, storing A in a preset storage location.
[0034] Further, step S500 includes the following steps: S510, traverse A, if A i,OLDVAL Not empty and A i,NEWVAL If it is empty, then A i,BIZID Modify the corresponding value.
[0035] In this embodiment, if A i,OLDVAL Not empty and A i,NEWVAL Empty, indicating A i The corresponding original data is empty, and the changed data has a value, which means that the data has been deleted. In this case, A i,BIZIDThe corresponding value is modified, and the specific data deleted can be checked through the stored change data table later.
[0036] S511, if A i,OLDVAL With A i,NEWVAL are not empty, and A i,OLDVAL With A i,NEWVAL If they are different, then A i,BIZID Modified to A i The corresponding original value.
[0037] In this embodiment, if A i,OLDVAL With A i,NEWVAL are not empty, and A i,OLDVAL With A i,NEWVAL Different, indicating that the original data has been replaced, in this case A i,BIZID Modified to A i The corresponding original value can be viewed directly through the currently effective data table to view the changed data. At the same time, the stored change data table can also be viewed to determine the data before the change.
[0038] S512, if A i,OLDVAL is empty, and A i,NEWVAL If it is not empty, then A i,BIZID Modified to A i The corresponding original value.
[0039] In this embodiment, if A i,OLDVAL is empty, and A i,NEWVAL If it is not empty, it means that data has been added, then A i,BIZID Modified to A i The corresponding original value; you can then directly view the added data through the currently effective data table.
[0040] S513, change Q_applid to Q_id.
[0041] In this embodiment, Q_applid is used to distinguish Q' from Q during the data change process. After the user completes the data change on the data table, Q_applid is changed to Q_id for subsequent viewing.
[0042] Further, step S500 includes the following steps: S520, traverse A, if A i The change type is the default deletion type, A i,OLDVAL Not empty and A i,NEWVAL If it is empty, then A i,BIZID The corresponding value is modified; otherwise, determine A i The corresponding data is abnormal.
[0043] S521, if Ai The change type is the preset change type, A i,OLDVAL With A i,NEWVAL are not empty, and A i,OLDVAL With A i,NEWVAL If they are different, then A i,BIZID Modified to A i The corresponding original value; otherwise, determine A i The corresponding data is abnormal.
[0044] S522, if A i The change type is the default add type, A i,OLDVAL is empty, and A i,NEWVAL If it is not empty, then A i,BIZID Modified to A i The corresponding original value; otherwise, determine A i The corresponding data is abnormal.
[0045] In this embodiment, a change type field is preset. By comparing the specific situation of the changed data with the corresponding change type, it can be determined whether the changed data has any abnormality, thereby ensuring the accuracy of the data change.
[0046] The data field change processing method of this embodiment, in response to the user's change action on the target original table, obtains the target original table information Q before the change; changes Q_id of Q to Q_applid to obtain the target change table information Q' corresponding to Q; obtains each change data corresponding to each target data subject name of the target original table corresponding to Q, and the change data subject name corresponding to the target data subject name, to obtain the change data table A corresponding to Q; if A meets the preset change conditions, use A to replace the target original table corresponding to Q; store A to a preset storage location; for core data that needs to be approved before it can be changed, it supports displaying different change record ranges in the approval stage and the final state stage. In the approval stage, the approver is more concerned about the content of this change, and the change information is displayed with the current change content; approval rejection does not affect the officially effective data; approval is automatically incorporated into the formal change history data, which is convenient for high-authority managers to review the historical change content.
[0047] Furthermore, through the method of the present invention, detailed information of field-level historical change data, such as change time, change person, change channel, etc., can be viewed; it supports querying historical change content with multi-dimensional conditions such as change batch, change time, change person, etc.; SDK encapsulation, after the business system is introduced, it can be used in various forms such as annotations and method calls, so that developers only need to focus on business logic, and the code intrusion is low.
[0048] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0049] An embodiment of the present invention also provides a non-transitory computer-readable storage medium, which can be set in an electronic device to store at least one instruction or at least one program related to implementing a method in a method embodiment. The at least one instruction or the at least one program is loaded and executed by the processor to implement the method provided in the above embodiment.
[0050] The program product may adopt any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0051] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0052] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0053] Program code for performing the operations of the present application may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., using an Internet service provider to connect through the Internet).
[0054] An embodiment of the present invention further provides an electronic device, comprising a processor and the aforementioned non-transitory computer-readable storage medium.
[0055] The electronic device is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0056] The electronic device is presented in the form of a general-purpose computing device. The components of the electronic device may include, but are not limited to: the at least one processor mentioned above, the at least one memory mentioned above, and a bus connecting different system components (including the memory and the processor).
[0057] The memory stores program codes, which can be executed by the processor, so that the processor executes the steps in various embodiments described in this specification.
[0058] The memory may include readable media in the form of volatile memory, such as random access memory (RAM) and / or cache memory, and may further include read only memory (ROM).
[0059] The memory may also include a program / utility having a set (at least one) of program modules, such program modules including but not limited to: an operating system, one or more application programs, other program modules and program data, each of which or some combination may include an implementation of a network environment.
[0060] The bus may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures.
[0061] The electronic device may also communicate with one or more external devices (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may communicate with one or more devices that enable a user to interact with the electronic device, and / or may communicate with any device (e.g., routers, modems, etc.) that enables the electronic device to communicate with one or more other computing devices. Such communication may be performed through an input / output (I / O) interface. Furthermore, the electronic device may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) through a network adapter. The network adapter communicates with other modules of the electronic device through a bus. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0062] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0063] An embodiment of the present invention further provides a computer program product, which includes program code. When the program product is run on an electronic device, the program code is used to enable the electronic device to execute the steps of the method according to various exemplary embodiments of the present invention described above in this specification.
[0064] Although some specific embodiments of the present invention have been described in detail by way of example, it should be understood by those skilled in the art that the above examples are only for illustration, not for limiting the scope of the present invention. It should also be understood by those skilled in the art that various modifications may be made to the embodiments without departing from the scope and spirit of the present invention.
Claims
1. A data field change processing method, characterized in that: The method comprises the following steps: S100, in response to a user's change action on a target original table, obtain target original table information Q before the change; wherein Q=(Q_id, Q_no, Q_name); Q_id is the ID of the target original table, Q_no is the number of the target original table, and Q_name is the name of the target original table; the target original table is an original table changed by any user; the target original table includes a plurality of rows and a plurality of columns of data; each row corresponds to a target data subject name; S200, changing Q_id of Q to Q_applid to obtain target change table information Q' corresponding to Q; wherein Q_applid is the ID of Q'; S300, obtaining each change data corresponding to each target data subject name of the target original table corresponding to Q, and the change data subject name corresponding to the target data subject name, so as to obtain the change data table A corresponding to Q = (A1, A2, ..., A i , …, A n ), i=1, 2,...,n; among them, A i is the row corresponding to the i-th changed data corresponding to Q, and n is the number of changed data corresponding to Q; A i Including Q_applid and A i The corresponding attributes; S400, if A meets the preset change condition, use A to replace the target original table corresponding to Q; S500, storing A in a preset storage location.
2. The data field change processing method according to claim 1, characterized in that: After step S400 and before step S500, the method further includes the following steps: S410: If A does not meet the preset change conditions, the target original table corresponding to Q is not changed.
3. The data field change processing method according to claim 1, characterized in that: A i =(A i,BIZID ,A i,FLDID ,A i,FLDNAME ,A i,OLDVAL ,A i,NEWVAL ,A i,TYPE ,Q_applid); Among them, A i,BIZID , A i,FLDID , A i,FLDNAME , A i,OLDVAL , A i,NEWVAL and A i,TYPE They are, in order, the name of the change subject of the i-th change data corresponding to Q, the ID of the change data, the name of the change data, the original data corresponding to the change data, the change data and the change type.
4. The data field change processing method according to claim 3, characterized in that: Step S400 includes the following steps: S420, A i A i,BIZID Change to the target data subject name and change Q_applid to Q_id to obtain the intermediate change data table A'; S430, replace Q with A'.
5. The data field change processing method according to claim 3, characterized in that: Step S500 includes the following steps: S510, traverse A, if A i,OLDVAL Not empty and A i,NEWVAL If it is empty, then A i,BIZID Modify the corresponding value; S511, if A i,OLDVAL With A i,NEWVAL are not empty, and A i,OLDVAL With A i,NEWVAL If they are different, then A i,BIZID Modified to A i The corresponding original value; S512, if A i,OLDVAL is empty, and A i,NEWVAL If it is not empty, then A i,BIZID Modified to A i The corresponding original value; S513, change Q_applid to Q_id.
6. The data field change processing method according to claim 3, characterized in that: Step S500 includes the following steps: S520, traverse A, if A i The change type is the default deletion type, A i,OLDVAL Not empty and A i,NEWVAL If it is empty, then A i,BIZID The corresponding value is modified; otherwise, determine A i The corresponding data is abnormal; S521, if A i The change type is the preset change type, A i,OLDVAL With A i,NEWVAL are not empty, and A i,OLDVAL With A i,NEWVAL If they are different, then A i,BIZID Modified to A i The corresponding original value; otherwise, determine A i The corresponding data is abnormal; S522, if A i The change type is the default add type, A i,OLDVAL is empty, and A i,NEWVAL If it is not empty, then A i,BIZID Modified to A i The corresponding original value; otherwise, determine A i The corresponding data is abnormal.
7. A non-transitory computer-readable storage medium, wherein at least one instruction or at least one program is stored in the storage medium, characterized in that: The at least one instruction or the at least one program is loaded and executed by the processor to implement the data field change processing method as described in any one of claims 1-6.
8. An electronic device, characterized in that: Includes a processor and the non-transitory computer-readable storage medium of claim 7.
