A data processing method and apparatus thereof
By dividing the metadata entity into public and private parts, and obtaining corresponding parts from the shared and target service metadata storage space for reconstruction, the problem of large independent storage space occupies each service data file in the prior art is solved, and the storage space saving and capacity improvement are achieved.
Patent Information
- Application Number
- CN202111575575.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-21
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2041-12-21
AI Technical Summary
In the prior art, each business data file requires independent metadata storage space, resulting in a large storage space occupancy and low resource utilization.
By dividing the metadata entity into a public part and a private part, obtaining the public part from the shared metadata storage space, obtaining the private part from the target business metadata storage space, and performing metadata reconstruction to access the business data file.
Different accounts share common parts of the storage space in the same shared metadata storage space, saving storage space and increasing the capacity of the number of accounts in the unit SAAS service cluster.
Smart Images

Figure CN114238337B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of data processing, and specifically to a data processing method and device thereof. Background Art
[0002] Currently, metadata entities are stored in metadata isolation storage, that is, the metadata entities of each business data file are stored in the metadata storage space corresponding to each business data file. Each business data file has its own unique metadata, and there are multiple metadata entities in one metadata. One metadata entity corresponds to a function or structure of the business data file.
[0003] Under the existing technology, after a developer modifies a metadata entity, when submitting the metadata entity, it is necessary to publish and rebuild each metadata containing the modified metadata entity to the metadata repository of the corresponding business data file.
[0004] Each business data file requires an independent metadata storage space, which takes up a large storage space. Summary of the invention
[0005] A first aspect of an embodiment of the present application provides a data processing method, including:
[0006] Obtain access requests for business data files;
[0007] Acquire a first code of a metadata entity of a business data file according to an access request;
[0008] Retrieve a common portion of the metadata entity from the shared metadata storage space according to the first encoding;
[0009] Acquire a private part of the metadata entity from a target business metadata storage space according to the first code, where the target business metadata storage space is one of the multiple business metadata storage spaces corresponding to the first code;
[0010] Use the public part and the private part to reconstruct metadata and obtain the metadata entity of the business data file;
[0011] Run the metadata entity to access the business data files.
[0012] In the embodiment of the present application, the SAAS service cluster divides the metadata entity into a public part and a private part, and obtains the public part from the shared metadata storage space, and obtains the private part from the target business metadata storage space in multiple business metadata storage spaces to perform metadata reconstruction, so that different account sets use the public part in the same shared metadata storage space, and different account sets use the private parts in different business metadata storage spaces, thereby saving storage space and increasing the capacity of the number of account sets in the unit SAAS service cluster.
[0013] In an implementation manner of the first aspect of the embodiment of the present application, the shared metadata storage space includes a shared database, and the target business metadata storage space includes a target business database;
[0014] Acquiring the common part of the metadata entity from the shared metadata storage space according to the first encoding includes:
[0015] Retrieve a common portion of the metadata entity from a shared database according to the first code;
[0016] Acquiring the private part of the metadata entity from the target business metadata storage space according to the first encoding includes:
[0017] The private part of the metadata entity is obtained from the target service database according to the first code.
[0018] This embodiment uses a database with large storage space and low storage cost, thus solving the problem of low resource utilization of metadata isolation storage database.
[0019] In an implementation of the first aspect of the embodiment of the present application, the shared metadata storage space includes a shared database and a shared metadata cache, and the target business metadata storage space includes a target business database and a target business metadata cache;
[0020] Acquiring the common part of the metadata entity from the shared metadata storage space according to the first encoding includes:
[0021] Retrieve a common portion of the metadata entity from the shared metadata cache according to the first encoding;
[0022] determining whether the common portion of the metadata entity obtained from the shared metadata cache is sufficient for metadata reconstruction;
[0023] If it is insufficient for metadata reconstruction, obtaining the common part of the metadata entity from the shared database according to the first code; the common part of the metadata entity obtained from the shared database is used to replace the common part of the metadata entity obtained historically, or is used to supplement the common part of the metadata entity obtained historically;
[0024] Acquiring the private part of the metadata entity from the target business metadata storage space according to the first encoding includes:
[0025] Acquire a private portion of the metadata entity from the target service metadata cache according to the first encoding;
[0026] Determining whether the private portion of the metadata entity obtained from the target business metadata cache is sufficient for metadata reconstruction;
[0027] If it is insufficient for metadata reconstruction, the private part of the metadata entity is obtained from the target business database according to the first code; the private part of the metadata entity obtained from the target business database is used to replace the private part of the metadata entity obtained historically, or to supplement the private part of the metadata entity obtained historically.
[0028] This embodiment uses cache, and the access speed is fast; the use of shared metadata cache and target business metadata cache reduces the consumption of microservice memory resources and improves the stability of the system.
[0029] In an implementation of the first aspect of the embodiment of the present application, the storage space of the metadata entity of the business data file also includes an intermediate database;
[0030] Acquiring the common part of the metadata entity from the shared database according to the first encoding includes:
[0031] Acquire a common portion of the metadata entity from an intermediate database according to the first code;
[0032] Determining whether the common portion of the metadata entity obtained from the intermediate database is sufficient for metadata reconstruction;
[0033] If it is insufficient for metadata reconstruction, obtaining the common part of the metadata entity from the shared database according to the first code; the common part of the metadata entity obtained from the shared database is used to replace the common part of the metadata entity obtained historically, or is used to supplement the common part of the metadata entity obtained historically;
[0034] Acquiring the private part of the metadata entity from the target business database according to the first encoding includes:
[0035] Retrieve the private portion of the metadata entity from the intermediate database according to the first encoding;
[0036] determining whether the private portion of the metadata entity obtained from the intermediate database is sufficient for metadata reconstruction;
[0037] If it is insufficient for metadata reconstruction, the private part of the metadata entity is obtained from the target business database according to the first code; the private part of the metadata entity obtained from the target business database is used to replace the private part of the metadata entity obtained historically, or to supplement the private part of the metadata entity obtained historically.
[0038] This embodiment uses an intermediate database, and the access speed is fast.
[0039] In an implementation of the first aspect of the embodiment of the present application, the common part includes a basic sub-part and an additional sub-part.
[0040] This embodiment divides the common part into a basic sub-part and an additional sub-part, thereby increasing the flexibility of the common part and allowing the common part to be modified by adding or modifying the additional sub-part.
[0041] In an implementation of the first aspect of the embodiment of the present application, obtaining a first code of a metadata entity of a service data file according to an access request includes:
[0042] Obtaining a second code of the metadata entity according to the access request;
[0043] Determine whether the second code needs to be converted;
[0044] If code conversion is required, the second code is converted to obtain the first code;
[0045] If code conversion is not required, the second code is determined as the first code.
[0046] This embodiment allows code conversion between different codes, thereby improving access flexibility.
[0047] In an implementation manner of the first aspect of the embodiment of the present application, the access request is initiated by the first object; before obtaining the access request for the business data file, the method further includes:
[0048] receiving the common portion submitted by the second object;
[0049] receiving the private portion submitted by the first subject;
[0050] Store the common parts in a shared metadata storage space;
[0051] The private part is stored in the target business metadata storage space.
[0052] This embodiment allows the first user to submit the private part and the second user to submit the public part, which improves the feasibility of the solution. After the second user modifies the public part of the metadata entity, when submitting the metadata entity, it only needs to publish the public part metadata of the modified metadata entity and rebuild the metadata to the shared data storage space, which saves submission time.
[0053] In an implementation manner of the first aspect of the embodiment of the present application, an access request is initiated by a first object; the common part includes a basic sub-part and an additional sub-part; before obtaining the access request for the business data file, the method further includes:
[0054] receiving a base sub-portion submitted by a second object;
[0055] receiving an additional sub-portion submitted by a third object;
[0056] receiving the private portion submitted by the first subject;
[0057] storing the base sub-part and the additional sub-part in a shared metadata storage space;
[0058] The private part is stored in the target business metadata storage space.
[0059] This embodiment allows a third user to submit additional sub-parts, increases the flexibility of the public part, and allows the public part to be modified by adding or modifying additional sub-parts.
[0060] In an implementation manner of the first aspect of the embodiment of the present application, the shared metadata storage space includes a shared database, and the target business metadata storage space includes a target business database; after obtaining the first code of the metadata entity of the business data file according to the access request, the method further includes:
[0061] Acquire a first routing code and a second routing code according to the first code;
[0062] Acquiring the common part of the metadata entity from the shared metadata storage space according to the first encoding includes:
[0063] Retrieve a common portion of the metadata entity from a shared database according to the first routing code;
[0064] Acquiring the private part of the metadata entity from the target business metadata storage space according to the first encoding includes:
[0065] The private part of the metadata entity is obtained from the target service database according to the second routing code.
[0066] This embodiment uses routing codes to access the database, thereby improving the feasibility of the solution.
[0067] In an implementation manner of the first aspect of the embodiment of the present application, the first route is encoded as meta, and the second route is encoded as biz.
[0068] A second aspect of an embodiment of the present application provides a data processing device, including:
[0069] An acquisition unit, used to acquire an access request for a business data file;
[0070] The acquiring unit is further used to acquire the first code of the metadata entity of the business data file according to the access request;
[0071] The acquisition unit is further used to acquire the common part of the metadata entity from the shared metadata storage space according to the first code;
[0072] The acquiring unit is further used to acquire the private part of the metadata entity from a target business metadata storage space according to the first code, the target business metadata storage space being one of the multiple business metadata storage spaces corresponding to the first code;
[0073] A reconstruction unit, used for reconstructing metadata using the public part and the private part to obtain a metadata entity of a business data file;
[0074] The running unit is used to run the metadata entity to access the business data file.
[0075] In an implementation manner of the second aspect of the embodiment of the present application, the shared metadata storage space includes a shared database, and the target business metadata storage space includes a target business database;
[0076] The acquisition unit is specifically used to: acquire the common part of the metadata entity from the shared database according to the first code;
[0077] The acquisition unit is specifically used to acquire the private part of the metadata entity from the target business database according to the first code.
[0078] In an implementation manner of the second aspect of the embodiment of the present application, the shared metadata storage space includes a shared metadata cache, and the target service metadata storage space includes a target service metadata cache;
[0079] The acquisition unit is specifically used to: acquire the common part of the metadata entity from the shared metadata cache according to the first code; determine whether the common part of the metadata entity acquired from the shared metadata cache is sufficient for metadata reconstruction; if it is insufficient for metadata reconstruction, acquire the common part of the metadata entity from the shared database according to the first code; the common part of the metadata entity acquired from the shared database and the common part of the metadata entity acquired from the shared metadata cache are not repeated.
[0080] The acquisition unit is specifically used to: acquire the private part of the metadata entity from the target business metadata cache according to the first code; determine whether the private part of the metadata entity acquired from the target business metadata cache is sufficient for metadata reconstruction; if it is insufficient for metadata reconstruction, acquire the private part of the metadata entity from the target business database according to the first code; the private part of the metadata entity acquired from the target business database and the private part of the metadata entity acquired from the target business metadata cache are not repeated.
[0081] In an implementation of the second aspect of the embodiment of the present application, the storage space of the metadata entity of the business data file also includes an intermediate database;
[0082] The acquisition unit is specifically used to: acquire the common part of the metadata entity from the intermediate database according to the first code; determine whether the common part of the metadata entity acquired from the intermediate database is sufficient for metadata reconstruction; if it is insufficient for metadata reconstruction, acquire the common part of the metadata entity from the shared database according to the first code; the common part of the metadata entity acquired from the shared database is used to replace the common part of the metadata entity acquired historically, or to supplement the common part of the metadata entity acquired historically;
[0083] The acquisition unit is specifically used to: acquire the private part of the metadata entity from the intermediate database according to the first code; determine whether the private part of the metadata entity acquired from the intermediate database is sufficient for metadata reconstruction; if it is not sufficient for metadata reconstruction, acquire the private part of the metadata entity from the target business database according to the first code; the private part of the metadata entity acquired from the target business database is used to replace the private part of the metadata entity acquired historically, or is used to supplement the private part of the metadata entity acquired historically.
[0084] In an implementation of the second aspect of the embodiment of the present application, the common part includes a basic sub-part and an additional sub-part.
[0085] In an implementation method of the second aspect of the embodiment of the present application, the acquisition unit is specifically used to obtain the second code of the metadata entity according to an access request; determine whether the second code needs to be converted; if the code conversion is required, convert the second code to obtain the first code; if the code conversion is not required, determine the second code as the first code.
[0086] In an implementation manner of the second aspect of the embodiments of the present application, the data processing device further includes:
[0087] A receiving unit, configured to receive the public part submitted by the second object; and receive the private part submitted by the first object;
[0088] The storage unit is used to receive the private part submitted by the first object; and store the private part in the target business metadata storage space.
[0089] In an implementation manner of the second aspect of the embodiments of the present application, the data processing device further includes:
[0090] A receiving unit, configured to receive a basic sub-portion submitted by a second object; receive an additional sub-portion submitted by a third object; and receive a private portion submitted by a first object;
[0091] The storage unit is used to store the basic sub-part and the additional sub-part in the shared metadata storage space; and store the private part in the target business metadata storage space.
[0092] In an implementation manner of the second aspect of the embodiments of the present application, the data processing device further includes:
[0093] The acquiring unit is further used to acquire the first routing code and the second routing code according to the first code;
[0094] An acquisition unit, specifically configured to acquire a common part of the metadata entity from a shared database according to the first routing code;
[0095] The acquiring unit is specifically configured to acquire the private part of the metadata entity from the target service database according to the second routing code.
[0096] In an implementation manner of the second aspect of the embodiment of the present application, the first route is encoded as meta, and the second route is encoded as biz.
[0097] A third aspect of an embodiment of the present application provides a computer device, including:
[0098] CPU, memory, input and output interface, wired or wireless network interface, power supply;
[0099] The memory is either transient storage memory or persistent storage memory;
[0100] The central processing unit is configured to communicate with the memory, and execute instructions in the memory on the computer device to perform the method of the first aspect.
[0101] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, comprising instructions, which, when executed on a computer, cause the computer to execute the method of the first aspect.
[0102] A fifth aspect of the embodiments of the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the method of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0103] Figure 1An architecture diagram of a SAAS service cluster in an embodiment of the present application;
[0104] Figure 2 A flowchart of a data processing method according to an embodiment of the present application;
[0105] Figure 3 A data structure diagram of a data processing method according to an embodiment of the present application;
[0106] Figure 4 A data structure diagram of another data processing method according to an embodiment of the present application;
[0107] Figure 5 A flowchart of another data processing method according to an embodiment of the present application;
[0108] Figure 6 A flowchart of another data processing method according to an embodiment of the present application;
[0109] Figure 7 A flowchart of another data processing method according to an embodiment of the present application;
[0110] Figure 8 A flowchart of another data processing method according to an embodiment of the present application;
[0111] Fig. 9 Another SAAS service cluster architecture diagram of an embodiment of the present application;
[0112] Fig.10 Another SAAS service cluster architecture diagram of an embodiment of the present application;
[0113] Fig.11 Another SAAS service cluster architecture diagram of an embodiment of the present application;
[0114] Fig.12 Another SAAS service cluster architecture diagram of an embodiment of the present application;
[0115] Fig.13 Another SAAS service cluster architecture diagram of an embodiment of the present application;
[0116] Fig.14 Another SAAS service cluster architecture diagram of an embodiment of the present application;
[0117] Fig.15 Another SAAS service cluster architecture diagram of an embodiment of the present application;
[0118] Fig.16 Another SAAS service cluster architecture diagram of an embodiment of the present application;
[0119] Fig.17An architectural diagram of another SAAS service cluster according to an embodiment of the present application. DETAILED DESCRIPTION
[0120] Currently, the enterprise resource planning (ERP) system that provides multi-tenant account software-as-a-service (SAAS) uses metadata isolation storage for metadata entity storage, that is, the metadata entities of each account are stored in the metadata storage space corresponding to each account, and the metadata entities of account sets such as customer-defined printing templates and customer-defined functions in secondary development are also stored in the corresponding metadata storage space. Each account has its own unique metadata, and there are multiple metadata entities in one metadata. One metadata entity corresponds to a function or structure of the account. The metadata storage space includes a metadata repository or microservice memory. The metadata repository is a database; the microservice memory of a microservice refers to the memory divided from the overall memory and used to run the microservice.
[0121] Under the existing technology, after the developer modifies the metadata entity, when submitting the metadata entity, it is necessary to publish and rebuild the metadata of each metadata containing the modified metadata entity to the metadata repository of the corresponding account set. The metadata entity is stored in metadata isolation storage, that is, the metadata entity of each account set is stored in the metadata repository corresponding to each account set, and the metadata entity corresponding to the customer-defined printing template, customer-defined functions in secondary development, etc. is also stored in the corresponding metadata repository. When the customer uses the microservice to access the account set in the metadata repository, the SAAS service cluster reads the metadata entity into the memory, and the metadata entity is stored in the memory using metadata isolation storage, that is, the metadata entity of each account set is stored in the microservice memory corresponding to each account set, and the metadata entity of the customer-defined printing template, customer-defined functions in secondary development, etc. is also stored in the corresponding microservice memory.
[0122] Each account set requires an independent metadata storage space, which takes up a large amount of storage space.
[0123] In accounting and auditing, it is very common to use the Internet to manage accounts. Networking and cloud computing are the trends in account management. In the multi-tenant account SAAS of the ERP system, there are two types of objects. The first type is the first object as a SAAS tenant, and the second type is the second and third objects as developers. Tenants are also called customers and subscribers, and developers are also called operators and merchants. There are multiple first objects. The second and third objects can be different objects or the same object. When there is only one developer, the second and third objects are the same object. Objects can be users, scripts, or AI. The following takes users as an example for explanation.
[0124] The embodiments of the present application can be implemented by a computer device, which may include at least one of a terminal and a server, wherein the server may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. The terminal and the server may be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiments of the present application. The following is an illustration using a SAAS service cluster as an example.
[0125] Business data files generally refer to data files in various businesses, such as data files in accounting business. Data files in accounting business are such as account sets. The following takes an account set as an example for explanation.
[0126] like Figure 1 As shown, the embodiment of the present application provides a SAAS service cluster 101, which is connected to a first user 102, a second user 103 and a third user 104. The SAAS service cluster 101 includes multiple account sets, and different first users access the corresponding account sets on the SAAS service cluster through the network.
[0127] like Figure 2 As shown, the embodiment of the present application provides a data processing method, including:
[0128] 201. Obtain an access request for a business data file.
[0129] The SAAS service cluster obtains the access request of the first user through the network, where the access request is used to indicate that the first user needs to access the account set on the SAAS service cluster.
[0130] 202. Obtain a first code of a metadata entity of a business data file according to an access request.
[0131] The SAAS service cluster reads the first code of the metadata entity of the account set that the first user needs to access from the access request. Different metadata entities are identified using different first codes.
[0132] 203. Acquire a common part of the metadata entity from the shared metadata storage space according to the first code.
[0133] The SAAS service cluster uses the first code to determine the metadata entity of the account set that the first user needs to access. After determining the metadata entity, the SAAS server cluster obtains the common part of the metadata entity from the shared metadata storage space. The common part is common to the metadata entities of multiple account sets.
[0134] 204. Acquire the private part of the metadata entity from the target business metadata storage space according to the first code.
[0135] The SAAS service cluster uses the first code to determine the metadata entity of the account set that the first user needs to access. After determining the metadata entity, the SAAS server cluster determines the target business metadata storage space corresponding to the metadata entity from multiple business metadata storage spaces, and obtains the private part of the metadata entity from the target business metadata storage space. The target business metadata storage space is one of the multiple business metadata storage spaces corresponding to the first code.
[0136] Step 203 and step 204 are independent of each other in terms of timing, and are not specifically limited.
[0137] 205. Use the public part and the private part to reconstruct metadata and obtain the metadata entity of the business data file.
[0138] After obtaining the public part and the private part, the SAAS service cluster reconstructs the metadata. When reconstructing the metadata, the SAAS service cluster integrates the public part of the metadata entity and the private part of the metadata entity into the metadata entity.
[0139] 206. Run the metadata entity to access the business data file.
[0140] The SAAS service cluster runs the integrated metadata entity. Running the metadata entity enables the first user to access the account set. The first user accesses the account set and can perform read and write operations on the account set, such as reading, saving, modifying, querying or sharing the account set.
[0141] In one implementation of the embodiment of the present application, the shared metadata storage space includes a shared database, and the target business metadata storage space includes a target business database. When N account sets use one shared database, the database includes one shared database and N business databases, and each account set corresponds to one business database.
[0142] In this embodiment, the public part is obtained from the shared database according to the first code, and the private part is obtained from the target service database according to the first code.
[0143] like Figure 3 As shown, the data processing method embodiment in the embodiment of the present application includes:
[0144] Metadata entities are divided into public and private parts. The public part is the data common to multiple metadata entities. It can be considered that the public part is the main body of the metadata entity. The main bodies of multiple metadata entities are the same. The private part is the data unique to each metadata entity. It can be considered that the private part is the personalized data added or modified on the main body of the metadata entity. In the customer customization scenario, the corresponding metadata entities such as the customized printing templates and conversion rules are stored in this business library by extending the original metadata entity.
[0145] like Figure 4 As shown, the data processing method embodiment in the embodiment of the present application includes:
[0146] The metadata entity is divided into a public part and a private part. The public part is divided into a basic sub-part and an additional sub-part. The additional sub-part can also be called an inherited sub-part or a forked sub-part. The basic sub-part can be considered as the data obtained by the first or first-level development, and the additional sub-part can be considered as the data obtained by the secondary development or second-level development. Secondary development or second-level development is to add or modify the basic sub-part to obtain the additional sub-part. The additional sub-part can be the metadata of the customer customized function in the secondary development.
[0147] In this embodiment, the SAAS service cluster obtains the common part of the metadata entity from the shared metadata storage space according to the first code, specifically, the SAAS service cluster obtains the basic sub-part and the additional sub-part of the metadata entity from the shared metadata storage space according to the first code.
[0148] like Figure 5 As shown, the shared metadata storage space includes the shared metadata cache, and the target business metadata storage space includes the target business metadata cache. The shared metadata cache and the target business metadata cache are both caches. The cache refers to the microservice memory. The microservice memory of a microservice refers to the memory divided from the overall memory of the SAAS service cluster for running the microservice.
[0149] In this embodiment, the intermediate database may be a database that stores data in key-value pairs, such as redis, LevelDB, etc., and redis is taken as an example for explanation below.
[0150] 501. Obtain a common part from a shared metadata cache according to a first encoding.
[0151] 502. Obtain a private part from a target service metadata cache according to the first code.
[0152] Steps 501 to 502 of this embodiment are similar to Figure 2 Steps 203 to 204 of the illustrated embodiment are similar, except that the shared metadata storage space used in this embodiment is specifically a shared metadata cache, and the target business metadata storage space is specifically a target business metadata cache, which will not be repeated here.
[0153] 503. Determine whether the public portion of the shared metadata cache and the private portion of the target service metadata cache are sufficient to perform metadata reconstruction. If sufficient, execute step 508; if not sufficient, execute step 504.
[0154] The SAAS service cluster parses the public and private parts obtained from the shared metadata cache and the target business metadata cache to determine whether the public and private parts can be reconstructed with metadata. If they are sufficient, metadata reconstruction can be performed, and the public and private parts can be restored to metadata entities to meet the access needs of the first user; if they are insufficient, metadata reconstruction cannot be performed, and the public and private parts cannot be restored to metadata entities due to the lack of some data, and the access needs of the first user cannot be met.
[0155] 504. Obtain the public part and the private part from the remote dictionary service redis according to the first code.
[0156] The SAAS service cluster uses the first code to determine the metadata entity of the account set that the first user needs to access. After the SAAS server cluster determines the metadata entity, the SAAS service cluster queries and obtains the public part and the private part of the metadata entity from redis. The public part obtained here may be the public part not obtained in step 501, and the private part obtained here may be the private part not obtained in step 502. In this way, the public part obtained in step 501 can be supplemented by the public part obtained in step 504, and the private part obtained in step 502 can be supplemented by the private part obtained in step 504, and the process proceeds to step 505. Since there is no need to obtain duplicate data, the processing efficiency can be improved and the consumption of computing resources can be reduced. The public part obtained here may also include the public part obtained in step 501, and the private part obtained here may also include the private part obtained in step 502. In this case, the public part obtained in step 501 is replaced by the public part obtained in step 504, and the private part obtained in step 502 is replaced by the private part obtained in step 504, and the process proceeds to step 505.
[0157] 505. Determine whether the public and private parts in the shared metadata cache, the target business metadata cache, and redis are sufficient to perform metadata reconstruction. If sufficient, execute step 508; if not sufficient, execute step 506.
[0158] Step 505 is similar to step 503, except that the object of judgment is the public part and private part obtained by the SAAS service cluster from the shared metadata cache, the target business metadata cache and redis, and the details are not repeated here.
[0159] Steps 504 to 505 are optional steps and may not be performed. When steps 504 to 505 are not performed, step 503 is to determine whether the public part of the shared metadata cache and the private part of the target business metadata cache are sufficient to perform metadata reconstruction. If sufficient, step 508 is performed; if not sufficient, step 506 is performed.
[0160] 506. Obtain the common part from the shared database according to the first code.
[0161] 507. Acquire the private part from the target service database according to the first code.
[0162] Steps 506 to 507 of this embodiment are similar to Figure 2Steps 203 to 204 of the illustrated embodiment are similar, except that the shared data storage space is a shared database, and the target business metadata storage space is a target business database. The public part obtained here may be the public part not obtained in steps 501 and 504, and the private part obtained here may be the private part not obtained in steps 502 and 504. In this way, the public part obtained in step 506 can be used to supplement the public part obtained before step 506, and the private part obtained in step 507 can be used to supplement the private part obtained before step 507, and the process proceeds to step 508. Since there is no need to obtain duplicate data, the processing efficiency can be improved and the consumption of computing resources can be reduced. The public part obtained here may also include the public part obtained in steps 501 and 504, and the private part obtained here may also include the private part obtained in steps 502 and 504. In this case, the public part obtained in step 506 replaces the public part obtained before step 506, and the private part obtained in step 507 replaces the private part obtained before step 507, and the process proceeds to step 508.
[0163] 508. Use the public part and the private part to reconstruct the metadata and obtain the metadata entity of the account set.
[0164] Step 508 of this embodiment is Figure 2 Step 205 of the illustrated embodiment is similar and will not be described in detail.
[0165] In this embodiment, the access request may include the first code, or the user ID, account name, etc. of the first user. The first code may be the storage address or serial number of the metadata entity, etc.
[0166] like Figure 6 As shown, another data processing method of an embodiment of the present application, the SAAS service cluster obtains the first code of the metadata entity according to the access request, including:
[0167] 601. Obtain a second code of a metadata entity according to an access request.
[0168] The SAAS service cluster reads the second code from the access request, and the second code corresponds to a metadata entity of an account set.
[0169] 602. Determine whether the second code is to be converted into a code. If so, execute step 603; if not, execute step 604.
[0170] Determining whether the second code needs to be converted can be divided into two steps. The first step is to determine whether the second code can be converted, and the second step is to determine whether the first user chooses to convert the second code. If the judgments in both steps are yes, it is determined that the second code needs to be converted, as follows:
[0171] The SAAS service cluster determines the second code to determine whether the second code can be converted and whether the first user chooses to perform the conversion. If the second code can be converted and the first user chooses to perform the conversion, it is determined to perform the conversion; if the second code cannot be converted, or the first user chooses not to perform the conversion, it is determined not to perform the conversion.
[0172] To determine whether the second code can be converted, it is necessary to determine whether the first user has both the second code and the first code. If the first user has both the second code and the first code, it is determined that the second code can be converted. To determine whether the first user chooses to convert the second code, it is necessary to perform the conversion according to the instruction of the first user.
[0173] 603. Perform code conversion on the second code to obtain a first code.
[0174] The SAAS service cluster converts the second code into the first code according to the pre-set code conversion rules. The pre-set code conversion rules are set by the developer. In this case, the first code and the second code are different codes. The first code and the second code correspond to the metadata entity of an account set respectively. Generally speaking, the additional sub-parts of the metadata entities of the two account sets are different.
[0175] 604. Determine the second code as the first code.
[0176] In this case, the first code and the second code are the same code. Therefore, the SAAS service cluster determines in step 602 not to perform code conversion, that is, determines the second code as the first code.
[0177] like Figure 7 As shown, another data processing method of an embodiment of the present application includes:
[0178] 701. Receive a basic sub-part submitted by a second user.
[0179] The SAAS service cluster receives the basic sub-portion of the public portion submitted by the second user.
[0180] 702. Receive an additional sub-part submitted by a third user.
[0181] The SAAS service cluster receives the additional sub-part of the public part submitted by the third user. The second user and the third user are developers. The second user and the third user can be different users or the same user. When there is only one developer, the second user and the third user are the same user.
[0182] Step 702 is an optional step.
[0183] 703. Receive the private part submitted by the first user.
[0184] The first user is a SAAS tenant. The SAAS service cluster receives the extended private part submitted by the first user.
[0185] Steps 701, 702 and 703 are independent of each other in terms of time sequence and are not specifically limited.
[0186] 704. Store the basic sub-part and the additional sub-part in a shared metadata storage space.
[0187] After receiving the basic sub-part and the additional sub-part, the SAAS service cluster stores the basic sub-part and the additional sub-part in a shared metadata storage space, which includes a shared database or a shared metadata cache, and may also include redis. When step 702 is not performed, the SAAS stores the basic sub-part in the shared metadata storage space.
[0188] 705. Store the private part in the target business metadata storage space.
[0189] After receiving the private part, the SAAS service cluster stores the private part in the target business metadata storage space. The target business metadata storage space includes a target business database or a target business metadata cache.
[0190] like Figure 8 As shown, another data processing method of an embodiment of the present application includes:
[0191] 801. Obtain a first routing code and a second routing code according to a first code.
[0192] The SAAS service cluster determines the metadata entity of the account set according to the first code, and when determining the storage location of the metadata entity in the database, obtains the first routing code and the second routing code corresponding to the metadata entity. The first routing code points to the shared database, and the second routing code points to the target business database. The first routing code is meta, and the second routing code is biz. The first routing number can also be 1, and the second routing code can also be 0.
[0193] When the metadata entity of the account set corresponding to the first code is stored in the shared database and the target business database, the routing code pointing to the shared database is determined as the first routing code, the routing code pointing to the target business database is determined as the second routing code, and the first routing code, the second routing code and the first code are bound.
[0194] 802. Acquire a common portion of the metadata entity from a shared database according to the first routing code.
[0195] The SAAS service cluster uses the first routing code to obtain the common part of the metadata entity from the shared database.
[0196] 803. Acquire the private part of the metadata entity from the target service database according to the second routing code.
[0197] The SAAS service cluster uses the second routing code to obtain the private part of the metadata entity from the target business database.
[0198] Step 802 and step 803 are independent of each other in terms of timing, and are not specifically limited.
[0199] like Fig. 9 As shown, the data processing device of the embodiment of the present application includes:
[0200] An acquisition unit 901 is used to acquire an access request for a business data file;
[0201] The acquisition unit 901 is further used to acquire the first code of the metadata entity of the business data file according to the access request;
[0202] The acquisition unit 901 is further configured to acquire the common part of the metadata entity from the shared metadata storage space according to the first code;
[0203] The acquisition unit 901 is further configured to acquire the private part of the metadata entity from a target business metadata storage space according to the first code, where the target business metadata storage space is one of the multiple business metadata storage spaces corresponding to the first code;
[0204] A reconstruction unit 902, configured to use the public part and the private part to perform metadata reconstruction to obtain a metadata entity of the business data file;
[0205] The running unit 903 is used to run the metadata entity to enable the first user to access the business data file.
[0206] The data processing device in this embodiment is used to execute Figures 2 to 8 The method in the illustrated embodiment.
[0207] like Fig.10 As shown, another data processing device according to an embodiment of the present application includes:
[0208] An acquisition unit 1001 is used to acquire an access request for a business data file;
[0209] The acquisition unit 1001 is further used to acquire a first code of a metadata entity of a service data file according to an access request;
[0210] The acquisition unit 1001 is further configured to acquire the common part of the metadata entity from the shared metadata storage space according to the first code;
[0211] The acquisition unit 1001 is further configured to acquire the private part of the metadata entity from a target business metadata storage space according to the first code, where the target business metadata storage space is one of the multiple business metadata storage spaces corresponding to the first code;
[0212] A reconstruction unit 1002 is used to use the public part and the private part to reconstruct the metadata and obtain the metadata entity of the business data file;
[0213] The running unit 1003 is used to run the metadata entity to enable the first user to access the business data file.
[0214] The shared metadata storage space includes a shared database, and the target business metadata storage space includes a target business database.
[0215] The shared metadata storage space includes a shared metadata cache, and the target business metadata storage space includes a target business metadata cache.
[0216] The acquisition unit 1001 is specifically used to: acquire the common part of the metadata entity from the shared database according to the first code;
[0217] The acquisition unit 1001 is specifically configured to acquire the private part of the metadata entity from the target service database according to the first code.
[0218] In an implementation manner of the second aspect of the embodiment of the present application, the shared metadata storage space includes a shared metadata cache, and the target service metadata storage space includes a target service metadata cache;
[0219] The acquisition unit 1001 is specifically used to: acquire the common part of the metadata entity from the shared metadata cache according to the first code; determine whether the common part of the metadata entity acquired from the shared metadata cache is sufficient for metadata reconstruction; if it is insufficient for metadata reconstruction, acquire the common part of the metadata entity from the shared database according to the first code to replace the common part of the metadata entity acquired historically, or to supplement the common part of the metadata entity acquired historically.
[0220] The acquisition unit 1001 is specifically used to: acquire the private part of the metadata entity from the target business metadata cache according to the first code; determine whether the private part of the metadata entity acquired from the target business metadata cache is sufficient for metadata reconstruction; if it is not sufficient for metadata reconstruction, acquire the private part of the metadata entity from the target business database according to the first code; the private part of the metadata entity acquired from the target business database is used to replace the private part of the metadata entity acquired historically, or is used to supplement the private part of the metadata entity acquired historically.
[0221] The storage space of the metadata entity of the business data file also includes an intermediate database;
[0222] The acquisition unit 1001 is specifically used to: acquire the common part of the metadata entity from the intermediate database according to the first code; determine whether the common part of the metadata entity acquired from the intermediate database is sufficient for metadata reconstruction; if it is insufficient for metadata reconstruction, acquire the common part of the metadata entity from the shared database according to the first code; the common part of the metadata entity acquired from the shared database is used to replace the common part of the metadata entity acquired historically, or to supplement the common part of the metadata entity acquired historically;
[0223] The acquisition unit 1001 is specifically used to: acquire the private part of the metadata entity from the intermediate database according to the first code; determine whether the private part of the metadata entity acquired from the intermediate database is sufficient for metadata reconstruction; if it is insufficient for metadata reconstruction, acquire the private part of the metadata entity from the target business database according to the first code; the private part of the metadata entity acquired from the target business database is used to replace the private part of the metadata entity acquired historically, or is used to supplement the private part of the metadata entity acquired historically.
[0224] The common part includes a basic sub-part and an additional sub-part.
[0225] The acquisition unit 1001 is specifically used to obtain the second code of the metadata entity according to the access request; determine whether the second code needs to be converted; if the conversion is required, convert the second code to obtain the first code; if the conversion is not required, determine the second code as the first code.
[0226] The data processing device also includes:
[0227] The receiving unit 1004 is used to receive the public part submitted by the second object; and receive the private part submitted by the first object;
[0228] The storage unit 1005 is configured to receive the private part submitted by the first object and store the private part in the target business metadata storage space.
[0229] The data processing device also includes:
[0230] The receiving unit 1004 is used to receive the basic sub-part submitted by the second object; receive the additional sub-part submitted by the third object; and receive the private part submitted by the first object;
[0231] The storage unit 1005 is used to store the basic sub-part and the additional sub-part in the shared metadata storage space; and store the private part in the target business metadata storage space.
[0232] The data processing device also includes:
[0233] The acquiring unit 1001 is further configured to acquire a first routing code and a second routing code according to the first code;
[0234] The acquisition unit 1001 is specifically configured to acquire the common part of the metadata entity from the shared database according to the first routing code;
[0235] The acquisition unit 1001 is specifically configured to acquire the private part of the metadata entity from the target service database according to the second routing code.
[0236] The first route is coded as meta, and the second route is coded as biz.
[0237] The SAAS service cluster in this embodiment is used to execute the following Figures 2 to 8 The method in the illustrated embodiment.
[0238] The embodiment of the present application divides the SAAS service cluster into a design layer, a runtime layer, and a microservice access layer from the perspective of layered design, wherein the design layer and the runtime layer belong to the storage space. The following example uses only a database in the storage space, i.e., the shared metadata storage space is a shared database, and the business metadata storage space is a business database. In practice, the storage space may also include a cache or a Key-Value database in the microservice memory.
[0239] First, let’s explain the concept:
[0240] Metadata publishing: The process of parsing metadata entities into the database of the account set is called metadata publishing. After this process, the metadata is stored in the database of the account set. At this time, the metadata entity is at the design time layer.
[0241] Metadata reconstruction: The process of parsing the public and private parts of the metadata entity in the database and converting it into a state executable by the microservice is called metadata reconstruction. After metadata reconstruction, the metadata entity is in the runtime layer.
[0242] The metadata of an account set includes multiple metadata entities. For example, the metadata of the first account set includes the first metadata entity of the first account set, the second metadata entity of the first account set, and the third metadata entity of the first account set. The metadata of the second account set includes the first metadata entity of the second account set, the second metadata entity of the second account set, and the third metadata entity of the second account set. The specific number is not limited. Generally speaking, a metadata entity or a group of metadata entities corresponds to a function or structure of an account set.
[0243] The following describes the SAAS service cluster from the perspective of layered design:
[0244] like Fig.11As shown, a SAAS service cluster in an embodiment of the present application includes:
[0245] The design-time layer includes the public part xml1102 of the first metadata entity, the private part xml1101 of the first metadata entity, and the private part xml1103 of the second metadata entity.
[0246] The public part xml1102 of the first metadata entity in the design layer and the private part xml1101 of the first metadata entity are reconstructed to obtain the first metadata entity 1104 in the runtime layer.
[0247] The microservice access layer accesses the first metadata entity 1104 using the first encoding 1106 of the first metadata entity.
[0248] The metadata of the public part xml1102 of the first metadata entity and the private part xml1103 of the second metadata entity in the design layer are reconstructed to obtain the second metadata entity 1105 in the runtime layer.
[0249] The microservice access layer accesses the second metadata entity 1105 using the first code 1107 of the second metadata entity.
[0250] In this embodiment, the relationship between metadata is extension, and the second metadata entity 1105 is an extended metadata entity of the first metadata entity 1104 .
[0251] Extension: The second metadata entity 1105 is extended from the first metadata entity 1104. The design layer stores the differential metadata of the second metadata entity 1105 relative to the first metadata entity 1104, that is, the private part of the second metadata entity. The private part of the metadata entity can also be called the extended part of the metadata entity.
[0252] The SAAS service cluster in this embodiment is used to execute the following Figures 2 to 8 The method in the illustrated embodiment.
[0253] like Fig.12 As shown, another SAAS service cluster in an embodiment of the present application includes:
[0254] The design-time layer includes the private part xml1201 of the first metadata entity, the basic subpart xml1202 of the first metadata entity, the additional subpart xml1203 of the second metadata entity, and the private part xml1204 of the second metadata entity. In addition to the xml format, the metadata entity can also be stored in other formats.
[0255] The metadata of the basic sub-part xml1202 of the first metadata entity in the design layer and the private part xml1201 of the first metadata entity are reconstructed to obtain the first metadata entity 1205 in the runtime layer.
[0256] The microservice access layer accesses the first metadata entity 1205 using the first code 1207 of the first metadata entity.
[0257] The metadata of the basic sub-part xml1202 of the first metadata entity in the design layer, the additional sub-part xml1203 of the second metadata entity and the private part xml1204 of the second metadata entity are reconstructed to obtain the second metadata entity 1206 in the runtime layer.
[0258] The microservice access layer accesses the second metadata entity 1206 using the first encoding 1208 of the second metadata entity.
[0259] In this embodiment, the relationship between metadata is inheritance, and the second metadata entity 1206 is the inherited metadata entity of the first metadata entity 1205 .
[0260] Inheritance: The second metadata entity 1206 inherits from the first metadata entity 1205. The design layer stores the difference metadata of the second metadata entity 1206 relative to the first metadata entity 1205, that is, the additional sub-part of the second metadata entity. The additional sub-part of the metadata entity can also be called the inherited sub-part of the metadata entity. The runtime layer stores the full amount of data of the second metadata entity 1206. In the microservice access layer, the second metadata entity 1206 is accessed through the first code 1208 of the second metadata entity.
[0261] The SAAS service cluster in this embodiment is used to execute the following Figures 2 to 8 The method in the illustrated embodiment.
[0262] like Fig.13 As shown, another SAAS service cluster in an embodiment of the present application includes:
[0263] The design-time layer includes a private part xml1301 of the first metadata entity, a base subpart xml1302 of the first metadata entity, an additional subpart xml1303 of the second metadata entity, and a private part xml1304 of the second metadata entity.
[0264] The metadata of the basic sub-part xml1302 of the first metadata entity in the design layer and the private part xml1301 of the first metadata entity are reconstructed to obtain the first metadata entity 1305 in the runtime layer.
[0265] The metadata of the basic sub-part xml1302 of the first metadata entity in the design layer, the additional sub-part xml1303 of the second metadata entity and the private part xml1304 of the second metadata entity are reconstructed to obtain the second metadata entity 1306 in the runtime layer.
[0266] The microservice access layer performs a code conversion judgment on the first code 1309 of the first metadata entity.
[0267] If the judgment result is no, that is, it is judged that no encoding conversion is performed, the microservice access layer uses the first encoding 1309 of the first metadata entity to access the first metadata entity 1305.
[0268] If the judgment result is yes, that is, it is judged to perform encoding conversion, the microservice access layer uses the metadata encoding converter 1307 to convert the first encoding 1309 of the first metadata entity into the first encoding of the second metadata, and the microservice access layer uses the first encoding 1308 of the second metadata entity to access the second metadata entity 1306. In this case, the first encoding 1309 of the first metadata entity is the second encoding of the second metadata entity 1306. The metadata encoding converter 1307 is also called a metadata encoding converter.
[0269] In this embodiment, the relationship between metadata is bifurcation, and the second metadata entity 1306 is a bifurcated metadata entity of the first metadata entity 1305 .
[0270] Fork: The second metadata entity 1306 is forked from the first metadata entity 1305. The design layer stores the metadata of the difference between the second metadata entity 1306 and the first metadata entity 1305, that is, the additional sub-part of the second metadata entity. The additional sub-part of the metadata entity can also be called the forked sub-part of the metadata entity. The full data of the second metadata entity 1306 is stored in the runtime layer; in the microservice access layer, the first code 1309 of the first metadata entity is encoded and converted into the first code 1308 of the second metadata entity according to the conditions, and the second metadata entity 1306 is accessed through the first code 1308 of the second metadata entity.
[0271] The SAAS service cluster in this embodiment is used to execute the following Figures 2 to 8 The method in the illustrated embodiment.
[0272] Under the existing technology, the metadata of each account set is isolated and cached in the microservice memory by account set, and the consumed microservice memory resources are linearly related to the number of account sets. When the number of account sets reaches a certain number, the metadata occupies most of the microservice memory, causing a serious decline in microservice performance and even downtime.
[0273] This embodiment realizes metadata sharing and isolated storage through metadata hierarchical design. For common metadata, all account sets share the common part of the same metadata entity, which not only reduces the resource consumption of the database and the problem of large memory resource consumption of microservices, but also greatly improves the delivery efficiency of metadata entities and solves the problem of continuous delivery of metadata for millions of account sets.
[0274] Through the hierarchical design of metadata, the original metadata entity developed for the first time is stored in the shared database. The original metadata entity is the basic sub-part of the metadata entity. The metadata entity corresponding to the customized printing template, conversion rules, etc. of the original metadata entity in the customer-defined scenario, that is, the private part of the metadata entity, is stored in the target business database; the metadata entity obtained by forking the original metadata entity or inheriting the original metadata entity in the secondary development scenario, that is, the additional sub-part of the metadata entity, is stored in the shared database. In the microservice access layer, the corresponding database is accessed through the dynamic routing of metadata. The dynamic routing includes the first routing code meta and the second routing code biz. Dynamic routing can also use other codes, such as 0 and 1.
[0275] like Fig.14 As shown, another SAAS service cluster in an embodiment of the present application includes:
[0276] Metadata delivery platform 1401 , metadata distributor 1403 , metadata reconstruction unit 1406 , metadata publishing module 1402 , shared database 1404 and target business database 1405 .
[0277] The metadata continuous delivery design is based on the metadata shared storage model. The delivery process includes the release process and the reconstruction process.
[0278] Release process:
[0279] The metadata delivery platform 1401 obtains the public portion submitted by the second user;
[0280] The metadata delivery platform 1401 obtains the private portion submitted by the first user;
[0281] The metadata delivery platform 1401 sends a publishing instruction, a public part, and a private part to the metadata publishing module 1402;
[0282] The metadata publishing module 1402 receives the publishing instruction, the public part and the private part sent by the metadata delivery platform 1401;
[0283] The metadata publishing module 1402 sends the public part and the private part to the metadata distributor 1403 according to the publishing instruction;
[0284] The metadata distributor 1403 receives the public part and the private part sent by the metadata publishing module 1402;
[0285] The metadata distributor 1403 performs filtering settings according to the type of metadata, distributes the public part to the shared database 1404, and distributes the private part to the business database;
[0286] Reconstruction process:
[0287] After the publishing process is completed, the metadata delivery platform 1401 sends a reconstruction instruction to the metadata reconstruction unit 1406;
[0288] The metadata reconstruction unit 1406 receives the reconstruction instruction sent by the metadata delivery platform 1401;
[0289] The metadata reconstruction unit 1406 obtains the common part from the shared database 1404
[0290] The metadata reconstruction unit 1406 obtains the private part from the business database;
[0291] The metadata reconstruction unit 1406 reconstructs metadata based on the public part and the private part to obtain the metadata entity
[0292] Metadata delivery platform 1401 correspondence Fig.10 The acquisition unit and the receiving unit in the embodiment shown in the figure correspond to the metadata publishing module 1402, the metadata distributor 1403, the shared database 1404 and the target business database 1405. Fig.10 The metadata reconstruction unit 1406 corresponds to Fig.10 The reconstruction unit in the illustrated embodiment.
[0293] The SAAS service cluster in this embodiment is used to execute the following Figures 2 to 8 The method in the illustrated embodiment.
[0294] Under the existing technology, after the developer modifies the metadata entity, when submitting the metadata entity, it is necessary to publish and rebuild the metadata of each metadata containing the modified metadata entity to the metadata repository of the corresponding account set, resulting in the delivery time being in a threaded relationship with the number of account sets. The more account sets there are, the longer the delivery time will be. This embodiment solves the problem of low delivery efficiency in the existing technology and greatly improves the efficiency of continuous delivery of metadata.
[0295] like Fig.15 As shown, another SAAS service cluster 1500 of the embodiment of the present application includes:
[0296] The storage space is a database 1502. The shared metadata storage space includes a shared database, and the business metadata storage space includes a business database. The SAAS service cluster 1500 includes a microservice 1501 and a database 1502, wherein the database 1502 includes a shared database and N business databases, and the microservice 1501 includes N account sets, where N≥2.
[0297] N account sets use a shared database, and each account set corresponds to a business database. The N account sets are the first account set, the second account set, the third account set, and the N account sets correspond to N business databases, which are the first business database, the second business database, the third business database, and the N business databases.
[0298] Microservice 1501 accesses the corresponding metadata repository through dynamic routing of metadata. The metadata repository is database 1502, including a shared database and a business database. Dynamic routing includes a first routing code meta and a second routing code biz. Dynamic routing can also use other codes, such as 0 and 1. N account sets use the first routing code meta to access the same shared database. Different account sets use the second routing code biz to access different business databases. The first account set uses the first routing code biz to access the first business database, the second account set uses the first routing code biz to access the second business database, the third account set uses the first routing code biz to access the third business database... The Nth account set uses the first routing code biz to access the Nth business database.
[0299] The SAAS service cluster in this embodiment is used to execute the following Figures 2 to 8 The method in the illustrated embodiment.
[0300] like Fig.16 As shown, another SAAS service cluster 1600 of an embodiment of the present application includes:
[0301] SAAS service cluster 1600 includes microservice access layer 16011, microservice memory 16012, redis 1603 and database 1602. Microservice access layer 16011 and microservice memory 16012 constitute microservice 1601. Microservice memory 16012, redis 1603 and database 1602 constitute storage space.
[0302] The microservice access layer 16011 includes N account sets, where N ≥ 2.
[0303] The microservice memory 16012 includes a shared metadata cache and N business metadata caches. The database 1602 includes a shared database and N business databases. The shared metadata storage space includes a shared database and a shared metadata cache, and the business metadata storage space includes a business database and a business metadata cache.
[0304] N account sets use a shared metadata cache, and each account set corresponds to a business metadata cache. The N account sets are the first account set, the second account set, the third account set...the Nth account set, and the N account sets correspond to N business metadata caches one by one. The N business metadata caches are the first business metadata cache, the second business metadata cache, the third business metadata cache...the Nth business metadata cache. Both the shared metadata cache and the business metadata cache belong to cache. The cache refers to the microservice memory 16012. The microservice memory 16012 of a microservice 1601 refers to the memory divided from the overall memory by the SAAS service cluster 1600 and used to run the microservice 1601. The shared public part is stored in the shared metadata cache in the microservice memory 16012, and the private part of the account set is stored in isolation by account set. Each account set has a private business metadata cache.
[0305] N account sets use one redis 1603.
[0306] N account sets use a shared database, and each account set corresponds to a business database. The N account sets are the first account set, the second account set, the third account set, and the N account sets correspond to N business databases, which are the first business database, the second business database, the third business database, and the N business databases.
[0307] When metadata is rebuilt, the microservice access layer 16011 first obtains the public part and the private part of the metadata entity from the microservice memory 16012. If it is determined that the public part and the private part obtained by the microservice memory 16012 are insufficient, the microservice access layer 16011 obtains the public part and the private part from redis 1603. If it is determined that the public part and the private part obtained by redis 1603 are insufficient, the microservice access layer 16011 obtains the public part and the private part from the database 1602.
[0308] The SAAS service cluster in this embodiment is used to execute the following Figures 2 to 8 The method in the illustrated embodiment.
[0309] like Fig.17 As shown, an embodiment of the present application provides a computer device 1700, including:
[0310] CPU 1701, memory 1705, input / output interface 1704, wired or wireless network interface 1703, power supply 1702;
[0311] The memory 1705 is a transient storage memory 1705 or a persistent storage memory 1705;
[0312] The CPU 1701 is configured to communicate with the memory 1705 and execute instructions in the memory 1705 on the computer device to perform the following operations: Figures 2 to 8 The method in the illustrated embodiment.
[0313] The present application provides a computer-readable storage medium including instructions. When the instructions are executed on a computer, the computer executes the following Figures 2 to 8 The method in the illustrated embodiment.
[0314] The present invention provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the following Figures 2 to 8 The method in the illustrated embodiment.
[0315] Those skilled in the art can 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.
[0316] In the several embodiments provided in the present 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 only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, 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 an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0317] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0318] 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. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0319] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it 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 all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), disk or optical disk, etc. Various media that can store program codes.
Claims
1. A data processing method, characterized in that, applied to a service cluster of a software as a service platform, the service cluster including a design-time layer, a runtime layer, and a microservice access layer, the method comprising: in the runtime layer, obtaining an access request for a business data file; obtaining a first encoding of a metadata entity of the business data file according to the access request; obtaining a common part of the metadata entity from a shared metadata storage space according to the first encoding; the common part is data common to multiple metadata entities; obtaining a private part of the metadata entity from a target business metadata storage space according to the first encoding, the target business metadata storage space being one corresponding to the first encoding among multiple business metadata storage spaces; the private part is data unique to each metadata entity; using the common part and the private part for metadata reconstruction to obtain the metadata entity of the business data file; running the metadata entity to access the business data file in the microservice access layer; the access request is initiated by a first object; the common part includes a basic sub-part and an additional sub-part; before obtaining the access request for the business data file, the method further comprises: in the design-time layer, receiving the basic sub-part submitted by a second object; the basic sub-part is used to represent the original factory metadata entity developed for the first time; receiving the additional sub-part submitted by a third object; the additional sub-part includes a fork sub-part; the fork sub-part is used to represent the difference part between the metadata entity developed for the second time and the original factory metadata entity developed for the first time, and the metadata entity developed for the second time is a metadata entity obtained by adding or modifying the original factory metadata entity developed for the first time; receiving the private part submitted by the first object; saving the basic sub-part and the additional sub-part in the shared metadata storage space; saving the private part in the target business metadata storage space; the obtaining the common part of the metadata entity from the shared metadata storage space according to the first encoding includes: in the runtime layer, obtaining the basic sub-part and the fork sub-part of the metadata entity from the shared metadata storage space according to the first encoding.
2. The method according to claim 1, characterized in that, the shared metadata storage space includes a shared database, and the target business metadata storage space includes a target business database; the obtaining the common part of the metadata entity from the shared metadata storage space according to the first encoding includes: obtaining the common part of the metadata entity from the shared database according to the first encoding; the obtaining the private part of the metadata entity from the target business metadata storage space according to the first encoding includes: obtaining the private part of the metadata entity from the target business database according to the first encoding.
3. The method according to claim 1, characterized in that, The shared metadata storage space includes a shared database and a shared metadata cache, and the target service metadata storage space includes a target service database and a target service metadata cache; The obtaining the common part of the metadata entity from the shared metadata storage space according to the first encoding includes: Obtaining the common part of the metadata entity from the shared metadata cache according to the first encoding; Determining whether the common part of the metadata entity obtained from the shared metadata cache is sufficient for metadata reconstruction; If it is not sufficient for metadata reconstruction, obtaining the common part of the metadata entity from the shared database according to the first encoding; the common part of the metadata entity obtained from the shared database is used to replace the common part of the metadata entity obtained historically, or to supplement the common part of the metadata entity obtained historically; The obtaining the private part of the metadata entity from the target service metadata storage space according to the first encoding includes: Obtaining the private part of the metadata entity from the target service metadata cache according to the first encoding; Determining whether the private part of the metadata entity obtained from the target service metadata cache is sufficient for metadata reconstruction; If it is not sufficient for metadata reconstruction, obtaining the private part of the metadata entity from the target service database according to the first encoding; the private part of the metadata entity obtained from the target service database is used to replace the private part of the metadata entity obtained historically, or to supplement the private part of the metadata entity obtained historically.
4. The method according to claim 3, wherein, The storage space of the metadata entity of the service data file further includes an intermediate database; The obtaining the common part of the metadata entity from the shared database according to the first encoding includes: Obtaining the common part of the metadata entity from the intermediate database according to the first encoding; Determining whether the common part of the metadata entity obtained from the intermediate database is sufficient for metadata reconstruction; If it is not sufficient for metadata reconstruction, obtaining the common part of the metadata entity from the shared database according to the first encoding; the common part of the metadata entity obtained from the shared database is used to replace the common part of the metadata entity obtained historically, or to supplement the common part of the metadata entity obtained historically; The obtaining the private part of the metadata entity from the target service database according to the first encoding includes: Obtaining the private part of the metadata entity from the intermediate database according to the first encoding; Determining whether the private part of the metadata entity obtained from the intermediate database is sufficient for metadata reconstruction; If it is not sufficient to perform metadata reconstruction, obtain the private part of the metadata entity from the target business database according to the first encoding; the private part of the metadata entity obtained from the target business database is used to replace the private part of the metadata entity obtained historically, or to supplement the private part of the metadata entity obtained historically.
5. The method according to any one of claims 1 to 4, wherein, the obtaining the first encoding of the metadata entity of the service data file according to the access request includes: obtaining a second encoding of the metadata entity according to the access request; judging whether the second encoding needs to be encoded and transformed; if encoding and transformation is required, performing encoding and transformation on the second encoding to obtain the first encoding; if encoding and transformation is not required, determining the second encoding as the first encoding.
6. The method according to any one of claims 1 to 4, wherein, the access request is initiated by a first object; before obtaining the access request for the service data file, the method further includes: receiving the public part submitted by a second object; receiving the private part submitted by the first object; storing the public part in a shared metadata storage space; storing the private part in a target business metadata storage space.
7. A data processing device, wherein, the data processing device includes a design-time layer, a runtime layer, and a microservice access layer, and the data processing device further includes: an obtaining unit, configured to obtain, in the runtime layer, an access request for a service data file; the access request is initiated by a first object; the obtaining unit is further configured to obtain a first encoding of the metadata entity of the service data file according to the access request; the obtaining unit is further configured to obtain the public part of the metadata entity from a shared metadata storage space according to the first encoding; the public part is data common to multiple metadata entities; the public part includes a basic sub-part and an additional sub-part; the obtaining unit is further configured to obtain the private part of the metadata entity from a target business metadata storage space according to the first encoding, and the target business metadata storage space is one corresponding to the first encoding among multiple business metadata storage spaces; the private part is data unique to each metadata entity; a reconstruction unit, configured to perform metadata reconstruction using the public part and the private part to obtain the metadata entity of the service data file; a running unit, configured to run the metadata entity to access the service data file in the microservice access layer; the data processing device further includes: a receiving unit, configured to receive, in the design-time layer, the basic sub-part submitted by a second object; the basic sub-part is used to represent the original factory metadata entity developed for the first time; The receiving unit is further configured to receive the additional sub - part submitted by a third object; the additional sub - part includes a forking sub - part; the forking sub - part is used to characterize the difference part between the metadata entity of the secondary development and the original factory metadata entity of the first development, and the metadata entity of the secondary development is the metadata entity obtained by adding to or modifying the original factory metadata entity of the first development; The receiving unit is further configured to receive the private part submitted by the first object; The saving unit is configured to save the basic sub - part and the additional sub - part in a shared metadata storage space; The saving unit is further configured to save the private part in a target service metadata storage space; The obtaining unit is specifically configured to, at the runtime layer, obtain the basic sub - part and the forking sub - part of the metadata entity from the shared metadata storage space according to the first encoding.
8. A computer device, characterized in that, it includes: a central processing unit, a memory, an input / output interface, a wired or wireless network interface, and a power supply; The memory is a transient storage memory or a persistent storage memory; The central processing unit is configured to communicate with the memory and execute the instruction operations in the memory on the computer device to execute the method according to any one of claims 1 to 6.
9. A computer - readable storage medium, including instructions, characterized in that, when the instructions run on a computer, the computer is caused to execute the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Multi-edition control method and apparatus for data file
CN101382885A
Data file processing method and device, electronic equipment and storage medium
CN113704204A