OBJECT PROCESSING METHOD, APPARATUS, AND COMPUTER DEVICE

The method improves object interaction efficiency by dividing operations into stages and checking for conflicts, enabling parallel execution of non-conflicting stages and reducing wait times in networking systems.

JP7566146B2Active Publication Date: 2024-10-11TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2023523281
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2021-05-19
Filing Date
2022-04-11
Publication Date
2024-10-11
Estimated Expiration
2042-04-11

AI Technical Summary

Technical Problem

Existing object interaction methods in networking often require strong synchronization, leading to decreased efficiency as computing nodes must wait for central node execution results, hindering parallel processing.

Method used

An object processing method that divides modification operations into stages based on conflicting operation types, allowing conflict checks and enabling parallel execution of non-conflicting stages while stopping conflicting operations.

Benefits of technology

Enhances efficiency by allowing parallel processing of non-conflicting operations and reducing the impact on other interactions, ensuring atomicity and minimizing wait times.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007566146000001
    Figure 0007566146000001
  • Figure 0007566146000002
    Figure 0007566146000002
  • Figure 0007566146000003
    Figure 0007566146000003
Patent Text Reader

Abstract

An object processing method includes the steps of: in response to an object interaction request, obtaining a current modification stage to which a current modification operation for a target object belongs, where the current modification operation is divided into multiple modification stages according to a conflicting operation type corresponding to each operation step; determining a conflict check result corresponding to the object interaction request according to a target operation type corresponding to the object interaction request and a current associated operation type corresponding to the current modification stage, where the target operation type is a type of target interaction operation requested by the object interaction request; and when no conflict exists as a result of the conflict check, performing a target interaction operation on the target object according to the object interaction request.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present application relates to the technical field of networks, and in particular to an object processing method, device, computer device, and storage medium.

[0002] This application claims priority to a Chinese patent application filed with the China Patent Office on May 19, 2021, bearing application number 2021105475897 and entitled "Object Processing Method, Apparatus, Computer Equipment, and Storage Medium," the entire contents of which are incorporated herein by reference. [Background technology]

[0003] In the field of network technology, it is often necessary to interact with objects that are stored in a database or the like. For example, in some cases, it is necessary to perform modification operations on objects in a database.

[0004] In the prior art, object interaction is realized by a strong synchronization method, that is, a specific computing node is allowed to centrally execute the interaction of words, so that other computing nodes need to wait for the execution result of the centrally controlled computing node before carrying out subsequent processing, which leads to a decrease in the efficiency of object interaction processing.

[0005] As needs to be explained, the information disclosed in the Background section above is intended only to enhance understanding of the background of the present application and may therefore include information that does not constitute prior art known to those skilled in the art. Summary of the Invention [Problem to be solved by the invention]

[0006] Based on this, it is necessary to provide an object processing method, an apparatus, a computer device and a storage medium for the above technical problem. [Means for solving the problem]

[0007] An object processing method, executed by a computing device, comprising: receiving an object interaction request for a target object; in response to the object interaction request, obtaining a current modification stage to which a current modification operation for the target object belongs, the current modification operation including a plurality of operation steps, the current modification operation being divided into a plurality of modification stages according to a conflict operation type corresponding to each of the operation steps, the conflict operation type being a type of conflict operation corresponding to the operation step; determining a conflict check result corresponding to the object interaction request according to a target operation type corresponding to the object interaction request and a current associated operation type corresponding to the current modification stage, the target operation type being a type of target interaction operation requested by the object interaction request; and performing the target interaction operation on the target object according to the object interaction request when no conflict exists as a result of the conflict check.

[0008] An object processing device, executed by a computing device, comprising: an interaction request receiving module used for receiving an object interaction request for a target object; a modification stage acquisition module used for acquiring a current modification stage to which a current modification operation for the target object belongs in response to the object interaction request, the current modification operation including a plurality of operation steps, the current modification operation being divided into a plurality of modification stages according to a conflict operation type corresponding to each of the operation steps, the conflict operation type being a type of the conflict operation corresponding to the operation step; a conflict check module used for determining a conflict check result corresponding to the object interaction request according to a target operation type corresponding to the object interaction request and a current related operation type corresponding to the current modification stage, the target operation type being a type of a target interaction operation requested by the object interaction request; and an operation execution module used for executing the target interaction operation on the target object according to the object interaction request when no conflict exists as a result of the conflict check.

[0009] A computing device comprising a memory and one or more processors, wherein computer-readable instructions are stored in the memory, and when the computer-readable instructions are executed by the one or more processors, the one or more processors are caused to perform steps in the methods described in each embodiment of the present application.

[0010] One or more computer-readable storage media having computer-readable instructions stored therein, the computer-readable instructions, when executed by one or more processors, causing the one or more processors to perform steps in the methods described in each embodiment of the present application.

[0011] A computer program product, the computer program product including computer-readable instructions, the computer-readable instructions being stored in a computer-readable storage medium, one or more processors of a computing device reading the computer-readable instructions from the computer-readable storage medium, and the one or more processors executing the computer-readable instructions, thereby causing the computing device to perform steps in the methods described in each embodiment of the present application.

[0012] The details of one or more embodiments of the application are set forth in the drawings and description below. Other features, objects, and advantages of the application will become apparent from the description, drawings, and claims.

[0013] In order to more clearly describe the technical means in the embodiments of the present application, the following briefly introduces the drawings that need to be used in the description of the embodiments. It is obvious that the drawings in the following description are only some embodiments of the present application, and those skilled in the art can also obtain other drawings according to these drawings without performing creative labor. [Brief description of the drawings]

[0014] [Figure 1] 1 is an application environment diagram of an object processing method in one embodiment. [Diagram 2] FIG. 11 is an application environment diagram of an object processing method according to another embodiment. [Diagram 3] 1 is a flow chart of a method for processing objects in one embodiment. [Figure 4] FIG. 2 is a schematic diagram of a state transformation matrix in one embodiment. [Diagram 5] 1 is a flow chart of a modification operation in one embodiment. [Figure 6] 11 is a flowchart of an object processing method according to another embodiment. [Figure 7]1 is a flow chart of a preparation operation in one embodiment. [Figure 8] 1 is a flow chart of an ending operation in one embodiment. [Figure 9] 4 is a flow chart for executing a data definition language statement in one embodiment. [Figure 10] FIG. 2 is a structural block diagram of an object processing device according to one embodiment. [Figure 11] 1 is a diagram showing the internal structure of a computer device according to one embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0015] In order to make the purpose, technical means and advantages of the present application clearer, the present application will be described in more detail below in conjunction with the drawings and examples. It should be understood that the specific examples described herein are only for interpreting the present application, and are not used to limit the present application.

[0016] The object processing method provided in the present application may be applied in an application environment as shown in Fig. 1. The application environment includes a server 102, a first terminal 104, a second terminal 106 and a database 108. Here, the first terminal 104 and the second terminal 106 communicate with the server 102 via a network, and the database 108 is a database used for storing data of each terminal and can communicate with the server and each terminal via a network. In the application process, the first terminal 104 executes a current modification operation on a target object in the database 108, the current modification operation corresponds to a number of modification steps, and the first terminal 104 sends the execution status of each modification step to the server when executing each modification step. When receiving an object interaction request for a target object sent from the second terminal 106, the server 102 obtains a current modification stage corresponding to the current modification operation of the first terminal 104 according to the execution state of each modification stage sent from the first terminal 104, determines a conflict check result corresponding to the object interaction request according to the target operation type corresponding to the object interaction request and the current related operation type corresponding to the current modification stage, stops performing the target interaction operation according to the object interaction request when a conflict exists as the conflict check result, and performs the target interaction operation on the target object according to the object interaction request when no conflict exists as the conflict check result, and sends the conflict check result to the second terminal 106. Here, the server may be an independent physical server, or may be a server cluster or a distributed system composed of multiple physical servers, or may be a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.The terminals (including the first terminal and the second terminal) may be, but are not limited to, smartphones, tablet computers, laptops, desktop computers, smart speakers, and smart watches. The terminals and the server may be directly or indirectly connected by wired or wireless communication, and the present application does not limit it here. In other application scenarios, the first terminal 104 and the second terminal 106 may be realized by one terminal device, and the terminal may be replaced by a server. In some embodiments, the terminal that interacts with the target object may be realized by a computing engine node (which may be called a SQL engine, computing node, or node), and mainly completes the computing function of the SQL (Structured Query Language) layer. As needs to be explained, the plurality in the embodiments of the present application may be at least two.

[0017] The object processing method provided in the present application may be applied in an application environment shown in Fig. 2. The application environment includes a terminal 202, a computing node cluster 204, and a database 206. The computing node cluster 204 may include at least one computing device, which may be called a computing node, and these computing nodes may be realized by a server or an interrupt. In addition, each computing node in the computing node cluster 204 may have interaction authority for the same object. In Fig. 2, two computing nodes are shown, a first computing node 2042 and a second computing node 2044. In an actual application scenario, a smaller or larger number of computing nodes may be included. Here, the first computing node 2042 and the second computing node 2044 communicate with the database 206 via a network, respectively, and the database 206 is a database used to store data of each computing node. In the application process, the first computing node 2042 executes a current modification operation on a target object in the database 206, the current modification operation corresponds to a number of modification steps, and the first computing node 2042 stores the execution state of each modification step in the database 206 when executing each modification step. When the second computing node 2044 receives an object interaction request for the target object sent from the terminal 202, it obtains the execution state of each modification step in the current modification operation of the first computing node 2042 from the database, determines and obtains a current modification step corresponding to the current modification operation of the first computing node 2042 according to the execution state, and determines a conflict check result corresponding to the object interaction request according to the target operation type corresponding to the object interaction request and the current related operation type corresponding to the current modification step.Here, the target operation type is a type of target interaction operation requested by the object interaction request, and when a conflict exists as a result of the conflict check, the target interaction operation is stopped from being executed according to the object interaction request, and when a conflict does not exist as a result of the conflict check, the target interaction operation is executed on the target object according to the object interaction request.

[0018] The embodiments provided in this application may be realized based on cloud technology. Here, cloud technology refers to a hosting technology that combines a series of resources such as hardware, software, and network in a wide area network or a local area network to realize computing, storage, processing, and sharing of data. Cloud technology is a collective term for network technology, information technology, integration technology, management platform technology, and application technology, etc., which are applied based on cloud computing business mode, and can form a resource pool, which can be used as needed, flexible and convenient. Cloud computing technology will be an important support. The background service of the technology network system requires a large amount of computing and storage resources, such as video websites, picture websites, and more portal websites. With the advanced development and application of the Internet industry, in the future, each item may have its own identification mark, which all need to be transmitted to the background system for logical processing, and different levels of data will be processed separately, and various types of industrial data all require powerful system support, which can only be realized by cloud computing.

[0019] The storage resources required for background services may be realized by a database. Here, a database can be regarded simply as an electronic file cabinet--a place for storing electronic files, and users can perform operations such as adding, querying, updating, and deleting data in the files. A so-called "database" is a collection of data stored together in a certain manner, shared by multiple users, with as little redundancy as possible, and independent of application programs. A database management system (abbreviated as DBMS) is a personal computer software system designed to manage databases, and generally has basic functions such as storage, interception, security, and backup. Database management systems may be classified on the basis of the database model they support, e.g., relational and XML (Extensible Markup Language), or on the basis of the type of computers they support, e.g., server clusters and mobile phones, or on the basis of the query language they use, e.g., SQL and XQuery, or on the basis of a focus on performance impulses, e.g., largest scale and fastest operating speed, or other classification schemes. Regardless of which classification scheme is used, some DBMSs can straddle categories, e.g., support multiple query languages ​​simultaneously.

[0020] As in the object processing method, device, computer device and storage medium provided by the present application, the data generated in the operation process of each embodiment may be stored in the blockchain. For example, the current modification stage to which the current modification operation of the target object belongs is recorded in the blockchain, and when receiving an object interaction request, the terminal or server obtains the current modification stage from the blockchain, determines the current related operation type corresponding to the current modification stage, and determines the conflict check result corresponding to the object interaction request according to the target operation type and the current related operation type, and when it determines that a conflict exists, stops performing the target interaction operation according to the object interaction request, and when it determines that no conflict exists, continues to perform the target interaction operation according to the object interaction request, and records the state information of each stage in the interaction operation process in the blockchain, and can also record the conflict check result in the blockchain. The terminal or server can obtain the state information of each stage in the interaction operation process from the blockchain. At the same time, the target operation type, the current related operation type and the conflict check result generated in the operation process may all be recorded in the blockchain. By recording data in the blockchain, it is possible to prevent the data from being tampered with, ensure the reliability of the storage of the data, and further ensure the reliability of the object processing process.

[0021] In one embodiment, as shown in Fig. 3, an object processing method is provided and applied to a computing device. It can be understood that the computing device can be a server or a terminal. This embodiment takes the method applied to a server as an example, and it can be understood that the method can also be applied to a system including a terminal and a server, and is realized by the interaction between the terminal and the server. In this embodiment, the method includes the following steps S302 to S308.

[0022] S302: Receive an object interaction request for a target object.

[0023] Here, the object is an entity that is the target of the network interaction, and may be at least one of a network device, data in the network device, and data in a database, etc. In an embodiment, the target object may be at least one of data or metadata stored in a database, etc. Specifically, the target object may be a schema (an abstract collection of metadata) in a database, such as at least one of a table, a column, an index, a constraint, a storage process, or a function in a database, etc. Furthermore, the number of target objects may be at least one. When there are at least two target objects, a conflict check can be performed for each target object respectively, and the target interaction operation is appropriately stopped or continued to be performed for each target object according to the object interaction request.

[0024] An interaction may be at least one of operations such as modifying or querying a target object. Here, the modification may be at least one of operations such as creating, modifying, deleting, inserting, or updating. Specifically, inserting one row into a table may be regarded as one modifying operation, and inserting two rows may be regarded as two modifying operations.

[0025] In one embodiment, an object interaction request is a request to perform a specific interaction on a target object. Furthermore, each object interaction request may correspond to at least one object interaction operation, and after determining the object interaction request, the corresponding object interaction operation can be determined to obtain the target interaction operation. At least one target interaction operation may correspond to one object interaction request, for example, for the following object interaction request, i.e., alter table t add a int, add b int, the corresponding target interaction operation is to add two columns, a and b, to table t, and each operation of adding a column can be regarded as one target interaction operation. When the interaction is a change operation, if an object interaction request is received, the server can determine a target change operation corresponding to the object interaction request.

[0026] Taking the target object as an example of a Schema in a database, the object interaction operation may be at least one of DML (Data Manipulation Language), DDL (Data Definition Language), or DCL (Data Control Language), etc. Here, DML may be commands such as select, update, insert, and delete, and these four commands are languages ​​for manipulating data in a database. As for DDL, the command types of DDL are more than DML, and the main commands include create, alter, or drop, etc., and DDL is mainly used for initialization operations such as defining or changing the structure, data type, links and constraints between tables, and is often used when establishing a table. DCL is a database control function, and is a statement for setting or modifying the privileges of a database user or role, and includes statements such as grant, deny, or revoke. Furthermore, languages ​​such as DML, DDL, or DCL are operations for changing objects in a database, and therefore may be called object change operations, and the corresponding requests may be called object change requests. In addition, the object interaction operation may be further subdivided, for example, alter may be subdivided into operations such as copy, inplace, or online, and these operations may be divided into multiple change steps based on the operation process. Furthermore, the object interaction request may be a command statement sent from a terminal and received by the server, for example, the server receives a DDL statement sent from a terminal, and the DDL statement is an object interaction request.

[0027] In one embodiment, the server may receive an object interaction request for a target object sent from a terminal.

[0028] S304: In response to an object interaction request, obtain a current modification stage to which a current modification operation for the target object belongs, where the current modification operation includes multiple operation steps, the current modification operation is divided into multiple modification stages according to a conflict operation type corresponding to each operation step, and the conflict operation type is a type of conflict operation corresponding to the operation step.

[0029] Here, the modification operation is an operation to modify the target object, and may be an operation to modify the contents and structure of the target object, and may be at least one of new creation, modification, deletion, insertion, and update. The current modification operation may be a modification operation that a specific computing node is performing on the target object when it receives an object interaction request, or may be a modification operation that a specific computing node performs on the target object before or after a set period when it receives the object interaction request. The modification operation includes multiple modification stages. Here, a modification stage is an execution stage that is subdivided to perform a certain modification operation. Each modification stage may include at least one operation step, and the conflict operation type corresponding to each operation step in the same modification stage is the same, that is, when it occurs that a computing node C issues an object interaction request during the execution process of the same modification stage, the response by the server is unique. For example, triggering the computing node C to perform rollback or continue execution. In one embodiment, the execution priority of the current modification operation may be higher than or equal to that of the target operation corresponding to the object interaction request, and furthermore, the execution priority of each modification stage of the current modification operation may be higher than or equal to that of each interaction stage corresponding to the object interaction request. Furthermore, the current modification stage may be the modification stage that a particular computing node is performing on the target object when receiving the object interaction request, or may be the modification stage that a particular computing node performs on the target object before or after a set period of time when the object interaction request is received.

[0030] Here, one operation may include multiple operation steps, that is, one operation is divided into multiple operation steps and executed, and the function that the operation is intended to achieve can be completed by executing the multiple operation steps corresponding to the operation. The operation step is an operation unit corresponding to the operation, for example, one operation may include at least one of the steps of establishing a handshake connection, accessing an interface, obtaining meta information, checking meta information, updating a state identifier, reading a certain data record, comparing data records, or modifying data records. These operation steps are executed according to a certain timing to complete the corresponding change operation. Furthermore, a conflict operation corresponding to an operation step is an interaction operation that has a conflict with the operation step, that is, if an operation step runs in parallel with a conflict operation, information corresponding to a target object may be confused. Therefore, the server should prevent an operation step from running in parallel with a corresponding conflict operation. Furthermore, a conflict operation type is a type of conflict operation corresponding to an operation step. Here, the conflict operation may include multiple types, and may be at least one of new creation, modification, deletion, insertion, update, or inquiry.

[0031] In one embodiment, the current modification operation on the target object may be a modification operation performed by a target computing node on the target object, where the target computing node may be another computing device different from the aforementioned server.

[0032] In one embodiment, the process of performing modification stage division for the current modification operation may be: 1. automatically divided by the server according to a certain manner, i.e., the server automatically divides the current modification operation into multiple modification stages according to the conflicting operation type; or 2. may be divided in advance by a human.

[0033] Furthermore, for a situation where the server automatically divides the modification steps for a modification operation, the server can determine whether each operation step can run in parallel with other computing nodes in the computing node cluster. When they cannot run in parallel, it determines that a conflict exists, and determines the operation type corresponding to the computing node where the conflict may occur as the conflict operation type corresponding to the operation step. Furthermore, consecutive operation steps in the same conflict operation type may be divided into the same modification step, and operation steps in different conflict operation types may be divided into different modification steps. Here, the computing node cluster is a cluster composed of computing nodes, and these computing nodes can interact with the target object. Furthermore, the target object is an object in the target database, and the target database is a database corresponding to the server, and the terminals and servers that can access the database are determined as computing nodes, and these computing nodes constitute the computing node cluster.

[0034] In one embodiment, the server can set a state record table, which may be represented as ddl_job or ddl_jobs. The state record table records the execution state of each modification step in each modification operation on the target object, and the initial state corresponding to each modification step may be unexecuted, and the computing node can modify the state from unexecuted to executed each time it completes the execution of one modification step. When the server receives an object interaction request, it can access the state record table to locate the target state record corresponding to the current modification operation, and determine the first unexecuted modification step in the target state record as the current modification step according to the order of the modification steps. Furthermore, when the execution of a modification step of the current modification operation fails, the state record of the latest modification step that has been executed can be obtained from the state record table, and the modification step before the execution failure can be restored based on the state record, and at this time, the modification step that has failed to be executed can be executed again. Here, the state record table can be stored in the server, or in the computing node that executes the current modification operation, or in a database that can be accessed by both the server and each computing node.

