Software platform metadata exporting method and device, equipment, storage medium and program product

By performing annotation scanning and paging queries on the metadata model classes of the software platform, the target collection name is generated and written into the directory file, which solves the problem of traditional export methods being unable to export on demand and realizes flexible and efficient metadata export.

CN120744196APending Publication Date: 2025-10-03SHENZHEN COMTOP INFORMATION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510791461.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-13
Publication Date
2025-10-03

AI Technical Summary

Technical Problem

Traditional software platform metadata export methods can only be performed based on collections, and cannot export partial contents of a collection on demand.

Method used

By performing annotation scanning on the metadata model class of the software platform, the metadata model type and basic collection name are obtained. Combined with the project number and version code required by the user, the target collection name is generated. The data is converted into a string and written into the directory file through paging query to achieve on-demand export.

Benefits of technology

It enables on-demand metadata export, avoids the risk of memory overflow caused by querying a large amount of data at one time, and improves the flexibility and efficiency of the export process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120744196A_ABST
    Figure CN120744196A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computer processing, provides a software platform metadata exporting method and device, equipment, a storage medium and a program product, and can realize that a user exports contents in a metadata set as required. Carrying out annotation scanning on a metadata model class of the software platform to obtain a metadata model type and a basic set name; obtaining a target set name according to the basic set name and a project number and a version code which need to be exported by a user; performing paging query on the metadata set of the target set name according to required export information set by a user on an export page configuration item, converting data obtained by paging query into character strings, and writing the character strings into corresponding directory files; and obtaining an export result according to the directory file.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer processing technology, and in particular to a method, apparatus, computer equipment, storage medium, and computer program product for exporting software platform metadata. Background Art

[0002] The software design automation collaboration platform (referred to as the software platform) is used for software design. Software design includes multiple designs, such as conceptual model design, application service design, development architecture design, and application detailed design. Metadata for these designs is stored in MongoDB and distributed. MongoDB is an open-source document database. MongoDB metadata can be exported for data migration and backup between projects.

[0003] However, the traditional export method can only export according to the collection, and users cannot export part of the collection content on demand. Summary of the Invention

[0004] Based on this, it is necessary to provide a method, apparatus, computer device, storage medium and computer program product for exporting software platform metadata to address the above technical issues.

[0005] This application provides a method for exporting software platform metadata, the method comprising:

[0006] Scan the metadata model class of the software platform for annotations to obtain the metadata model type and basic collection name;

[0007] Get the target collection name based on the metadata model type, base collection name, and the project number and version code that the user needs to export;

[0008] According to the required export information set by the user in the configuration item of the export page, a page query is performed on the metadata collection of the target collection name, the data obtained by the page query is converted into a string, and written into the corresponding directory file;

[0009] According to the catalog file, an export result is obtained.

[0010] In one embodiment, the metadata model class of the software platform is scanned for annotations to obtain the metadata model type and the base set name, including:

[0011] Scan the custom annotation configuration on the metadata model class of the software platform to obtain the metadata model type and basic collection name.

[0012] In one embodiment, the target collection name is obtained based on the metadata model type, the base collection name, and the project number and version code that the user needs to export, including:

[0013] The metadata model type, basic collection name, project number and version code that the user needs to export are concatenated to obtain the target collection name.

[0014] In one embodiment, the metadata model type, the base collection name, the project number and version code to be exported by the user are concatenated to obtain the target collection name, including:

[0015] Concatenate the metadata model type with the base collection name;

[0016] After splicing the results, add the project number and version code that the user needs to export to obtain the target collection name.

[0017] In one embodiment, according to the content that the user needs to export, a page query is performed on the metadata set of the target collection name, and the data obtained by the page query is converted into a string and written into the corresponding directory file, including:

[0018] Perform a paging query on the metadata set of the target collection name, and convert the data obtained by the paging query into a string;

[0019] During the conversion to a string, the content is processed according to the user's desired export, some fields are ignored, and the conversion results are written to the corresponding directory file.

[0020] In one embodiment, the string comprises a JSON string.

[0021] The present application provides a device for exporting software platform metadata, the device comprising:

[0022] Annotation scanning module, used to perform annotation scanning on the metadata model class of the software platform to obtain the metadata model type and basic collection name;

[0023] The name acquisition module is used to obtain the target collection name based on the metadata model type, the base collection name, and the project number and version code that the user needs to export;

