Data processing method and device

By saving and generating SQL statements by tenants themselves, the flexibility and cost of personalized fields in SaaS services are solved, and efficient customization and secondary development are achieved.

CN120508565APending Publication Date: 2025-08-19HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410385895.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2024-02-17
Filing Date
2024-03-30
Publication Date
2025-08-19

AI Technical Summary

Technical Problem

In the prior art, SaaS service providers need to customize or secondary development of personalized fields for tenants, resulting in poor flexibility, high cost and long cycles, and security risks.

Method used

Tenants save the mapping relationship between the extended entity and the database table name and the mapping relationship between attributes and field names, generate corresponding SQL statements for operation, and reduce dependence on SaaS service providers.

Benefits of technology

Improves the flexibility of using database tables, reduces the cost and cycle of customization or secondary development, and reduces security risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120508565A_ABST
    Figure CN120508565A_ABST
Patent Text Reader

Abstract

The invention provides a data processing method, which comprises the following steps: receiving information input by a first tenant for indicating an operation executed on a first entity and / or a first attribute expanded by the first tenant in a database, the first attribute being an attribute expanded by the first tenant on a second entity; obtaining metadata of the first tenant, wherein the metadata comprises a first mapping relationship between the first entity and a first table in a database and a second mapping relationship between the first attribute and a first field in the database; a first table corresponding to the first entity is determined according to the first mapping relation, a first structured query language (SQL) statement is generated according to the first table, and the first SQL statement is used for executing the operation on the first table; and / or a first field corresponding to the first attribute is determined according to the second mapping relation, and a second SQL statement is generated according to the first field and used for indicating to execute operation on the first field. According to the method, the cost and period of secondary development of the SaaS service by the tenant can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims priority to the Chinese patent application with application number 202410179161.5 filed with the State Intellectual Property Office of China on February 17, 2024, and priority to the Chinese patent application with the invention name “A Data Management Method”, all contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of databases, and more particularly, to a method, apparatus, and computing device for data processing. Background Art

[0003] Due to the wide variety of industry data models, for example, some fields are unique to a tenant. Therefore, the entities and / or entity attributes provided by SaaS service providers cannot meet the needs of tenants. SaaS services generally require tenant customization or secondary development.

[0004] In traditional tenant customization or secondary development solutions, tenants send their requests for field extensions to the SaaS service provider, and the SaaS service provider's developers add the tenant-customized (or extended) fields to the database table based on these requirements. This traditional solution has the following problems: 1. Poor flexibility: If multiple tenants have customization or secondary development needs, the SaaS service provider's developers will add personalized fields for multiple tenants to the database table. Since these personalized fields are customized for the corresponding tenant, other tenants cannot use them, resulting in poor flexibility in the use of the database table. 2. High implementation cost and long cycle: The addition of tenant-customized fields can only be completed by the SaaS service provider's developers, which is long and costly.

[0005] Therefore, how to reduce the cost and cycle of tenants' customization or secondary development of SaaS services and improve the flexibility of implementation has become a technical problem that needs to be solved urgently. Summary of the Invention

[0006] The present application provides a data processing method, device, and storage system, which can reduce the cost and cycle of tenants' customization or secondary development of SaaS services and improve implementation flexibility.

[0007] In a first aspect, a method for data processing is provided, the method comprising: receiving information input by a first tenant, the information being used to indicate an operation to be performed on a first entity and / or a first attribute in a database, wherein the first entity is an entity extended by the first tenant, and the first attribute is an attribute extended by the first tenant to a second entity; obtaining metadata of the first tenant, the metadata of the first tenant comprising at least one of the following: a first mapping relationship between the first entity and a first table in the database, and a second mapping relationship between the first attribute and a first field in the database; determining the first table corresponding to the first entity according to the first mapping relationship, and generating a first structured query SQL statement according to the first table, the first SQL statement being used to perform the operation on the first table; and / or determining the first field corresponding to the first attribute according to the second mapping relationship, and generating a second SQL statement according to the first field, the second SQL statement being used to indicate that the operation be performed on the first field.

[0008] It should be understood that the first entity and the second entity may be the same entity, or may be different entities, and this application does not make any specific limitation on this.

[0009] It should also be understood that the first SQL statement and the second SQL statement may be the same SQL statement, or may be different SQL statements, and this application does not make any specific limitation on this.

[0010] In the above technical solution, if a tenant requires customization or secondary development of a SaaS service, the tenant can save the mapping relationship between the extended entity names and the extended database table names, and / or the mapping relationship between the extended attribute names and the field names in the extended database table, in its own metadata. This, on the one hand, eliminates the need for the SaaS service provider's developers to add new database tables and / or fields to the database that require tenant-specific extensions, thereby increasing the flexibility of database table usage. On the other hand, it also eliminates the need for the SaaS service provider's developers to complete customization or secondary development, reducing implementation time and costs.

[0011] In combination with the first aspect, in some implementations of the first aspect, context information of the first tenant is obtained, where the context information includes metadata of the first tenant.

[0012] In combination with the first aspect, in some implementations of the first aspect, the information is used to indicate that a query operation is to be performed on the first attribute, and the second SQL statement is an SQL query statement used to perform the query operation on the first field.

[0013] In combination with the first aspect, in certain implementations of the first aspect, the method further includes: generating an object query language OQL statement based on the information input by the first tenant; converting the OQL statement into the first SQL statement based on the first table; and converting the OQL statement into the second SQL statement based on the first field.

[0014] In combination with the first aspect, in some implementations of the first aspect, the information is used to indicate that an insert operation is to be performed on the first attribute, and the second SQL statement is an SQL insert statement, which is used to perform the insert operation on the first field.

[0015] In combination with the first aspect, in certain implementations of the first aspect, the information is used to indicate that an update operation is to be performed on the first attribute, the second SQL statement is an SQL update statement, and the SQL insert statement is used to perform the update operation on the first field.

[0016] In combination with the first aspect, in certain implementations of the first aspect, the information is used to indicate that a delete operation is to be performed on the first attribute, the second SQL statement is a SQL delete statement, and the SQL insert statement is used to perform the delete operation on the first field.

[0017] In a second aspect, a data processing device is provided, which includes a receiving module, an acquisition module, and a processing module, wherein the receiving module is used to receive information input by a first tenant, and the information is used to indicate an operation performed on a first entity and / or a first attribute in a database, wherein the first entity is an entity extended by the first tenant, and the first attribute is an attribute extended by the first tenant to a second entity; the acquisition module is used to obtain metadata of the first tenant, and the metadata of the first tenant includes at least one of the following: a first mapping relationship between the first entity and a first table in the database, and a second mapping relationship between the first attribute and a first field in the database; the processing module is used to determine the first table corresponding to the first entity based on the first mapping relationship, and generate a first structured query SQL statement based on the first table, and the first SQL statement is used to perform the operation on the first table; and / or determine the first field corresponding to the first attribute based on the second mapping relationship, and generate a second SQL statement based on the first field, and the second SQL statement is used to indicate that the operation is performed on the first field.

[0018] In combination with the second aspect, in some implementations of the second aspect, the acquisition module is specifically used to: acquire context information of the first tenant, where the context information includes metadata of the first tenant.

[0019] In combination with the second aspect, in some implementations of the second aspect, the information is used to indicate that a query operation is to be performed on the first attribute, and the second SQL statement is an SQL query statement used to perform the query operation on the first field.

[0020] In combination with the second aspect, in certain implementations of the second aspect, the processing module is specifically used to: generate an object query language OQL statement based on the information input by the first tenant; convert the OQL statement into the first SQL statement based on the first table; and / or convert the OQL statement into the second SQL statement based on the first field.

[0021] In combination with the second aspect, in some implementations of the second aspect, the information is used to indicate that an insert operation is to be performed on the first attribute, and the second SQL statement is an SQL insert statement, which is used to perform the insert operation on the first field.

[0022] In combination with the second aspect, in certain implementations of the second aspect, the information is used to indicate that an update operation is to be performed on the first attribute, the second SQL statement is an SQL update statement, and the SQL insert statement is used to perform the update operation on the first field.

[0023] In combination with the second aspect, in certain implementations of the second aspect, the information is used to indicate a delete operation to be performed on the first attribute, the second SQL statement is a SQL delete statement, and the SQL insert statement is used to perform the delete operation on the first field.

[0024] In combination with the second aspect, in some implementations of the second aspect, the device is an OQL engine.

[0025] The beneficial effects of the second aspect and any possible implementation of the second aspect correspond to the beneficial effects of the first aspect and any possible implementation of the first aspect, and will not be elaborated on herein.

[0026] In a third aspect, an embodiment of the present application provides a computing device, which includes a processor, which is used to couple with a memory, read and execute instructions and / or program codes in the memory to execute the first aspect, or any possible implementation of the first aspect.

[0027] Optionally, the processor may be a general-purpose processor, which may be implemented in hardware or software. When implemented in hardware, the processor may be a logic circuit, an integrated circuit, or the like; when implemented in software, the processor may be a general-purpose processor implemented by reading software code stored in a memory, which may be integrated into the processor or located independently of the processor.

[0028] In a fourth aspect, an embodiment of the present application provides a chip system, which includes a logic circuit, which is used to couple with an input / output interface and transmit data through the input / output interface to execute the first aspect or any possible implementation method of the first aspect.

[0029] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores program code. When the computer storage medium runs on a computer, it enables the computer to execute the first aspect or any possible implementation of the first aspect.

[0030] By way of example, these computer-readable storages include, but are not limited to, one or more of the following: read-only memory (ROM), programmable ROM (PROM), erasable PROM (EPROM), Flash memory, electrically EPROM (EEPROM), and a hard drive.

[0031] Optionally, as an implementation manner, the above-mentioned storage medium may specifically be a non-volatile storage medium.

[0032] In a sixth aspect, an embodiment of the present application provides a computer program product, which includes: a computer program code, which, when running on a computer, enables the computer to execute the first aspect or any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 A schematic diagram of a cloud scenario applied to this application is shown.

[0034] Figure 2 It is a schematic flow chart of a data processing method provided in an embodiment of the present application.

[0035] Figure 3 This is a schematic flowchart of a method for generating SQL query statements provided in an embodiment of the present application.

[0036] Figure 4 This is a schematic flowchart of a method for generating an SQL insert statement provided in an embodiment of the present application.

[0037] Figure 5 This is a schematic flowchart of a method for generating an SQL update statement provided in an embodiment of the present application.

[0038] Figure 6This is a schematic flowchart of a method for generating an SQL delete statement provided in an embodiment of the present application.

[0039] Figure 7 It is a schematic block diagram of a data processing device 700 provided in an embodiment of the present application.

[0040] Figure 8 This is a diagram illustrating an example structure of a computing device 800 provided in an embodiment of the present application.

[0041] Figure 9 This is a schematic diagram of the architecture of a computing device cluster provided in an embodiment of the present application.

[0042] Figure 10 This is a schematic diagram of a network connection between computing devices 800A and 800B provided in an embodiment of the present application.

[0043] Figure 11 This is a structural example diagram of a computer program product 800 provided in an embodiment of the present application.

[0044] Figure 12 A schematic diagram of a system architecture provided in an embodiment of the present application.

[0045] Figure 13 A schematic diagram of a centralized storage system provided in an embodiment of the present application.

[0046] Figure 14 A schematic diagram of a distributed storage system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0047] The technical solution in this application will be described below with reference to the accompanying drawings.

[0048] This application will present various aspects, embodiments, or features around systems including multiple devices, components, modules, etc. It should be understood and appreciated that each system may include additional devices, components, modules, etc., and / or may not include all of the devices, components, modules, etc. discussed in conjunction with the figures. Furthermore, combinations of these aspects may also be used.

[0049] Additionally, in the embodiments of this application, words such as "exemplary" and "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described in this application as "exemplary" should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of the word "exemplary" is intended to present concepts in a concrete manner.

[0050] In the embodiments of the present application, “corresponding” and “relevant” may sometimes be used interchangeably. It should be noted that when the distinction between them is not emphasized, the meanings they intend to express are consistent.

[0051] The business scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. A person skilled in the art will appreciate that, with the evolution of network architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are equally applicable to similar technical problems.

[0052] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in yet other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0053] In this application, "at least one" means one or more, and "more" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: including the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.

[0054] For the convenience of description, the basic concepts involved in the embodiments of the present application are first described in detail below.

[0055] 1. Cloud service platform

[0056] A cloud service platform is a service platform based on cloud computing technology. It can provide a variety of cloud computing services, including infrastructure as a service (IaaS), platform as a service (PaaS), and software as a service (SaaS). These services can be provided to users over the Internet, eliminating the need to purchase and maintain hardware and software. Users can simply use the services on demand.

[0057] As an example, Figure 1 A schematic diagram of a cloud scenario applied to this application is shown. Figure 1 As shown, the cloud scenario may include: a cloud service platform (also referred to as a cloud platform), a cloud data center, and a client. The cloud service platform is used to manage the infrastructure that provides multiple cloud services. The infrastructure includes multiple cloud data centers, each of which includes multiple servers. Each server includes cloud service resources and provides corresponding cloud services to tenants.

[0058] The interaction between users (also called tenants) and the cloud platform mainly includes: users log in to the cloud platform through the client web page, select and purchase the corresponding cloud services in the cloud platform, and after purchase, users can use the corresponding cloud services provided by the cloud platform.

[0059] It should be understood that tenants of cloud services can be individuals, enterprises, schools, hospitals, administrative agencies, etc.

[0060] The following is an explanation of IaaS, PaaS and SaaS.

[0061] IaaS refers to a cloud computing service model that provides users with virtualized computing resources (such as servers, storage devices, and network equipment) over the Internet. IaaS service providers manage and maintain this infrastructure, ensuring its availability, scalability, and security, while users can access and use these resources from anywhere via the internet.

[0062] PaaS refers to a cloud computing service model that provides an environment for developing and running applications without requiring users to manage or control the underlying cloud infrastructure (such as servers, networks, and storage devices). PaaS service providers provide the platform components (such as databases, development tools, and servers) required to develop, run, and manage applications as a service, allowing users to focus on developing and running applications without worrying about implementing and managing the underlying technology.

[0063] SaaS refers to a software delivery model in which a SaaS service provider provides software applications and their associated data, functions, and services to users over the internet. Users do not need to purchase and maintain the software applications and their associated hardware and infrastructure; they can use the software simply by accessing the services provided by the SaaS service provider over the internet.

[0064] 2. General layer

[0065] Cloud computing services typically have multiple layers that logically divide different service components and functions. The general layer typically refers to the core service layer of the cloud service platform, also known as the IaaS layer. This layer provides tenants with basic IT infrastructure services, including computing resources (such as servers, storage, and processors), network resources (such as virtual private networks and load balancing), and other basic services (such as identity authentication and access control). The main goal of the general layer is to ensure that tenants can obtain and use these infrastructure resources on demand and flexibly, without having to worry about the underlying hardware management and maintenance.

[0066] The computing resources (eg, storage) of the general layer carry standard entities provided by the SaaS service provider and attribute information of the standard entities.

[0067] 3. Tenant layer

[0068] The tenant layer refers to the specific service layer used by users or tenants on a cloud service platform. At this layer, tenants can select and use various cloud services based on their business needs. At the tenant layer, each tenant has access to one or more independent, isolated service instances to ensure data security and privacy. The tenant layer also provides tenant management and billing capabilities, enabling service providers to effectively manage and bill tenants.

[0069] At the tenant level, tenants can conduct secondary development of services based on SaaS service providers and customize new entities and / or metadata such as entity attribute information.

[0070] 4. Structured Query Language (SQL)

[0071] SQL is a standard programming language used to manage relational database management systems (RDBMS). It mainly uses concepts such as table names and column names to operate on data in relational databases. The operations may include but are not limited to: query, insert, update, and delete.

[0072] 5. Object Query Language (OQL)

[0073] OQL is an object-oriented data query language. It is primarily used in object-oriented data models or object databases, allowing users to query and operate on objects. OQL primarily uses concepts such as entity object names and attribute names to perform queries and operations.

[0074] 6. Metadata

[0075] Metadata is data that describes data.

[0076] Due to the wide variety of industry data models, for example, in the field of customer relationship management (CRM), some fields are unique to a tenant. Therefore, the entities and / or entity attributes provided by SaaS service providers cannot meet the needs of tenants. SaaS services generally require tenant customization or secondary development.

[0077] In traditional tenant customization or secondary development solutions, the tenant sends the need to extend fields to the SaaS service provider, and the developers of the SaaS service provider add the tenant-customized (or extended) fields to the database table based on the need.

[0078] The above traditional solutions have the following problems:

[0079] 1. Poor flexibility

[0080] If multiple tenants have customization or secondary development needs, the developers of the SaaS service provider will add personalized fields for multiple tenants to the database table. Since the personalized fields are customized for the corresponding tenants, other tenants cannot use them, resulting in poor flexibility in the use of the database table.

[0081] 2. High implementation cost and long cycle

[0082] Adding personalized fields to tenants can only be done by developers of the SaaS service provider, which takes a long time and is costly.

[0083] 3. There are certain security risks

[0084] The entity attributes and data isolation between tenants are not high, which will pose potential security risks.

[0085] In view of this, an embodiment of the present application provides a data processing method, which can reduce the cost and cycle of tenants customizing or secondary development of SaaS services and improve the flexibility of implementation.

[0086] Figure 2 This is a schematic flow chart of a data processing method provided in an embodiment of the present application, such as Figure 2 As shown, the method may include steps 210-240, and steps 210-240 are described in detail below.

[0087] For example, Figure 2 The method shown may be executed by an OQL engine.

[0088] Step 210: Receive OQL information input by the first tenant, where the OQL information includes an extended entity name and / or an extended attribute name, and operations on the extended entity name and / or the extended attribute name.

[0089] In an embodiment of the present application, OQL information input by the first tenant may be received, where the OQL information includes an extended entity name and / or an extended attribute name, and operations on the extended entity and / or extended attribute.

[0090] It should be understood that in OQL, an entity may also be referred to as an entity object.

[0091] As an example, the above operations on the extended entities and / or extended attributes include but are not limited to: querying the data in the extended entities and / or extended attributes, inserting new data into the extended entities and / or extended attributes, updating the data in the extended entities and / or extended attributes, deleting the data in the extended entities and / or extended attributes, etc.

[0092] Step 220: Obtain metadata of the first tenant, where the metadata includes at least one of the following: a mapping relationship between an extended entity name and an extended database table name, and a mapping relationship between an extended attribute name and a field name in an extended database table.

[0093] As an example, if the first tenant needs to extend new entities and / or new attributes, the first tenant can save the following metadata in the context of the first tenant: the mapping relationship between the extended entity name and the extended database table name, and / or the mapping relationship between the extended attribute name and the field name in the extended database table.

[0094] In the embodiment of the present application, after receiving the information input by the first tenant, the above metadata can be obtained from the context of the first tenant.

[0095] Step 230: Determine the extended database table name based on the extended entity name and the mapping relationship between the extended entity name and the extended database table name, and / or determine the field name in the extended database table based on the extended attribute name and the mapping relationship between the extended attribute name and the field name in the extended database table.

[0096] In an embodiment of the present application, after obtaining the metadata of the first tenant, the extended database table name can be determined based on the mapping relationship between the extended entity name and the extended database table name, and the extended entity name input by the first tenant.

[0097] In an embodiment of the present application, after obtaining the metadata of the first tenant, the field name in the extended database table can also be determined based on the mapping relationship between the extended attribute name and the field name in the extended database table, as well as the extended attribute name input by the first tenant.

[0098] Step 240: Generate an SQL statement based on the extended database table name and / or the field name in the extended database table, and the operation on the extended entity and / or extended attribute in the information input by the first tenant.

[0099] In an embodiment of the present application, an SQL statement can be generated based on the name of the extended database table and / or the field name in the extended database table, and the operations on the extended entity and / or extended attributes in the information input by the first tenant, and the SQL statement includes operations on the extended database table and / or the fields in the extended database table.

[0100] As an example, the above operations on the extended database table and / or the fields in the extended database table include but are not limited to: querying the data in the extended database table and / or the fields in the extended database table, inserting new data into the extended database table and / or the fields in the extended database table, updating the data in the extended database table and / or the fields in the extended database table, deleting the data in the extended database table and / or the fields in the extended database table, etc.

[0101] In the above technical solution, if a tenant requires customization or secondary development of a SaaS service, the tenant can save the mapping relationship between the extended entity names and the extended database table names, and / or the mapping relationship between the extended attribute names and the field names in the extended database table, in its own metadata. This, on the one hand, eliminates the need for the SaaS service provider's developers to add new database tables and / or fields to the database that require tenant-specific extensions, thereby increasing the flexibility of database table usage. On the other hand, it also eliminates the need for the SaaS service provider's developers to complete customization or secondary development, reducing implementation time and costs.

[0102] Below, it is assumed that the SaaS service provider defines an entity object order in the general layer. Order has two standard attributes, orderNumber and orderAmount. The extension mode uses a unified extension table. The tenant with ID "Tenant 1" extends the manufacturer's entity object order with two attributes: carType and carModel. Figure 3-Figure 6 , the specific implementation method of the data processing method provided in the embodiment of the present application is described in detail.

[0103] It should be understood that Figure 3-Figure 6 The examples are only intended to help those skilled in the art understand the embodiments of the present application, and are not intended to limit the embodiments of the present application to Figure 3-Figure 6 The specific numerical values or specific scenarios shown in the examples. Figure 3-Figure 6 It is obvious that various equivalent modifications or changes can be made to the following examples, and such modifications and changes also fall within the scope of the embodiments of the present application.