[0035] S306: Determine a conflict check result corresponding to the object interaction request according to a target operation type corresponding to the object interaction request and a current related operation type corresponding to the current modification stage. The target operation type is a type of the target interaction operation requested by the object interaction request.

[0036] In one embodiment, the current relevant operation type includes a current conflicting operation type or a current concurrent operation type.

[0037] In one embodiment, the target operation type is a type of the target interaction operation, which may be at least one of new creation, modification, deletion, insertion, update, or inquiry, etc. The target operation type corresponding to the object interaction request may be at least one kind, and when there are at least two kinds of target operation types, each target operation type can be respectively compared with a current related operation type corresponding to the current modification stage, and a conflict check result can be obtained.

[0038] In one embodiment, the current conflicting operation type is an operation type that is not allowed to be executed synchronously with the current modification stage, the current parallel operation type is an operation type that is allowed to be executed synchronously with the current modification stage, the current conflicting operation type may include at least one conflicting operation type, and the current parallel operation type may include at least one parallel operation type. Furthermore, a matching judgment between the target operation type and the current related operation type can be performed, and a conflict check result corresponding to the object interaction request can be obtained according to the matching judgment result. Specifically, if the current conflicting operation type includes the target operation type, it is determined that a conflict exists as the conflict check result, and if the current parallel operation type includes the target operation type, it is determined that no conflict exists as the conflict check result. In an embodiment, the current conflicting operation type and the current parallel operation type may both be determined as the current related operation type.

[0039] In one embodiment, the current conflict operation type and the current parallel operation type may be according to the operation type record table corresponding to each predetermined modification operation. Furthermore, the operation type record table may include a conflict operation type record table and a parallel operation type record table. Furthermore, when determining the current modification operation, the server determines the conflict operation type record table corresponding to the current modification operation, and determines the conflict operation type recorded in the conflict operation type record table as the current conflict operation type. Similarly, the current parallel operation type may be determined according to the parallel operation type record table of each predetermined modification operation. When determining the current modification operation, the server determines the parallel operation type record table corresponding to the current modification operation, and determines the parallel operation type recorded in the parallel operation type record table as the current parallel operation type.

[0040] S308: When no conflict exists as a result of the conflict check, a target interaction operation is performed on the target object according to the object interaction request.

[0041] Specifically, when the object interaction request is an object modification request, it executes the corresponding target modification operation on the target object, for example, when a DDL statement is received, it executes the command corresponding to the DDL statement on the target object.

[0042] It means that when there is no conflict, the target operation type corresponding to the object interaction request and the current related operation type corresponding to the current modification stage are allowed to operate in parallel, and the target interaction operation can be performed according to the object interaction request.

[0043] In one embodiment, when a conflict exists as a result of the conflict check, the execution of the target interaction operation according to the object interaction request is stopped. When a conflict exists, it means that the target operation type corresponding to the object interaction request and the current related operation type corresponding to the current modification stage are not allowed to run in parallel, and the execution of the target interaction operation according to the object interaction request can be stopped.

[0044] In the above object processing method, by dividing the modification operation into modification steps, a conflict check can be performed at each modification step. Operation steps without conflict can be operated in parallel, and operation of an operation step with conflict can be stopped at the same time, so that the atomicity of the operation can be ensured, the influence of the modification operation on other interaction operations can be greatly reduced, and the efficiency of the object interaction processing can be effectively improved. In addition, by dividing the current modification operation into modification steps, the comparison between the target interaction operation and the current modification operation can be made finer, and the target interaction operation does not need to wait until all the steps of the modification operation are completely executed. Such a method does not affect the production environment, can minimize the influence of the modification operation on other interaction operations, and is not noticeable to the user who triggers the object interaction request.

[0045] In one embodiment, the step of obtaining a current modification stage to which a current modification operation on a target object belongs includes the steps of obtaining a current operation process corresponding to a current modification operation on the target object, and determining the modification stage corresponding to the current operation process as a current modification stage to which a current modification operation on a target object belongs, in which consecutive operation processes of different conflicting operation types are divided into different modification stages.

[0046] Here, the current operation process may be an operation process that a particular computing node is performing on the target object when the object interaction request is received, or may be an operation process that a particular computing node is performing on the target object before or after a set period of time when the object interaction request is received.

[0047] In one embodiment, the correspondence between the operation process and the change stage may be preset, or the change stage corresponding to the operation process may be determined instantly. When the server receives an object interaction request, it determines a current change stage corresponding to a current operation process according to the correspondence between the operation process and the change stage.

[0048] In the above embodiment, the current modification stage is determined based on the current operation process corresponding to the current modification operation, and then a conflict check is performed for the object interaction request based on the current modification stage. The detailed operation process allows the accurate determination of the current modification stage, and a more reliable conflict check result can be obtained.

[0049] In one embodiment, the step of performing stage division for the current modification operation includes the steps of: determining a current operation step sequence corresponding to the current modification operation, where the current operation step sequence includes a plurality of operation steps arranged according to an operation order; determining a conflicting operation type corresponding to each operation step in the current operation step sequence; and dividing the current operation step sequence according to the conflicting operation type corresponding to the operation steps to obtain a plurality of modification steps corresponding to the current modification operation, where consecutive operation steps of the same conflicting operation type are divided into the same modification step.

[0050] Here, the operation sequence is a sequence obtained by arranging a number of operation steps according to the execution order. At least two operation steps that are adjacent in the execution order can be regarded as consecutive operation steps. That is, for adjacent operation steps, if the corresponding conflict operation types are different, they can be divided into different modification stages.

[0051] In one embodiment, the change operation includes multiple operation steps. Taking the new operation as an example, the new operation may include multiple consecutive operation steps, such as 1, obtaining meta information, 2, checking meta information, 3, adding new table data to a data dictionary, where the data dictionary may be stored in a database, and 4, updating a status identifier. These operation steps constitute a current operation sequence. Each operation step may have different conflict states in the interaction operation with other computing nodes during the execution process. For example, assuming that another operation is an insert operation, each operation step of the insert operation can run in parallel with the operation steps of obtaining meta information, checking meta information, and updating status identifier in the new operation, i.e., there is no conflict, but each operation step of the insert operation cannot run in parallel with the operation step of adding new table data to a data dictionary in the new operation, and the insert operation needs to be rolled back, i.e., there is a conflict. Furthermore, the conflict operation types corresponding to the mutually consecutive operation steps 1 and 2 are the same, and therefore the two operation steps can be divided into the same change step as a meta information check step. The conflicting operation types corresponding to operation steps 2 and 3 are different, so the two operation steps can be divided into different modification steps. At the same time, the conflicting operation types corresponding to operation steps 3 and 4 are different, so the two operation steps can be divided into different modification steps, and operation steps 3 and 4 are divided into a data addition step and an identifier update step, respectively. Thus, the operation step sequence corresponding to the new creation operation is divided into a meta information check step, a data addition step and an identifier update step. In the process of actually dividing the modification operation, the number of operations to be compared may be more, and may be all the interaction operations performed on the same object in the computing node cluster.

[0052] In the above embodiment, the change operation is divided into change stages according to the conflicting operation type corresponding to each operation step in the operation step sequence, so that consecutive operation steps of the same conflicting operation type are divided into the same change stage, and consecutive operation steps of different conflicting operation types are divided into different change stages, and the division of change stages can be accurately realized based on the conflicting operation type corresponding to the operation steps.

[0053] In one embodiment, the step of determining a conflict check result corresponding to the object interaction request according to a target operation type corresponding to the object interaction request and a current associated operation type corresponding to the current modification stage includes the steps of: extracting an operation type identifier from the object interaction request, obtaining a target operation type corresponding to the object interaction request according to the extracted operation type identifier, comparing the target operation type with the current conflicting operation type, and determining that a conflict exists as the conflict check result when determining that the current conflicting operation type includes the target operation type according to the comparison result.

[0054] Here, the computing node can carry a type identifier of the target operation type when sending an object interaction request, and the server can extract the type identifier from the information carried by the object interaction request to obtain the target operation type.

[0055] In one embodiment, if there are multiple current conflicting operation types, the target operation type can be compared with the current conflicting operation type one by one. When there is a conflicting operation type that matches the target operation type, it is determined that the current conflicting operation type includes the target operation type, and at this time, it is determined that a conflict exists as the conflict check result. When there is no conflicting operation type that matches the target operation type, it is determined that the current conflicting operation type does not include the target operation type, and at this time, it is determined that a conflict does not exist as the conflict check result.

[0056] In the above embodiment, the conflict check is performed based on the comparison result between the target operation type and the current conflict operation type, and the conflict check result can be obtained quickly, so as to effectively improve the efficiency of object processing.

[0057] In one embodiment, the step of determining a conflict check result corresponding to the object interaction request according to a target operation type corresponding to the object interaction request and a current associated operation type corresponding to the current modification stage includes the steps of: extracting an operation type identifier from the object interaction request, obtaining a target operation type corresponding to the object interaction request according to the extracted operation type identifier, and comparing the target operation type with the current concurrent operation type, and determining that a conflict exists as the conflict check result when determining that the current concurrent operation type does not include the target operation type according to the comparison result.

[0058] In one embodiment, if there are multiple current concurrent operation types, the target operation type can be compared with the current concurrent operation type one by one. When there is no conflicting operation type that matches the target operation type, it is determined that the current concurrent operation type does not include the target operation type, and then it is determined that a conflict exists as a conflict check result; similarly, when there is a conflicting operation type that matches the target operation type, it is determined that the current concurrent operation type includes the target operation type, and then it is determined that a conflict does not exist as a conflict check result.

[0059] In the above embodiment, the conflict check is performed based on the comparison result between the target operation type and the current parallel operation type, and the conflict check result can be obtained quickly, so as to effectively improve the efficiency of object processing.

[0060] In one embodiment, the operation type record table may be realized by a state transformation matrix, which can record the conversion possibility between each state of the target object, and if the conversion is possible, it records that the conversion is allowed, and if the conversion is not possible, it records that the conversion is not allowed. Furthermore, a conflict check result corresponding to the object interaction request can be determined according to the state transformation matrix. Here, the state of the target object may be the data read / write state of the target object, and may be at least one of public, readable, writeable, no write, no read, waiting, delete only, etc. Here, public refers to a state in which read, write, and delete operations can be performed.

