CN118820203A - Data modification method, device, equipment and medium applied to database - Google Patents
Data modification method, device, equipment and medium applied to database Download PDFInfo
- Publication number
- CN118820203A CN118820203A CN202410577948.7A CN202410577948A CN118820203A CN 118820203 A CN118820203 A CN 118820203A CN 202410577948 A CN202410577948 A CN 202410577948A CN 118820203 A CN118820203 A CN 118820203A
- Authority
- CN
- China
- Prior art keywords
- modification
- data
- statement
- executed
- rollback
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/21—Design, administration or maintenance of databases
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1448—Management of the data involved in backup or backup restore
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2282—Tablespace storage structures; Management thereof
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/242—Query formulation
- G06F16/2433—Query languages
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Software Systems (AREA)
- Quality & Reliability (AREA)
- Mathematical Physics (AREA)
- Computational Linguistics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本发明提供一种应用于数据库的数据修改方法、装置、设备及介质,用以解决相关技术中数据库数据修改的回退操作耗时长,回退后数据不确定性高的技术问题,该方法包括:获取针对数据库的待执行修改语句;根据待执行修改语句中的数据修改对象在数据库中查询和备份数据修改对象对应的初始数据,得到备份数据;根据备份数据生成待执行修改语句对应的回退语句;执行待执行修改语句对应的数据修改操作;当触发待执行修改语句的修改回退条件时,执行回退语句对应的数据回退操作;基于备份数据对数据回退操作对应的回退数据进行数据稽核。
The present invention provides a data modification method, device, equipment and medium applied to a database, which are used to solve the technical problems in the related art that the rollback operation of database data modification is time-consuming and the uncertainty of data after rollback is high. The method comprises: obtaining a modification statement to be executed for the database; querying and backing up the initial data corresponding to the data modification object in the database according to the data modification object in the modification statement to be executed, and obtaining the backup data; generating a rollback statement corresponding to the modification statement to be executed according to the backup data; executing the data modification operation corresponding to the modification statement to be executed; when the modification rollback condition of the modification statement to be executed is triggered, executing the data rollback operation corresponding to the rollback statement; and performing data audit on the rollback data corresponding to the data rollback operation based on the backup data.
Description
技术领域Technical Field
本发明涉及数据处理技术领域,尤其涉及一种应用于数据库的数据修改方法、装置、设备及介质。The present invention relates to the field of data processing technology, and in particular to a data modification method, device, equipment and medium applied to a database.
背景技术Background Art
在日常的业务支撑系统运维工作中,涉及多批次的数据库数据修改时,主要通过手工编写SQL(Structured Query Language,结构化查询语言)语句后提交数据库执行,或提交给具备数据验证功能的数据修改工具执行。In the daily operation and maintenance of business support systems, when multiple batches of database data are modified, SQL (Structured Query Language) statements are mainly written manually and submitted to the database for execution, or submitted to a data modification tool with data verification function for execution.
现有的数据修改工具可对修改方案中SQL语句进行逐条校验,简单验证每条语句的语法是否正确。在涉及执行修改大量SQL语句的场景下,经常将多条SQL语句打包一起执行修改,若在执行修改过程中,因网络、主机、数据库故障等出现异常中断或者在用户需要对之前修改的数据进行回退恢复时,需要对已经执行修改的数据进行部分或全部恢复。但是,现有的技术方案中当数据库的数据修改执行异常时须人工介入处理,而且修改方案中的SQL语句越多,就会使得数据修改的回退方案越复杂,导致数据修改的回退操作耗时长,回退后数据不确定性高。Existing data modification tools can check each SQL statement in the modification plan one by one, and simply verify whether the syntax of each statement is correct. In scenarios involving the execution and modification of a large number of SQL statements, multiple SQL statements are often packaged together for modification. If an abnormal interruption occurs during the modification process due to network, host, or database failure, or when the user needs to roll back the previously modified data, it is necessary to partially or fully restore the data that has been modified. However, in the existing technical solutions, when the data modification of the database is executed abnormally, manual intervention is required, and the more SQL statements in the modification plan, the more complicated the data modification rollback plan will be, resulting in a long time-consuming data modification rollback operation and high uncertainty in the data after the rollback.
发明内容Summary of the invention
本发明提供一种应用于数据库的数据修改方法、装置、设备及介质,用以解决相关技术中数据库数据修改的回退操作耗时长,回退后数据不确定性高的技术问题。The present invention provides a data modification method, device, equipment and medium applied to a database, so as to solve the technical problems in the related art that the rollback operation of database data modification is time-consuming and the uncertainty of the data after the rollback is high.
第一方面,本发明实施例提供一种应用于数据库的数据修改方法,该方法包括:In a first aspect, an embodiment of the present invention provides a data modification method applied to a database, the method comprising:
获取针对数据库的待执行修改语句;Get the modification statements to be executed on the database;
根据待执行修改语句中的数据修改对象在数据库中查询和备份数据修改对象对应的初始数据,得到备份数据;According to the data modification object in the modification statement to be executed, the initial data corresponding to the data modification object is queried and backed up in the database to obtain the backup data;
根据备份数据生成待执行修改语句对应的回退语句;Generate a rollback statement corresponding to the modification statement to be executed based on the backup data;
执行待执行修改语句对应的数据修改操作;Execute the data modification operation corresponding to the modification statement to be executed;
当触发待执行修改语句的修改回退条件时,执行回退语句对应的数据回退操作;When the modification rollback condition of the modification statement to be executed is triggered, the data rollback operation corresponding to the rollback statement is executed;
基于备份数据对数据回退操作对应的回退数据进行数据稽核。Perform data audit on the rollback data corresponding to the data rollback operation based on the backup data.
在一种可能实施的方式中,本发明实施例提供的方法中,根据待执行修改语句中的数据修改对象在数据库中查询和备份数据修改对象对应的初始数据,得到备份数据,包括:In a possible implementation, in the method provided by the embodiment of the present invention, querying and backing up the initial data corresponding to the data modification object in the database according to the data modification object in the modification statement to be executed to obtain the backup data includes:
识别并提取待执行修改语句中关于数据修改的关键信息;Identify and extract key information about data modification in the modification statement to be executed;
根据关键信息在数据库中查询和备份关键信息对应的初始数据,得到备份数据。The initial data corresponding to the key information is queried and backed up in the database according to the key information to obtain the backup data.
在一种可能实施的方式中,本发明实施例提供的方法中,识别并提取待执行修改语句中关于数据修改的关键信息,包括:In a possible implementation, in the method provided by the embodiment of the present invention, identifying and extracting key information about data modification in the modification statement to be executed includes:
对待执行修改语句进行语句洗练,剔除待执行修改语句中的注释部分;Clean the modified statements to be executed and remove the comments in them.
将待执行修改语句与各语句句型对应的规则表达式进行匹配,根据匹配结果确定待执行修改语句的语句句型;Match the modification statement to be executed with the regular expressions corresponding to each statement pattern, and determine the statement pattern of the modification statement to be executed according to the matching result;
按照待执行修改语句的语句句型对应的提取规则提取待执行修改语句中关于数据修改的关键信息。Extract key information about data modification in the modification statement to be executed according to the extraction rules corresponding to the sentence pattern of the modification statement to be executed.
在一种可能实施的方式中,本发明实施例提供的方法中,关键信息包括数据修改对象的目标修改库表、库表别名、where条件子句以及修改字段。In a possible implementation, in the method provided by an embodiment of the present invention, the key information includes the target modification library table of the data modification object, the library table alias, the where condition clause, and the modification field.
在一种可能实施的方式中,本发明实施例提供的方法中,根据关键信息在数据库中查询和备份关键信息对应的初始数据,得到备份数据,包括:In a possible implementation manner, in the method provided by the embodiment of the present invention, querying and backing up initial data corresponding to the key information in a database according to the key information to obtain backup data includes:
提取关键信息中目标修改库表的库表基础信息;Extract the basic information of the target modified library table in the key information;
根据关键信息中数据修改对象的信息和库表基础信息定义数据修改对象的变量,生成临时备份表;Define the variables of the data modification object according to the information of the data modification object in the key information and the basic information of the library table, and generate a temporary backup table;
根据临时备份表中的变量在数据库中查找变量对应的初始值,并根据初始值为临时备份表中的变量进行变量赋值,得到备份数据。The initial values corresponding to the variables in the temporary backup table are searched in the database, and the variables in the temporary backup table are assigned values according to the initial values to obtain the backup data.
在一种可能实施的方式中,本发明实施例提供的方法中,根据备份数据生成待执行修改语句对应的回退语句,包括:In a possible implementation, in the method provided by the embodiment of the present invention, generating a rollback statement corresponding to the modification statement to be executed according to the backup data includes:
根据预设的回退语句规则表达式和临时备份表中变量的值生成待执行修改语句对应的回退语句。A rollback statement corresponding to the modification statement to be executed is generated according to the preset rollback statement rule expression and the value of the variable in the temporary backup table.
在一种可能实施的方式中,本发明实施例提供的方法中,基于备份数据对数据回退操作对应的回退数据进行数据稽核,包括:In a possible implementation, in the method provided in the embodiment of the present invention, data auditing is performed on the rollback data corresponding to the data rollback operation based on the backup data, including:
基于备份数据执行预设的回退检查语句,以对数据回退操作对应的回退数据进行数据稽核。Execute the preset rollback check statement based on the backup data to perform data audit on the rollback data corresponding to the data rollback operation.
第二方面,本发明实施例提供一种应用于数据库的数据修改装置,包括:In a second aspect, an embodiment of the present invention provides a data modification device applied to a database, comprising:
获取单元,用于获取针对数据库的待执行修改语句;An acquisition unit, used for acquiring modification statements to be executed on the database;
提取单元,用于根据待执行修改语句中的数据修改对象在数据库中查询和备份数据修改对象对应的初始数据,得到备份数据;An extraction unit is used to query and back up the initial data corresponding to the data modification object in the database according to the data modification object in the modification statement to be executed, so as to obtain the backup data;
回退语句生成单元,用于根据备份数据生成待执行修改语句对应的回退语句;A rollback statement generating unit, used to generate a rollback statement corresponding to the modification statement to be executed according to the backup data;
修改单元,用于执行待执行修改语句对应的数据修改操作;A modification unit, used to execute the data modification operation corresponding to the modification statement to be executed;
回退单元,用于当触发待执行修改语句的修改回退条件时,执行回退语句对应的数据回退操作;A rollback unit, used to execute a data rollback operation corresponding to a rollback statement when a modification rollback condition of a modification statement to be executed is triggered;
稽核单元,用于基于备份数据对数据回退操作对应的回退数据进行数据稽核。The audit unit is used to perform data audit on the rollback data corresponding to the data rollback operation based on the backup data.
在一种可能实施的方式中,本发明实施例提供的装置中,提取单元具体用于:In a possible implementation manner, in the device provided by the embodiment of the present invention, the extraction unit is specifically used for:
识别并提取待执行修改语句中关于数据修改的关键信息;Identify and extract key information about data modification in the modification statement to be executed;
根据关键信息在数据库中查询和备份关键信息对应的初始数据,得到备份数据。The initial data corresponding to the key information is queried and backed up in the database according to the key information to obtain the backup data.
在一种可能实施的方式中,本发明实施例提供的装置中,提取单元具体用于:In a possible implementation manner, in the device provided by the embodiment of the present invention, the extraction unit is specifically used for:
对待执行修改语句进行语句洗练,剔除待执行修改语句中的注释部分;Clean the modified statements to be executed and remove the comments in them.
将待执行修改语句与各语句句型对应的规则表达式进行匹配,根据匹配结果确定待执行修改语句的语句句型;Match the modification statement to be executed with the regular expressions corresponding to each statement pattern, and determine the statement pattern of the modification statement to be executed according to the matching result;
按照待执行修改语句的语句句型对应的提取规则提取待执行修改语句中关于数据修改的关键信息。Extract key information about data modification in the modification statement to be executed according to the extraction rules corresponding to the sentence pattern of the modification statement to be executed.
在一种可能实施的方式中,本发明实施例提供的装置中,关键信息包括数据修改对象的目标修改库表、库表别名、where条件子句以及修改字段。In a possible implementation, in the device provided by the embodiment of the present invention, the key information includes the target modification library table of the data modification object, the library table alias, the where condition clause, and the modification field.
在一种可能实施的方式中,本发明实施例提供的装置中,提取单元具体用于:In a possible implementation manner, in the device provided by the embodiment of the present invention, the extraction unit is specifically used for:
提取关键信息中目标修改库表的库表基础信息;Extract the basic information of the target modified library table in the key information;
根据关键信息中数据修改对象的信息和库表基础信息定义数据修改对象的变量,生成临时备份表;Define the variables of the data modification object according to the information of the data modification object in the key information and the basic information of the library table, and generate a temporary backup table;
根据临时备份表中的变量在数据库中查找变量对应的初始值,并根据初始值为临时备份表中的变量进行变量赋值,得到备份数据。The initial values corresponding to the variables in the temporary backup table are searched in the database, and the variables in the temporary backup table are assigned values according to the initial values to obtain the backup data.
在一种可能实施的方式中,本发明实施例提供的装置中,回退语句生成单元具体用于:In a possible implementation manner, in the device provided by the embodiment of the present invention, the fallback statement generating unit is specifically used for:
根据预设的回退语句规则表达式和临时备份表中变量的值生成待执行修改语句对应的回退语句。A rollback statement corresponding to the modification statement to be executed is generated according to the preset rollback statement rule expression and the value of the variable in the temporary backup table.
在一种可能实施的方式中,本发明实施例提供的装置中,稽核单元具体用于:In a possible implementation, in the device provided by the embodiment of the present invention, the audit unit is specifically used for:
基于备份数据执行预设的回退检查语句,以对数据回退操作对应的回退数据进行数据稽核。Execute the preset rollback check statement based on the backup data to perform data audit on the rollback data corresponding to the data rollback operation.
第三方面,本发明实施例提供一种电子设备,包括:至少一个处理器、至少一个存储器以及存储在存储器中的计算机程序指令,当计算机程序指令被处理器执行时实现如本发明实施例第一方面所提供的方法。In a third aspect, an embodiment of the present invention provides an electronic device, comprising: at least one processor, at least one memory, and computer program instructions stored in the memory, which, when executed by the processor, implement the method provided in the first aspect of the embodiment of the present invention.
第四方面,本发明实施例提供一种计算机可读存储介质,其上存储有计算机程序指令,当计算机程序指令被处理器执行时实现如本发明实施例第一方面所提供的方法。In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, implements the method provided in the first aspect of the embodiment of the present invention.
本发明实施例中,通过获取针对数据库的待执行修改语句,根据待执行修改语句中的数据修改对象在数据库中查询和备份数据修改对象对应的初始数据,得到备份数据,然后根据备份数据生成待执行修改语句对应的回退语句,之后执行待执行修改语句对应的数据修改操作,当触发待执行修改语句的修改回退条件时,执行回退语句对应的数据回退操作,并且基于备份数据对数据回退操作对应的回退数据进行数据稽核。与相关技术相比,在数据库数据修改方案中配备相应的数据备份机制和数据修改回退机制,并且数据修改回退机制通过设置修改语句对应的回退语句实现,从而可以通过执行回退语句即可完成修改语句的数据修改回退,简化了回退方案,减少人工介入和回退操作耗时,此外通过对备份数据与回退后的数据进行稽核比对,提高了回退后数据的正确性。In an embodiment of the present invention, by obtaining a modification statement to be executed for a database, querying and backing up the initial data corresponding to the data modification object in the modification statement to be executed in the database according to the data modification object in the modification statement to be executed, obtaining backup data, and then generating a rollback statement corresponding to the modification statement to be executed according to the backup data, and then executing the data modification operation corresponding to the modification statement to be executed. When the modification rollback condition of the modification statement to be executed is triggered, the data rollback operation corresponding to the rollback statement is executed, and the rollback data corresponding to the data rollback operation is audited based on the backup data. Compared with the related art, a corresponding data backup mechanism and a data modification rollback mechanism are provided in the database data modification scheme, and the data modification rollback mechanism is implemented by setting the rollback statement corresponding to the modification statement, so that the data modification rollback of the modification statement can be completed by executing the rollback statement, which simplifies the rollback scheme, reduces manual intervention and time-consuming rollback operations, and in addition, by auditing and comparing the backup data with the rolled-back data, the correctness of the rolled-back data is improved.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1为本发明实施例提供的一种应用于数据库的数据修改方法的流程示意图;FIG1 is a schematic flow chart of a method for modifying data in a database according to an embodiment of the present invention;
图2为本发明实施例提供的update、delete、insert语句的句型结构示意图;FIG2 is a schematic diagram of the sentence structure of update, delete, and insert statements provided in an embodiment of the present invention;
图3为本发明实施例提供的where子句获取流程示意图;FIG3 is a schematic diagram of a where clause acquisition process according to an embodiment of the present invention;
图4为本发明实施例提供的一种应用于数据库的数据修改装置的结构示意图;FIG4 is a schematic diagram of the structure of a data modification device applied to a database provided by an embodiment of the present invention;
图5为本发明实施例提供的一种电子设备的结构示意图。FIG5 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention.
具体实施方式DETAILED DESCRIPTION
为了使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明作进一步地详细描述,显然,所描述的实施例仅仅是本发明一部份实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本发明保护的范围。In order to make the purpose, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
下面对文中出现的一些词语进行解释:The following are explanations of some of the terms that appear in the text:
1、本发明实施例中术语“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。1. In the embodiments of the present invention, the term "and/or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and/or B may represent: A exists alone, A and B exist at the same time, and B exists alone. The character "/" generally indicates that the associated objects are in an "or" relationship.
目前常规变频空调器制热运行过程中,内风机转速持续按照设定转速运行,若用户设定风档较高,当室外换热器结霜较多或室内环境温度接近设定温度时,不仅出风温度会持续降低,而且会加速室外换热器结霜速度,严重影响用户的热舒适性体验。During the heating operation of current conventional variable-frequency air conditioners, the internal fan speed continues to run at the set speed. If the user sets the wind speed higher, when the outdoor heat exchanger is frosted or the indoor ambient temperature is close to the set temperature, not only will the air outlet temperature continue to decrease, but the frost speed of the outdoor heat exchanger will also be accelerated, seriously affecting the user's thermal comfort experience.
下面结合附图和实施例对本发明提供的应用于数据库的数据修改方法、装置、设备及介质进行更详细地说明。The data modification method, device, equipment and medium applied to a database provided by the present invention are described in more detail below in conjunction with the accompanying drawings and embodiments.
本发明实施例提供一种应用于数据库的数据修改方法,如图1所示,包括:An embodiment of the present invention provides a data modification method applied to a database, as shown in FIG1 , comprising:
步骤S101,获取针对数据库的待执行修改语句。Step S101, obtaining a modification statement to be executed for the database.
具体实施时,可以从从数据源(如用户输入、修改语句文件、其它软件工具或脚本、远程主机调用等)依次读取每条修改语句,然后将这些待执行的修改语句保存到修改语句变量数组中。In specific implementation, each modification statement can be read in sequence from a data source (such as user input, modification statement file, other software tools or scripts, remote host call, etc.), and then these modification statements to be executed are saved in a modification statement variable array.
步骤S102,根据待执行修改语句中的数据修改对象在数据库中查询和备份数据修改对象对应的初始数据,得到备份数据。Step S102, querying and backing up the initial data corresponding to the data modification object in the database according to the data modification object in the modification statement to be executed, to obtain backup data.
数据修改对象是在执行修改语句时修改语句中用于修改操作的对象,数据修改对象对应的初始数据也就是数据库中修改语句要修改的数据,对数据修改对象对应的初始数据进行备份一边后续可以将修改后的数据回退到修改之前。The data modification object is the object used for modification operations in the modification statement when the modification statement is executed. The initial data corresponding to the data modification object is the data to be modified by the modification statement in the database. The initial data corresponding to the data modification object is backed up so that the modified data can be rolled back to the state before the modification.
在一种可能实施的方式中,根据待执行修改语句中的数据修改对象在数据库中查询和备份数据修改对象对应的初始数据,得到备份数据,包括:识别并提取待执行修改语句中关于数据修改的关键信息;根据关键信息在数据库中查询和备份关键信息对应的初始数据,得到备份数据。In one possible implementation, initial data corresponding to the data modification objects in the modification statement to be executed is queried in the database and backed up to obtain backup data, including: identifying and extracting key information about the data modification in the modification statement to be executed; and initial data corresponding to the key information is queried in the database and backed up to obtain backup data based on the key information.
从修改语句变量数据组顺序读取每条修改语句进行处理,根据修改语句类型(update修改、delete删除、insert新增)不同推送到对应的子流程处理,通过识别、解释待执行的修改语句,提取修改语句中修改目标库表、库表别名、where条件子句以及修改字段等关键信息。Each modification statement is read sequentially from the modification statement variable data group for processing, and is pushed to the corresponding sub-process for processing according to the modification statement type (update, delete, insert). By identifying and interpreting the modification statement to be executed, key information such as the modified target library table, library table alias, where condition clause, and modified field in the modification statement is extracted.
在一种可能实施的方式中,识别并提取待执行修改语句中关于数据修改的关键信息,包括:对待执行修改语句进行语句洗练,剔除待执行修改语句中的注释部分;将待执行修改语句与各语句句型对应的规则表达式进行匹配,根据匹配结果确定待执行修改语句的语句句型;按照待执行修改语句的语句句型对应的提取规则提取待执行修改语句中关于数据修改的关键信息。In one possible implementation, key information about data modification in the modification statement to be executed is identified and extracted, including: sentence cleaning of the modification statement to be executed to remove the comment part in the modification statement to be executed; matching the modification statement to be executed with the regular expression corresponding to each statement pattern, and determining the statement pattern of the modification statement to be executed according to the matching result; extracting the key information about data modification in the modification statement to be executed according to the extraction rule corresponding to the statement pattern of the modification statement to be executed.
关键信息识别提取子流程中会先进行语句洗练,剔除注释部分,根据修改语句的句型结构特点,使用set、from、where、values、select等关键字位置的识别方法,再结合引号、括号等特殊字符的处理方法,提取目标修改库表、库表别名、where条件子句、修改字段等修改语句中关键信息。In the key information identification and extraction sub-process, the statements will be refined first, the comments will be removed, and according to the sentence structure characteristics of the modification statement, the identification method of the keyword position such as set, from, where, values, select, etc. will be used, and the processing method of special characters such as quotation marks and brackets will be combined to extract the key information in the modification statement such as the target modification table, table alias, where condition clause, modification field, etc.
示例性的,以update修改语句句型、delete删除语句句型、insert新增语句句型的句型结构为例,update、delete、insert语句的句型结构如图2所示。Exemplarily, taking the sentence structure of an update modification statement, a delete deletion statement, and an insert addition statement as an example, the sentence structure of update, delete, and insert statements is shown in FIG. 2 .
剔除注释可以以单引号为分隔符将修改语句分割成若干子串存放在数组中,将数组下标为偶数的数组元素“/*”到“*/”之间的字符替换成空格,然后数组元素重新拼接成新的修改语句,也就是将非单引号内的注释替换成空格。To remove comments, you can split the modification statement into several substrings using single quotes as delimiters and store them in an array. Replace the characters between "/*" and "*/" in array elements with even-numbered array subscripts with spaces, and then reassemble the array elements into a new modification statement. In other words, replace the comments that are not in single quotes with spaces.
提取修改语句的关键信息时,可以待执行修改语句与各语句句型对应的规则表达式进行匹配处理,使用编程语言包含但不限于perl、python语言,如果匹配失败则认为非标准修改语句,系统退出,匹配成功则提取关键信息成功后将匹配信息保存到的。这里所用到规则表达式匹配均不区分大小写。以pythone语言举例,下面对update、delete、insert语句的关键信息识别提取过程说明。When extracting the key information of the modification statement, the modification statement to be executed can be matched with the regular expressions corresponding to each statement pattern. The programming language used includes but is not limited to perl and python. If the match fails, it is considered a non-standard modification statement and the system exits. If the match succeeds, the key information is extracted successfully and the matching information is saved. The regular expression matching used here is not case-sensitive. Taking pythone language as an example, the key information identification and extraction process of update, delete, and insert statements is described below.
update语句关键信息识别提取:待执行修改语句与update语句对应的规则表达式匹配成功后,待执行修改语句的第一组为目标修改库表,第二组存在则为库表别名,第三组为set关键字后面的子字符串,然后通过set常用修改句式“set[库表别名.]字段=”和“set([库表别名.]字段1,[库表别名.]字段2……)=”中提取修改字段。从set子字符串中获取where条件子串时,引入单词临时变量、单引号计数器变量和括号计数器变量,对set子字符串的字符进行依次逐一处理,单词临时变量用于存储英文字母、数字、下横线字符。当前字符为英文字母、数字、下横线时则在单词临时变量的值后面追加该字符,当前字符不为英文字母、数字、下横线则单词临时变量置空;如果当前字符为单引号则单引号计数器变量加一;如果当前字符为左括号则括号计数器变量加一,为右括号则括号计数器变量减一;当前字符为非上述字符、括号计数器变量值为0且单引号计数器变量值为偶数时对该单词临时变量进行判断是否为where字符串。如果单词临时变量为where字符串,则set子字符串剩余未处理字符串为where条件子句,不为where字符串则单词临时变量置空后继续往下处理。到最后都没匹配到where字符串则此修改语句中where条件子句不存在。where子句获取流程如图3所示。Update statement key information identification and extraction: After the modification statement to be executed successfully matches the rule expression corresponding to the update statement, the first group of the modification statement to be executed is the target modification library table, the second group is the library table alias if it exists, and the third group is the substring after the set keyword. Then, the modification field is extracted through the set common modification sentence "set [library table alias.] field = " and "set ([library table alias.] field 1, [library table alias.] field 2 ...) = ". When obtaining the where condition substring from the set substring, introduce word temporary variables, single quote counter variables, and bracket counter variables, and process the characters of the set substring one by one. The word temporary variable is used to store English letters, numbers, and underscore characters. When the current character is an English letter, number, or underscore, the character is appended after the value of the temporary word variable. If the current character is not an English letter, number, or underscore, the temporary word variable is set to empty. If the current character is a single quote, the single quote counter variable is incremented by one. If the current character is a left bracket, the bracket counter variable is incremented by one. If it is a right bracket, the bracket counter variable is decremented by one. If the current character is not one of the above characters, the bracket counter variable value is 0, and the single quote counter variable value is an even number, the temporary word variable is judged to be a where string. If the temporary word variable is a where string, the remaining unprocessed string of the set substring is the where condition clause. If it is not a where string, the temporary word variable is set to empty and the processing continues. If no where string is matched at the end, the where condition clause in this modification statement does not exist. The where clause acquisition process is shown in Figure 3.
delete语句的关键信息识别提取:待执行修改语句与delet语句对应的规则表达式的匹配成功后,待执行修改语句的第一组为目标修改库表,第二组存在则为库表别名,第三组如果存在并匹配到where字符串开头则为where条件子句。Identify and extract key information of delete statements: After the modification statement to be executed successfully matches the rule expression corresponding to the delete statement, the first group of the modification statement to be executed is the target modification library table, the second group is the library table alias if it exists, and the third group is the where condition clause if it exists and matches the beginning of the where string.
insert语句的关键信息识别提取:待执行修改语句与insert语句对应的规则表达式的匹配成功后,待执行修改语句的第一组为目标修改库表,第二组存在则为库表别名,第三组如果存在并匹配到values或select字符串开头则为values或select子句。Identify and extract key information of insert statements: After the modification statement to be executed successfully matches the rule expression corresponding to the insert statement, the first group of the modification statement to be executed is the target modification library table, the second group is the library table alias if it exists, and the third group is the values or select clause if it exists and matches the beginning of the values or select string.
本公开实施例在语句洗练后剔除注释后,通过各语句句型对应的规则表达式可快速识别语句中修改库表、where条件、修改字段等关键信息,提高提取关键信息的处理效率。After the statements are cleaned and comments are removed, the disclosed embodiment can quickly identify key information such as modified library tables, where conditions, and modified fields in the statements through regular expressions corresponding to each statement pattern, thereby improving the processing efficiency of extracting key information.
在一种可能实施的方式中,根据关键信息在数据库中查询和备份关键信息对应的初始数据,得到备份数据,包括:提取关键信息中目标修改库表的库表基础信息;根据关键信息中数据修改对象的信息和库表基础信息定义数据修改对象的变量,生成临时备份表;根据临时备份表中的变量在数据库中查找变量对应的初始值,并根据初始值为临时备份表中的变量进行变量赋值,得到备份数据。In one possible implementation, initial data corresponding to the key information is queried and backed up in a database according to the key information to obtain backup data, including: extracting basic information of a target modified library table in the key information; defining variables of the data modification object according to information of the data modification object in the key information and basic information of the library table to generate a temporary backup table; searching for initial values corresponding to the variables in the database according to the variables in the temporary backup table, and assigning values to the variables in the temporary backup table according to the initial values to obtain backup data.
具体实施时,提取关键信息中目标修改库表的非隐藏字段、主键、默认值等库表基础信息。根据关键信息中数据修改对象的信息和库表基础信息定义变量,然后将变量与语句生成规则中备份语句的规则表达式进行绑定,将变量的值代入备份语句的规则表达式可以生成备份语句。In the specific implementation, extract the non-hidden fields, primary keys, default values and other basic information of the target modified table in the key information. Define variables based on the information of the data modification object and the basic information of the table in the key information, and then bind the variables to the rule expression of the backup statement in the statement generation rule. Substitute the value of the variable into the rule expression of the backup statement to generate the backup statement.
备份语句生成规则涉及多条执行语句,包括创建临时临时备份表、临时备份表新增rowidbak列、给临时备份表中所有带有默认值的列赋予默认值(有多少个带默认值字段就有多少条赋值语句)、将修改删除新增的数据备份到临时备份表等语句。其中临时备份表rowidbak列用于保存目标修改库表中对应数据的rowid隐藏列,对于update修改语句、delete删除语句该列是在将数据从目标修改库表备份到临时备份表时带过来,临时备份表中rowidbak列的值与目标修改库表的rowid隐藏列值是一一对应关系,见“列表二”中备份语句规则表达式一列。对于insert新增语句临时备份表新增rowidbak列后不会赋值,该列是在执行insert语句将数据新增到目标修改库表后,将本次目标修改库表新增数据的rowid隐藏列值更新到临时备份表对应的rowidbak列。The backup statement generation rule involves multiple execution statements, including creating a temporary backup table, adding a rowidbak column to the temporary backup table, assigning default values to all columns with default values in the temporary backup table (there are as many assignment statements as there are fields with default values), and backing up modified, deleted, and newly added data to the temporary backup table. The rowidbak column in the temporary backup table is used to save the rowid hidden column of the corresponding data in the target modification library table. For update modification statements and delete deletion statements, this column is brought over when backing up data from the target modification library table to the temporary backup table. The value of the rowidbak column in the temporary backup table is one-to-one corresponding to the rowid hidden column value of the target modification library table, see the backup statement rule expression column in "List 2". For insert addition statements, the temporary backup table will not be assigned a value after adding a rowidbak column. After the insert statement is executed to add data to the target modification library table, the rowid hidden column value of the newly added data in the target modification library table is updated to the corresponding rowidbak column in the temporary backup table.
步骤S103,根据备份数据生成待执行修改语句对应的回退语句。Step S103: Generate a rollback statement corresponding to the modification statement to be executed according to the backup data.
根据预设的回退语句规则表达式和临时备份表中变量的值生成待执行修改语句对应的回退语句。A rollback statement corresponding to the modification statement to be executed is generated according to the preset rollback statement rule expression and the value of the variable in the temporary backup table.
具体实施时,将临时备份表中定义的数据修改对象的变量与语句生成规则中回退语句的规则表达式进行绑定,将变量的值代入回退语句的规则表达式可以生成回退语句。回退语句使用临时备份表中的字段可将数据快速准确恢复到修改前的状态。In specific implementation, the variables of the data modification objects defined in the temporary backup table are bound to the rule expressions of the rollback statements in the statement generation rules, and the rollback statements can be generated by substituting the values of the variables into the rule expressions of the rollback statements. The rollback statements use the fields in the temporary backup table to quickly and accurately restore the data to the state before the modification.
步骤S104,执行待执行修改语句对应的数据修改操作。Step S104, executing the data modification operation corresponding to the modification statement to be executed.
根据待执行修改语句的关键信息可以创建修改原表,结合前述步骤获取的信息可以创建一个包含修改原表、临时备份表、备份语句、回退语句等信息的修改语句信息实例对象,并添加到修改语句信息实例对象任务队列中。修改语句信息实例对象任务队列采用列表数据结构,每一个节点元素采用类或对象设计。According to the key information of the modification statement to be executed, the modification original table can be created. Combined with the information obtained in the previous steps, a modification statement information instance object containing information such as the modification original table, temporary backup table, backup statement, and rollback statement can be created and added to the modification statement information instance object task queue. The modification statement information instance object task queue adopts a list data structure, and each node element adopts a class or object design.
从修改语句信息实例对象任务队列中按顺序依次获取实例对象数据项,根据修改语句类型不同跳转到update修改子流程、delete删除子流程或insert新增子流程处理,同时展示修改信息以便操作人查阅确认,记录修改日志便于日后查证。直到实例对象任务队列中的任务全部成功执行后进行数据备份表管理,数据备份表管理主要根据操作人选择继续保留备份数据还是清理备份数据。如果某个任务执行失败、异常中断或操作人选择中断,操作人可选择退出或执行数据回退操作。The instance object data items are obtained in sequence from the modification statement information instance object task queue, and the update modification sub-process, delete deletion sub-process or insert new sub-process are jumped to according to the modification statement type. At the same time, the modification information is displayed for the operator to check and confirm, and the modification log is recorded for future verification. The data backup table management is performed until all the tasks in the instance object task queue are successfully executed. The data backup table management is mainly based on the operator's choice to continue to retain the backup data or clean up the backup data. If a task fails to execute, is abnormally interrupted, or the operator chooses to interrupt, the operator can choose to exit or perform a data rollback operation.
判断实例对象的sqltype修改语句类型变量,如果该值为update或delete则跳转到子流程StepA,如果该值为insert则跳转到子流程StepB。Determine the sqltype modification statement type variable of the instance object. If the value is update or delete, jump to sub-process StepA. If the value is insert, jump to sub-process StepB.
StepA子流程:StepA sub-process:
从修改语句信息实例对象中获取创建临时备份表、临时备份表新增rowidbak字段列、临时备份表带默认值字段赋值、修改或删除目标修改库表语句,按照此顺序依次执行。执行成功后修改修改语句信息实例对象中的执行状态标识为1已执行,继续从修改语句信息实例对象任务队列中获取任务处理,直到全部执行完毕,如果执行失败则调用数据回退及回退数据稽核模块进行数据回退。Get the statements for creating a temporary backup table, adding a rowidbak column to the temporary backup table, assigning a default value to the temporary backup table, and modifying or deleting the target modification database table from the modification statement information instance object, and execute them in this order. After successful execution, modify the execution status flag in the modification statement information instance object to 1 "executed", and continue to obtain task processing from the modification statement information instance object task queue until all executions are completed. If the execution fails, call the data rollback and rollback data audit module to roll back the data.
StepB子流程:StepB sub-process:
从修改语句信息实例对象中获取创建临时备份表、临时备份表带默认值字段赋值、新增数据到临时备份表、临时备份表新增rowidbak字段列、新增数据到目标修改表语句,按照此顺序依次执行。Get the statements for creating a temporary backup table, assigning default values to fields in the temporary backup table, adding data to the temporary backup table, adding rowidbak columns to the temporary backup table, and adding data to the target modification table from the modification statement information instance object, and execute them in this order.
从修改语句信息实例对象取出目标修改库表获取库表主键,然后将主键、临时备份表、目标修改库表代入“rowidbak赋值语句r1”语句然后执行,将目标修改库表rowid字段值更新到临时备份表rowidbak字段。如果目标修改库表不存在库表主键,则获取库表所有字段和临时备份表、目标修改库表代入“rowidbak赋值语句r2”语句然后执行,将目标修改库表rowid字段值更新到临时备份表rowidbak字段。Get the target modification table from the modification statement information instance object to obtain the table primary key, then substitute the primary key, temporary backup table, and target modification table into the "rowidbak assignment statement r1" statement and execute it, and update the target modification table rowid field value to the temporary backup table rowidbak field. If the target modification table does not have a table primary key, obtain all the table fields and the temporary backup table and target modification table into the "rowidbak assignment statement r2" statement and execute it, and update the target modification table rowid field value to the temporary backup table rowidbak field.
rowidbak赋值语句r1:update临时备份表变量backup_table a setrowidbak assignment statement r1: update temporary backup table variable backup_table a set
a.rowidbak=(select b.rowid from目标修改库表变量source_table b wherea.主键字段1=b.主键字段2and a.主键字段1=b.主键字段2……)a.rowidbak=(select b.rowid from target modification library table variable source_table b where a.primary key field 1=b.primary key field 2and a.primary key field 1=b.primary key field 2……)
rowidbak赋值语句r2:update临时备份表变量backup_table a setROWIDBAK assignment statement R2: update temporary backup table variable backup_table a set
a.rowidbak=(select b.rowid from目标修改库表变量source_table b where((a.字段1is null and b.字段1is null)or(a.字段1is not null and b.字段1is notnull and a.字段1=b.字段1))and((a.字段2is null and b.字段2is null)or(a.字段2is not null and b.字段2is not null and a.字段2=b.字段2))……)a.rowidbak=(select b.rowid from target modification library table variable source_table b where((a.field1is null and b.field1is null)or(a.field1is not null and b.field1is notnull and a.field1=b.field1))and((a.field2is null and b.field2is null)or(a.field2is not null and b.field2is not null and a.field2=b.field2))……)
执行成功后更新修改语句信息实例对象中的执行状态标识为已执行,继续从修改语句信息实例对象任务队列中获取任务处理,直到全部执行完毕,如果执行异常则调用数据回退及回退数据稽核模块进行数据回退。After successful execution, the execution status mark in the modification statement information instance object is updated to be executed, and task processing continues to be obtained from the modification statement information instance object task queue until all executions are completed. If the execution is abnormal, the data rollback and rollback data audit module are called to perform data rollback.
步骤S105,当触发待执行修改语句的修改回退条件时,执行回退语句对应的数据回退操作。Step S105, when the modification rollback condition of the modification statement to be executed is triggered, the data rollback operation corresponding to the rollback statement is executed.
具体实施时,修改回退条件包括数据修改执行失败或者执人工介入触发。例如通过软件应用界面操作触发回退或是通过其它软件应用调用触发回退)。In specific implementation, the modification rollback conditions include data modification execution failure or manual intervention triggering. For example, the rollback is triggered by software application interface operation or by other software application calls).
展示已经执行修改的语句信息,包括语句排序序号、语句、修改记录数等,由操作人从软件应用界面输入回退序号确认回退到哪一步,设置输入时限,超过时限则默认序号为1回退全部修改。Displays the information of the statements that have been modified, including statement sorting number, statement, number of modified records, etc. The operator enters the rollback number from the software application interface to confirm which step to roll back to, and sets the input time limit. If the time limit is exceeded, the default number is 1 and all modifications are rolled back.
从修改语句信息实例对象任务队列尾端开始逆序读取执行状态标识为已执行且回退序号大于等于输入的回退序号的修改语句信息实例对象,执行实例对象中的回退语句,然后执行步骤4的数据一致性稽核比对处理,直到所有符合条件的修改语句信息实例对象回退完后系统退出。例如有序号1到10共10个修改语句信息实例对象任务,执行到序号7时失败或人工中断执行需要回退到序号2时,则需要执行回退的修改语句信息实例对象任务依次为序号6、序号5、序号4、序号3、序号2。Starting from the end of the modification statement information instance object task queue, read the modification statement information instance objects whose execution status is marked as executed and whose rollback sequence number is greater than or equal to the input rollback sequence number in reverse order, execute the rollback statement in the instance object, and then perform the data consistency audit and comparison processing in step 4 until all qualified modification statement information instance objects are rolled back and the system exits. For example, there are 10 modification statement information instance object tasks with sequence numbers 1 to 10, and when sequence number 7 fails or the execution is manually interrupted and needs to be rolled back to sequence number 2, the modification statement information instance object tasks that need to be rolled back are sequence numbers 6, 5, 4, 3, and 2.
步骤S106,基于备份数据对数据回退操作对应的回退数据进行数据稽核。Step S106: Performing a data audit on the rollback data corresponding to the data rollback operation based on the backup data.
执行回退语句完毕后进行数据一致性稽核比对处理,将备份数据与回退后的数据进行稽核比对,确保回退后的数据与执行修改语句的修改前的数据数据保持一致。After the rollback statement is executed, a data consistency audit and comparison is performed to audit and compare the backup data with the data after rollback to ensure that the data after rollback is consistent with the data before the modification statement is executed.
在一种可能实施的方式中,基于备份数据对数据回退操作对应的回退数据进行数据稽核,包括:基于备份数据执行预设的回退检查语句,以对数据回退操作对应的回退数据进行数据稽核。In one possible implementation, performing a data audit on the rollback data corresponding to the data rollback operation based on the backup data includes: executing a preset rollback check statement based on the backup data to perform a data audit on the rollback data corresponding to the data rollback operation.
从修改语句信息实例对象取出目标修改库表获取库表主键和库表所有字段信息。如果修改语句类型sqltype值为update、delete,目标修改库表存在主键,则将主键、字段、备份临时表、目标修改库表代入“回退检查语句h1”语句,目标修改库表不存在主键,则将字段、备份临时表、目标修改库表代入“回退检查语句h2”语句,然后执行,执行后查询到的记录为0表示数据恢复到原始状态,记录不为0表示数据没有恢复到原始状态,需要人工确认是否继续执行回退操作还是退出系统。如果修改语句类型sqltype值为insert,目标修改库表存在主键,则将主键、字段、备份临时表、目标修改库表代入“回退检查语句h3”语句,目标修改库表不存在主键则将字段、备份临时表、目标修改库表代入“回退检查语句h4”语句,然后执行,执行后查询到的记录为0表示数据恢复到原始状态,记录不为0表示数据没有恢复到原始状态,需要人工确认是否继续执行回退操作还是退出系统。Get the target modified table from the modification statement information instance object to obtain the table primary key and all table field information. If the modification statement type sqltype value is update or delete, and the target modified table has a primary key, substitute the primary key, field, backup temporary table, and target modified table into the "rollback check statement h1" statement. If the target modified table does not have a primary key, substitute the field, backup temporary table, and target modified table into the "rollback check statement h2" statement and then execute. After execution, if the record queried is 0, it means that the data has been restored to the original state. If the record is not 0, it means that the data has not been restored to the original state, and manual confirmation is required to continue the rollback operation or exit the system. If the modification statement type sqltype value is insert, and the target modification table has a primary key, the primary key, field, backup temporary table, and target modification table are substituted into the "rollback check statement h3" statement. If the target modification table does not have a primary key, the field, backup temporary table, and target modification table are substituted into the "rollback check statement h4" statement and then executed. After execution, if the record queried is 0, it means that the data has been restored to the original state. If the record is not 0, it means that the data has not been restored to the original state, and manual confirmation is required whether to continue the rollback operation or exit the system.
回退检查语句h1:select a.字段1,a.字段2,a.字段3……from备份临时表变量backup_table a minus select a.字段1,a.字段2,a.字段3……from目标修改库表变量source_table a where exists(select 1from备份临时表变量backup_table bwhere a.主键字段1=b.主键字段2and a.主键字段1=b.主键字段2……)Rollback check statement h1: select a. field 1, a. field 2, a. field 3... from backup temporary table variable backup_table a minus select a. field 1, a. field 2, a. field 3... from target modification library table variable source_table a where exists (select 1 from backup temporary table variable backup_table b where a. primary key field 1 = b. primary key field 2 and a. primary key field 1 = b. primary key field 2...)
回退检查语句h2:select a.字段1,a.字段2,a.字段3……from备份临时表变量backup_table a minus select a.字段1,a.字段2,a.字段3……from目标修改库表变量source_table a where(select b.rowid from目标修改库表变量source_table bwhere((a.字段1is null and b.字段1is null)or(a.字段1is not null and b.字段1is notnull and a.字段1=b.字段1))and((a.字段2is null and b.字段2is null)or(a.字段2is not null and b.字段2is not null and a.字段2=b.字段2))……)Rollback check statement h2: select a.field1, a.field2, a.field3…from backup temporary table variable backup_table a minus select a.field1, a.field2, a.field3…from target modification library table variable source_table a where(select b.rowid from target modification library table variable source_table bwhere((a.field1is null and b.field1is null)or(a.field1is not null and b.field1is notnull and a.field1=b.field1))and((a.field2is null and b.field2is null)or(a.field2is not null and b.field2is not null and a.field2=b.field2))…)
回退检查语句h3:select a.字段1,a.字段2,a.字段3……from目标修改库表变量source_table a where exists(select 1from备份临时表变量backup_table bwhere a.主键字段1=b.主键字段2and a.主键字段1=b.主键字段2……)Rollback check statement h3: select a. field 1, a. field 2, a. field 3... from target modification library table variable source_table a where exists (select 1 from backup temporary table variable backup_table b where a. primary key field 1 = b. primary key field 2 and a. primary key field 1 = b. primary key field 2...)
回退检查语句h4:select a.字段1,a.字段2,a.字段3……from目标修改库表变量source_table a where(select b.rowid from目标修改库表变量source_table bwhere((a.字段1is null and b.字段1is null)or(a.字段1is not null and b.字段1is notnull and a.字段1=b.字段1))and((a.字段2is null and b.字段2is null)or(a.字段2is not null and b.字段2is not null and a.字段2=b.字段2))……)Fallback check statement h4: select a.field1, a.field2, a.field3…from target modification library table variable source_table a where(select b.rowid from target modification library table variable source_table bwhere((a.field1is null and b.field1is null)or(a.field1is not null and b.field1is notnull and a.field1=b.field1))and((a.field2is null and b.field2is null)or(a.field2is not null and b.field2is not null and a.field2=b.field2))…)
如图4所示,基于应用于数据库的数据修改方法同样的发明构思,本发明还提供一种应用于数据库的数据修改装置,包括:As shown in FIG. 4 , based on the same inventive concept as the data modification method applied to a database, the present invention further provides a data modification device applied to a database, comprising:
获取单元401,用于获取针对数据库的待执行修改语句;The acquisition unit 401 is used to acquire the modification statement to be executed for the database;
提取单元402,用于根据待执行修改语句中的数据修改对象在数据库中查询和备份数据修改对象对应的初始数据,得到备份数据;An extraction unit 402 is used to query and back up the initial data corresponding to the data modification object in the database according to the data modification object in the modification statement to be executed, and obtain backup data;
回退语句生成单元403,用于根据备份数据生成待执行修改语句对应的回退语句;A rollback statement generating unit 403, used to generate a rollback statement corresponding to the modification statement to be executed according to the backup data;
修改单元404,用于执行待执行修改语句对应的数据修改操作;Modification unit 404, used to execute the data modification operation corresponding to the modification statement to be executed;
回退单元405,用于当触发待执行修改语句的修改回退条件时,执行回退语句对应的数据回退操作;The rollback unit 405 is used to execute the data rollback operation corresponding to the rollback statement when the modification rollback condition of the modification statement to be executed is triggered;
稽核单元406,用于基于备份数据对数据回退操作对应的回退数据进行数据稽核。The audit unit 406 is used to perform data audit on the rollback data corresponding to the data rollback operation based on the backup data.
在一种可能实施的方式中,本发明实施例提供的装置中,提取单元402具体用于:In a possible implementation, in the device provided by the embodiment of the present invention, the extraction unit 402 is specifically used for:
识别并提取待执行修改语句中关于数据修改的关键信息;Identify and extract key information about data modification in the modification statement to be executed;
根据关键信息在数据库中查询和备份关键信息对应的初始数据,得到备份数据。The initial data corresponding to the key information is queried and backed up in the database according to the key information to obtain the backup data.
在一种可能实施的方式中,本发明实施例提供的装置中,提取单元402具体用于:In a possible implementation, in the device provided by the embodiment of the present invention, the extraction unit 402 is specifically used for:
对待执行修改语句进行语句洗练,剔除待执行修改语句中的注释部分;Clean the modified statements to be executed and remove the comments in them.
将待执行修改语句与各语句句型对应的规则表达式进行匹配,根据匹配结果确定待执行修改语句的语句句型;Match the modification statement to be executed with the regular expressions corresponding to each statement pattern, and determine the statement pattern of the modification statement to be executed according to the matching result;
按照待执行修改语句的语句句型对应的提取规则提取待执行修改语句中关于数据修改的关键信息。Extract key information about data modification in the modification statement to be executed according to the extraction rules corresponding to the sentence pattern of the modification statement to be executed.
在一种可能实施的方式中,本发明实施例提供的装置中,关键信息包括数据修改对象的目标修改库表、库表别名、where条件子句以及修改字段。In a possible implementation, in the device provided by the embodiment of the present invention, the key information includes the target modification library table of the data modification object, the library table alias, the where condition clause, and the modification field.
在一种可能实施的方式中,本发明实施例提供的装置中,提取单元402具体用于:In a possible implementation, in the device provided by the embodiment of the present invention, the extraction unit 402 is specifically used for:
提取关键信息中目标修改库表的库表基础信息;Extract the basic information of the target modified library table in the key information;
根据关键信息中数据修改对象的信息和库表基础信息定义数据修改对象的变量,生成临时备份表;Define the variables of the data modification object according to the information of the data modification object in the key information and the basic information of the library table, and generate a temporary backup table;
根据临时备份表中的变量在数据库中查找变量对应的初始值,并根据初始值为临时备份表中的变量进行变量赋值,得到备份数据。The initial values corresponding to the variables in the temporary backup table are searched in the database, and the variables in the temporary backup table are assigned values according to the initial values to obtain the backup data.
在一种可能实施的方式中,本发明实施例提供的装置中,回退语句生成单元403具体用于:In a possible implementation, in the device provided by the embodiment of the present invention, the fallback statement generating unit 403 is specifically used for:
根据预设的回退语句规则表达式和临时备份表中变量的值生成待执行修改语句对应的回退语句。A rollback statement corresponding to the modification statement to be executed is generated according to the preset rollback statement rule expression and the value of the variable in the temporary backup table.
在一种可能实施的方式中,本发明实施例提供的装置中,稽核单元406具体用于:In a possible implementation, in the device provided by the embodiment of the present invention, the audit unit 406 is specifically used for:
基于备份数据执行预设的回退检查语句,以对数据回退操作对应的回退数据进行数据稽核。Execute the preset rollback check statement based on the backup data to perform data audit on the rollback data corresponding to the data rollback operation.
另外,本发明实施例的应用于数据库的数据修改方法和装置可以由电子设备来实现。图5示出了本发明实施例提供的电子设备的硬件结构示意图。In addition, the data modification method and device applied to the database according to the embodiment of the present invention can be implemented by an electronic device. Fig. 5 shows a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present invention.
下面具体参考图5,其示出了适于用来实现本公开实施例中的电子设备500的结构示意图。图5示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。5, which shows a schematic diagram of the structure of an electronic device 500 suitable for implementing the embodiments of the present disclosure. The electronic device shown in FIG5 is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
如图5所示,电子设备500可以包括处理装置(例如中央处理器、图形处理器等)501,其可以根据存储在只读存储器(ROM)502中的程序或者从存储装置508加载到随机访问存储器(RAM)503中的程序而执行各种适当的动作和处理以实现如本公开所述的实施例的应用于数据库的数据修改方法。在RAM 503中,还存储有电子设备500操作所需的各种程序和数据。处理装置501、ROM 502以及RAM 503通过总线504彼此相连。输入/输出(I/O)接口505也连接至总线504。As shown in FIG5 , the electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503 to implement the data modification method applied to a database according to the embodiment described in the present disclosure. In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to the bus 504.
通常,以下装置可以连接至I/O接口505:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置506;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置507;包括例如磁带、硬盘等的存储装置508;以及通信装置509。通信装置509可以允许电子设备500与其他设备进行无线或有线通信以交换数据。虽然图5示出了具有各种装置的电子设备500,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。Typically, the following devices may be connected to the I/O interface 505: input devices 506 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 508 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 509. The communication devices 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Although FIG. 5 shows an electronic device 500 with various devices, it should be understood that it is not required to implement or have all the devices shown. More or fewer devices may be implemented or have alternatively.
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在非暂态计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码,从而实现如上所述的应用于数据库的数据修改方法。在这样的实施例中,该计算机程序可以通过通信装置509从网络上被下载和安装,或者从存储装置508被安装,或者从ROM 502被安装。在该计算机程序被处理装置501执行时,执行本公开实施例的方法中限定的上述功能。In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains a program code for executing the method shown in the flowchart, thereby implementing the data modification method applied to the database as described above. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 509, or installed from the storage device 508, or installed from the ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-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 of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer 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 of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer 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. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
在一些实施方式中,客户端、服务器可以利用诸如HTTP(HyperText TransferProtocol,超文本传输协议)之类的任何当前已知或未来研发的网络协议进行通信,并且可以与任意形式或介质的数字数据通信(例如,通信网络)互连。通信网络的示例包括局域网(“LAN”),广域网(“WAN”),网际网(例如,互联网)以及端对端网络(例如,ad hoc端对端网络),以及任何当前已知或未来研发的网络。In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device:
获取针对数据库的待执行修改语句;Get the modification statements to be executed on the database;
根据待执行修改语句中的数据修改对象在数据库中查询和备份数据修改对象对应的初始数据,得到备份数据;According to the data modification object in the modification statement to be executed, the initial data corresponding to the data modification object is queried and backed up in the database to obtain the backup data;
根据备份数据生成待执行修改语句对应的回退语句;Generate a rollback statement corresponding to the modification statement to be executed based on the backup data;
执行待执行修改语句对应的数据修改操作;Execute the data modification operation corresponding to the modification statement to be executed;
当触发待执行修改语句的修改回退条件时,执行回退语句对应的数据回退操作;When the modification rollback condition of the modification statement to be executed is triggered, the data rollback operation corresponding to the rollback statement is executed;
基于备份数据对数据回退操作对应的回退数据进行数据稽核。Perform data audit on the rollback data corresponding to the data rollback operation based on the backup data.
可选的,当上述一个或者多个程序被该电子设备执行时,该电子设备还可以执行上述实施例所述的其他步骤。Optionally, when the above one or more programs are executed by the electronic device, the electronic device may also execute other steps described in the above embodiments.
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括但不限于面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and/or flow chart, and the combination of the square boxes in the block diagram and/or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
描述于本公开实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,单元的名称在某种情况下并不构成对该单元本身的限定。The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、片上系统(SOC)、复杂可编程逻辑设备(CPLD)等等。The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer 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 of the foregoing.
本发明实施例中,通过获取针对数据库的待执行修改语句,根据待执行修改语句中的数据修改对象在数据库中查询和备份数据修改对象对应的初始数据,得到备份数据,然后根据备份数据生成待执行修改语句对应的回退语句,之后执行待执行修改语句对应的数据修改操作,当触发待执行修改语句的修改回退条件时,执行回退语句对应的数据回退操作,并且基于备份数据对数据回退操作对应的回退数据进行数据稽核。与相关技术相比,在数据库数据修改方案中配备相应的数据备份机制和数据修改回退机制,并且数据修改回退机制通过设置修改语句对应的回退语句实现,从而可以通过执行回退语句即可完成修改语句的数据修改回退,简化了回退方案,减少人工介入和回退操作耗时,此外通过对备份数据与回退后的数据进行稽核比对,提高了回退后数据的正确性。In an embodiment of the present invention, by obtaining a modification statement to be executed for a database, querying and backing up the initial data corresponding to the data modification object in the modification statement to be executed in the database according to the data modification object in the modification statement to be executed, obtaining backup data, and then generating a rollback statement corresponding to the modification statement to be executed according to the backup data, and then executing the data modification operation corresponding to the modification statement to be executed. When the modification rollback condition of the modification statement to be executed is triggered, the data rollback operation corresponding to the rollback statement is executed, and the rollback data corresponding to the data rollback operation is audited based on the backup data. Compared with the related art, a corresponding data backup mechanism and a data modification rollback mechanism are provided in the database data modification scheme, and the data modification rollback mechanism is implemented by setting the rollback statement corresponding to the modification statement, so that the data modification rollback of the modification statement can be completed by executing the rollback statement, which simplifies the rollback scheme, reduces manual intervention and time-consuming rollback operations, and in addition, by auditing and comparing the backup data with the rolled-back data, the correctness of the rolled-back data is improved.
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention is described with reference to the flowchart and/or block diagram of the method, device (system), and computer program product according to the embodiment of the present invention. It should be understood that each process and/or box in the flowchart and/or block diagram, as well as the combination of the process and/or box in the flowchart and/or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one or more processes in the flowchart and/or one or more boxes in the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device that implements the functions specified in one or more processes in the flowchart and/or one or more boxes in the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions may also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and/or one or more boxes in the block diagram.
尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例做出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410577948.7A CN118820203A (en) | 2024-05-10 | 2024-05-10 | Data modification method, device, equipment and medium applied to database |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410577948.7A CN118820203A (en) | 2024-05-10 | 2024-05-10 | Data modification method, device, equipment and medium applied to database |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN118820203A true CN118820203A (en) | 2024-10-22 |
Family
ID=93071983
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202410577948.7A Pending CN118820203A (en) | 2024-05-10 | 2024-05-10 | Data modification method, device, equipment and medium applied to database |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN118820203A (en) |
-
2024
- 2024-05-10 CN CN202410577948.7A patent/CN118820203A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7219104B2 (en) | Data cleansing | |
| CN113656407B (en) | A data topology generation method, device, electronic equipment and storage medium | |
| CN113204621B (en) | Document storage, document retrieval method, device, equipment and storage medium | |
| JP6070936B2 (en) | Information processing apparatus, information processing method, and program | |
| JP6982049B2 (en) | Methods, equipment, equipment and storage media for managing indexes | |
| WO2019134339A1 (en) | Desensitization method and procedure, application server and computer readable storage medium | |
| CN111367529A (en) | Code contribution statistical method and device | |
| US10930389B2 (en) | Systems and methods for the classification and indexing of contract documentation | |
| EP3218811A1 (en) | Testing insecure computing environments using random data sets generated from characterizations of real data sets | |
| CN112559717B (en) | Search matching method, device, electronic equipment and storage medium | |
| CN114238326A (en) | Data batch comparison method, device, equipment and storage medium | |
| CN111984673B (en) | Fuzzy retrieval method and device for tree structure of power grid electric energy metering system | |
| WO2019161620A1 (en) | Application dependency update method, terminal and device, and storage medium | |
| CN111666087B (en) | Operation rule updating method and device, computer system and readable storage medium | |
| CN118885336A (en) | Data recovery method, device and equipment | |
| EP3814927A1 (en) | Identification of records for post-cloning tenant identifier translation | |
| CN115827588A (en) | A method, device, equipment and storage medium for generating a business global serial number | |
| JP2018109898A (en) | Data migration system | |
| CN115203281A (en) | Information searching method and device, electronic equipment and storage medium | |
| CN118820203A (en) | Data modification method, device, equipment and medium applied to database | |
| WO2025222808A1 (en) | Code editing method and apparatus, device, and storage medium | |
| US9092472B1 (en) | Data merge based on logical segregation | |
| JP6123372B2 (en) | Information processing system, name identification method and program | |
| US20020123811A1 (en) | Production management system and program | |
| CN118426868A (en) | Recommendation method and device for large model interface configuration, electronic equipment and storage medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination |