Data writing method and device, computer device, and storage medium

By temporarily storing data in the database and file queue, the problem of low data writing efficiency when the main database is abnormal is solved, and an efficient and reliable data writing process is achieved.

CN115712758BActive Publication Date: 2026-03-31SHANGHAI PUDONG DEVELOPMENT BANK
2 Cites 0 Cited by

Patent Information

Application Number
CN202211462870.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-22
Publication Date
2026-03-31
Estimated Expiration
2042-11-22

AI Technical Summary

Technical Problem

Existing data writing methods require manual switching between master and slave databases when the master database crashes, resulting in low data writing efficiency.

Method used

After receiving data to be written, the system obtains the initial data volume of the database and file queue. If the queue is not full, the data is temporarily written to the corresponding queue to alleviate system pressure. When there is free space in the queue, the data is written to the database in batches to avoid data loss.

Benefits of technology

It improves data writing efficiency, avoids data loss, reduces system pressure, and enhances the reliability and efficiency of data writing.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

The application relates to a data writing method and device, computer equipment, a storage medium and a computer program product. The method comprises the following steps: after receiving to-be-written data, acquiring a first initial data amount of a database queue; if the first initial data amount is smaller than the queue depth of the database queue, writing the to-be-written data into the database queue, and writing the data in the database queue into a database; if the queue depth of the database queue is equal to the first initial data amount, acquiring a second initial data amount of a file queue; if the second initial data amount is smaller than the queue depth of the file queue, writing the to-be-written data into the file queue, writing the data in the file queue into a service file, and when the data amount in the database queue is smaller than the queue depth of the database queue, writing the data in the service file into the database through the database queue. The method can improve the data writing efficiency.
Need to check novelty before this filing date? Find Prior Art