[0061] In one embodiment, each operation type may correspond to a different state of the target object. In one embodiment, a target state of the target object may be determined according to the target operation type, and a current state of the target object may be determined according to the operation type of the current modification operation. Specifically, if the execution of the current modification operation has not been completed, the current state may be a state before the execution of the current modification operation, and if the execution of the current modification operation has been completed, the current state may be a state after the execution of the current modification operation. Also, an expected state for the target object of the target operation type may be determined as the target state of the target object.

[0062] In one embodiment, each modification step may correspond to a state, and the current state of the target object may be determined according to the execution state of the current modification step. The specific process may refer to the above process of determining the current state according to the current modification operation, and will not be described in detail again here.

[0063] In one embodiment, a target state corresponding to a target object after performing an interaction on the target object according to a target operation type is determined, and when determining to allow the target object to be transformed from a current state to the target state based on a state transformation matrix, a conflict check result is determined to be no conflict, otherwise, a conflict check result corresponding to an object change request is determined to be a conflict.

[0064] In one embodiment, the state transformation matrix may be shown in FIG. 4. In FIG. 4, whether or not to allow the state of a column item to be transformed into the state of a row item is recorded, where the arrow in the form represents the transformation direction, Y represents permission, and N represents disallowance. Take the transformation of the first state of the first column into the second state of the first row as an example, the current state of the target object is new-public, that is, the current modification operation is a new operation, and the corresponding state when the execution of the new operation is completed is public, and the target object of the target object is modify-public. That is, the target interaction operation is a modify operation, and the corresponding state when the execution of the modify operation is completed is public. It is determined that such a transformation is allowed by consulting the information of the state transformation matrix in FIG. 4. Therefore, it is determined that there is no conflict as a conflict check result.

[0065] In one embodiment, the method further includes stopping performing the target interaction operation on the target object according to the object interaction request when a conflict exists as a result of the conflict check.

[0066] When a conflict exists, it means that the target operation type corresponding to the object interaction request and the current related operation type corresponding to the current modification stage are not allowed to operate in parallel, and the execution of the target interaction operation according to the object interaction request can be stopped.

[0067] In one embodiment, when a conflict exists, a rollback operation can be further performed to restore the state before receiving the object interaction request, and then the execution state of the current modification operation can be monitored in real time, and if the execution of the current modification operation is finished, the latest state after the current modification operation modifies the target object can be obtained, and the object interaction request can be responded to again, and the target interaction operation can be further performed based on the latest state of the target object.

[0068] In this manner, the interaction process is based on the latest state of the target object, and differences in the states of the target object acquired by different computing nodes can be prevented.

[0069] In one embodiment, the step of performing a target interaction operation on a target object in accordance with the object interaction request when no conflict exists as a result of the conflict check includes the step of determining a target operation step sequence corresponding to a target operation type in response to the object interaction request when no conflict exists as a result of the conflict check, and the step of performing a target interaction operation on the target object in accordance with the target operation step sequence.

[0070] In one embodiment, a step sequence record table can record operation step sequences corresponding to various operation types. When receiving an object interaction request and determining that no conflict exists as a conflict check result, determine an operation step sequence corresponding to the operation type identifier from the step sequence record table according to the operation type identifier of the target operation type to obtain a target operation step sequence.

[0071] In the above embodiment, a target operation step sequence corresponding to the target operation type is determined, and a target interaction operation is performed on a target object according to the target operation step sequence, and a target interaction operation is performed on the target object based on an object interaction request, thereby ensuring a reliable response to the object interaction request.

[0072] In one embodiment, the step of performing a target interaction operation on a target object in accordance with the target operation step sequence includes the steps of determining a first operation stage corresponding to the target object, where the first operation stage is a next operation stage corresponding to the object interaction request, sending an operation locking request for the target object when a stage priority corresponding to the first operation stage satisfies a priority execution condition, and performing the operation step corresponding to the first operation stage when determining that locking response information for the operation locking request has been received.

[0073] Here, the operation locking request is a request to trigger operation locking. Furthermore, the operation locking request is sent to computing nodes interacting with the target object, triggering these computing nodes to take corresponding object locks and lock the current operation on the target object until unlocking. The locking response information may be response information returned to the server by the computing node after taking the object lock, i.e., feedback that the lock application is successful. When the server receives the locking response information, it can determine that the corresponding computing node has taken the corresponding object lock.

[0074] In one embodiment, the process of determining whether the stage priority corresponding to the first operation stage satisfies the priority execution condition may involve obtaining each stage priority in each interaction operation that interacts with the target object, comparing the stage priority corresponding to the first operation stage with each of the above-mentioned stage priorities, and determining that the stage priority corresponding to the first operation stage satisfies the priority execution condition when the stage priority corresponding to the first operation stage is the highest.

[0075] In one embodiment, the implementation process of the step of sending an operation locking request for the target object may be to send an operation locking request for the target object to other computing nodes in the computing node cluster, so that these computing nodes return locking response information to the server. Furthermore, the operation locking request may be sent to all computing nodes in the computing node cluster, and at this time, it can be considered as applying for a global lock. Under some circumstances, the operation locking request may be sent to some computing nodes in the computing node cluster, and at this time, it can be considered as applying for a local lock. In one embodiment, after sending an operation locking request for the target object to other computing nodes in the computing node cluster, when locking response information of some computing nodes is received, an operation process corresponding to a first operation stage may be performed, and when locking response information of all computing nodes is received, an operation process corresponding to the first operation stage may be performed.

[0076] Furthermore, the step of performing a target interaction operation on the target object according to the target operation process sequence includes the steps of: determining a next operation step corresponding to the target object to obtain a first operation step; sending an operation locking request to a computing node cluster, so that each computing node in the computing node cluster locks the object when it is compatible with the operation locking request and returns locking response information; executing the first operation step when the locking response information returned from each computing node in the computing node cluster is received; sending an operation unlocking request to the computing node cluster when the execution of the first operation step is completed, so that each computing node in the computing node cluster releases the object lock and continues to operate; and returning to the step of obtaining a next modification step for modifying the target object according to the object modification request, until the execution of each operation modification step corresponding to the object modification request is completed.

[0077] In one embodiment, since the target interaction operation is divided into several small operation steps, it is not necessary to apply for a lock for every operation step, and only apply for a lock when an operation step that needs to be controlled starts, and release the lock after each operation step is completed. Specifically, when data in table A is stored in a data table, and an attempt is made to delete table A based on an object modification operation, table A has already been deleted, and the data table is currently in the process of deleting data of table A. If a modification operation is received at this time to create a new table with the same name, table A has already been deleted, and there is no conflict between the newly created table and the deleted table, and there is no conflict with the operation to delete the data table, so the process of creating a new table does not need to apply for a lock.

[0078] In one embodiment, for example, if the target interaction operation is a DDL statement, the entire computing node cluster may be represented as a single entity to the outside world, and before the next stage where the DDL enters may result in the rollback of other DML statements, the server needs to apply for a global lock, and strong synchronization can be performed at this time. The specific process of applying for a global lock may be as follows: 1. The server first sends a lock request to all nodes in the computing node cluster and waits for a certain period of time. 2. The server checks whether there are other computing nodes that have already received an incompatible lock, and if so, waits and goes to 3. If there is no feedback that the server has the lock, or if it receives a locking response, it means that it can proceed to the next step, and goes to 4. 3. The server waits for the locking response information of each computing node. 4. The server advances the state of the target object so that other computing nodes can see that it has progressed the state, which could cause a rollback if they had not sent feedback in the previous step. 5. After the server completes the execution, it sends a lock release message to the computing node that fed back the lock, and continues to repeat the above steps until the DDL statement is completed.

[0079] In the above embodiment, the server requests operation locking at each operation stage, and each operation stage can be treated as an independent operation unit, thereby realizing the smallest unit of conflict checking and minimizing the waiting process of the computing nodes.

[0080] In one embodiment, the object processing method further includes a step of determining a second operation stage corresponding to the target object, where the second operation stage is a next operation stage corresponding to the first operation stage; and a step of maintaining the object lock requested by the operation locking request and executing an operation process corresponding to the second operation stage when a stage priority corresponding to the second operation stage satisfies a priority execution condition.

[0081] In the above embodiment, after applying for a lock in the first operation stage, if a lock is also applied for in the second operation stage, the lock applied for in the first operation stage is not released, thereby preventing repeated lock application operations and effectively improving the efficiency of object processing.

[0082] In one embodiment, the step of sending an operation locking request for the target object when the stage priority corresponding to the first operation stage satisfies the priority execution condition includes the step of determining an operation content level of the operation content corresponding to the first operation stage, and when the operation content level is an object level, determining that the stage priority corresponding to the first operation stage satisfies the priority execution condition and sending an operation locking request for the target object.

[0083] Here, the operation content is the content that the interaction operation operates on the target object, and the operation content may be the object level content or the data level content. Take the target object as an example, a table, the operation content may be the object level content, such as the table structure, data type, link and constraint between tables, and the operation content may be the data level content, such as inserting a record into a table and modifying data for a record in a table. The degree of influence of the content level interaction operation on the target object is greater than the degree of influence of the data level interaction operation on the target object.

[0084] In the above embodiment, a stage priority corresponding to an operation stage is determined according to an operation content level, and then an operation locking request is determined whether to send. The content level interaction operation can be preferentially performed, and the data level interaction operation is performed later. In this way, after the data level interaction operation is performed, the content level interaction operation can overwrite the effect of the data level interaction operation, effectively preventing an invalid operation from occurring, and this method can effectively improve the efficiency of object processing.