[0104] The above extension modes include: unified extension table extension, independent extension table extension, and local table extension. Table 1 below lists the different extension modes.

[0105] Table 1 Extension Mode

[0106]

[0107] Figure 3 This is a schematic flow chart of a method for generating SQL query statements provided by an embodiment of the present application. Figure 3 As shown, the method may include steps 310-340, which are described in detail below.

[0108] Step 310: Receive the order message input by the tenant.

[0109] In an embodiment of the present application, an entity object message input by a tenant can be received, for example, an order message, which includes information to be queried, for example, the standard attributes orderNumber and orderAmount of the entity order, and the extended attributes of the entity order.

[0110] As an example, a tenant may input the above order message through the tenant data access interface of the OQL engine.

[0111] Step 320: Generate a corresponding OQL statement based on the order message input by the tenant.

[0112] In an embodiment of the present application, after the OQL engine receives the order message input by the tenant through the tenant data access interface, the OQL engine can generate a corresponding OQL statement.

[0113] As an example, the obtained OQL statement is as follows:

[0114]

[0115] It should be understood that in the above metadata, the table name corresponding to the entity order is cpq_order_t, the standard table field name corresponding to the standard attribute orderNumber is order_number, the standard table field name corresponding to the standard attribute orderAmount is order_amount, the extended table field name corresponding to the extended attribute carType is v1, and the extended table field name corresponding to the extended attribute carModel is v2.

[0116] Step 340: Convert the entity into the corresponding database table name, convert the attribute into the corresponding database table field name, and perform conversion from OQL statement to SQL statement.

[0117] In an embodiment of the present application, the entities in the OQL statement can be converted into corresponding database table names, and the attributes in the OQL statement can be converted into corresponding database table field names according to the mapping relationship between the entity and the table name in the metadata, and an SQL statement can be generated, thereby realizing the conversion of the OQL statement to the SQL statement.

[0118] As an example, the SQL statement generated based on the above metadata is as follows:

[0119]

[0120] Figure 4 This is a schematic flow chart of a method for generating SQL insert statements provided by an embodiment of the present application. Figure 4 As shown, the method may include steps 410-430, which are described in detail below.

[0121] Step 410: Receive the order message input by the tenant.

[0122] As an example, the input order message is shown in Table 2 below.

[0123] Table 2 Order message

[0124] Standard attribute orderNumber Standard attribute orderAmount Extended attribute carType Extended attribute carModel 09-123 123 Type 1 Model 1 09-456 345 Type 2 Model 2

[0125] As shown in Table 2, the order message indicates that two records with values of 09-123 and 09-456 are inserted into the standard attribute orderNumber; two records with values of 123 and 345 are inserted into the standard attribute orderAmount; two records with values of Type 1 and Type 2 are inserted into the extended attribute carType; and two records with values of Model 1 and Model 2 are inserted into the extended attribute carModel.

[0126] Step 420: Obtain and cache the tenant's metadata from the tenant's context.

[0127] It should be understood that the metadata of the tenant obtained in step 320 is the same as the metadata obtained in step 230. For details, please refer to the metadata obtained in step 230, which will not be repeated here.

[0128] Step 430: Generate an SQL insert statement based on the tenant's metadata.

[0129] In an embodiment of the present application, an SQL insert statement can be generated by splicing based on the mapping relationship between the entity and the table name in the metadata.

[0130] As an example, since the standard table field name corresponding to the standard attribute orderNumber is order_number, the standard table field name corresponding to the standard attribute orderAmount is order_amount, the extended table field name corresponding to the extended attribute carType is v1, and the extended table field name corresponding to the extended attribute carModel is v2, the generated insert statements for the standard table and the extended table are as follows.

[0131] Insert statement for standard table:

[0132]

[0133] Insert statement for the extended table:

[0134]

[0135] Figure 5 This is a schematic flow chart of a method for generating SQL update statements provided by an embodiment of the present application. Figure 5 As shown, the method may include steps 510-530, which are described in detail below.

[0136] Step 510: Receive the order message input by the tenant.

[0137] As an example, the input order message is shown in Table 3 below.

[0138] Table 3 order message

[0139] id Standard attribute orderNumber Standard attribute orderAmount Extended attribute carType Extended attribute carModel id1 09-123 123 Type 1 Model 1

[0140] As shown in Table 3, the order message indicates that the value of the standard attribute orderNumber is updated to 09-123; the value of the standard attribute orderAmount is updated to 123; the value of the extended attribute carType is updated to Type 1; and the value of the extended attribute carModel is updated to Model1.

[0141] Step 520: Obtain and cache the tenant's metadata from the tenant's context.

[0142] It should be understood that the metadata of the tenant obtained in step 420 is the same as the metadata obtained in step 230. For details, please refer to the metadata obtained in step 230, which will not be repeated here.

[0143] Step 530: Generate an SQL update statement based on the tenant's metadata.

[0144] In an embodiment of the present application, SQL update statements can be generated by splicing based on the mapping relationship between entities and table names in the metadata.

[0145] As an example, since the standard table field name corresponding to the standard attribute orderNumber is order_number, the standard table field name corresponding to the standard attribute orderAmount is order_amount, the extended table field name corresponding to the extended attribute carType is v1, and the extended table field name corresponding to the extended attribute carModel is v2, the generated update statements for the standard table and the extended table are as follows.

[0146] Update statement for standard tables:

[0147]

[0148] Update statement for the extended table:

[0149]

[0150] Figure 6 This is a schematic flow chart of a method for generating an SQL delete statement provided in an embodiment of the present application. Figure 6 As shown, the method may include steps 610-630, which are described in detail below.

[0151] Step 610: Receive the order message input by the tenant.

[0152] As an example, the input order message is shown in Table 4 below.

[0153] Table 4 Order message

[0154] id Standard attribute orderNumber Standard attribute orderAmount Extended attribute carType Extended attribute carModel id1 09-456 340 Type 2 Model 2

[0155] Step 620: Obtain and cache the tenant's metadata from the tenant's context.

[0156] It should be understood that the metadata of the tenant obtained in step 520 is the same as the metadata obtained in step 230. For details, please refer to the metadata obtained in step 230, which will not be repeated here.

[0157] Step 630: Generate an SQL delete statement based on the metadata of the tenant.

[0158] In an embodiment of the present application, SQL update statements can be generated by splicing based on the mapping relationship between entities and table names in the metadata.

[0159] As an example, since the standard table field name corresponding to the standard attribute orderNumber is order_number, the standard table field name corresponding to the standard attribute orderAmount is order_amount, the extended table field name corresponding to the extended attribute carType is v1, and the extended table field name corresponding to the extended attribute carModel is v2, the generated delete statements for the standard table and the extended table are as follows.

[0160] Delete statement for standard table:

[0161]

[0162] Combined with the above Figures 1 to 6 , describes in detail the data processing method provided by the embodiment of the present application, and will be combined with Figure 7-14 , the embodiments of the device of the present application are described in detail. It should be understood that the description of the method embodiment corresponds to the description of the device embodiment, so for parts not described in detail, reference can be made to the previous method embodiment.

[0163] The embodiment of the present application further provides a computer storage medium in which program instructions are stored. When the program is executed, the program may include: Figures 2 to 6 Corresponding to part or all of the steps of the data processing method in the embodiment.