[0024] A paging query processing module is used to perform a paging query on the metadata set of the target collection name according to the content to be exported by the user, convert the data obtained by the paging query into a string, and write it into the corresponding directory file;

[0025] The result acquisition module is used to obtain the export result according to the directory file.

[0026] The present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the above method.

[0027] The present application provides a computer-readable storage medium having a computer program stored thereon, and the computer program is used by a processor to execute the above method.

[0028] The present application provides a computer program product having a computer program stored thereon, wherein the computer program is used by a processor to execute the above method.

[0029] The above-mentioned software platform metadata export method, apparatus, computer equipment, storage medium and computer program product perform annotation scanning on the metadata model class of the software platform to obtain the metadata model type and the basic set name; obtain the target set name according to the metadata model type, basic set name and the project number and version code required to be exported by the user; perform paging query on the metadata set of the target set name according to the required export information set by the user in the export page configuration item, convert the data obtained by the paging query into a string, and write it into the corresponding directory file; obtain the export result according to the directory file. In the solution provided by the present application, partial export is achieved through the required export information set by the user in the export page configuration item, and the risk of memory overflow caused by querying a large amount of data at one time can be avoided by querying the metadata set by paging. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0031] Figure 1 1 is a flowchart of a method for exporting software platform metadata in one embodiment;

[0032] Figure 2 A schematic diagram of exporting a page in one embodiment;

[0033] Figure 3 A schematic diagram of exporting a record page in one embodiment;

[0034] FIG4 (a) is a schematic diagram of an interface for importing files in one embodiment;

[0035] FIG4( b ) is a schematic diagram of another interface for importing files in one embodiment;

[0036] Figure 5 A schematic diagram of an interface for import confirmation in one embodiment;

[0037] Figure 6 is a structural block diagram of a device for exporting software platform metadata in one embodiment;

[0038] Figure 7 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0039] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0040] The software platform metadata export method provided in this application can be executed by a computer device, including: Figure 1 Steps shown.

[0041] Step S101 : Scan the metadata model class of the software platform for annotations to obtain the metadata model type and the basic set name.

[0042] The metadata model class may be a metadata model java class.

[0043] This application uses metadata model configuration to match the data structure of the metadata model with the MongoDB collection. First, define the data structure of the metadata model java class, such as defining the ClazzModel class. The ClazzModel class contains some properties that describe the class model, and then annotate the ClazzModel class with custom annotations, such as @ModelClassTypeConfig; the custom annotation contains two attributes, namely: modelType and collection, where modelType refers to the value of the metadata model type and is globally unique, and collection refers to the collection name corresponding to the metadata model, which belongs to the basic collection name. Thus, the definition of the metadata model configuration is completed, which can be expressed in code as follows:

[0044] @ModelclassTypeconfig(modelType="clazz",collection="sdd_clazz")

[0045] public class clazzModel { / / Some properties describing the class model...}

[0046] The above is an introduction to metadata model configuration. After configuration, you can scan the metadata model configuration and embed it in the Spring (an open-source application development framework) container. This is done by annotating the Spring Boot project's startup class with the @ComponentScan annotation and configuring the basePackages and includeFilters properties. In basePackages, specify the package path to scan, and in includeFilters, specify the filter. Using custom filters, you can filter out the metadata model configuration when the Spring Boot project starts. This metadata model configuration can then be saved in a map file for subsequent metadata export and import.

[0047] Since the metadata model Java class carries custom annotations, which include metadata model types and base collection names, the metadata model types and base collection names can be obtained by performing annotation scanning on the metadata model Java class of the software platform.

[0048] Step S102: Obtain the target collection name according to the metadata model type, the basic collection name, and the project number and version code that the user needs to export.

[0049] After obtaining the metadata model type and base collection name, you can combine the project number and version code you want to export to obtain the target collection name. On the export page, you can select the project number and version code you want to export, and the computer will use the selected project number and version code as the project number and version code you want to export.

[0050] Step S103: perform a paged query on the metadata collection of the target collection name according to the required export information set by the user in the export page configuration item, convert the data obtained by the paged query into a string, and write it into the corresponding directory file.

[0051] MongoDB stores several metadata collections, each with a corresponding name. Using the target collection name as the index, we identify the metadata collection whose name matches the target collection name. We can then use MongoTemplate (an open source component provided by Spring Boot) to perform a paging query on this metadata collection, convert the query data into a string, and write it to the corresponding directory file.

