Search

CN-121996667-A - Data updating method and device applied to database, computer readable storage medium and electronic equipment

CN121996667ACN 121996667 ACN121996667 ACN 121996667ACN-121996667-A

Abstract

The embodiment of the application provides a data updating method, a device, a computer readable storage medium and electronic equipment applied to a database, wherein the method comprises the steps of establishing a data object cache library based on a target database and a current updating task; the data object cache comprises a data object related to the current update task in the target database, a data object to be updated corresponding to the data object cache is determined according to the current update task, the data object to be updated corresponding to the data object cache is the data object which needs to be updated according to the current update task and the parameter information of the data object to be updated in the current update task is updated to the target database. The technical scheme of the embodiment of the application can reduce the influence on the normal service of the database when the data object in the database is updated.

Inventors

  • LUO XUAN
  • Jia Mulin
  • ZHAN LI

Assignees

  • 华夏基金管理有限公司

Dates

Publication Date
20260508
Application Date
20251225

Claims (10)

  1. 1. A method of data updating for application to a database, the method comprising: Establishing a data object cache based on a target database and a current update task, wherein the data object cache comprises data objects related to the current update task in the target database; Determining a data object to be updated corresponding to the data object cache library according to the current update task, wherein the data object to be updated corresponding to the data object cache library is a data object which needs to be updated according to the current update task; and updating the parameter information of the data object to be updated in the current updating task into the target database.
  2. 2. The method of claim 1, wherein the building a data object cache based on the target database and the current update task comprises: determining the data field corresponding to the current update task; acquiring a data object of the target database in the data field; and establishing the data object cache library according to the data objects of the target database in the data field.
  3. 3. The method according to claim 1, wherein the determining, according to the current update task, the data object to be updated corresponding to the data object cache library includes: Determining a target data object in the current update task, wherein the target data object is an updated data object indicated by the current update task; Under the condition that the data object cache library comprises the target data object, if the parameter information of the target data object in the data object cache library is not consistent with the parameter information of the target data object in the current update task, the target data object is used as the data object to be updated; And taking the target data object as the data object to be updated under the condition that the target data object is not included in the data object cache library.
  4. 4. A method according to claim 3, wherein said updating the parameter information of the data object to be updated in the current update task into the target database comprises: under the condition that the data object to be updated is included in the data object cache library, updating the parameter information of the data object to be updated in the current update task into the target database; And under the condition that the data object to be updated is not included in the data object cache library, newly establishing the data object to be updated in the target database, and updating the parameter information of the data object to be updated in the current updating task into the target database.
  5. 5. The method according to claim 1, wherein updating the parameter information of the data object to be updated in the current update task into the target database comprises: determining to-be-updated data elements in the to-be-updated data object according to the parameter information of the to-be-updated data object in the current update task and the parameter information of the to-be-updated data object in the data object cache library; acquiring a target updating mode corresponding to the data element to be updated; and under the target updating mode, updating the parameter information of the data object to be updated in the current updating task into the target database.
  6. 6. The method of claim 5, wherein the method further comprises: Acquiring identification information corresponding to the current update task; Generating a latest data element version number based on the identification information; and taking the latest data element version number as the data element version number of the data element to be updated in the target database.
  7. 7. The method of claim 1, wherein prior to the establishing a data object cache based on the target database and the current update task, the method further comprises: acquiring the update time of the target database and the import time of each update task in the update task library; and taking the target update task in the update task library as the current update task, wherein the import time corresponding to the target update task is later than the update time.
  8. 8. A data updating apparatus for use in a database, comprising: The cache module is configured to establish a data object cache library based on a target database and a current update task, wherein the data object cache library comprises data objects related to the current update task in the target database; The identification module is configured to determine a data object to be updated corresponding to the data object cache library according to the current update task, wherein the data object to be updated corresponding to the data object cache library is a data object which needs to be updated according to the current update task; And the updating module is configured to update the parameter information of the data object to be updated in the current updating task into the target database.
  9. 9. A computer readable storage medium having stored thereon computer readable instructions which, when executed by a processor of a computer, cause the computer to perform the data updating method applied to a database according to any of claims 1 to 7.
  10. 10. An electronic device, comprising: One or more processors; Storage means for storing one or more programs which, when executed by the one or more processors, cause the electronic device to implement the data updating method applied to a database as claimed in any one of claims 1 to 7.

Description

Data updating method and device applied to database, computer readable storage medium and electronic equipment Technical Field The present application relates to the field of data processing technologies, and in particular, to a data updating method and apparatus applied to a database, a computer readable storage medium, and an electronic device. Background With the continuous development of the service scope, service providers gradually provide various services to the outside, and most of these services need to be acquired by accessing a database. In the related art, in order to maintain a service or add a new service, it is often required to update a data object in a database. At present, when updating data objects in a database, the method generally comprises the following steps of firstly determining the data object to be updated in the database according to the requirement of an updating task, and then replacing the data object to be updated in the database with a new data object. However, data objects stored in the database continue to accumulate over a long period of time as traffic changes. In this case, the process of determining the data object to be updated in the database requires complex searching and identification among the vast number of data objects. This operation consumes a significant amount of database computing resources, causing its ability to handle normal service requests to be severely preempted, thereby affecting normal service of the database. Disclosure of Invention In order to solve the technical problems, embodiments of the present application provide a data updating method, apparatus, computer readable storage medium and electronic device applied to a database, which can reduce the influence on the normal service of the database when updating the data object in the database. Other features and advantages of the application will be apparent from the following detailed description, or may be learned by the practice of the application. According to one aspect of the embodiment of the application, a data updating method applied to a database is provided, which comprises the steps of establishing a data object cache based on a target database and a current updating task, wherein the data object cache comprises data objects related to the current updating task in the target database, determining to-be-updated data objects corresponding to the data object cache according to the current updating task, wherein the to-be-updated data objects corresponding to the data object cache are data objects, which need to be updated according to the current updating task, of the data object cache, and updating parameter information of the to-be-updated data objects in the current updating task into the target database. According to one aspect of the embodiment of the application, a data updating device applied to a database is provided, which comprises a cache module and an updating module, wherein the cache module is configured to establish a data object cache based on a target database and a current updating task, the data object cache comprises data objects related to the current updating task in the target database, the identifying module is configured to determine to-be-updated data objects corresponding to the data object cache according to the current updating task, the to-be-updated data objects corresponding to the data object cache are data objects, which need to be updated according to the current updating task, of the data object cache, and the updating module is configured to update parameter information of the to-be-updated data objects in the current updating task to the target database. In some embodiments of the present application, based on the foregoing solution, the caching module is further configured to determine a data field corresponding to the current update task, obtain a data object of the target database in the data field, and establish the data object repository according to the data object of the target database in the data field. In some embodiments of the present application, based on the foregoing solution, the identification module is further configured to determine a target data object in the current update task, where the target data object is a data object indicated to be updated by the current update task, and if it is determined that the parameter information of the target data object in the data object repository is inconsistent with the parameter information of the target data object in the current update task under the condition that the data object repository includes the target data object, take the target data object as the data object to be updated, and take the target data object as the data object to be updated under the condition that the data object repository does not include the target data object. In some embodiments of the present application, based on the foregoing, the update module is further configured to update the parameter information o