[0164] Figure 7This is a schematic block diagram of a data processing apparatus 700 provided in an embodiment of the present application. The apparatus 700 can be implemented using software, hardware, or a combination of both. The apparatus 700 provided in an embodiment of the present application can implement the data processing method provided in an embodiment of the present application. The apparatus 700 includes a receiving module 710, an acquisition module 720, and a processing module 730. Among them, the receiving module 710 is used to receive information input by the first tenant, and the information is used to indicate the operation performed on the first entity and / or the first attribute in the database, wherein the first entity is an entity extended by the first tenant, and the first attribute is an attribute extended by the first tenant to the second entity; the acquisition module 720 is used to obtain the metadata of the first tenant, and the metadata of the first tenant includes at least one of the following: a first mapping relationship between the first entity and the first table in the database, and a second mapping relationship between the first attribute and the first field in the database; the processing module 730 is used to determine the first table corresponding to the first entity according to the first mapping relationship, and generate a first structured query SQL statement according to the first table, and the first SQL statement is used to perform the operation on the first table; and / or determine the first field corresponding to the first attribute according to the second mapping relationship, and generate a second SQL statement according to the first field, and the second SQL statement is used to indicate that the operation is performed on the first field.

[0165] Optionally, the acquisition module 720 is specifically configured to: acquire context information of the first tenant, where the context information includes metadata of the first tenant.

[0166] Optionally, the information is used to indicate that a query operation is to be performed on the first attribute, and the second SQL statement is an SQL query statement used to perform the query operation on the first field.

[0167] Optionally, the processing module 730 is specifically used to: generate an object query language OQL statement based on the information input by the first tenant; convert the OQL statement into the first SQL statement based on the first table; and / or convert the OQL statement into the second SQL statement based on the first field.

[0168] Optionally, the information is used to indicate that an insert operation is to be performed on the first attribute, and the second SQL statement is an SQL insert statement, which is used to perform the insert operation on the first field.

[0169] Optionally, the information is used to indicate that an update operation is to be performed on the first attribute, the second SQL statement is an SQL update statement, and the SQL insert statement is used to perform the update operation on the first field.

[0170] Optionally, the information is used to indicate that a delete operation is to be performed on the first attribute, the second SQL statement is an SQL delete statement, and the SQL insert statement is used to perform the delete operation on the first field.

[0171] Optionally, the device 700 is an OQL engine.

[0172] The above-mentioned apparatus 700 can be embodied in the form of a functional module. The term "module" herein can be implemented in the form of software and / or hardware, and is not specifically limited thereto.

[0173] For example, a "module" can be a software program, a hardware circuit, or a combination of the two that implements the aforementioned functions. For example, the implementation of receiving module 710 will be described below using receiving module 710 as an example. Similarly, the implementation of other modules, such as acquisition module 720 and processing module 730, can refer to the implementation of receiving module 710.

[0174] The receiving module 710 is taken as an example of a software functional unit, and the receiving module 710 may include code running on a computing instance. The computing instance may include at least one of a physical host (computing device), a virtual machine, and a container. Furthermore, the computing instance may be one or more. For example, the receiving module 710 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed in the same region or in different regions. Furthermore, the multiple hosts / virtual machines / containers used to run the code may be distributed in the same availability zone (AZ) or in different AZs, each AZ including one data center or multiple geographically close data centers. Generally, a region may include multiple AZs.

[0175] Similarly, multiple hosts / virtual machines / containers running the code can be distributed within the same virtual private cloud (VPC) or across multiple VPCs. Typically, a VPC is set up within a region. Cross-region communication between two VPCs within the same region, or between VPCs in different regions, requires a communication gateway within each VPC to interconnect the VPCs.

[0176] The receiving module 710 is an example of a hardware functional unit. The receiving module 710 may include at least one computing device, such as a server. Alternatively, the receiving module 710 may be implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0177] The multiple computing devices included in the receiving module 710 can be distributed in the same region or in different regions. The multiple computing devices included in the receiving module 710 can be distributed in the same AZ or in different AZs. Similarly, the multiple computing devices included in the receiving module 710 can be distributed in the same VPC or in multiple VPCs. The multiple computing devices can be any combination of servers, ASICs, PLDs, CPLDs, FPGAs, GALs, and other computing devices.

[0178] Therefore, the modules of each example described in the embodiments of this application can be implemented with electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0179] It should be noted that: when the device 700 provided in the above embodiment executes the above method, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. For example, the receiving module 710 can be used to execute any step in the above method, the acquisition module 720 can be used to execute any step in the above method, and the processing module 730 can be used to execute any step in the above method. The steps that the receiving module 710, the acquisition module 720, and the processing module 730 are responsible for implementing can be specified as needed, and all the functions of the above device can be realized by respectively implementing different steps in the above method through the receiving module 710, the acquisition module 720, and the processing module 730.

[0180] The modules of each example described in the embodiments of this application can be implemented with electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0181] The following combination Figure 8 , a computing device provided in an embodiment of the present application is described in detail.

[0182] Figure 8 8 is a schematic diagram of the architecture of a computing device 800 provided in an embodiment of the present application. The computing device 800 may be a server, a computer, or other device with computing capabilities.

[0183] Figure 8 The computing device 800 shown includes a bus 102, a processor 104, a memory 106, and a communication interface 108. The processor 104, the memory 106, and the communication interface 108 communicate with each other via the bus 102. The computing device 800 can be a server or a terminal device. It should be understood that this application does not limit the number of processors and memories in the computing device 800.

[0184] The bus 102 may be a peripheral component interconnect Express (PCIe) bus, an extended industry standard architecture (EISA) bus, a unified bus (UBus or UB), a compute express link (CXL), a cache coherent interconnect for accelerators (CCIX), etc. The unified bus is also called a Lingqu bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 The use of only one line in the figure does not necessarily indicate that there is only one bus or only one type of bus. Bus 104 may include a path for transmitting information between various components of computing device 800 (e.g., memory 106, processor 104, and communication interface 108). The unified bus may also be referred to as a Lingqu bus.

[0185] The processor 104 may include any one or more computing devices such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP) or a digital signal processor (DSP), an ASIC, an FPGA, a CPLD, an NPU, a SoC, an offload card, an accelerator card, etc.

[0186] The memory 106 may include volatile memory, such as random access memory (RAM). The processor 104 may also include non-volatile memory, such as read-only memory (ROM), flash memory, a hard disk drive (HDD), or a solid state drive (SSD). In addition, the memory 106 may also be implemented using storage class memory (SCM), phase change memory (PCM), or other types of storage media.

[0187] It is worth noting that the same type of storage medium can be configured in the same computing device to implement the function of memory 106, or two or more types of storage media can be configured to implement the function of memory 106. This application does not limit this.

[0188] The memory 106 stores executable program codes, and the processor 104 executes the executable program codes to respectively implement the functions of the aforementioned receiving module, obtaining module, and processing module, thereby achieving Figure 2-Figure 6 That is, the memory 106 stores a method for executing Figure 2-Figure 6 method instructions.

[0189] Alternatively, the memory 106 stores executable codes, and the processor 104 executes the executable codes to respectively implement the functions of the aforementioned data processing device, thereby achieving Figure 2-Figure 6 That is, the memory 106 stores a method for executing Figure 2-Figure 6 method instructions.

[0190] The communication interface 103 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the computing device 800 and other devices or a communication network.