[0052] The character string includes a JSON string, and the following description takes the JSON string as an example.

[0053] Use MongoTemplate (an open source component provided by SpringBoot) to perform paginated queries on the metadata collection. This paginated query avoids the risk of memory overflows caused by querying large amounts of data at once. The file path to be exported is generated based on specific rules (for example, by concatenating the metadata model type in the file path). The data obtained from the paginated query is then divided according to the metadata model to which it belongs, forming the data for each metadata model. This data for each metadata model is converted into a JSON string and written to a directory file. The file path for this directory file can be formed by concatenating the metadata model types. During the conversion of the data for each metadata model into a JSON string, processing can be performed, and some fields can be ignored.

[0054] Step S104: Obtain export results based on the directory file.

[0055] You can compress the catalog file and download it from the metadata export record page, allowing users to obtain the exported results. You can customize the extension of the compressed package, such as .sda or .sdax, to distinguish it from ordinary compressed packages. sda stands for "Structured Data Archive," and sdax is an extended version of sda.

[0056] In the above-mentioned method for exporting metadata of the software platform, the metadata model class of the software platform is scanned for annotations to obtain the metadata model type and the basic set name; the target set name is obtained based on the metadata model type, the basic set name, and the project number and version code that the user needs to export; according to the required export information set by the user in the export page configuration item, the metadata set of the target set name is queried in a paged manner, the data obtained by the paged query is converted into a string, and written into the corresponding directory file; the export result is obtained according to the directory file. In the solution provided by the present application, partial export is achieved through the required export information set by the user in the export page configuration item, and the risk of memory overflow caused by querying a large amount of data at one time can be avoided by querying the metadata set in a paged manner.

[0057] In one embodiment, the metadata model class of the software platform is scanned for annotations to obtain the metadata model type and the basic set name, including: scanning the custom annotation configuration on the metadata model class of the software platform to obtain the metadata model type and the basic set name.

[0058] Through metadata model configuration, the data structure of the metadata model is mapped to the MongoDB collection. First, define the data structure of the metadata model Java class, such as the ClazzModel class. The ClazzModel class contains some properties that describe the class model. Then, add a custom annotation to the ClazzModel class, such as @ModelClassTypeConfig. The custom annotation contains two attributes: modelType and collection. ModelType refers to the value of the metadata model type and is globally unique. Collection refers to the collection name corresponding to the metadata model. This collection name belongs to the base collection name. Thus, the definition of the metadata model configuration is completed, which can be expressed in code as follows:

[0059] @ModelclassTypeconfig(modelType="clazz",collection="sdd_clazz")

[0060] public class clazzModel { / / Some properties describing the class model...}

[0061] The above is an introduction to metadata model configuration. After configuration, you can scan the metadata model configuration and embed it in the Spring (an open-source application development framework) container. This is done by annotating the Spring Boot project's startup class with the @ComponentScan annotation and configuring the basePackages and includeFilters properties. In basePackages, specify the package path to scan, and in includeFilters, specify the filter. Using custom filters, you can filter out the metadata model configuration when the Spring Boot project starts. This metadata model configuration is then saved in a map and can be used later to export and import metadata.

[0062] Since the metadata model Java class carries custom annotations, which include metadata model types and base collection names, the metadata model types and base collection names can be obtained by performing annotation scanning on the metadata model Java class of the software platform.

[0063] In this embodiment, by pre-annotating the metadata model class, the metadata model type and the basic collection name can be obtained by subsequently scanning the custom annotation, which facilitates subsequent processing.

[0064] In one embodiment, the target collection name is obtained according to the metadata model type, the basic collection name, and the project number and version code that the user needs to export, including: concatenating the metadata model type, the basic collection name, the project number and version code that the user needs to export to obtain the target collection name.

[0065] After obtaining the metadata model type, basic set name, and the project number and version code that the user needs to export, you can determine the splicing order according to the formation rules of the target set name, and splice the metadata model type, basic set name, and the project number and version code that the user needs to export according to the splicing order; for example, if the formation rules of the target set name are: metadata model type + project number + version code + basic set name, then from front to back they are: metadata model type, project number, version code, basic set name.

[0066] In this embodiment, the target set name is obtained by concatenating the metadata model type, the basic set name, the project number and version code that the user needs to export, which can effectively distinguish sets of metadata models with different project numbers and different versions.