[0085] In one embodiment, the stage priority corresponding to the first operation stage may be determined according to the target operation type, and when the target operation type meets a preset type condition, it is determined that the stage priority corresponding to each operation stage of the target interaction operation all meets the priority execution condition.Furthermore, when the operation content level of the target interaction operation is an object level, it is determined that the target operation type meets the preset type condition, and it is determined that the stage priority corresponding to each operation stage of the target interaction operation all meets the priority execution condition.Specifically, when the target operation type is an operation type corresponding to a DDL statement, it is determined and determined that the stage priority corresponding to each operation stage of the target interaction operation all meets the priority execution condition, that is, the execution of a DDL statement has priority over statements such as DML.

[0086] In one embodiment, the object processing method further includes the steps of determining a target object version identifier corresponding to the object interaction request; obtaining a current object version identifier corresponding to the target object after modifying the target object according to a current modification operation; comparing the target object version identifier and the current object version identifier, and stopping responding to the object interaction request when the comparison does not match.

[0087] Here, the version identifier of the target object is carried in the object interaction request, and after the server receives the object interaction request, it determines the version identifier of the target object carried by the request to obtain the target object version identifier.

[0088] Here, the target object corresponds to a version identifier, and after updating the target object, the version identifier of the target object will change. For example, every time a change is made to the target object, the version identifier of the target object will be incremented by +1, thereby obtaining the current object version identifier corresponding to the target object.

[0089] In the above embodiment, whether to respond to the object interaction request is determined by comparing the version identifier of the target object, and the object interaction request is responded to only when the target object version identifier and the current object version identifier are matched, so that any interaction operation performed on the target object can be performed on the latest state of the target object, and differences in the contents of the target object obtained by different computing nodes can be prevented, and data consistency for the target object of all computing nodes in the computing node cluster can be ensured.

[0090] In one embodiment, the object interaction request is an object change request, and the step of performing a target interaction operation according to the object interaction request includes the steps of obtaining interaction basic information corresponding to the object interaction request when the next object change stage is an information checking stage, checking the interaction basic information, and making a state change to the target object when the checking of the interaction basic information is passed.

[0091] In one embodiment, the object interaction request is an object modification request, and the step of performing the target interaction operation according to the object interaction request includes: performing a corresponding state modification operation on the target object when the next object modification stage is a version identifier writing stage; obtaining a target state version identifier corresponding to the target object after performing the state modification operation; and writing the target state version identifier into the storage space, when a storage node in the storage space receives a new object interaction request for the target object, determining a state version identifier carried in the new object interaction request, and stopping responding to the new object interaction request when the state version identifier carried in the object interaction request does not match the target state version identifier. Here, the storage node may be called a storage engine node (TD Store), and may be a computer device operable in a storage layer, and mainly completes transaction and storage functions.

[0092] In one embodiment, the object interaction request is an object change request, and the step of performing the target interaction operation according to the object interaction request includes the steps of: performing a corresponding state change operation on the target object when the next object change stage is a state broadcast stage; and generating state change broadcast information according to the state change operation, the state change broadcast information being used to trigger each computing node in a computing node cluster to obtain the target object after the state change operation. Here, the state change broadcast information is the broadcast information generated when the state of the target object changes. Each computing node can receive the state change broadcast information and obtain the latest state and latest version information corresponding to the target object from a state record table. Furthermore, the state change broadcast information may be represented by a global schema version (GLSV), etc.

[0093] In the above embodiment, the object modification request is responded to by different modification steps, and the execution order of these modification steps can be adjusted according to the actual situation, and the number and order of modification steps for different target operation types can be different. In this manner, the object modification request can be responded to by multiple independent modification steps, and the atomized control of the modification operation can be ensured.

[0094] In one embodiment, the step of determining a conflict check result corresponding to the object interaction request according to a target operation type corresponding to the object interaction request and a current related operation type corresponding to a current modification stage includes the steps of: obtaining a state record table from a storage space, the state record table is used to record state information corresponding to each object modification operation; and when there is no state information of a conflicting object modification operation in the state record table, determining a conflict check result corresponding to the object interaction request according to a target operation type corresponding to the object interaction request and a current related operation type corresponding to a current modification stage, the conflicting object modification operation is a modification operation that conflicts with the object interaction request. The conflict check performed in this embodiment can be regarded as a conflict check between interaction operations, and can be regarded as a first-stage conflict check.

[0095] In one embodiment, when the object interaction request is an object modification request, and there is no state information of conflict object modification operation in the state record table, the step of determining the conflict check result corresponding to the object interaction request according to the target operation type corresponding to the object interaction request and the current related operation type corresponding to the current modification stage includes the steps of obtaining the object identifier of the target object, sending an object registration request to the cluster management node according to the object identifier, so that the cluster management node responds to the object registration request by generating a unique registration number according to the object identifier, and determining the conflict check result corresponding to the object interaction request according to the target operation type corresponding to the object interaction request and the current related operation type corresponding to the current modification stage when obtaining the unique registration number sent from the cluster management node. The conflict check performed in this embodiment can be regarded as an intra-interaction operation conflict check, and can be regarded as a second-stage conflict check.

[0096] In one embodiment, each modification stage of the current modification operation may correspond to an operation type, and these operation types may be determined based on the pre-set state of the target object, for example, for an operation stage in a delete-only state, the operation type may be a delete operation type, for an operation stage in a write state, the operation type may be a write operation type, for an operation stage in a read state, the operation type may be a read operation type, and so on.

[0097] In one embodiment, the step of determining a conflict check result corresponding to the object interaction request according to a target operation type corresponding to the object interaction request and a current related operation type corresponding to a current modification stage includes the steps of: determining a current parallel operation type corresponding to a current modification stage as a delete operation type when the current modification stage is a write operation blocking information stage, where the write operation blocking information stage is used to write a current object version identifier corresponding to the target object after modifying the target object according to the current modification operation; and determining that a conflict exists as a conflict check result corresponding to the object interaction request when the target operation type does not match the delete operation type.

[0098] Here, the operation blocking information writing step is a step of writing the operation blocking information to a storage space, and may be called a write fence step. The operation blocking information may be information used to block an operation that does not meet a condition. Here, the operation that does not meet the condition may be an operation whose version identifier does not match a current object version identifier corresponding to the target object.

[0099] Here, the delete operation type is an operation type that can perform a delete operation, specifically, the delete operation type may be an operation type in a delete-only state. Furthermore, only when the target operation type corresponds to a delete operation, it is determined that no conflict exists as the conflict check result, otherwise, it is determined that a conflict exists as the conflict check result.

[0100] In one embodiment, a version number is assigned to the Schema, and the version number of the Schema can be stored as data in the storage node after each execution of an interaction operation. A +1 operation can be performed on the version number at the write fence stage.

[0101] In one embodiment, if a DDL statement for a schema finishes executing, other nodes can know that the DDL statement for the schema has finished executing based on the broadcasted global object version, and can therefore obtain the latest version number and latest state of the schema through ddl_job. When a DML statement accesses a schema with a version number, if this version number is smaller than the current version number of the schema, it means that the schema is in the process of executing a DDL statement and has not completed, and the DML statement needs to be rolled back. In this manner, it is possible to effectively prevent other statements from interacting with the schema during the process of executing a DDL statement on the schema.

[0102] In the above embodiment, in the stage of writing the operation inhibition information, the conflict check result is determined based on the matching judgment of the operation type, so that the reliability of the conflict check result can be effectively ensured.

[0103] In one embodiment, the modification stage corresponding to the current modification operation may be shown in 502 / 504 / 506 / 508 and 510 in Fig. 5. Each modification stage in Fig. 5 may correspond to a respective state, and after receiving an object interaction request, the server performs a matching judgment between the target operation type corresponding to the object interaction request and the current concurrent operation type of the current modification stage, and if they match, the conflict check result determines that there is no conflict, and if they do not match, the conflict check result determines that there is conflict. The management node may be called a cluster management node (MC), which is realized by a computer device and can manage the essential information of the entire cluster.

[0104] Furthermore, the modification stage corresponding to the current modification operation is described in detail as follows.

[0105] 1. When receiving a DDL statement, the server reads the data dictionary from the storage node, gets meta information from it, and checks the meta information. If the meta information check fails, it terminates (ABORTs) the execution of the response to the object interaction request.

[0106] 2. If the meta-information check is successful, the server determines the current state and the target state of the Schema, obtains the state transformation matrix from the local storage space, and determines whether to allow the current state to be transformed into the target state based on the state transformation matrix. If the transformation is not allowed, it terminates (ABORTs) the execution of the response to the object interaction request.

[0107] 3. If the transformation is permitted, push the write fence to the storage node and store the Schema version number as data in the storage node. If the push fails, terminate (ABORT) the execution of the response to the object interaction request.

[0108] 4. If the progress is successful, update the data dictionary with the storage node. If the update fails, terminate (ABORT) the execution of the response to the object interaction request.

[0109] 5. If the update is successful, the manager node forwards the GLSV and notifies other computes of the executed state of the Schema statements.

[0110] 6. If the GLSV progress is successful, execution of the current modification operation succeeds (SUCCESS).

[0111] In one embodiment, when the object interaction request is an object modification request, a prepare operation may be further performed before the target modification operation on the target object, and an ending operation may be further performed after the target modification operation on the target object. For example, if the target modification operation is an operation corresponding to DDL, the prepare operation may be called start_ddl_jod, the ending operation may be called end_ddl_jod, and the target modification operation may be called push_ddl_jod. The process of performing the prepare operation, the target modification operation, and the ending operation together may be shown in FIG. 6, which is a flowchart of an object processing method in one embodiment. A specific implementation process may be as follows: Execute the prepare operation, and if the execution of the prepare operation is successful, determine that the start is successful, and proceed to the execution process of the native DDL process. Here, the first native DDL process may be a DDL process that needs to be executed between the prepare operation and the object modification operation. When the execution of the first native DDL process is finished, start the execution of the object modification operation, and if the execution of the object modification operation is successful, determine that the inference is successful. Continue to execute the second native DDL process. Here, the second native DDL process may be a DDL process that needs to be executed between the object modification operation and the ending operation. When the execution of the second native DDL process ends, the execution of the ending operation is started, and if the execution of the ending operation is successful, it is determined that the estimation is successful, and the entire process can be terminated. Also, as shown in FIG. 6, it can be determined whether restoration is necessary when the execution of a certain operation step fails, and if restoration is necessary, a restoration process is executed to restore to the state before the execution failure, so as to ensure stable operation of the object modification operation.

