CN110781214A - Database reading and writing method and device, computer equipment and storage medium - Google Patents

Database reading and writing method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN110781214A
CN110781214A CN201910915994.2A CN201910915994A CN110781214A CN 110781214 A CN110781214 A CN 110781214A CN 201910915994 A CN201910915994 A CN 201910915994A CN 110781214 A CN110781214 A CN 110781214A
Authority
CN
China
Prior art keywords
database
task
transaction
slave
data table
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
Application number
CN201910915994.2A
Other languages
Chinese (zh)
Inventor
郑政芳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kingdee Software China Co Ltd
Original Assignee
Kingdee Software China Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Kingdee Software China Co Ltd filed Critical Kingdee Software China Co Ltd
Priority to CN201910915994.2A priority Critical patent/CN110781214A/en
Publication of CN110781214A publication Critical patent/CN110781214A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24553Query execution of query operations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Computational Linguistics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application relates to a database reading and writing method, a database reading and writing device, computer equipment and a storage medium. The method comprises the following steps: acquiring a database transaction to be processed; the database transaction includes at least one task; starting database transactions and executing tasks in sequence; when the current executed task is a read operation task, querying a historical operation record which corresponds to a target data table pointed by the read operation task and is in the life cycle of the current database transaction; when the historical operation records comprise write operation records, reading data corresponding to the tasks in the target data table from the main database; and when the historical operation record does not comprise the write operation record, reading the data corresponding to the task in the target data table from the slave database corresponding to the master database. The method can improve the service performance of the database.

Description