[0067] In one embodiment, the metadata model type, the basic set name, the project number and version code required to be exported by the user are spliced ​​together to obtain the target set name, including: splicing the metadata model type and the basic set name; and splicing the project number and version code required to be exported by the user after the splicing result to obtain the target set name.

[0068] This embodiment first concatenates the metadata model type with the basic collection name to obtain a concatenation result, and then adds the project number and version code that the user needs to export after the concatenation result, thereby completing the concatenation of the project number and project code to obtain the target collection name.

[0069] In one embodiment, according to the required export information set by the user in the export page configuration item, a paging query is performed on the metadata set of the target collection name, the data obtained by the paging query is converted into a string, and written into a corresponding directory file, including: a paging query is performed on the metadata set of the target collection name, and the data obtained by the paging query is converted into a string; in the process of converting to a string, the required export information set by the user in the export page configuration item is processed, some fields are ignored, and the conversion result is written into the corresponding directory file.

[0070] This section takes JSON string as an example.

[0071] Use MongoTemplate (an open-source component provided by SpringBoot) to perform a paginated query on the metadata collection for the target collection name. This paginated query avoids the risk of memory overflows caused by querying large amounts of data at once. Generate the file path to be exported based on specific rules (for example, by concatenating the metadata model type in the file path). Then, partition the data obtained from the paginated query by the metadata model it belongs to, creating data for each metadata model. This data is then converted into a JSON string and written to a directory file. The directory file path can be formed by concatenating the metadata model types.

[0072] Among them, in the process of converting the data of a single metadata model into a JSON string, processing can be performed, and some fields can be ignored to obtain the corresponding conversion result, and the conversion result is written into the corresponding directory file.

[0073] In the process of converting to a character string, this embodiment processes the required export information set by the user in the configuration items on the export page, ignoring some fields so that the conversion result does not include information that the user does not need, thereby realizing on-demand export.

[0074] To better understand the above method, an application embodiment is described in detail below. This embodiment includes a metadata model configuration phase, a metadata export phase, and a metadata import phase. This embodiment obtains the metadata model type and the corresponding base collection name by scanning the custom annotation @ModelClassTypeConfig configuration on the metadata model Java class. When exporting metadata, a target collection name is first constructed based on the metadata model type, base collection name, and the user's desired project and version. A paging query is used to query the metadata collection corresponding to the target collection name. The data obtained from the paging query is converted into a JSON string and written to the corresponding directory file according to the generation rules. During the conversion of the paging query data into a JSON string, some fields are filtered out and the JSON strings for these fields are not generated. After the directory file is written, the number of directory files and the corresponding target collection names are counted. After all are exported, the directory files are compressed into a compressed package. When importing metadata, the compressed package is uploaded and then decompressed. The decompressed directory files are then scanned and loaded into MongoDB in batches. During the loading process, data is populated into the metadata model based on the file path.

[0075] First, the metadata model configuration phase:

[0076] Through metadata model configuration, the data structure of the metadata model is mapped to the MongoDB collection. First, define the data structure of the metadata model Java class, such as the ClazzModel class. The ClazzModel class contains some properties that describe the class model. Then, add a custom annotation to the ClazzModel class, such as @ModelClassTypeConfig. The custom annotation contains two attributes: modelType and collection. ModelType refers to the value of the metadata model type and is globally unique. Collection refers to the collection name corresponding to the metadata model. This collection name belongs to the base collection name. Thus, the definition of the metadata model configuration is completed, which can be expressed in code as follows:

[0077] @ModelclassTypeconfig(modelType="clazz",collection="sdd_clazz")

[0078] public class clazzModel { / / Some properties describing the class model...}

[0079] The above is an introduction to metadata model configuration. After configuration, you can scan the metadata model configuration and embed it in the Spring (an open-source application development framework) container. This is done by annotating the Spring Boot project's startup class with the @ComponentScan annotation and configuring the basePackages and includeFilters properties. In basePackages, specify the package path to scan, and in includeFilters, specify the filter. Using custom filters, you can filter out the metadata model configuration when the Spring Boot project starts. This metadata model configuration can then be saved in a map file for subsequent metadata export and import.

[0080] The second part is to export metadata:

[0081] When exporting metadata, users can select the project number and version code to be exported on the export page. They can also configure some custom configuration items on the export page. The example of the export page is as follows: Figure 2 shown.