[0112] In one embodiment, any type of DDL will record a ddl record when it starts executing, i.e., it records state information in ddl_job. The purpose of doing this is to make it clear in the system that a certain DDL has been executed. To the restore thread, ddl_job is a field of the DDL.

[0113] In one embodiment, in order to ensure that data is not read / written incorrectly during the process of DML in parallel with DDL, the metadata and user data states need to be continuously adjusted according to the specific situation during the execution process of DDL. For example, before DROP TABLE can reliably execute the deletion of user data, the metadata state should be advanced to a delete-only state, thereby preventing new transactions from reading the deleted user data. In a distributed database, the process of advancing the DDL state may be interrupted by any abnormality, such as a network magnetic disk abnormality. Any failure of any node in the progression process means that the execution of DDL fails. In this situation, it is necessary to restore in a background thread, and the statement to be restored is ddl_job recorded in start_ddl_job, and ddl_job is continuously updated with the progress of DDL, and the real-time nature of ddl_job can reserve a valid field for the restoration thread. When the execution of DDL is finished, it is necessary to decide whether to reserve or delete ddl_job according to whether to throw an abnormality to the main process of DDL execution. At the point where we decide to delete the ddl_job, i.e. represent the DDL execution successful, otherwise a secondary decision needs to be made in the background restore thread.

[0114] Specifically, the function push ddl job encapsulates all the necessary states to progress a Schema state from one state to the next. By implementing this function, the execution of one DDL change is divided into several successive small steps, and push_ddl_job is used to progress the execution state of the small steps of a DDL statement, and is an implementer that executes DDL step by step, and its main functions include the following, as shown in Figure 5:

[0115] 1. Modify version information according to the latest data dictionary information, and modify the state and version of Schema in the data dictionary. This process can be a normal modification operation of the data dictionary, and further includes checking meta information.

[0116] 2. When the meta-information check is successful, the state transformation matrix can be used to detect whether the transformation of the object state is logical, and the state can progress only between permitted states.

[0117] 3. Add / progress a write fence stage.

[0118] 4. Update the data dictionary.

[0119] 5. Increment the version identifier and save the increment information for failure recovery.

[0120] In one embodiment, object modification operations of embodiments of the present application can achieve asynchronous deletion of data, for example, one computing node can delete a record in Schema in one step when another computing node reliably performs an insert operation on Schema. Operations of the DROP class in DDL statements can be completed instantly, a background thread ensures the deletion of the data, and the actual delete operation does not need to be executed on the same computing node as the DDL statement.

[0121] In one embodiment, the specific implementation process of the prepare operation may be shown in Figure 7. start_ddl_job is the starting point for the SQL Engine to execute a DDL statement, and as shown in Figure 7, its main functions include:

[0122] 1. Query the DDL synchronization structure, i.e., scan ddl_job, and determine that no statements are running in the cluster global that conflict with the current ddl. For example, execute an ALTER TABLE or DROP TABLE statement, and obtain the conflict detection result according to the statement execution result. Here, the storage layer is used to perform the first conflict detection, i.e., realize the concurrency control between DDLs. If it is determined that a conflict exists based on the scan result of ddl_job, terminate the execution of the DDL statement (ABORT).

[0123] 2. If it is determined that there is no conflict based on the scan result of ddl_job, obtain the key (keyword) formed by the base table name of the target object and register it on the management node. The management node will not allow the registration of two duplicate values ​​during the registration process, and the MC will output a data dictionary lock (dd.table lock) when the registration is successful, and here the cluster management layer is used to perform a second conflict detection, i.e., to realize parallel control between DDL statements. If the acquisition of the dd.table lock fails, i.e., the registration fails, the execution of the DDL statement is terminated (ABORT).

[0124] 3. If the dd.table lock is acquired successfully, the current ddl status information is stored in the status record table (ddl_job table) for parallel control and failure recovery. If the storage in the ddl_job table fails, the execution of the DDL statement is terminated (ABORT).

[0125] 4. Check the existence of the record stored in 3. If it exists, it means that the record is successfully stored in the ddl_job table. Obtain a status lock (job_id lock) from the management node to quickly determine the current execution status of the DDL. If not obtained, it means that the DDL is being executed in a normal process or has already been restored on another node. If the acquisition of the job-id lock fails, terminate the execution of the DDL statement (ABORT).

[0126] 5. If the job-id lock is acquired successfully, execution of start_ddl_job is successful (SUCCESS).

[0127] In one embodiment, the specific implementation process of the ending operation may be shown in Figure 8. Specifically, end_ddl_job is used to end the execution of DDL and perform some cleanup, and the specific implementation process is described as follows:

[0128] 1. The server determines whether the DDL record needs to be removed from the ddl_job table according to the execution field of the DDL locally, where the basis for whether it needs to be removed is whether it needs to be restored or continued to be executed in the restore thread; if it needs to be restored or continued to be executed in the restore thread, it will not be removed.

[0129] 2. When the decision is successful, the manager node advances the GLSV (i.e., advances the object version identifier) ​​and notifies other computes that execution of the statement on the Schema has finished.

[0130] 3. When the GLSV process is successful, execute the lock release, i.e. execute release LOCK to release the various global locks applied by the management node in the execution process of this DDL. If the execution of the lock release fails, it will be restored by the background thread.

[0131] 4. When the execution of the lock release is successful, execute internal memory release, i.e. execute release mem to release the corresponding internal memory. If the execution of the internal memory release fails, it will be restored by a background thread.

[0132] 5. If the internal memory freeing is successful, end_ddl_job is executed successfully (SUCCESS). Also, if the legacy task is not completed, it is restored by the background thread.

[0133] As needs to be explained, each divided step in Figures 5, 6, 7 and 8 can be understood as a complete operation step, and the modification steps required for different operation types can be appropriately reduced, for example, a delete operation does not require additional modification of data dictionary information.

[0134] In one embodiment, the execution status of a DDL statement can be obtained by querying the DDL synchronization construct. The query result obtained by the following query statement "select * from information_schema.ddl_job where is_history= 1\G" may be as follows: mysql> select * from information_schema.ddl_job where is_history=1\G SCHEMA_NAME: d1 TABLE_NAME: # TABLE_VERSION: 0 DDL_STATUS: 0 START_TIMESTAMP: 2021-04-07 19:14:14 LAST_TIMESTAMP: 2021-04-07 19:14:14 DDL_SQL: create database d1 INFO: {”exec_addr”:{”ip”:”127.0.0.1”,”port”:9025},”recov_addr”:{”ip”:”127.0.0.1”,”port”: 9025}}

[0135] Here, "SCHEMA_NAME" represents the name of the target object, "TABLE_NAME" represents the name of a table in the target object, "TABLE_VERSION" represents the version of the table, "DDL_STATUS" represents the execution status of the DDL statement, "START_TIMESTAMP" represents the start time of executing the DDL statement, "LAST_TIMESTAMP" represents the end time of executing the DDL statement, "DDL_SQL" is the DDL statement being executed, "INFO" represents the queried information, exec_addr represents the machine address of the DDL execution, ip represents the corresponding IP (Internet Protocol) address, port represents the corresponding network interface, recov_addr represents the address of the machine where the DDL execution is completed, and may include status information such as normal or abnormal.

[0136] The present application further provides an application scenario in which the above object processing method is applied. Specifically, the application of the object processing method in the application scenario is as follows:

[0137] The embodiments of the present application can be applied to a distributed database system, a multi-write database cluster system in which computing and storage are separated, etc. The process of executing a single Data Definition Language statement (DDL statement) is shown in FIG.

[0138] First, execute the start_ddl_jod step. Then execute the push_ddl_job step. Finally, execute the end_ddl_job step. The push_ddl_job step is used to realize the functions of 1) advancing the state and ensuring the visibility of user data, and 2) recording the progress information of ddl and ensuring that it can be restored at any node. The end_ddl_job step is used to realize the cleanup such as saving information. In the case of normal termination, it is determined whether to withhold the corresponding state record based on whether it is necessary to organize the temporary table, and the deletion of user data must be performed in a background thread, i.e., in the DDL thread.

[0139] As shown in FIG. 9, when the execution of a certain step fails, a failure record can be generated, and the state before the execution failure can be restored by the restoration thread. Here, the execution failure can be a failure of the program execution, or a failure situation in which the system cannot operate, such as a power outage. Furthermore, when there is no need to process again in the restoration thread, the DDL thread can return to the original state and process other tasks, and when there is a need to process in the restoration thread, the corresponding state can be restored by the restoration thread, and the restoration thread can access ddl_job to obtain the execution failure state, and further realize the state restoration. There is no need to worry about data problems caused by the failure of the DDL, and once the execution of the DDL fails, the background thread can restore the abnormal DDL to ensure the data consistency state.

[0140] Strong synchronization of all computing nodes is not required for a DDL statement, and all computing nodes become aware of the execution of a DDL statement on a computing node in the following manner:

[0141] 1. For DDL statements, the cluster management node and storage nodes verify whether modification statements to the same schema are still running. Because modification processes are stored in the storage nodes in the form of tasks, the process of querying the tasks actually includes a verification process. In addition, the write fence in the storage nodes can ensure that the storage nodes cannot perform read and write operations that are not permitted during DDL processes.

[0142] 2. Each small step in a DDL statement will update a cluster-level variable, and when other nodes in the cluster start a new transaction, they can make a logical decision on the next execution based on the current step of the schema change and obtain the cluster-level variable. It will decide whether to proceed to the schema change decision process according to the value of the cluster-level variable, and will determine whether a schema change has occurred in the currently operated schema, what change has occurred, what state the schema is in at the moment, and whether this state allows the current operation to be executed. After the execution of the process is completed, the schema of the computing node will also be updated to the latest state.

[0143] 3. A logical table can be added in the data dictionary, that is, the state record table in the above embodiment. In the operation process, the state in the logical table is synchronized to determine how to execute the statement, and this logical table can be accessed by all computing nodes in the computing node cluster, so the state recorded in the logical table can be a cluster-level variable. Here, the logical table can be realized by ddl_job, and the execution state of DDL can be queried in the form of SQL statements to determine whether the current DDL execution is completed, to which step it should be executed, etc., according to the records in ddl_job. In addition, the synchronization structure in the logical table and the digital dictionary can be different.