[0191] As a possible implementation, the computing device 800 may also include a chip system, the chip system including a processor and a power supply circuit, the power supply circuit is used to supply power to the processor, and the processor is used to execute Figure 2-Figure 6 The corresponding operation steps are omitted for brevity. The processor can be implemented by a GPU, or by a computing device or AI chip such as a DPU, NPU, XPU, SoC, offload card, or accelerator card.

[0192] As a possible implementation, the computing device 800 may include multiple types of processors 104, that is, the computing device 800 is a heterogeneous device. For example, the computing device 800 includes a CPU and a GPU, and at least one of the processors 104 may execute Figure 2-Figure 6 For the sake of brevity, the corresponding operation steps are not repeated here.

[0193] Embodiments of the present application also provide a computing device cluster. The computing device cluster includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smartphone.

[0194] like Figure 9 As shown, the computing device cluster includes at least one computing device 100. The memory 106 in one or more computing devices 100 in the computing device cluster may store the same Figure 2-Figure 6 Instructions for the method shown.

[0195] In some possible implementations, the memory 106 of one or more computing devices 100 in the computing device cluster may also store partial instructions for executing the XXX method. In other words, the combination of one or more computing devices 100 can jointly execute the instructions for executing the XXX method.

[0196] It should be noted that the memory 106 in different computing devices 800 in the computing device cluster may store different instructions, each for executing a portion of the functions of the data processing apparatus. In other words, the instructions stored in the memory 106 in different computing devices 800 may implement the functions of one or more of the receiving module 710, the obtaining module 720, and the processing module 730.

[0197] In some possible implementations, one or more computing devices in a computing device cluster may be connected via a network, which may be a wide area network or a local area network. Figure 10 A possible implementation is shown. Figure 10As shown, two computing devices 800A and 800B are connected via a network. Specifically, the connection to the network is achieved through a communication interface within each computing device. In this possible implementation, the memory 106 within computing device 800A stores instructions for executing the functions of a receiving module. Simultaneously, the memory 106 within computing device 800B stores instructions for executing the functions of an acquiring module and a processing module.

[0198] Figure 10 The connection mode between the computing device clusters shown may be based on the need of the data processing method provided by the present application, and therefore the functions implemented by the acquisition module and the processing module are considered to be executed by the computing device 800B.

[0199] It should be understood that Figure 10 The functionality of the computing device 800A shown in FIG. 8 may also be implemented by multiple computing devices 800. Similarly, the functionality of the computing device 800B may also be implemented by multiple computing devices 800.

[0200] In some possible implementations, the memory 106 of one or more computing devices 800 in the computing device cluster may also store partial instructions for executing the data processing method. In other words, the combination of one or more computing devices 800 can jointly execute the instructions for executing the data processing method.

[0201] The structure of the computing device 800 listed above is only an example description, and the present application is not limited thereto. The computing device 800 of the embodiment of the present application includes various hardware in the computer system in the prior art. For example, the computing device 800 also includes other memories besides the memory 820, such as disk storage, etc. It should be understood by those skilled in the art that the computing device 800 may also include other devices necessary to achieve normal operation. At the same time, according to specific needs, those skilled in the art should understand that the above-mentioned computing device 800 may also include hardware devices that implement other additional functions. In addition, those skilled in the art should understand that the above-mentioned computing device 800 may also include only the devices necessary to implement the embodiment of the present application, and does not necessarily include Figure 10 All devices shown in .

[0202] In some embodiments of the present application, the disclosed methods may be implemented as computer program instructions encoded in a machine-readable format on a computer-readable storage medium or on other non-transitory media or articles of manufacture. Figure 11Schematically illustrates a conceptual partial view of an example computer program product, arranged in accordance with at least some embodiments presented herein, comprising a computer program for executing a computer process on a computing device. In one embodiment, the example computer program product 1100 is provided using a signal-bearing medium 1101. The signal-bearing medium 1101 may include one or more program instructions 1102 that, when executed by one or more processors, may provide the above-described instructions for executing a computer process. Figure 2-6 Thus, for example, reference to Figure 2-6 In the embodiment shown in , one or more features thereof may be borne by one or more instructions associated with the signal bearing medium 1101.

[0203] In some examples, signal-bearing medium 1101 may include computer-readable media 1103, such as, but not limited to, a hard drive, a compact disc (CD), a digital video disc (DVD), a digital tape, a memory, a read-only memory (ROM), or a random access memory (RAM), etc. In some embodiments, signal-bearing medium 801 may include computer-recordable media 1104, such as, but not limited to, a memory, a read / write (R / W) CD, a R / W DVD, etc. In some embodiments, signal-bearing medium 1101 may include communication media 1105, such as, but not limited to, digital and / or analog communication media (e.g., fiber optic cables, waveguides, wired communication links, wireless communication links, etc.). Thus, for example, signal-bearing medium 1101 may be communicated via a wireless form of communication medium 1105 (e.g., a wireless communication medium that complies with the IEEE 802.11 standard or other transmission protocols). One or more program instructions 1102 may be, for example, computer-executable instructions or logic-implemented instructions. In some examples, the aforementioned computing device can be configured to, in response to one or more program instructions 1102 communicated to the computing device by computer-readable medium 1103, computer recordable medium 1104, and / or communication medium 1105, provide various operations, functions, or actions. It should be understood that the arrangement described herein is merely for illustrative purposes. Thus, it will be understood by those skilled in the art that other arrangements and other elements (e.g., machines, interfaces, functions, sequences, and functional groups, etc.) can be used instead, and some elements can be omitted altogether according to the desired result. In addition, many of the described elements can be implemented as discrete or distributed components or in any appropriate combination and position to implement functional entities in conjunction with other components.

[0204] like Figure 12, which is a schematic diagram of a system architecture provided in an embodiment of the present application, wherein the system includes an application server 200 and a storage system 100 .

[0205] As an example, in a cloud computing scenario, the application server 200 may be a cloud server in a cloud data center, for example, Figure 1 Basic resources of the data center shown.

[0206] In actual application scenarios, users (or tenants) can access data through applications. The computers running these applications are called "application servers 200." Application servers 200 can be physical machines or virtual machines. Physical application servers 200 include, but are not limited to, desktop computers, servers, laptops, and mobile devices. Application servers 200 access data from storage system 100 through switches. Switches are optional; application servers 200 can also communicate directly with storage system 100 over the network.

[0207] The storage system 100 includes one or more hard disks and other storage devices with specific storage functions. The actual address of the storage space provided by the hard disks and other storage devices is not directly exposed to the application server 200. The hard disk can be of any type, such as a solid-state drive, a mechanical hard disk, or other types of hard disks. Each hard disk is divided into several physical blocks (chunks), which are mapped into logical blocks to form a storage pool. The storage pool is used to provide storage space to the upper (such as the application server 200). This storage space actually comes from the hard disks included in the storage system 100.

[0208] As an example, the storage system 100 can execute the above-mentioned data processing method, for example, the application server 200 obtains the information input by the first tenant (for example, obtained through a browser) and the metadata of the first tenant (for example, obtained through the metadata center of the application server 200) and sends them to the storage system 100, the storage system 100 determines the first table corresponding to the first entity according to the first mapping relationship, generates a first SQL statement according to the first table, and performs an operation on the first table stored in the storage system 100 according to the first SQL statement, and / or determines the first field corresponding to the first attribute according to the second mapping relationship, generates a second SQL statement according to the first field, and performs an operation on the first field stored in the storage system 100 according to the second SQL statement.