[0082] Because metadata model export may take a long time, you can export it asynchronously and then check the export progress by viewing the export record page. An example of the export record page is as follows: Figure 3 shown.

[0083] When exporting in the background, it traverses the project number and version code selected by the user on the export page, and then Figure 2 The custom configuration items on the right side of the export page are displayed. Filter the metadata model configurations you want to export and then traverse these metadata model configurations. If the project data volume is large, you can separate the tables by project number and version code. Specifically, append the project code and version number to the base collection name, and then construct the target collection name based on the project number and version code.

[0084] Use the MongoTemplate provided by Spring Boot to perform a paginated query for data in the metadata collection corresponding to the target collection name. This paginated query avoids the risk of memory overflow caused by querying large amounts of data at once. The file path to be exported is generated based on certain rules (for example, by concatenating the metadata model type in the file path). The data obtained from the paginated query is then partitioned by the metadata model to which it belongs, generating data for each metadata model. The data for each metadata model is then converted into a JSON string and written to a directory file. The file path for this directory file can be formed by concatenating the metadata model types. During the conversion of the individual metadata model data into the JSON string, processing can be performed, such as ignoring certain fields, to obtain the corresponding conversion result, which is then written to the corresponding directory file. The directory file is compressed and available for download from the metadata export record page, allowing users to obtain the exported results. The compressed file extension can be customized, such as .sda or .sdax, to distinguish it from standard compressed files.

[0085] This embodiment implements partial data export through the configuration items of the export page, overcoming the traditional export tool's method of only being able to export according to collections. It can partially export according to rules and can modify data during the import process. It implements file storage and split export through paging query and writing files according to individual metadata model data, avoiding writing the exported data into one file and avoiding the situation where the file is very large due to the large amount of data in the metadata model collection.

[0086] The third part is importing metadata:

[0087] Importing metadata includes four steps: importing files, import confirmation, importing information, and importing results.

[0088] When importing files, users can upload the compressed package of the metadata model and check the custom configuration. The custom configuration can control how to handle duplication, exceptions, etc. during import. The interface for importing files is shown in Figure 4 (a) and Figure 4 (b).

[0089] When confirming the import, the metadata model information in the compressed package is parsed and displayed on the page, so that users can check the metadata model data to be imported. The import confirmation interface is as follows: Figure 5 shown.

[0090] When importing information, the import log can be displayed to facilitate the importing user to check the progress.

[0091] When the import is confirmed, the import results can be displayed to facilitate the importing user to view the result data.

[0092] When importing in the background, the directory files in the compressed package are traversed, and then the metadata model type is parsed according to the file path (the metadata model type can be spliced ​​in the path according to certain rules when exporting metadata). Then, the class structure of the corresponding metadata model is obtained from the metadata model configuration according to the metadata model type, and the JSON string of the metadata model file content is read and converted into a class model. Then, attribute processing can be performed (adding or modifying metadata model attributes). Finally, the metadata model is saved to the MongoDB collection through MongoTemplate.

[0093] In this embodiment, by parsing the compressed package of the metadata model, you can check to import part of the data to achieve partial import. During the import process, you can also process the data to achieve data modification during the import process.

[0094] This embodiment provides a solution that allows users to select partial export options and modify model properties during export to achieve processing, addressing the inflexibility of traditional export tools, which can only export the entire collection. Furthermore, by exporting each record of the collection data as a single file, this embodiment avoids the situation where excessive collection data creates large files. By parsing the compressed metadata model package, users can select partial data for import and modify model properties during save, addressing the inflexibility of traditional import tools, which can only import the entire collection.

[0095] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.

[0096] Based on the same inventive concept, embodiments of the present application also provide a software platform metadata export device for implementing the software platform metadata export method described above. The solution provided by this device is similar to the solution described in the above method. Therefore, the specific limitations of the one or more software platform metadata export device embodiments provided below can be found in the limitations of the software platform metadata export method described above and will not be repeated here.

[0097] In one embodiment, Figure 6 As shown, a device for exporting software platform metadata is provided, including:

[0098] An annotation scanning module 601 is used to perform annotation scanning on the metadata model class of the software platform to obtain the metadata model type and basic set name;

[0099] The name acquisition module 602 is used to obtain the target collection name according to the metadata model type, the base collection name, and the project number and version code that the user needs to export;