Database reading and writing method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a database read-write method and apparatus, a computer device, and a storage medium.
Background
With the development of computer technology, a large amount of data is generated in daily life, and a database is required for managing the data. In the case of a large amount of data, it is necessary to use a plurality of databases to store the same data, and read and write separation of database operations is achieved by having a master database process write operations, such as addition, modification, and deletion operations, and a slave database process read operations, such as query operations. Conventionally, additional third-party services, such as MyCat and ProxySQL services (a proxy service middleware), are usually used to implement read-write separation of database operations.
However, the middleware is used to implement the read-write separation of the database operation, and the problems that the read-write separation of the database operation is incomplete and the adaptive read-write separation cannot be implemented exist, so that the service performance of the database is low.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a database read/write method, an apparatus, a computer device, and a storage medium capable of improving service performance of a database.
A method of reading and writing to a database, the method comprising:
acquiring a database transaction to be processed, wherein the database transaction comprises at least one task;
starting the database affairs and sequentially executing the tasks;
when the current executed task is a read operation task, querying a historical operation record which corresponds to a target data table pointed by the read operation task and is in the life cycle of the current database transaction;
when the historical operation records comprise write operation records, reading data corresponding to the tasks in the target data table from a master database;
and when the historical operation record does not comprise a write operation record, reading data corresponding to the task in the target data table from a slave database corresponding to the master database.
A database read-write apparatus, the apparatus comprising:
the system comprises a transaction acquisition module, a transaction processing module and a transaction processing module, wherein the transaction acquisition module is used for acquiring a database transaction to be processed, and the database transaction comprises at least one task;
the transaction starting module starts the database transaction and sequentially executes the tasks;
the record query module is used for querying a historical operation record which corresponds to a target data table pointed by the read operation task and is in the life cycle of the current database transaction when the current executed task is the read operation task;
the first data reading module is used for reading data corresponding to the task in the target data table from a master database when the historical operation records comprise write operation records;
and the second data reading module is used for reading the data corresponding to the task in the target data table from the slave database corresponding to the master database when the historical operation records do not comprise the write operation records.
A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
acquiring a database transaction to be processed; the database transaction comprises at least one task;
starting the database affairs and sequentially executing the tasks;
when the current executed task is a read operation task, querying a historical operation record which corresponds to a target data table pointed by the read operation task and is in the life cycle of the current database transaction;
when the historical operation records comprise write operation records, reading data corresponding to the tasks in the target data table from a master database;
and when the historical operation record does not comprise a write operation record, reading data corresponding to the task in the target data table from a slave database corresponding to the master database.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
acquiring a database transaction to be processed; the database transaction comprises at least one task;
starting the database affairs and sequentially executing the tasks;
when the current executed task is a read operation task, querying a historical operation record which corresponds to a target data table pointed by the read operation task and is in the life cycle of the current database transaction;
when the historical operation records comprise write operation records, reading data corresponding to the tasks in the target data table from a master database;
and when the historical operation record does not comprise a write operation record, reading data corresponding to the task in the target data table from a slave database corresponding to the master database.
According to the database reading and writing method, the database reading and writing device, the computer equipment and the storage medium, when a reading operation task in a database transaction is executed, a historical operation record which corresponds to a target data table pointed by the reading operation task and is in the life cycle of the current database transaction is inquired, so that the database which needs to be accessed by the reading operation task can be distributed according to the historical operation record. When the historical operation records comprise write operation records, the data in the target data table may be modified in the life cycle of the database transaction, and the condition that the target data table is not synchronized to the slave database may exist, and the required data is directly read from the master database. When the historical operation record does not include the write operation record, the data in the target data table is not modified in the life cycle of the database transaction, the data stored in the master database and the slave database have consistency, the required data can be read from the slave database, the load pressure of the master database is reduced, the read-write operation on the databases is completely separated, the self-adaptive read-write separation is realized, and the service performance of the databases is improved.
Drawings
FIG. 1 is a diagram illustrating an exemplary implementation of a database read/write method;
FIG. 2 is a flowchart illustrating a database read/write method according to an embodiment;
FIG. 3 is a flowchart illustrating a database read/write method according to another embodiment;
FIG. 4 is a block diagram showing the construction of a database reading and writing apparatus according to an embodiment;
FIG. 5 is a block diagram showing the construction of a database reading and writing apparatus according to another embodiment;
FIG. 6 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The database reading and writing method provided by the application can be applied to the application environment shown in fig. 1. The application environment includes a user terminal 102, a computer device 104, a master server 106, and a slave server 108. The user terminal 102 may be a desktop terminal or a mobile terminal, and the mobile terminal may be at least one of a mobile phone, a tablet computer, a notebook computer, and the like. The computer device 104 may be a terminal or a server. Master server 106 is configured with a master database and slave server 108 is configured with a slave database, it being understood that slave server 108 may be configured with a plurality of slave databases. The master server 106 and the slave server 108 may each be implemented as a stand-alone server or as a server cluster of multiple servers.
The user terminal 102 and the computer device 104 are connected via a network, the computer device 104 and the master server 106 are connected via a network, and the computer device 104 and the slave server 108 are also connected via a network. The computer device 104 may obtain the database transaction from the user terminal 102, start the database transaction and sequentially execute the tasks, and when the currently executed task is a read operation task, the computer device 104 queries a historical operation record corresponding to a target data table pointed by the read operation task and within a life cycle of the current database transaction. When the historical operation record includes a write operation record, the computer device 104 reads data corresponding to the task in the target data table from the master database in the master server 106. When the historical operation record does not include a write operation record, the computer device 104 reads data corresponding to the task in the target data table from the slave database in the slave server 108. Those skilled in the art will understand that the application environment shown in fig. 1 is only a part of the scenario related to the present application, and does not constitute a limitation to the application environment of the present application.
In one embodiment, as shown in fig. 2, a database reading and writing method is provided, which is described by taking the method as an example applied to the computer device 104 in fig. 1, and includes the following steps:
s202, acquiring a database transaction to be processed; the database transaction includes at least one task.
A database transaction is a transaction composed of a sequence of tasks related to database operations, and the tasks included in the database transaction are usually related tasks. Tasks related to database operations include read operations tasks and write operations tasks. The reading operation task is used for executing reading operation on the database; the write operation task is used for executing write operation on the database. The write operation may specifically include at least one of an add operation, a modify operation, and a delete operation.
Specifically, the computer device may obtain service information collected by the user terminal, and generate a corresponding task related to the database operation according to the service information. A computer device may encapsulate multiple tasks into one database transaction. The service information is information related to a service processed by the user terminal, such as order information, resource transfer information, or information related to user operation.
In one embodiment, the computer device may first obtain a plurality of tasks to be executed, analyze the obtained plurality of tasks, and then encapsulate at least one task associated with the plurality of tasks into a database transaction. The computer device may assign a corresponding transaction identification for each database transaction. When the computer equipment detects the database transaction execution instruction, the corresponding database transaction is obtained according to the transaction identification carried by the database transaction execution instruction. The transaction identifier is an identifier used for uniquely identifying the database transaction, and may specifically include a character string of at least one character of letters, numbers and symbols.
It is understood that there are various ways for the computer device to obtain the database transaction execution instruction, for example, the computer device may receive the database transaction execution instruction sent by other computer devices; or when the computer device detects a transaction triggering operation, generate a corresponding database transaction execution instruction according to the transaction triggering operation, and the like, which is not limited herein in this embodiment of the application. The transaction triggering operation is a triggering operation for triggering generation of a database transaction execution instruction. The trigger operation may specifically be a touch operation, a cursor operation, a key operation, or a voice operation. The touch operation can be touch click operation, touch press operation or touch slide operation, and the touch operation can be single-point touch operation or multi-point touch operation; the cursor operation can be an operation of controlling a cursor to click or an operation of controlling the cursor to press; the key operation may be a virtual key operation or a physical key operation, etc.
In one embodiment, the user terminal sends service information to the computer device, and after receiving the service information, the computer device generates a task according to the service information. The computer equipment encapsulates at least one task with business association relationship into a database transaction.
For example, when a product trade order is created at a user terminal, the service data related to the product trade order specifically includes: the product transaction quantity, the product unit price, the remaining stock of the product in the warehouse, the corresponding resource transfer amount and the like corresponding to the transaction order. The service data need to be processed simultaneously, and the operation tasks corresponding to the service data with the service association relationship can be encapsulated into a database transaction, so that the consistency of the data can be ensured.
In one embodiment, the user terminal sends the service information to the computer device, and the computer device stores the service information locally after receiving the service information. The computer equipment can generate corresponding tasks according to the locally stored service information in real time. Or when the preset time period is reached, generating a corresponding task according to the service information stored in the time period. Or when the computer device detects a trigger action for triggering the generation of the task, generating a corresponding task according to the locally stored service information, and the like. The computer device may generate the corresponding task in any way, and the application embodiments are not limited thereto. Further, the computer device may encapsulate the at least one task having the business association into a database transaction.
And S204, starting database transactions and executing tasks in sequence.
Specifically, after the computer device obtains the database transaction, the database transaction may be started, and when the database transaction is successfully started, the computer device will sequentially execute all tasks included in the database transaction.
In one embodiment, the computer device may start the database transaction immediately after the computer device acquires the database transaction, or may preset an interval time, and automatically start the database transaction when the preset time is reached after the computer device acquires the database transaction.
In one embodiment, the computer device may initiate a database transaction by calling an Interface, which may specifically be an API (Application Programming Interface) Interface. When the computer device monitors that data needs to be updated, for example, a trade order is created at a user terminal, and data such as amount of money and order quantity related to the trade order needs to be updated, the computer device can call an API (application programming interface) to start a database transaction, and after the database transaction is started, tasks are sequentially executed in a life cycle of the database transaction. The lifecycle of the database transaction is the whole lifecycle from the start of the database transaction to the end of the database transaction.
S206, when the current executed task is a read operation task, querying a historical operation record which corresponds to the target data table pointed by the read operation task and is in the life cycle of the current database transaction.
Wherein the read operation task is a task for performing a read operation. The target data table is the data table to be accessed by the current read operation task. The historical operation record is a read-write operation record of the target data table in the life cycle of the database transaction and is used for recording the operated condition of the target data table in the transaction. The historical operation record in the life cycle of the current database transaction is the record of the operation condition of the target data table recorded in all time periods from the start of the database transaction to the current time.
Specifically, the computer device may sequentially execute each task in the database transaction when starting the database transaction, and for each task, the computer device may determine an operation type of the task, and when the operation type is a type of a read operation task, the computer device may obtain a target data table to be accessed by the task, and query a historical operation record of the target data table in a life cycle of the current database transaction.
In one embodiment, during the life cycle of a database transaction, whenever a read operation task or a write operation task is performed on a target data table, the operation record corresponding to the target data table is recorded.
In an embodiment, the historical operation record in the transaction may specifically include a table name of the target data table, an operation type on the target data table, an execution time, and a corresponding relationship of the transaction identifier corresponding to the historical operation record. The operation type may be a read operation type and a write operation type, and the write operation type may specifically include an add operation, a modify operation, and a delete operation. When the currently executed task is a read operation task, the computer equipment inquires the table name of the target data table and inquires the historical operation record of the target data table according to the table name of the target data table.
In one embodiment, each time a task is executed by a computer device during the lifecycle of a database transaction, the type of operation performed by the task on the target data table to which the task is directed is recorded. And the computer equipment generates a historical operation record according to the operation type of the task which is locally recorded and is performed on the pointed target data table.
And S208, when the historical operation record comprises the write operation record, reading data corresponding to the task in the target data table from the main database.
The main database is an original database for storing data and is unique, and the main database is not expandable. In order to improve the service performance of the database, it is generally required to build a database cluster, such as a database cluster including a master database and a slave database. The slave database is a database storing data copied from the master database, and is used for storing data copied from the master database. And the slave database may be one or more. The slave database can be horizontally expanded or vertically expanded. "plurality" in all embodiments of the present application means "more than one".
Specifically, after querying the historical operation record of the target data table, the computer device analyzes and judges the historical operation record, and if the historical operation record comprises a write operation record, the computer device may connect to a master database, and read data corresponding to the task in the target data table from the master database.
In one embodiment, before the computer device reads the data corresponding to the task in the target data table from the master database, a local configuration object may be obtained, and an address of the master database may be obtained from the configuration object. The configuration object is an object for storing configuration information, and may specifically be a configuration file, or may be a configuration server. The configuration file is a file for storing configuration information, the configuration server is a server for storing configuration information, and addresses corresponding to the master database and the slave database can be configured in the configuration file and the configuration server, and the addresses are used for connecting the corresponding databases. And then the computer equipment is connected with the master database according to the address of the master database. And finally, the computer equipment reads the target data table from the connected main database and acquires data corresponding to the task from the target data table.
In one embodiment, the master database includes at least one master data table. The main data table is a grid virtual table corresponding to the main database and is used for storing data of the main database. And the computer equipment screens out the main data table pointed by the current read-write operation task from at least one main data table to be used as a target data table of the main database.
And S210, when the historical operation record does not comprise the write operation record, reading data corresponding to the task in the target data table from the slave database corresponding to the master database.
Specifically, after querying the historical operation record of the target data table, the computer device analyzes and judges the historical operation record, and if the historical operation record does not include the write operation record, the computer device may connect to the slave database and read the data corresponding to the task in the target data table from the slave database.
In one embodiment, the computer device may first determine the target slave database corresponding to the master database, then the computer device reloads the local configuration object, and obtains the address of the determined target slave database from the configuration object. The computer device may then connect to the target slave database based on the address of the target slave database. And finally, the computer equipment reads the target data table from the database from the connected target and acquires the data corresponding to the task from the target data table. The target slave database is a slave database to be subjected to a read operation task and is used for storing data copied from the master database.
In one embodiment, the computer device may determine more than one slave database corresponding to the master database, and the computer device may obtain the weight coefficients corresponding to the slave servers where the slave databases are located. The computer equipment can select the target slave database by using a load balancing algorithm according to the weight coefficient corresponding to each slave database and the current load condition. The load balancing algorithm is an algorithm for balancing load pressure of the computer equipment and is used for balancing load pressure of the slave server corresponding to the slave database.
In one embodiment, the computer device may determine more than one slave database corresponding to the master database, and then the computer device obtains the hardware information and the load rate corresponding to the slave server where each slave database is located. And finally, the computer equipment screens more than one secondary database for the target secondary database meeting the idle condition according to the hardware information and the load rate corresponding to each secondary database. The hardware information is detailed information for measuring physical performance of the hardware device, and the hardware information may specifically be configuration information of a server corresponding to the database, such as a Central Processing Unit (CPU) and a memory of the server. The load rate is the load condition of the slave server where the slave database is located, and the high load rate indicates that the load capacity of the current slave database is large and the possibility of being capable of bearing tasks is low; the low load rate means that the current slave database has small load capacity and high possibility of being able to bear tasks.
In one embodiment, the slave database includes at least one slave data table. The slave data table is a grid virtual table corresponding to the slave database and used for storing data of the slave database. And the computer equipment screens the slave data table pointed by the current read-write operation task from the at least one slave data table to serve as a target data table of the slave database.
According to the database reading and writing method, when a reading operation task in a database transaction is executed, the historical operation record which corresponds to the target data table pointed by the reading operation task and is in the life cycle of the current database transaction is inquired, so that the database which needs to be accessed by the reading operation task can be distributed according to the historical operation record. When the historical operation records comprise write operation records, the data in the target data table may be modified in the life cycle of the database transaction, and the condition that the target data table is not synchronized to the slave database may exist, and the required data is directly read from the master database. When the historical operation record does not include the write operation record, the data in the target data table is not modified in the life cycle of the database transaction, the data stored in the master database and the slave database have consistency, the required data can be read from the slave database, the load pressure of the master database is reduced, the read-write operation on the databases is completely separated, the self-adaptive read-write separation is realized, and the service performance of the databases is improved.
In one embodiment, step S202 specifically includes: acquiring a plurality of tasks to be executed; packaging at least one associated task in the plurality of tasks into a database transaction, and determining a transaction identifier corresponding to the database transaction; and when detecting the database transaction execution instruction, acquiring the corresponding database transaction according to the transaction identifier carried by the database transaction execution instruction.
Specifically, when the computer device obtains a plurality of tasks to be executed, at least one associated task in the plurality of tasks is encapsulated into a database transaction according to the needs of business logic. After the database transaction is packaged, determining a transaction identifier corresponding to the database transaction, and when the computer device detects a database transaction execution instruction, locally acquiring the corresponding database transaction according to the transaction identifier carried by the database transaction execution instruction.
It is understood that there are various ways for the computer device to obtain the database transaction execution instruction, for example, the computer device may receive the database transaction execution instruction sent by other computer devices; or when the computer device detects a transaction triggering operation, generate a corresponding database transaction execution instruction according to the transaction triggering operation, and the like, which is not limited herein in this embodiment of the application.
In the above embodiment, by acquiring a plurality of tasks to be executed and encapsulating the associated tasks into one database transaction, the operation on the database can be performed within the transaction. The transaction identification corresponding to the database transaction is determined, each transaction has a unique determinable mark, the corresponding database transaction can be obtained through the transaction identification, and the processing efficiency of the database transaction is improved.
In one embodiment, the database reading and writing method further includes: when the current executed task is a write operation task, reading data corresponding to the task in the target data table from the main database; the write operation task includes at least one of an addition operation task, a modification operation task, and a deletion operation task.
The new adding operation task is used for executing the new adding data operation in the database, the modifying operation task is used for executing the data modifying operation in the database, and the deleting operation task is used for executing the data deleting operation in the database.
Specifically, the computer device can monitor and judge the currently executed tasks when the tasks are executed in sequence. When the current task is at least one of a new operation task, a modification operation task and a deletion operation task, the computer equipment is connected with the main database, and data corresponding to the task in the target data table is read from the main database.
In one embodiment, the operations for incremental and destructive modification of data must be performed in the master database, considering that the master database is the source of data synchronized from the database. Thus, when the currently executed task is a write operation task, the computer device may read data corresponding to the write operation task in the target data table from the master database.
In the above embodiment, when the currently executed task is an operation task to be added, an operation task to be modified or an operation task to be deleted, the main database is connected to read data from the main database, so that adaptive read-write separation of database operations is realized, the read data can be ensured to be the latest data, dirty reading is avoided, and the consistency of the data is ensured.
In one embodiment, step S208 specifically includes: when the historical operation records comprise the write operation records, loading a local configuration object, and acquiring the address of the main database from the configuration object; connecting the master database according to the address of the master database; and reading the target data table from the connected main database, and acquiring data corresponding to the task from the target data table.
Specifically, after the computer device queries the historical operation record, the historical operation record is analyzed and judged, and if the historical operation record comprises a write operation record, the computer device reads a local configuration object and acquires the address of the main database from the configuration object. After the computer device acquires the address of the master database, the computer device connects to the master database according to the address of the master database. After the connection is successful, the computer device reads the target data table from the connected main database and acquires data corresponding to the task from the target data table.
In one embodiment, when the history operation record corresponding to the target data table pointed by the read operation task includes a write operation record, it indicates that the data in the target data table has been modified. During the lifetime of the current database transaction, the slave database does not synchronize the latest data from the master database, and thus the data of the target data table stored in the slave database is not the latest data. In this case, the computer device may be connected to a master database, from which the latest, accurate data is read, avoiding dirty reading.
In the above embodiment, if the historical operation record includes the write operation record, the address of the master database is obtained and connected to the master database, and the data is read from the master database, so that the read data is the latest data, dirty reading can be effectively avoided, and the consistency of the data is further ensured.
In one embodiment, step S210 specifically includes: when the historical operation record does not comprise the write operation record, determining a target slave database corresponding to the master database; loading a local configuration object, and acquiring a determined address of a target slave database from the configuration object; connecting the target slave database according to the address of the target slave database; and reading a target data table from the database from the connected target, and acquiring data corresponding to the task from the target data table.
Specifically, after the computer device queries the historical operation record, the historical operation record is analyzed and judged. If the historical operation record does not include the write operation record, the computer device determines a target slave database corresponding to the master database. After determining the target slave database, the computer device loads the local configuration object and acquires the address of the determined target slave database from the configuration object, and after acquiring the address of the slave database, the computer device connects the slave database according to the address of the slave database. After the connection is successful, the computer device reads the target data table from the connected slave database and acquires data corresponding to the task from the target data table.
In one embodiment, when the history operation record corresponding to the target data table pointed by the read operation task does not include the write operation record, it indicates that the data in the target data table has not been modified. Thus, the data from the target data table stored in the database is also up-to-date throughout the lifetime of the current database transaction. In this case, the computer device may be connected to the slave database, reading data from the slave database. In the above embodiment, when the history operation record does not include the write operation record, it indicates that the data in the target data table pointed by the current read operation task is not modified, and the data in the target data table stored in the slave database is still consistent with the data in the target data table stored in the master database. By acquiring the address of the slave database and connecting the slave database, the data is read from the slave database, and partial reading operation tasks are shared by the slave database on the premise of ensuring the accuracy of the read data, so that the load of the master database is reduced.
In one embodiment, when the history operation record does not include the write operation record, determining the target slave database corresponding to the master database specifically includes: determining more than one slave database corresponding to the master database; acquiring a weight coefficient corresponding to each slave database; and screening the target slave databases meeting the idle conditions from more than one slave database according to the weight coefficients corresponding to the slave databases and the current load condition.
Specifically, after the computer device queries the historical operation record, the historical operation record is analyzed and judged. If the historical operation records do not comprise the write operation records, the computer device determines more than one slave database corresponding to the master database, and after the slave databases are determined, the computer device acquires the weight coefficients corresponding to the slave databases. According to the obtained weight coefficient corresponding to each slave database, the computer device screens more than one slave databases for the target slave databases meeting the idle condition. The condition that the idle condition is satisfied may be that hardware information of a slave server where the slave database is located is higher than preset hardware information, and/or a load rate of the slave server is lower than a preset load rate threshold.
In one embodiment, the computer device may determine a database storing data identical to the master data as a slave database corresponding to the master database, and then the computer device further screens out a target slave database satisfying the idle condition from more than one slave database.
In one embodiment, the computer device may calculate a corresponding hardware score and load score according to the hardware information and load rate of the slave server corresponding to each slave database, and calculate a composite score corresponding to each slave database according to the hardware score and load score. And thus, the slave database corresponding to the slave server whose composite score satisfies the idle condition can be selected as the target database.
In one embodiment, the computer device may use the difference or quotient of the hardware score and the load score as the corresponding composite score. The computer device may rank the composite scores corresponding to each slave database from high to low, targeting the slave database corresponding to the first ranked composite score as the target slave database.
In one embodiment, the computer device may select the target slave database through a load balancing algorithm, and then use a dynamic smooth weighted polling device to obtain a corresponding weight coefficient of each slave database. The computer equipment determines the current load condition and distributes operation tasks to all the slave databases in a balanced mode. The dynamic smooth weighted polling device is a device for dynamically distributing weight coefficients to the computer equipment, and is used for dynamically distributing weight coefficients to the slave servers corresponding to the slave databases.
In the above embodiment, the target slave databases meeting the idle condition are screened from more than one slave databases by obtaining the weight coefficients corresponding to the slave databases and according to the weight coefficients corresponding to the slave databases and the current load condition. Therefore, the reasonable resource distribution can be carried out on the slave database, and the service performance of the database is further improved.
In one embodiment, the database reading and writing method further includes: and after the current task is executed, updating the historical operation record corresponding to the target data table to which the task points according to the operation type corresponding to the task.
In one embodiment, the historical operational record of the computer device update may be recorded in a log file of the database transaction. The log file of the database transaction is a file for recording all database transactions in the database and is used for recording the data updating condition of the database. The computer equipment can restore the data to the state before the data updating according to the record information of the log file of the database transaction.
In the above embodiment, after the current task is executed, the historical operation record corresponding to the target data table to which the task is directed is updated according to the operation type corresponding to the task. Therefore, after each task is executed, the corresponding historical operation record can be timely updated. When the currently executed task is a read operation task, the inquired historical operation record which corresponds to the target data table pointed by the read operation task and is in the life cycle of the current database transaction is the latest. Therefore, whether the accessed database is a master database or a slave database can be accurately selected according to the latest historical operation record, and the consistency of data is further ensured.
In one embodiment, after the end of the lifecycle of the database transaction, the database read-write method further comprises: and synchronously updating the data of the master database to the slave database.
Specifically, when the computer device monitors that the life cycle of the database transaction is finished, the computer device stores the data subjected to the writing operation task in the master database into the master database, and synchronously updates the data in the master database into the slave database.
In one embodiment, after the life cycle of the database transaction is over, the computer device may implement the data synchronization update through a synchronization mechanism of the database itself, or may implement the data synchronization update through a manner of backing up a database directory.
In one embodiment, the computer device may implement data synchronization update by using a third-party tool, which may specifically be database data synchronization software, such as SQL company (Structured Query Language contrast tool), SQL Delta (Structured Query Language contrast tool), SyncNavigator (synchronized Navigator), and the like.
In the above embodiment, by synchronously updating the data of the master database to the slave database after the lifecycle of the database transaction has ended, the consistency of the data of the master database and the slave database can be ensured.
As shown in fig. 3, in a specific embodiment, the database reading and writing method includes the following steps:
s302, a plurality of tasks to be executed are obtained.
S304, packaging at least one related task in the plurality of tasks into a database transaction, and determining a transaction identifier corresponding to the database transaction.
And S306, when the database transaction execution instruction is detected, acquiring the corresponding database transaction according to the transaction identifier carried by the database transaction execution instruction.
S308, starting database transactions and executing tasks in sequence.
S310, when the current executed task is a read operation task, historical operation records which correspond to the target data table pointed by the read operation task and are in the life cycle of the current database transaction are inquired.
S312, when the history operation record comprises the write operation record, the address of the main database is obtained from the configuration object.
And S314, connecting the master database according to the address of the master database.
And S316, reading the target data table from the connected main database, and acquiring data corresponding to the task from the target data table.
And S318, after the current task is executed, updating the historical operation record corresponding to the target data table pointed by the task according to the operation type corresponding to the task.
And S320, synchronously updating the data of the master database to the slave database.
S322, when the current executed task is a write operation task, reading data corresponding to the task in the target data table from the main database; the write operation task includes at least one of an addition operation task, a modification operation task, and a deletion operation task.
And S324, determining more than one slave database corresponding to the master database.
S326, the weight coefficients corresponding to the slave databases are obtained.
And S328, screening more than one target slave database meeting the idle condition from the more than one slave databases according to the weight coefficient corresponding to each slave database and the current load condition.
S330, the address of the determined target slave database is obtained from the configuration object.
And S332, connecting the target slave database according to the address of the target slave database.
S334, read the target data table from the database from the connected target, and obtain data corresponding to the task from the target data table.
According to the database reading and writing method, when a reading operation task in a database transaction is executed, the historical operation record which corresponds to the target data table pointed by the reading operation task and is in the life cycle of the current database transaction is inquired, so that the database which needs to be accessed by the reading operation task can be distributed according to the historical operation record. When the historical operation records comprise write operation records, the data in the target data table may be modified in the life cycle of the database transaction, and the condition that the target data table is not synchronized to the slave database may exist, and the required data is directly read from the master database. When the historical operation record does not include the write operation record, the data in the target data table is not modified in the life cycle of the database transaction, the data stored in the master database and the slave database have consistency, the required data can be read from the slave database, the load pressure of the master database is reduced, the read-write operation on the databases is completely separated, the self-adaptive read-write separation is realized, and the service performance of the databases is improved.
It should be understood that although the various steps in the flow charts of fig. 2-3 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-3 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 4, there is provided a database read-write apparatus, including: a transaction obtaining module 401, a transaction starting module 402, a record querying module 403, a first data reading module 404 and a second data reading module 405, wherein:
a transaction obtaining module 401, configured to obtain a database transaction to be processed; the database transaction includes at least one task.
A transaction initiation module 402, configured to initiate database transactions and execute tasks in sequence.
The record query module 403 is configured to, when the currently executed task is a read operation task, query a historical operation record that corresponds to the target data table pointed by the read operation task and is within a life cycle of the current database transaction.
And a first data reading module 404, configured to read data corresponding to the task in the target data table from the master database when the historical operation record includes the write operation record.
And a second data reading module 405, configured to read data corresponding to the task in the target data table from a slave database corresponding to the master database when the history operation record does not include the write operation record.
In an embodiment, the transaction obtaining module 401 is further configured to obtain a plurality of tasks to be executed; packaging at least one associated task in the plurality of tasks into a database transaction, and determining a transaction identifier corresponding to the database transaction; and when detecting the database transaction execution instruction, acquiring the corresponding database transaction according to the transaction identifier carried by the database transaction execution instruction.
In one embodiment, the first data reading module 404 is further configured to obtain an address of the master database from the configuration object when the historical operation record includes the write operation record; connecting the master database according to the address of the master database; and reading the target data table from the connected main database, and acquiring data corresponding to the task from the target data table.
In one embodiment, the second data reading module 405 is further configured to determine a target slave database corresponding to the master database when the history operation record does not include the write operation record; acquiring the address of the determined target slave database from the configuration object; connecting the target slave database according to the address of the target slave database; and reading a target data table from the database from the connected target, and acquiring data corresponding to the task from the target data table.
In one embodiment, the second data reading module 405 is further configured to determine more than one slave database corresponding to the master database; acquiring a weight coefficient corresponding to each slave database; and screening the target slave databases meeting the idle conditions from more than one slave database according to the weight coefficients corresponding to the slave databases and the current load condition.
Referring to fig. 5, in one embodiment, the database reading and writing apparatus further includes: a third data reading module 406, a record updating module 407, and a data synchronization module 408, wherein:
a third data reading module 406, configured to read, when the currently executed task is a write operation task, data corresponding to the task in the target data table from the master database; the write operation task includes at least one of an addition operation task, a modification operation task, and a deletion operation task.
And the record updating module 407 is configured to update the historical operation record corresponding to the target data table to which the task points according to the operation type corresponding to the task after the current task is executed.
And a data synchronization module 408 for synchronously updating the data of the master database to the slave database.
When the database reading and writing device executes the reading operation task in the database transaction, the historical operation record which corresponds to the target data table pointed by the reading operation task and is in the life cycle of the current database transaction is inquired, so that the database which needs to be accessed by the reading operation task can be distributed according to the historical operation record. When the historical operation records comprise write operation records, the data in the target data table may be modified in the life cycle of the database transaction, and the condition that the target data table is not synchronized to the slave database may exist, and the required data is directly read from the master database. When the historical operation record does not include the write operation record, the data in the target data table is not modified in the life cycle of the database transaction, the data stored in the master database and the slave database have consistency, the required data can be read from the slave database, the load pressure of the master database is reduced, the read-write operation on the databases is completely separated, the self-adaptive read-write separation is realized, and the service performance of the databases is improved.
For specific limitations of the database reading and writing device, reference may be made to the above limitations of the database reading and writing method, which are not described herein again. All or part of the modules in the database reading and writing device can be realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
Fig. 6 is an internal structure diagram of a computer device in an embodiment, which may specifically be the computer device 104 in fig. 1. As shown in fig. 6, the computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing database read-write data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a database read-write method.
Those skilled in the art will appreciate that the architecture shown in fig. 6 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to perform the steps of the database read-write method described above. The steps of the database read-write method herein may be steps in the database read-write method of the above-described embodiments.
In one embodiment, a computer-readable storage medium is provided, in which a computer program is stored, which, when executed by a processor, causes the processor to carry out the steps of the above-described database read-write method. The steps of the database read-write method may be steps in the database read-write methods of the various embodiments described above.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (11)