[0209] In another example, the application server 200 can execute the above-mentioned data processing method, where the application server 200 obtains the information input by the first tenant and the metadata of the first tenant, determines the first table corresponding to the first entity according to the first mapping relationship, generates a first SQL statement according to the first table, and performs operations on the first table stored in the storage system 100 according to the first SQL statement, and / or determines the first field corresponding to the first attribute according to the second mapping relationship, generates a second SQL statement according to the first field, and performs operations on the first field stored in the storage system 100 according to the second SQL statement.

[0210] The type of the storage system 100 is not limited in the embodiment of the present application. The storage system 100 may be a centralized storage system or a distributed storage system. Figure 13-14 , exemplarily showing a possible centralized storage system and a possible centralized storage system with a distributed storage system.

[0211] It should be understood that for ease of description, the method of performing the above data processing by the storage system 100 is taken as an example for explanation below.

[0212] like Figure 13 As shown, a centralized storage system applicable to embodiments of the present application is characterized by a unified entry point through which all data from external devices must pass. This entry point is the centralized storage system's engine 121. Engine 121 is the core component of the centralized storage system, and many of the storage system's advanced functions are implemented within it.

[0213] like Figure 13 As shown, the engine 121 has one or more controllers. Figure 13 The following description is made by taking the engine including controller 0 as an example.

[0214] The engine 121 also includes a front-end interface 123 and a back-end interface 124. The front-end interface 123 is used to communicate with the application server 200, thereby providing storage services for the application server 200. The back-end interface 124 is used to communicate with the hard disk 128 to expand the storage system capacity. Through the back-end interface 124, the engine 121 can connect to more hard disks 128, thereby forming a very large storage resource pool.

[0215] In the embodiment of the present application, the controller 0 can execute the data processing method mentioned in the embodiment of the present application. That is, the controller 0 can generate a first SQL statement based on the first table, and perform an operation on the first table stored in the hard disk 128 in the hard disk enclosure 130 according to the first SQL statement, and / or determine a first field corresponding to the first attribute according to the second mapping relationship, generate a second SQL statement based on the first field, and perform an operation on the first field stored in the hard disk 128 in the hard disk enclosure 130 according to the second SQL statement.

[0216] In hardware, such as Figure 13 As shown, controller 0 includes at least a processor 125 and a memory 122. Processor 125 is a central processing unit (CPU) that processes data access requests from application servers, such as requests for accessing a database initiated by a user through an application server, and is also used to process requests generated within the storage system. For example, when processor 125 receives write data requests from application server 200 through front-end port 123, it temporarily stores the data in these write data requests in memory 122. When the total amount of data in memory 122 reaches a certain threshold, processor 125 sends the data stored in memory 122 to hard disk 128 through the back-end port for persistent storage.

[0217] Memory 122 refers to an internal memory that exchanges data directly with the processor. It can read and write data at any time and at a very high speed. It serves as a temporary data storage for the operating system or other running programs. Memory can be random access memory or read-only memory (ROM). Random access memory is dynamic random access memory (DRAM) or storage class memory (SCM). DRAM is a semiconductor memory that, like most random access memories (RAM), is a volatile memory device. Memory 122 can also be a module composed of dual in-line memory modules or dual in-line memory modules (DIMM, DRAM), or a solid state disk (SSD).

[0218] Computer program instructions are stored in the memory 122 , and the processor 125 runs the computer program instructions in the memory 122 to execute the data processing method provided in the embodiment of the present application.

[0219] The engine 121 may not have a hard drive slot; the hard drive 128 must be placed in the hard drive enclosure 126, and the back-end interface 124 communicates with the hard drive enclosure 126. The back-end interface 124 exists in the form of an adapter card in the engine 121. Two or more back-end interfaces 124 can be used simultaneously on one engine 121 to connect to multiple hard drive enclosures. Alternatively, the adapter card can be integrated into the motherboard, in which case the adapter card can communicate with the processor 125 via the PCIE bus.

[0220] It should be noted that Figure 13 Only one engine 121 is shown in the figure. However, in actual applications, the storage system may include two or more engines 121, and redundancy or load balancing is performed between the multiple engines 121.

[0221] The hard disk enclosure 126 includes a control unit 127 and a plurality of hard disks 128. The control unit 127 can have various forms. In one case, the hard disk enclosure 126 is an intelligent disk enclosure, such as Figure 13 As shown, the control unit 127 includes a CPU and a memory. The CPU is used to perform operations such as address conversion and reading and writing data. The memory is used to temporarily store data to be written to the hard disk 128, or read data from the hard disk 128 to be sent to the controller. In another case, the control unit 127 is a programmable electronic component, such as a data processing unit (DPU). Optionally, the DPU here can also be replaced with a processing chip such as a graphics processing unit (GPU) or an embedded neural network processor (NPU).

[0222] like Figure 14 As shown, a distributed storage system provided by an embodiment of the present application includes a computing node cluster and a storage node cluster. The computing node cluster includes one or more computing nodes 2100 ( Figure 14 Two computing nodes 2100 are shown in FIG, but are not limited to two computing nodes 2100. Each computing node 2100 can communicate with each other. A computing node 2100 is a computing device, such as a server, a desktop computer, or a storage array controller.

[0223] The computing node 2100 can process data access requests from outside the distributed storage system, such as requests for accessing a database initiated by a user through an application server, and can also process requests generated within the storage system.

[0224] In hardware, such as Figure 14As shown, computing node 2100 includes at least a processor 212, a memory 213, and a network card 214. Processor 212 is a central processing unit (CPU) or other processing chip with processing capabilities, and is used to process data access requests from outside computing node 2100 or requests generated within computing node 2100. Exemplarily, when processor 212 receives write data requests from users, it temporarily stores the data in these write data requests in memory 213. When the total amount of data in memory 213 reaches a certain threshold, processor 212 sends the data stored in memory 213 to storage node 220 for persistent storage. Figure 14 Only one CPU 212 is shown in the figure. In actual applications, there are often multiple CPUs 212, wherein one CPU 212 has one or more CPU cores. This embodiment does not limit the number of CPUs and the number of CPU cores.

[0225] The type of memory 213 is similar to the memory 122 mentioned above. For details, please refer to the above description and will not be repeated here.

[0226] Network card 214 is used to communicate with storage node 220. For example, when the total amount of data in memory 213 reaches a certain threshold, computing node 2100 can send a request to storage node 220 via network card 214 to persistently store the data. In addition, computing node 2100 can also include a bus for communication between various components within computing node 2100.

[0227] Functionally, due to Figure 14 The primary function of compute nodes 2100 in this example is computing. When storing data, they can leverage remote storage for persistent storage. Therefore, they have less local storage than conventional servers, saving both cost and space. However, this does not mean that compute nodes 2100 cannot have local storage. In actual implementation, compute nodes 2100 can also have a small number of internal hard drives or external hard drives.

[0228] Any computing node 2100 can access any storage node in the storage node cluster through the network. The storage node cluster includes multiple storage nodes ( Figure 14 Three storage nodes are shown in FIG, but are not limited to three storage nodes).

[0229] The storage node can process data access requests sent from the computing node 2100 and write data to the hard disk 225 or read data from the hard disk 225 .

[0230] In an embodiment of the present application, the storage node 2200 can execute the data processing method provided in the embodiment of the present application.

[0231] From a hardware perspective, a storage node includes a processor 221, a memory 222, a network card 223, and multiple hard disks 225. The network card 224 is used to communicate with the computing node 2100. The hard disk 225 is used to store data and can be a disk or other types of storage media, such as a solid-state drive or a shingled magnetic recording hard disk. The processor 221 is used to write data to the hard disk 225 or read data from the hard disk 225 according to a read / write data request. In the process of reading and writing data, the processor 221 needs to convert the address carried in the read / write data request into an address that can be recognized by the hard disk. In the embodiment of the present application, the processor 221 serves as the main core unit of the storage node and executes the data processing method provided in the embodiment of the present application.

[0232] The type of processor 221 is similar to that of processor 112 , and details thereof can be found in the above description, which will not be repeated here.

[0233] In another embodiment, some functions of the processor 221 can be offloaded to the network card 223. The network card 223 is an intelligent network card. It can include a CPU and memory. The CPU is used to perform operations that can be performed by the processor 221, such as address conversion and reading and writing data. The memory in the network card is used to temporarily store data to be written to the hard disk 225, or data read from the hard disk 225 to be sent to the computing node 2100. The CPU can also be a programmable electronic component, such as a DPU. Optionally, the DPU here can also be a processing chip such as a GPU or an NPU. There is no ownership relationship between the network card 223 and the hard disk 225 in the storage node, and the network card 223 can access any hard disk 225 in the storage node.

[0234] It should be noted that Figure 13 and Figure 14 The possible hardware structure of the storage system is only exemplified. The data processing method provided in the embodiment of the present application is also applicable to other systems or devices with storage functions.

[0235] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0236] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0237] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0238] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0239] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0240] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0241] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