[0100] The paging query processing module 603 is used to perform a paging query on the metadata set of the target collection name according to the required export information set by the user in the export page configuration item, convert the data obtained by the paging query into a string, and write it into the corresponding directory file;

[0101] The result acquisition module 604 is used to obtain the export result according to the directory file.

[0102] In one embodiment, the annotation scanning module 601 is further used to scan the custom annotation configuration on the metadata model class of the software platform to obtain the metadata model type and the basic collection name.

[0103] In one embodiment, the name acquisition module 602 is further used to: concatenate the metadata model type, the basic set name, the project number and version code that the user needs to export to obtain the target set name.

[0104] In one embodiment, the name acquisition module 602 is further used to: concatenate the metadata model type with the basic collection name; and concatenate the project number and version code that the user needs to export after the concatenation result to obtain the target collection name.

[0105] In one embodiment, the paging query processing module 603 is also used to: perform paging query on the metadata set of the target collection name, and convert the data obtained from the paging query into a string; in the process of converting to a string, the required export information set by the user in the export page configuration item is processed, some fields are ignored, and the conversion results are written into the corresponding directory file.

[0106] In one embodiment, the string comprises a JSON string.

[0107] Each module in the aforementioned software platform metadata export device may be implemented in whole or in part through software, hardware, or a combination thereof. Each module may be embedded in or independent of a processor in a computer device in the form of hardware, or may be stored in a computer device memory in the form of software, so that the processor can call and execute the corresponding operations of each module.

[0108] In an exemplary embodiment, a computer device is provided, the internal structure of which can be as follows: Figure 7 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O) and a communication interface. The processor, memory and input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used to store data involved in the above method. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it implements a method for exporting software platform metadata.

[0109] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0110] In one embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0111] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0112] In one embodiment, a computer program product is provided, on which a computer program is stored. The computer program is used by a processor to execute the steps in the above-mentioned various method embodiments.

[0113] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0114] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. In particular, any reference to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), programmable logic devices (PLDs), quantum computing-based data processing logic devices, artificial intelligence (AI) processors, and the like.

[0115] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0116] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A method for exporting software platform metadata, characterized in that: The method comprises: Scan the metadata model class of the software platform for annotations to obtain the metadata model type and basic collection name; Get the target collection name based on the metadata model type, base collection name, and the project number and version code that the user needs to export; According to the required export information set by the user in the configuration item of the export page, a page query is performed on the metadata collection of the target collection name, the data obtained by the page query is converted into a string, and written into the corresponding directory file; According to the catalog file, an export result is obtained.

2. The method according to claim 1, characterized in that Scan the metadata model class of the software platform for annotations to obtain the metadata model type and basic collection name, including: Scan the custom annotation configuration on the metadata model class of the software platform to obtain the metadata model type and basic collection name.

3. The method according to claim 1, characterized in that Get the target collection name based on the metadata model type, base collection name, and the project number and version code that the user wants to export, including: The metadata model type, basic collection name, project number and version code that the user needs to export are concatenated to obtain the target collection name.

4. The method according to claim 3, characterized in that The metadata model type, base collection name, project number and version code to be exported by the user are concatenated to obtain the target collection name, including: Concatenate the metadata model type with the base collection name; After splicing the results, add the project number and version code that the user needs to export to obtain the target collection name.

5. The method according to claim 1, wherein According to the required export information set by the user in the configuration item of the export page, a page query is performed on the metadata collection of the target collection name, the data obtained by the page query is converted into a string, and written into the corresponding directory file, including: Perform a paging query on the metadata set of the target collection name, and convert the data obtained by the paging query into a string; During the conversion to a string, the data is processed according to the required export information set by the user in the configuration items on the export page, some fields are ignored, and the conversion results are written to the corresponding directory file.

6. The method according to any one of claims 1 to 5, characterized in that The string includes a JSON string.

7. A software platform metadata export device, characterized in that: The device comprises: Annotation scanning module, used to perform annotation scanning on the metadata model class of the software platform to obtain the metadata model type and basic collection name; The name acquisition module is used to obtain the target collection name based on the metadata model type, the base collection name, and the project number and version code that the user needs to export; A paging query processing module is used to perform a paging query on the metadata set of the target collection name according to the required export information set by the user in the export page configuration item, convert the data obtained by the paging query into a string, and write it into the corresponding directory file; The result acquisition module is used to obtain the export result according to the directory file.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 6 is implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.