1. A method for reading and writing a database, the method comprising:
acquiring a database transaction to be processed, wherein the database transaction comprises at least one task;
starting the database affairs and sequentially executing the tasks;
when the current executed task is a read operation task, querying a historical operation record which corresponds to a target data table pointed by the read operation task and is in the life cycle of the current database transaction;
when the historical operation records comprise write operation records, reading data corresponding to the tasks in the target data table from a master database;
and when the historical operation record does not comprise a write operation record, reading data corresponding to the task in the target data table from a slave database corresponding to the master database.
2. The method of claim 1, wherein obtaining the pending database transaction comprises:
acquiring a plurality of tasks to be executed;
packaging at least one associated task in the plurality of tasks into a database transaction, and determining a transaction identifier corresponding to the database transaction;
and when detecting a database transaction execution instruction, acquiring a corresponding database transaction according to a transaction identifier carried by the database transaction execution instruction.
3. The method of claim 1, further comprising:
when the currently executed task is a write operation task, reading data corresponding to the task from the target data table from the main database; the write operation task comprises at least one of an addition operation task, a modification operation task and a deletion operation task.
4. The method of claim 1, wherein when the historical operation record comprises a write operation record, reading data corresponding to the task in the target data table from a master database comprises:
when the historical operation record comprises a write operation record, acquiring an address of a main database from a configuration object;
connecting the master database according to the address of the master database;
and reading the target data table from the connected master database, and acquiring data corresponding to the task from the target data table.
5. The method of claim 1, wherein reading the data corresponding to the task in the target data table from a slave database corresponding to the master database when the historical operation record does not include a write operation record comprises:
when the historical operation records do not comprise write operation records, determining a target slave database corresponding to the master database;
acquiring the determined address of the target slave database from the configuration object;
connecting the target slave database according to the address of the target slave database;
and reading the target data table from the connected target slave database, and acquiring data corresponding to the task from the target data table.
6. The method of claim 5, wherein determining the target slave database corresponding to the master database when the historical operation record does not include a write operation record comprises:
determining more than one slave database corresponding to the master database;
acquiring a weight coefficient corresponding to each slave database;
and screening the target slave databases meeting the idle conditions from the more than one slave databases according to the weight coefficients corresponding to the slave databases and the current load condition.
7. The method according to any one of claims 1 to 6, further comprising:
after the current task is executed, according to the operation type corresponding to the task, updating the historical operation record corresponding to the target data table pointed by the task.
8. The method of any of claims 1 to 6, wherein after the end of the lifecycle of the database transaction, the method further comprises:
and synchronously updating the data of the master database to the slave database.
9. A database read-write apparatus, comprising:
the system comprises a transaction acquisition module, a transaction processing module and a transaction processing module, wherein the transaction acquisition module is used for acquiring a database transaction to be processed, and the database transaction comprises at least one task;
the transaction starting module starts the database transaction and sequentially executes the tasks;
the record query module is used for querying a historical operation record which corresponds to a target data table pointed by the read operation task and is in the life cycle of the current database transaction when the current executed task is the read operation task;
the first data reading module is used for reading data corresponding to the task in the target data table from a master database when the historical operation records comprise write operation records;
and the second data reading module is used for reading the data corresponding to the task in the target data table from the slave database corresponding to the master database when the historical operation records do not comprise the write operation records.
10. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 8 are implemented when the computer program is executed by the processor.
11. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 8.
CN201910915994.2A 2019-09-26 2019-09-26 Database reading and writing method and device, computer equipment and storage medium Pending CN110781214A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910915994.2A CN110781214A (en) 2019-09-26 2019-09-26 Database reading and writing method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910915994.2A CN110781214A (en) 2019-09-26 2019-09-26 Database reading and writing method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN110781214A true CN110781214A (en) 2020-02-11