[0144] 4. Assuming that no corresponding Schema change occurs when other nodes start executing the transaction, during the execution process, the persistent update to the Schema state during the Schema change process (Write fence) can prevent the problem of data inconsistency caused by each node in the cluster operating using an old version of the Schema object during the execution process. A logic is added to determine whether the current version of the Schema object is compatible with the operation version when data is written to the storage layer to determine whether data is allowed to be read or written, and further ensure that neither the read nor the write of data introduces data consistency and integrity problems. Supports multiple conflict resolution mechanisms at the same time.

[0145] Also, DDL has priority, that is, DDL can always proceed with execution, and other DML transactions will be rolled back in some state. Specifically, if a DDL statement needs to be executed during the execution of other DML statements, these DML statements will be rolled back after the execution of the DDL statement is finished.

[0146] In the prior art, when implementing DDL in a distributed database, only serial execution of DDL is implemented, and DDL execution is only permitted on a specific node. This embodiment can allow DDL statements to be executed on multiple nodes by splitting the details of the execution stage, that is, DDL can be executed on any computing node, and unrelated DDL can be executed in parallel, realizing multi-write.

[0147] The above embodiment has at least the following beneficial effects.

[0148] 1. It is possible to ensure that the execution expression of a DDL statement in a distributed database is basically consistent with the execution of a DDL statement by a standalone MySQL (a relational database management system).

[0149] 2. By segmenting the execution of DDL and allowing the processing object version delay between different computing nodes, the impact of DML statements during the process of DDL execution in a distributed system is maximized. By converting the execution of traditional DDL statements from the original mode of direct change from before to after the change into multiple consecutive independent small steps, different computing nodes in the cluster can sense the state of the schema change in an asynchronous manner, and at the same time, when the computing layer starts a read / write operation, the memory layer determines whether the current operation object version state is consistent with the latest state of the cluster schema, preventing data consistency problems in read / write transactions caused by DDL changes.

[0150] 3. DDL statements are executed in stages, other nodes can sense different stages in a timely manner, and can decide whether to continue executing / rollback the transaction according to the current execution stage of the DDL, and transaction rollback can be minimized by precise partitioning of states. Non-locking mode allows different computing nodes in a cluster to sense that a DDL modification statement is occurring in the current system, and minimizes the impact on other computing nodes when a DDL statement is executed compared to the implementation with strong synchronization.

[0151] 4. User data is protected by write fences. Even if cross-version data breaks through the limitations of segmented DDL, the storage layer can detect it through write fences and reject the transaction commit, ensuring that data is not read or written incorrectly.

[0152] 5. Implement a global control structure through ddl_job to track DDL execution information, and have a background restore thread monitor system tables in real time to ensure that when a DDL statement fails to execute in a distributed system, the metadata can still be restored to an accurate and consistent state to provide services to users.

[0153] 6. Once a DDL failure occurs, the background thread can immediately roll back or proceed according to the execution information, ensuring that the entire distributed database system can enter a different consistent state and restore the ability to provide services to the outside world.

[0154] As should be understood, although the steps in the above flowchart are shown in sequence according to the indication of the arrows, the steps are not necessarily performed in sequence according to the order indicated by the arrows. Unless otherwise specified in this specification, there is no strict order restriction on the execution of the steps, and the steps may be performed in other orders. And, at least some of the steps in the above flowchart may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but may be performed at different times. The order of execution of these steps or stages is also not necessarily performed in sequence, but may be performed in order or alternately with other steps or at least some of the steps or stages of other steps.

[0155] Based on the same idea as the object processing method in the above embodiment, the present application further provides an object processing device, which can be used to execute the above object processing method. For ease of explanation, in the structural diagram of the embodiment of the object processing device, only parts related to the embodiment of the present application are shown. As can be understood by those skilled in the art, the illustrated structure does not constitute a limitation on the device, which may include more or less components than those illustrated, or combine certain components or arrange different components.

[0156] In one embodiment, as shown in Figure 10, an object processing device 1000 is provided, which can adopt software modules or hardware modules, or a combination of both, to become a part of a computer device. The device specifically includes: an interaction request receiving module 1002, a change stage obtaining module 1004, a conflict checking module 1006, and an operation performing module 1008, in which: The interaction request receiving module 1002 is used for receiving an object interaction request for a target object.

[0157] The modification stage acquisition module 1004 is used for acquiring a current modification stage to which a current modification operation for a target object belongs in response to an object interaction request, where the current modification operation includes multiple operation steps, the current modification operation is divided into multiple modification stages according to a conflict operation type corresponding to each operation step, and the conflict operation type is a type of conflict operation corresponding to the operation step.

[0158] The conflict checking module 1006 is used to determine a conflict checking result corresponding to the object interaction request according to a target operation type corresponding to the object interaction request and a current associated operation type corresponding to the current modification stage, where the target operation type is the type of the target interaction operation requested by the object interaction request.

[0159] The operation execution module 1008 is used for executing a target interaction operation on a target object according to the object interaction request when no conflict exists as a result of the conflict check.

[0160] In the above-mentioned object processing device, by subdividing a change operation into change stages, a conflict check can be performed at each change stage, operation stages where no conflict exists can be operated in parallel, and at the same time, operation of an operation stage where a conflict exists can be stopped, thereby greatly reducing the impact of the change operation on other interaction operations and effectively improving the efficiency of object interaction processing.

[0161] In one embodiment, the modification stage acquisition module further includes: an operation process acquisition sub-module, which is used for acquiring a current operation process corresponding to a current modification operation on a target object; and a modification stage determination sub-module, which is used for determining the modification stage corresponding to the current operation process as the current modification stage to which the current modification operation on the target object belongs, in which consecutive operation processes of different conflicting operation types are divided into different modification stages.

[0162] In one embodiment, the object processing device further includes: a step sequence determination module used for determining a current operation step sequence corresponding to a current modification operation, where the current operation step sequence includes a plurality of operation steps arranged according to an operation order; a conflict type determination module used for determining a conflict operation type corresponding to each operation step in the current operation step sequence; and a step sequence division module used for dividing the current operation step sequence according to the conflict operation type corresponding to the operation steps to obtain a plurality of modification steps corresponding to the current modification operation, where consecutive operation steps of the same conflict operation type are divided into the same modification steps.

[0163] In one embodiment, the current relevant operation type includes a current conflicting operation type, and the conflict checking module includes: a first operation type determination sub-module used for extracting an operation type identifier from the object interaction request and obtaining a target operation type corresponding to the object interaction request according to the extracted operation type identifier; and a first conflict checking sub-module used for comparing the target operation type with the current conflicting operation type and determining that a conflict exists as a conflict checking result when it is determined that the current conflicting operation type includes the target operation type according to the comparison result.

[0164] In one embodiment, the current related operation type includes a current concurrent operation type, and the conflict check module includes: a second operation type determination sub-module used for extracting an operation type identifier from the object interaction request and obtaining a target operation type corresponding to the object interaction request according to the extracted operation type identifier; and a second conflict check sub-module used for comparing the target operation type with the current concurrent operation type and determining that a conflict exists as a conflict check result when it is determined according to the comparison result that the current concurrent operation type does not include the target operation type.

[0165] In one embodiment, the object processing device further includes an operation stop module used for stopping performing a target interaction operation on a target object according to the object interaction request when a conflict exists as a result of the conflict check.

[0166] In one embodiment, the operation execution module includes a step sequence determination submodule used to determine a target operation step sequence corresponding to a target operation type in response to an object interaction request when no conflict exists as a result of the conflict check, and an interaction operation execution submodule used to execute a target interaction operation on a target object according to the target operation step sequence.

[0167] In one embodiment, the interaction operation executing sub-module includes: a first operation step determination unit, used for determining a first operation step corresponding to a target object, where the first operation step is a next operation step corresponding to an object interaction request; a locking request sending unit, used for sending an operation locking request for the target object when a step priority corresponding to the first operation step satisfies a priority execution condition, where the operation locking request is used for triggering a computing node interacting with the target object to apply a corresponding object lock and lock the current operation on the target object until unlocking; and an operation operation executing unit, used for executing an operation operation corresponding to the first operation step when determining that locking response information for the operation locking request is received, where the locking response information is response information returned by the computing node after applying the object lock.

[0168] In one embodiment, the object processing device further includes: an operation stage determination module, used for determining a second operation stage corresponding to the target object, where the second operation stage is a next operation stage corresponding to the first operation stage; and an object lock maintaining module, used for maintaining the object lock requested by the operation locking request and executing the operation process corresponding to the second operation stage when the stage priority corresponding to the second operation stage satisfies the priority execution condition.

[0169] In one embodiment, the locking request sending sub-module includes: a content level determination unit, which is used for determining an operation content level of an operation content corresponding to a first operation stage; and a locking request sending unit, which is used for determining that the stage priority corresponding to the first operation stage satisfies the priority execution condition when the operation content level is an object level, and sending an operation locking request for the target object.

[0170] In one embodiment, the object processing device further includes: a target version identifier determination module, used for determining a target object version identifier corresponding to the object interaction request; a current version identifier determination module, used for obtaining a current object version identifier corresponding to the target object after modifying the target object according to a current modification operation; and a version identifier comparison module, used for comparing the target object version identifier and the current object version identifier, and stopping responding to the object interaction request when the comparison is not consistent.

[0171] In one embodiment, the current related operation type includes a current parallel operation type, and the conflict check module includes: an operation type determination submodule, which is used for determining a current parallel operation type corresponding to a current modification stage as a delete operation type when the current modification stage is a write operation blocking information stage, where the write operation blocking information stage is used for writing a current object version identifier corresponding to the target object after modifying the target object according to the current modification operation; and a third conflict check submodule, which is used for determining that a conflict exists as a conflict check result corresponding to the object interaction request when the target operation type does not match the delete operation type.