[0242] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0243] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0244] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0245] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0246] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0247] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0248] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A data processing method, characterized in that: include: Receive information input by a first tenant, where the information is used to indicate an operation to be performed on a first entity and / or a first attribute in a database, wherein the first entity is an entity extended by the first tenant, and the first attribute is an attribute extended by the first tenant to a second entity; Obtaining metadata of the first tenant, where the metadata of the first tenant includes at least one of the following: a first mapping relationship between the first entity and a first table in the database, and a second mapping relationship between the first attribute and a first field in the database; Determining the first table corresponding to the first entity according to the first mapping relationship, and generating a first structured query SQL statement according to the first table, wherein the first SQL statement is used to perform the operation on the first table; and / or The first field corresponding to the first attribute is determined according to the second mapping relationship, and a second SQL statement is generated according to the first field, where the second SQL statement is used to instruct to perform the operation on the first field.

2. The method according to claim 1, characterized in that The acquiring metadata of the first tenant includes: Context information of the first tenant is obtained, where the context information includes metadata of the first tenant.

3. The method according to claim 1 or 2, characterized in that The information is used to instruct to perform a query operation on the first attribute, and the second SQL statement is an SQL query statement, and the SQL query statement is used to perform the query operation on the first field.

4. The method according to claim 3, characterized in that The method further comprises: Generate an Object Query Language (OQL) statement based on the information input by the first tenant; Generating a first SQL statement according to the first table includes: Convert the OQL statement into the first SQL statement according to the first table; Generating a second SQL statement according to the first field includes: The OQL statement is converted into the second SQL statement according to the first field.

5. The method according to claim 1 or 2, characterized in that The information is used to instruct to perform an insert operation on the first attribute, and the second SQL statement is an SQL insert statement, and the SQL insert statement is used to perform the insert operation on the first field.

6. The method according to claim 1 or 2, characterized in that The information is used to instruct to perform an update operation on the first attribute, the second SQL statement is an SQL update statement, and the SQL insert statement is used to perform the update operation on the first field.

7. The method according to claim 1 or 2, characterized in that The information is used to instruct to perform a delete operation on the first attribute, the second SQL statement is an SQL delete statement, and the SQL insert statement is used to perform the delete operation on the first field.

8. A data processing device, characterized in that: include: a receiving module, configured to receive information input by a first tenant, the information being used to indicate an operation to be performed on a first entity and / or a first attribute in a database, wherein the first entity is an entity extended by the first tenant, and the first attribute is an attribute extended by the first tenant to a second entity; an acquisition module, configured to acquire metadata of the first tenant, the metadata of the first tenant including at least one of the following: a first mapping relationship between the first entity and a first table in the database, and a second mapping relationship between the first attribute and a first field in the database; a processing module, configured to determine the first table corresponding to the first entity according to the first mapping relationship, and generate a first structured query SQL statement according to the first table, wherein the first SQL statement is used to perform the operation on the first table; and / or The processing module is configured to determine the first field corresponding to the first attribute according to the second mapping relationship, and generate a second SQL statement according to the first field, wherein the second SQL statement is configured to instruct execution of the operation on the first field.

9. The device according to claim 8, characterized in that The acquisition module is specifically used for: Context information of the first tenant is obtained, where the context information includes metadata of the first tenant.

10. The device according to claim 8 or 9, characterized in that The information is used to instruct to perform a query operation on the first attribute, and the second SQL statement is an SQL query statement, and the SQL query statement is used to perform the query operation on the first field.

11. The device according to claim 10, characterized in that The processing module is specifically used for: Generate an Object Query Language (OQL) statement based on the information input by the first tenant; Converting the OQL statement into the first SQL statement according to the first table; and / or The OQL statement is converted into the second SQL statement according to the first field.

12. The device according to claim 8 or 9, characterized in that The information is used to instruct to perform an insert operation on the first attribute, and the second SQL statement is an SQL insert statement, and the SQL insert statement is used to perform the insert operation on the first field.

13. The device according to claim 8 or 9, characterized in that The information is used to instruct to perform an update operation on the first attribute, the second SQL statement is an SQL update statement, and the SQL insert statement is used to perform the update operation on the first field.

14. The device according to claim 8 or 9, characterized in that The information is used to instruct to perform a delete operation on the first attribute, the second SQL statement is an SQL delete statement, and the SQL insert statement is used to perform the delete operation on the first field.

15. The device according to any one of claims 8 to 14, characterized in that The device is an OQL engine.

16. A computer device, characterized in that: include: A processor, the processor being configured to be coupled to a memory, read and execute instructions and / or program codes in the memory, so as to perform the operation steps of the method according to any one of claims 1 to 7.

17. A chip system, characterized in that: include: The chip system includes a processor and a power supply circuit, wherein the power supply circuit is used to supply power to the processor, and the processor is used to execute the operating steps of the method according to any one of claims 1 to 7.

18. A computing device cluster, characterized in that: comprising at least one computing device, each computing device including a processor and a memory; The processor of the at least one computing device is configured to execute instructions stored in a memory of the at least one computing device, so that the computing device cluster performs the operating steps of the method according to any one of claims 1 to 7.

19. A computer-readable medium, characterized in that The method comprises computer program instructions. When the computer program instructions are executed by a computing device cluster, the computing device cluster performs the operation steps of the method according to any one of claims 1 to 7.

20. A computer program product comprising instructions, characterized in that When the instructions are executed by a computing device cluster, the computing device cluster is caused to perform the operation steps of the method according to any one of claims 1 to 7.