Family

ID=69384776

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910915994.2A Pending CN110781214A (en) 2019-09-26 2019-09-26 Database reading and writing method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110781214A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111367718A (en) * 2020-02-26 2020-07-03 上海达梦数据库有限公司 Database starting method, device, equipment and storage medium
CN111475517A (en) * 2020-03-06 2020-07-31 平安科技(深圳)有限公司 Data updating method and device, computer equipment and storage medium
CN112100208A (en) * 2020-09-08 2020-12-18 北京金山云网络技术有限公司 Operation request forwarding method and device
CN112115202A (en) * 2020-09-18 2020-12-22 北京人大金仓信息技术股份有限公司 Task distribution method and device in cluster environment
CN112783860A (en) * 2021-01-11 2021-05-11 网易(杭州)网络有限公司 Method and device for constructing mirror database, storage medium and computer equipment
CN113190619A (en) * 2021-04-29 2021-07-30 优刻得科技股份有限公司 Data read-write method, system, equipment and medium for distributed KV database
CN113296683A (en) * 2020-04-07 2021-08-24 阿里巴巴集团控股有限公司 Data storage method, device, server and storage medium
WO2022068220A1 (en) * 2020-09-30 2022-04-07 北京金山云网络技术有限公司 Data processing method and apparatus, computer device, and storage medium
CN115794928A (en) * 2023-02-03 2023-03-14 金蝶汽车网络科技有限公司 Hypertext request processing method and device, computer equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090210428A1 (en) * 2008-02-19 2009-08-20 Yahoo! Inc. System and method for writing data dependent upon multiple reads in a distributed database database
CN102591964A (en) * 2011-12-30 2012-07-18 北京新媒传信科技有限公司 Implementation method and device for data reading-writing splitting system
CN103530290A (en) * 2012-07-03 2014-01-22 深圳市腾讯计算机系统有限公司 Method and system for data migration among databases
CN104391873A (en) * 2014-10-29 2015-03-04 上海达梦数据库有限公司 Database operation separation method and database operation separation system
CN107066575A (en) * 2017-04-11 2017-08-18 广东亿迅科技有限公司 Method and its system for realizing data base read-write load balancing
CN108038157A (en) * 2017-12-05 2018-05-15 北京星河星云信息技术有限公司 Master-slave database reading/writing method, system, storage device and server
CN110019496A (en) * 2017-07-27 2019-07-16 北京京东尚科信息技术有限公司 Data read-write method and system
CN110188114A (en) * 2019-05-27 2019-08-30 上海达梦数据库有限公司 A kind of optimization method of data manipulation, device, system, equipment and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090210428A1 (en) * 2008-02-19 2009-08-20 Yahoo! Inc. System and method for writing data dependent upon multiple reads in a distributed database database
CN102591964A (en) * 2011-12-30 2012-07-18 北京新媒传信科技有限公司 Implementation method and device for data reading-writing splitting system
CN103530290A (en) * 2012-07-03 2014-01-22 深圳市腾讯计算机系统有限公司 Method and system for data migration among databases
CN104391873A (en) * 2014-10-29 2015-03-04 上海达梦数据库有限公司 Database operation separation method and database operation separation system
CN107066575A (en) * 2017-04-11 2017-08-18 广东亿迅科技有限公司 Method and its system for realizing data base read-write load balancing
CN110019496A (en) * 2017-07-27 2019-07-16 北京京东尚科信息技术有限公司 Data read-write method and system
CN108038157A (en) * 2017-12-05 2018-05-15 北京星河星云信息技术有限公司 Master-slave database reading/writing method, system, storage device and server
CN110188114A (en) * 2019-05-27 2019-08-30 上海达梦数据库有限公司 A kind of optimization method of data manipulation, device, system, equipment and storage medium

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111367718A (en) * 2020-02-26 2020-07-03 上海达梦数据库有限公司 Database starting method, device, equipment and storage medium
CN111367718B (en) * 2020-02-26 2023-05-02 上海达梦数据库有限公司 Database starting method, device, equipment and storage medium
CN111475517A (en) * 2020-03-06 2020-07-31 平安科技(深圳)有限公司 Data updating method and device, computer equipment and storage medium
CN111475517B (en) * 2020-03-06 2024-02-20 平安科技(深圳)有限公司 Data updating method, device, computer equipment and storage medium
CN113296683B (en) * 2020-04-07 2022-04-29 阿里巴巴集团控股有限公司 Data storage method, device, server and storage medium
CN113296683A (en) * 2020-04-07 2021-08-24 阿里巴巴集团控股有限公司 Data storage method, device, server and storage medium
CN112100208A (en) * 2020-09-08 2020-12-18 北京金山云网络技术有限公司 Operation request forwarding method and device
CN112115202A (en) * 2020-09-18 2020-12-22 北京人大金仓信息技术股份有限公司 Task distribution method and device in cluster environment
WO2022068220A1 (en) * 2020-09-30 2022-04-07 北京金山云网络技术有限公司 Data processing method and apparatus, computer device, and storage medium
CN112783860B (en) * 2021-01-11 2023-08-08 网易(杭州)网络有限公司 Method, device, storage medium and computer equipment for constructing mirror image database
CN112783860A (en) * 2021-01-11 2021-05-11 网易(杭州)网络有限公司 Method and device for constructing mirror database, storage medium and computer equipment
CN113190619B (en) * 2021-04-29 2022-12-27 优刻得科技股份有限公司 Data read-write method, system, equipment and medium for distributed KV database
CN113190619A (en) * 2021-04-29 2021-07-30 优刻得科技股份有限公司 Data read-write method, system, equipment and medium for distributed KV database
CN115794928A (en) * 2023-02-03 2023-03-14 金蝶汽车网络科技有限公司 Hypertext request processing method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110781214A (en) Database reading and writing method and device, computer equipment and storage medium
US11288002B2 (en) System and method for providing high availability data
CN110209650B (en) Data normalization and migration method and device, computer equipment and storage medium
CN111143133B (en) Virtual machine backup method and backup virtual machine recovery method
CN111078507A (en) Data monitoring method, system, computer equipment and storage medium
CN108965383B (en) File synchronization method and device, computer equipment and storage medium
CN109358874B (en) Business rule updating method, business rule updating device, computer equipment and storage medium
CN111209090A (en) Method and assembly for creating virtual machine in cloud platform and server
CN108763046B (en) Thread running monitoring method, device, computer equipment and storage medium
CN110727698A (en) Database access method and device, computer equipment and storage medium
CN110784498A (en) Personalized data disaster tolerance method and device
CN112416710A (en) User operation recording method and device, electronic equipment and storage medium
CN110457401B (en) Data storage method and device, computer equipment and storage medium
CN111090701B (en) Service request processing method, device, readable storage medium and computer equipment
CN110543465B (en) Directory operation method and device, computer equipment and storage medium
CN113515518A (en) Data storage method and device, computer equipment and storage medium
CN113590643B (en) Data synchronization method, device, equipment and storage medium based on dual-track database
CN114416689A (en) Data migration method and device, computer equipment and storage medium
CN112783866B (en) Data reading method, device, computer equipment and storage medium
CN112115166B (en) Data caching method and device, computer equipment and storage medium
CN114756293A (en) Service processing method, device, computer equipment and storage medium
CN114328711A (en) Data processing method and device, computer equipment and storage medium
CN113326052A (en) Method and device for upgrading service component, computer equipment and storage medium
CN116643846B (en) Timed task processing method and device based on container cluster arrangement management platform
CN111507566B (en) Method, device, computer equipment and storage medium for generating article production list

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200211

RJ01 Rejection of invention patent application after publication