[0172] Specific limitations regarding the object processing device may be referred to the limitations regarding the object processing method, and will not be described in detail again here. All or part of each module in the object processing device can be realized by software, hardware, or a combination thereof. Each module may be embedded in or independent of one or more processors in a computer device in the form of hardware, or may be stored in a memory in a computer device in the form of software, whereby one or more processors call and execute operations corresponding to each module.

[0173] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG. 11. The computer device includes one or more processors, a memory, and a network interface connected via a system bus. Here, the one or more processors of the computer device are used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. An operating system, computer-readable instructions, and a database are stored in the non-volatile storage medium. The internal memory provides an environment for the operation of the operating system and the computer-readable instructions in the non-volatile storage medium. The database of the computer device is used to store data such as a conflict check result. The network interface of the computer device is used to connect and communicate with an external terminal via a network. When the computer-readable instructions are executed by the one or more processors, an object processing method is realized.

[0174] As will be understood by those skilled in the art, the structure shown in FIG. 11 is merely a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on a computer device to which the solution of the present application can be applied; a specific computer device may include more or less components than those shown in the drawing, or may combine certain components, or have a different component arrangement.

[0175] In one embodiment, a computing device is further provided, comprising a memory and one or more processors, wherein computer readable instructions are stored in the memory, and the one or more processors, when executing the computer readable instructions, implement the steps in each of the method embodiments described above.

[0176] In one embodiment, one or more computer-readable storage media are provided that store computer-readable instructions that, when executed by one or more processors, implement the steps in each of the method embodiments described above.

[0177] In one embodiment, a computer program product is provided, the computer program product including computer readable instructions stored in a computer readable storage medium, one or more processors of a computing device read the computer readable instructions from the computer readable storage medium, and the one or more processors execute the computer readable instructions to cause the computing device to perform the steps of each of the method embodiments described above.

[0178] As can be understood by those skilled in the art, the implementation of all or part of the processes in the above embodiment methods may be completed by instructing relevant hardware by computer-readable instructions, and the computer-readable instructions may be stored in a non-volatile computer-readable storage medium, and when the computer-readable instructions are executed, the implementation may include the processes of the above embodiment methods. Here, any reference to memory, storage, database, or other medium used in the embodiments provided herein may include at least one of non-volatile and volatile memory. Non-volatile memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, etc. Volatile memory may include Random Access Memory (RAM) or external cache memory. As a non-limiting explanation, RAM may be of multiple types, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), etc.

[0179] The technical features of the above embodiments can be combined in any combination. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope described in this specification.

[0180] The above examples only represent several embodiments of the present application, and the description is relatively specific and detailed, but it should not be understood as limiting the scope of the invention patent. However, those skilled in the art can make some modifications and improvements without departing from the concept of the present application, all of which are within the scope of protection of the present application. Therefore, the scope of protection of the present application patent should be governed by the appended claims. [Explanation of symbols]

[0181] 102 Server 104 Terminal 1 106 Terminal 2 108 Database 202 Terminal 204 Compute Node Cluster 206 Database 1000 Object Processing Unit 1002 Interaction Request Receiver Module 1004 Change stage acquisition module 1006 Conflict Check Module 1008 Operation Execution Module 2042 First Computing Node 2044 Second Computing Node

Claims

1. 1. A method of processing objects, implemented by a computing device, comprising: receiving an object interaction request for a target object; in response to the object interaction request, acquiring a current modification stage to which a current modification operation for the target object belongs, the current modification operation includes a plurality of operation steps, the current modification operation is divided into a plurality of modification stages according to a conflict operation type corresponding to each of the operation steps, and the conflict operation type is a type of conflict operation corresponding to the operation step; determining a conflict check result corresponding to the object interaction request according to a target operation type corresponding to the object interaction request and a current related operation type corresponding to the current modification stage, where the target operation type is a type of a target interaction operation requested by the object interaction request; and when no conflict exists as a result of the conflict check, executing the target interaction operation on the target object according to the object interaction request.

2. The step of obtaining a current modification stage to which a current modification operation on the target object belongs in response to the object interaction request includes: obtaining a current operation process corresponding to the current modification operation on the target object; 2. The method according to claim 1, further comprising: determining a modification stage corresponding to the current operation process as the current modification stage to which the current modification operation on the target object belongs, wherein consecutive operation processes of different conflicting operation types are divided into different modification stages.

3. The step of dividing the current modification operation into phases includes: determining a current operation sequence corresponding to the current change operation, the current operation sequence including a plurality of the operation steps arranged according to an operation order; determining the conflicting operation type corresponding to each of the operation steps in the current operation step sequence; and dividing the current operation sequence according to the conflicting operation type corresponding to the operation to obtain a plurality of modification steps corresponding to the current modification operation, wherein consecutive operation steps of the same conflicting operation type are divided into the same modification step.

4. the current related operation type includes a current conflicting operation type; determining a conflict check result corresponding to the object interaction request according to a target operation type corresponding to the object interaction request and a current associated operation type corresponding to the current modification stage; extracting an operation type identifier from the object interaction request, and obtaining a target operation type corresponding to the object interaction request according to the extracted operation type identifier; 2. The method of claim 1, further comprising: comparing the target operation type with the current conflicting operation type; and determining that a conflict exists as the conflict check result when determining that the current conflicting operation type includes the target operation type according to a comparison result.

5. the current associated operation type includes a current concurrent operation type; determining a conflict check result corresponding to the object interaction request according to a target operation type corresponding to the object interaction request and a current associated operation type corresponding to the current modification stage; extracting an operation type identifier from the object interaction request, and obtaining a target operation type corresponding to the object interaction request according to the extracted operation type identifier; comparing the target operation type with the current concurrent operation type, and determining that a conflict exists as a result of the conflict check when it is determined according to a comparison result that the current concurrent operation type does not include the target operation type.

6. The method comprises:

2. The method of claim 1, further comprising: stopping performing the target interaction operation on the target object according to the object interaction request when a conflict exists as a result of the conflict check.

7. The step of performing the target interaction operation on the target object according to the object interaction request includes: determining a first operation step corresponding to the target object, the first operation step being a next operation step corresponding to the object interaction request; sending an operation locking request for the target object when the stage priority corresponding to the first operation stage satisfies a priority execution condition, the operation locking request being used to trigger a computing node interacting with the target object to acquire a corresponding object lock, locking the current operation on the target object until unlocking; 2. The method of claim 1, further comprising: executing the operation process corresponding to the first operation stage when determining that locking response information for the operation locking request has been received, the locking response information being response information returned by the computing node after the computing node has acquired the object lock.

8. The method comprises: determining a second operation step corresponding to the target object, the second operation step being a next operation step corresponding to the first operation step; 8. The method of claim 7, further comprising: when a stage priority corresponding to the second operation stage satisfies the priority execution condition, maintaining the object lock requested by the operation locking request and executing the operation step corresponding to the second operation stage.

9. The step of transmitting an operation locking request for the target object when a stage priority corresponding to the first operation stage satisfies a priority execution condition, determining an operation content level of operation content corresponding to the first operation stage; 8. The method of claim 7, further comprising: determining that a stage priority corresponding to the first operation stage satisfies a priority execution condition when the operation content level is an object level, and sending an operation locking request for the target object.

10. The method comprises: determining a target object version identifier corresponding to the object interaction request; obtaining a current object version identifier corresponding to the target object after modifying the target object according to the current modification operation; 2. The method of claim 1, further comprising: comparing the target object version identifier with the current object version identifier and ceasing to respond to the object interaction request when the comparison does not match.

11. the current associated operation type includes a current concurrent operation type; determining a conflict check result corresponding to the object interaction request according to a target operation type corresponding to the object interaction request and a current associated operation type corresponding to the current modification stage; determining a current concurrent operation type corresponding to the current modification stage as a delete operation type when the current modification stage is a write operation prevention information stage, the write operation prevention information stage being used for writing a current object version identifier corresponding to the target object after modifying the target object according to the current modification operation; and determining that a conflict exists as a conflict check result corresponding to the object interaction request when the target operation type does not match the delete operation type.

12. When no conflict exists as a result of the conflict check, the step of executing the target interaction operation on the target object according to the object interaction request includes: determining a target operation step sequence corresponding to the target operation type in response to the object interaction request when no conflict exists as a result of the conflict check; and performing the target interaction operation on the target object in response to the target operation step sequence.

13. 1. An object processing apparatus implemented by a computing device, the apparatus comprising: an interaction request receiving module, which is used for receiving an object interaction request for a target object; a modification stage acquisition module, which is used to acquire a current modification stage to which a current modification operation for the target object belongs in response to the object interaction request, where the current modification operation includes a plurality of operation steps, the current modification operation is divided into a plurality of modification stages according to a conflict operation type corresponding to each of the operation steps, and the conflict operation type is a type of conflict operation corresponding to the operation step; a conflict checking module used for determining a conflict checking result corresponding to the object interaction request according to a target operation type corresponding to the object interaction request and a current related operation type corresponding to the current modification stage, where the target operation type is a type of a target interaction operation requested by the object interaction request; an operation execution module, which is used for executing the target interaction operation on the target object according to the object interaction request when no conflict exists as a result of the conflict check.

14. The change phase acquisition module is an operation procedure acquisition submodule, which is used for acquiring a current operation procedure corresponding to the current modification operation on the target object; The apparatus according to claim 13, further comprising: a modification stage determination sub-module used for determining a modification stage corresponding to the current operation process as the current modification stage to which the current modification operation on the target object belongs, wherein consecutive operation processes of different conflicting operation types are divided into different modification stages.

15. A computing device comprising a memory and one or more processors, wherein computer readable instructions are stored in the memory, the one or more processors implementing the method of any one of claims 1 to 12 when executing the computer readable instructions.

16. A computer program, characterized in that when it is executed by one or more processors, it implements the method according to any one of claims 1 to 12.

Citation Information

Patent Citations

  • Associated transaction processing method of mobile database

    CN101184106A

  • Management device and method for blockchain account book data

    CN111949315A

  • Method and device for dividing online transaction processing and executing in distributed environment

    JP2008165370A

  • Automatic Entity-Grouping for Scalable OLTP

    US20140129531A1