Resource processing method and apparatus, computer device, and storage medium

CN117708114BActive Publication Date: 2026-10-27TENCENT CLOUD COMPUTING (BEIJING) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211082764.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-06
Publication Date
2026-10-27
Estimated Expiration
2042-09-06

AI Technical Summary

Technical Problem

[0003]专有云往往涉及较多的资源类型,例如主机、磁盘、网络等硬件资源,传统技术中,对于不同类型的资源,通常是独立开发接口进行管理,开发及维护成本高

Benefits of technology

[0010]上述资源处理方法、装置、计算机设备、存储介质和计算机程序产品,由于将资源类型抽象成了资源模型,并且将各个资源类型对应的模型描述信息及模型标识统一存储于资源模型数据表,将包括资源类型对应的各个数据字段的校验信息的字段配置信息存储于字段配置信息,并且资源模型数据表与字段配置信息数据表通过模型标识进行关联,从而可以在接收到对资源处理接口进行调用生成的资源处理请求后,解析资源处理请求得到目标接口参数,根据目标接口参数中的模型描述信息从资源模型数据表中,确定资源模型的模型标识,从字段配置信息数据表中确定该模型标识所关联的字段配置信息,基于字段配置信息中与处理信息中的目标处理字段对应的目标校验信息,对处理信息进行校验,并在校验通过后,对存储待处理资源的资源表执行处理信息所包含的处理操作,实现了通过统一的资源处理接口对各种资源类型的资源进行处理,只需要在接口参数中声明模型即可,从而对于各种资源类型的资源只需要开发和维护该统一的资源处理接口,节省了开发和维护成本。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117708114B_ABST
    Figure CN117708114B_ABST
Patent Text Reader

Abstract

The application relates to a resource processing method and device, computer equipment, a storage medium and a computer program product, which can be applied to a cloud computing scenario to manage virtualized resources and physical resources in the cloud computing scenario. The resource processing method comprises the following steps: receiving a resource processing request generated by calling a resource processing interface, analyzing the request to obtain model description information and processing information of a resource model; determining a model identifier of the resource model from a resource model data table according to the model description information; determining field configuration information associated with the model identifier from a field configuration information data table; based on target verification information corresponding to a target processing field in the processing information in the field configuration information, verifying the processing information, and after the verification is passed, executing a processing operation contained in the processing information on a resource data table. By adopting the method, the development and maintenance cost in the resource management process can be saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to resource processing methods, apparatus, computer equipment, storage media, and computer program products. Background Technology

[0002] With the development of computer technology, private cloud technology has emerged. Private cloud, also known as private cloud, is a cloud platform built for the exclusive use of a single customer. The customer company owns its own infrastructure, and the cloud vendor customizes and deploys the cloud platform and applications on this infrastructure for the customer, providing unified control over data, security and service quality, and supporting various automation scenarios for the customer.

[0003] Private clouds often involve a variety of resource types, such as hardware resources like hosts, disks, and networks. In traditional technologies, different types of resources are usually managed through independently developed interfaces, which results in high development and maintenance costs. Summary of the Invention

[0004] Therefore, it is necessary to provide a resource processing method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can save development and maintenance costs in response to the above-mentioned technical problems.

[0005] On one hand, this application provides a resource processing method. The method includes: receiving a resource processing request generated by calling a resource processing interface; parsing the resource processing request to obtain target interface parameters, wherein the target interface parameters include model description information of a resource model corresponding to the resource to be processed and processing information for the resource to be processed, wherein the resource model is an instance object of the resource type to which the resource to be processed belongs; determining a model identifier of the resource model from a resource model data table based on the model description information, wherein the resource model data table stores model identifiers corresponding to different resource types, and the resource model data table is associated with a field configuration information data table through the stored model identifiers; determining the field configuration information associated with the model identifier from the field configuration information data table, wherein the field configuration information includes verification information for each data field corresponding to the resource type; verifying the processing information based on the target verification information in the field configuration information corresponding to the target processing field in the processing information, and after the verification is passed, executing the processing operation contained in the processing information on the resource data table storing the resource to be processed.

[0006] On the other hand, this application also provides a resource processing apparatus. The apparatus includes: a request receiving module, configured to receive a resource processing request generated by calling a resource processing interface, parse the resource processing request to obtain target interface parameters, the target interface parameters including model description information of a resource model corresponding to the resource to be processed and processing information for the resource to be processed, the resource model being an instance object of the resource type to which the resource to be processed belongs; a model identifier determining module, configured to determine the model identifier of the resource model from a resource model data table based on the model description information, the resource model data table storing model identifiers corresponding to different resource types, the resource model data table being associated with a field configuration information data table through the stored model identifiers; a configuration information determining module, configured to determine the field configuration information associated with the model identifier from the field configuration information data table, the field configuration information including verification information for each data field corresponding to the resource type; and a verification module, configured to verify the processing information based on the target verification information in the field configuration information corresponding to the target processing field in the processing information, and, after successful verification, execute the processing operation contained in the processing information on the resource data table storing the resource to be processed.

[0007] On the other hand, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the resource processing method described above.

[0008] On the other hand, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the steps of the resource processing method described above.

[0009] On the other hand, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the steps of the resource processing method described above.

[0010] The aforementioned resource processing methods, apparatus, computer equipment, storage media, and computer program products abstract resource types into resource models and uniformly store the model description information and model identifiers corresponding to each resource type in a resource model data table. They also store field configuration information, including verification information for each data field corresponding to the resource type, in a field configuration information table. Furthermore, the resource model data table and the field configuration information data table are associated through the model identifier. This allows for the following functionality: upon receiving a resource processing request generated by calling the resource processing interface, the system parses the request to obtain the target interface parameters. Based on the model description information in the target interface parameters, it determines the model identifier of the resource model from the resource model data table and the field configuration information associated with that model identifier from the field configuration information table. Based on the target verification information corresponding to the target processing field in the processing information, it verifies the processing information. Upon successful verification, it executes the processing operations contained in the processing information on the resource table storing the resources to be processed. This achieves the processing of various resource types through a unified resource processing interface. Only the model needs to be declared in the interface parameters, thus requiring only the development and maintenance of this unified resource processing interface for various resource types, saving development and maintenance costs.

[0011] On one hand, this application provides a resource processing method. The method includes: obtaining a model identifier, model description information, and field configuration information corresponding to a target resource type; writing a new data record composed of the model description information and the model identifier into a resource model data table; writing a new data record composed of the field configuration information and the model identifier into a field configuration information data table; and using the instance object determined by the data record corresponding to the model identifier in the resource model data table and the field configuration information data table as the resource model corresponding to the target resource type; wherein the resource model is used to respond to resource processing requests for resources under the target resource type.

[0012] On the other hand, this application also provides a resource processing apparatus. The apparatus includes: an information acquisition module, used to acquire a model identifier, model description information, and field configuration information corresponding to a target resource type; a first data writing module, used to write a new data record composed of the model description information and the model identifier into the resource model data table; a second data writing module, used to write a new data record composed of the field configuration information and the model identifier into the field configuration information data table; and a resource model determination module, used to determine the instance object determined by the data record corresponding to the model identifier in the resource model data table and the field configuration information data table as the resource model corresponding to the target resource type; wherein, the target resource model is used to respond to resource processing requests for resources under the target resource type.

[0013] On the other hand, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the resource processing method described above.

[0014] On the other hand, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the steps of the resource processing method described above.

[0015] On the other hand, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the steps of the resource processing method described above.

[0016] The aforementioned resource processing methods, devices, computer equipment, storage media, and computer program products, by abstracting resource types into resource models and uniformly storing the model description information and model identifiers corresponding to each resource type in a resource model data table, and storing the field configuration information including the verification information of each data field corresponding to the resource type in the field configuration information, can realize unified management of resources through the resource model data table and field configuration information, thereby improving resource processing efficiency. Attached Figure Description

[0017] Figure 1 This is an application environment diagram of a resource processing method in one embodiment;

[0018] Figure 2 This is a flowchart illustrating a resource processing method in one embodiment;

[0019] Figure 3 Here is an example of a host model declaration in one embodiment;

[0020] Figure 4Here is an example of a declaration of a data table related to a resource model in another embodiment;

[0021] Figure 5 This is a schematic diagram illustrating the grouping of resource models and data fields in one embodiment;

[0022] Figure 6 This is an example of a business tree structure and associated resources in one embodiment;

[0023] Figure 7 Here is an example of a declaration of an associated data table in one embodiment;

[0024] Figure 8 This is a storage diagram of each node in the service tree in one embodiment;

[0025] Figure 9 Here is an example of a table showing the association between tags in one embodiment;

[0026] Figure 10 This is a flowchart illustrating a resource processing method in another embodiment;

[0027] Figure 11 This is an overall architecture diagram of the resource management engine in one embodiment;

[0028] Figure 12 Here is a code example for generating the SDK in one embodiment;

[0029] Figure 13 This is a structural block diagram of a resource processing device in one embodiment;

[0030] Figure 14 This is a structural block diagram of a resource processing device in one embodiment;

[0031] Figure 15 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0032] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0033] Cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software, and networks within a wide area network or local area network to achieve data computing, storage, processing, and sharing.

[0034] Cloud technology is a collective term for network technologies, information technologies, integration technologies, management platform technologies, and application technologies applied to the cloud computing business model. It can form resource pools, providing flexible and convenient on-demand access. Cloud computing technology will become a crucial support. Backend services of technical network systems require substantial computing and storage resources, such as video websites, image websites, and many portal websites. With the rapid development and application of the internet industry, every item may have its own identification mark in the future, requiring transmission to backend systems for logical processing. Data at different levels will be processed separately, and various industry data will all require robust system support, which can only be achieved through cloud computing.

[0035] This application relates to private clouds in cloud technology, specifically to resource management of private clouds, which will be specifically described through the embodiments below.

[0036] The resource processing method provided in this application embodiment can be applied to, for example, Figure 1 The application environment shown is illustrated. Terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or located in the cloud or on other servers. The data storage system can be a CMDB (Configuration Management Database). CMDBs provide functions for integrating, harmonizing, synchronizing, mapping, and visualizing resources, and can be used to store and manage various configuration information of devices in an enterprise IT architecture, making them an important means of resource management. Terminal 102 can be, but is not limited to, various desktop computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, etc. Portable wearable devices can include smartwatches, smart bracelets, head-mounted devices, etc. Server 104 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server terminal that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. Servers can be directly or indirectly connected through wired or wireless communication methods, and this application does not impose any restrictions.

[0037] Specifically, this application abstracts resource types and their attributes into "resource models" and "fields." Information related to "resource models" is stored in a resource model data table, and information related to "fields" is stored in a field configuration information data table. Through these two data tables, various types of resources can be processed by providing a unified resource processing interface. It is only necessary to declare the model in the interface parameters when calling the resource processing interface. After the server receives the resource processing request generated by calling the resource processing interface, it can determine the resource model corresponding to the resource to be processed from the resource model data table based on the model description information carried therein, and obtain the verification information of each data field corresponding to the resource model from the field configuration information data table. Thus, the processing operation of the request can be verified based on the verification information, and the corresponding processing can be performed after the verification is passed.

[0038] It should be noted that the resource processing method provided in this application embodiment is generally executed by server 104, and correspondingly, the resource processing device is generally also located in server 104. However, in other embodiments of this application, terminal 102 may also have similar functions to server 104, thereby being able to execute the resource processing method provided in this application embodiment.

[0039] In one embodiment, such as Figure 2 As shown, a resource processing method is provided, which is applied to... Figure 1 Taking the server in the example, the following steps are included:

[0040] Step 202: Receive the resource processing request generated by calling the resource processing interface, parse the resource processing request to obtain the target interface parameters. The target interface parameters include the model description information of the resource model corresponding to the resource to be processed and the processing information for the resource to be processed. The resource model is an instance object of the resource type to which the resource to be processed belongs.

[0041] The resource processing request is used to request the processing of resources on the cloud platform. Cloud platform resources include, but are not limited to, various physical hardware resources, cloud-native virtual resources, deployment planning data, Kubernetes (container orchestration engine resources, or Kubernetes for short) resources, etc. Physical hardware resources include, but are not limited to, hosts, disks, and networks. Processing cloud platform resources can involve querying, deleting, modifying, or adding resources, or any combination of these operations. The resource to be processed refers to the resource requested by the resource processing request. For example, if the resource processing request requests a query for hosts on the cloud platform, then the resource to be processed is a host. The resource type to which the resource to be processed belongs refers to the type of the resource to be processed, categorized by attributes. For example, a host is a resource type, a disk is a resource type, and a network is a resource type. The resource model is an instance object of the resource type to which the resource to be processed belongs. Each resource type can be abstracted into a resource model for management. Different resource types have different attributes, which are abstracted into fields of the resource model, thus allowing different fields for different resource models. Custom configuration of resource models and fields is supported. Figure 3 The image shows an example of a host model declaration and its relationship to host data in one embodiment. (Reference) Figure 3 The host model includes eight fields: fixed asset number, IP, CPU, memory, maintenance personnel, application time, application source, and applicant. Each field corresponds to an attribute of the host data.

[0042] Model description information refers to information used to indicate a specific resource model. Model description information may include at least one of the following: model name, model identifier, or model icon. The model name can be in English or Chinese. Processing information for the resource to be processed includes the target processing field of the request and the specific processing operation.

[0043] Specifically, when a user needs to process resources on the cloud platform, they can generate a resource processing request by calling the resource processing interface provided by the server through the terminal and send it to the server. After receiving the resource processing request from the terminal, the server can parse the request to obtain the target interface parameters carried within it. The target interface parameters include model description information of the resource model corresponding to the resource to be processed and processing information for the resource to be processed. Since the target interface parameters include model description information, the server can determine the specific type of resource that the terminal wants to process, and thus perform subsequent resource processing. In other embodiments, when the associated system corresponding to the cloud platform needs to process resources on the cloud platform, the server of the associated system can also generate a resource processing request by calling the resource processing interface and send the resource processing request to server 104. For example, if the log system needs to query pods under k8s resources, the log system server can send a resource query request by calling the resource processing interface.

[0044] Step 204: Determine the model identifier of the resource model from the resource model data table based on the model description information. The resource model data table stores the model identifiers corresponding to different resource types. The resource model data table is associated with the field configuration information data table through the stored model identifiers.

[0045] The resource model data table stores model description information for each resource model. This description includes, but is not limited to, model name, model identifier, and interface display style information. The interface display style information defines how each resource model is displayed on the terminal interface, and may specifically include a model icon. The model identifier uniquely identifies a resource model. The resource model data table stores model identifiers corresponding to different resource types, allowing for unified management of all resource models. The field configuration information data table stores field configuration information for each resource model. This includes validation information for each data field corresponding to the resource type represented by the resource model. This allows for validation of the processing information for each data field. These data fields correspond to the attributes of the resource type and can be seen as abstract instances of the resource type's attributes. For example, for the host resource type, data fields may include host ID, CPU (central processing unit), and maintenance personnel, etc.

[0046] The resource model data table is associated with the field configuration information data table through the stored model identifier. Both the resource model data table and the field configuration information data table may include columns corresponding to the model identifier. The field configuration information of the resource model identified by the model identifier can be obtained from the field configuration information data table by using the model identifier determined from the resource model data table.

[0047] Specifically, since model description information can refer to a specific resource model, the server can determine the specific resource model of the resource to be processed by the resource processing request based on the model description information, and thus determine the model identifier of the specific resource model from the resource model data table. In practical applications, model description information may include a model name. The server can query the resource model data table to find the model identifier corresponding to the model name. The model identifier corresponding to the model name is the model identifier in the data record where the model name is located. Each resource model corresponds to one data record in the resource model data table, and one data record can be, for example, a row of data in the resource model data table.

[0048] Step 206: Determine the field configuration information associated with the model identifier from the field configuration information data table. The field configuration information includes the verification information of each data field corresponding to the resource type.

[0049] The field configuration information associated with the model identifier refers to the field configuration information contained in the data record containing the model identifier. It can be understood that if the resource model uniquely identified by the model identifier corresponds to multiple data fields, meaning the resource type represented by that resource model has multiple attributes, there can be multiple data records containing the model identifier. Each data record corresponds to one data field, and each data record contains the field configuration information corresponding to one data field. Here, a data record can be a row of data in the field configuration information data table. The field configuration information corresponding to each data field can include the validation information corresponding to that data field. The validation information corresponding to different data fields can be the same or different. For example, the field configuration information data table can include three validation items: "whether it is unique," "whether it is required," and "whether it is editable." The specific information corresponding to these three validation items is the validation information.

[0050] Specifically, the server can query the field configuration information data table, retrieve data records containing model identifiers of resource models corresponding to the resource to be processed, and determine the field configuration information contained in the retrieved data records as the field configuration information associated with the model identifier.

[0051] Step 208: Based on the target verification information corresponding to the target processing field in the processing information in the field configuration information, the processing information is verified, and after the verification is passed, the processing operation contained in the processing information is executed on the resource data table storing the resources to be processed.

[0052] The target processing field in the processing information is the field requested to be processed by the resource processing request, and the processing operation contained in the processing information is the specific processing operation requested by the resource processing request.

[0053] Specifically, since the field configuration information associated with the model identifier is determined from the field configuration information data table, and this field configuration information includes validation information for each data field corresponding to the resource type, the validation information corresponding to the target processing field in the processing information can be determined from this field configuration information. This validation information is the target validation information. Based on this target validation information, the specific processing operation for the target processing field in the processing information can be validated. After the validation passes, the requested specific processing operation is executed on the data corresponding to the target processing field in the resource data table storing the resource to be processed. For example, assuming the validation information of the target processing field specifies that the target processing field is not editable, if the processing operation is a modification operation, then the validation will fail.

[0054] In one embodiment, when the verification fails, the server may refuse to process the request and return a verification failure message to the sender corresponding to the resource processing request.

[0055] In one embodiment, the resource data to be processed can be stored using the table column definition method in MySQL. In this case, each resource model corresponds to an independent MySQL table, and each field corresponds to an independent column. The server can then determine the resource data table for storing the resources to be processed based on the correspondence between the resource models and the MySQL tables. In other embodiments, the resources to be processed can be stored in the form of key-value pairs, where the field is the key and the field value is the value corresponding to the key. In this case, each resource model can correspond to a unified data table, and the server can directly perform processing operations on this data table.

[0056] In the above resource processing method, resource types are abstracted into resource models, and the model description information and model identifiers corresponding to each resource type are uniformly stored in the resource model data table. Field configuration information, including validation information for each data field corresponding to the resource type, is stored in the field configuration information. Furthermore, the resource model data table and the field configuration information data table are associated through the model identifier. Therefore, upon receiving a resource processing request generated by calling the resource processing interface, the method can parse the resource processing request to obtain the target interface parameters. Based on the model description information in the target interface parameters, the model identifier of the resource model is determined from the resource model data table, and the field configuration information associated with that model identifier is determined from the field configuration information data table. Based on the target validation information corresponding to the target processing field in the processing information, the processing information is validated. After successful validation, the processing operations contained in the processing information are executed on the resource table storing the resources to be processed. This achieves the processing of resources of various resource types through a unified resource processing interface. Only the model needs to be declared in the interface parameters, thus requiring only the development and maintenance of this unified resource processing interface for various resource types, saving development and maintenance costs.

[0057] In one embodiment, the resource processing method further includes a resource model creation step, which includes: obtaining a target model identifier, target model description information, and target field configuration information corresponding to the target resource type; combining the target model description information and the target model identifier into a new data record and writing it into a resource model data table; combining the target field configuration information and the target model identifier into a new data record and writing it into a field configuration information data table; and using the instance object determined by the data record corresponding to the target model identifier in the resource model data table and the field configuration information data table as the resource model corresponding to the target resource type.

[0058] Specifically, the terminal interface can display a resource model configuration interface. Users can customize the target model identifier, target model description information, and target field configuration information corresponding to the target resource type in this interface. The terminal then sends a resource model creation request to the server via an interface provided by the server. Upon receiving the request, the server parses it to obtain the target model identifier, target model description information, and target field configuration information. The server then writes a new data record composed of the target model description information and the target model identifier into the resource model data table, and writes a new data record composed of the target field configuration information and the target model identifier into the field configuration information data table. Finally, the instance object determined by the data record corresponding to the target model identifier in the resource model data table and the field configuration information data table can be used as the resource model corresponding to the target resource type. In this embodiment, the resource model data table and the field configuration information data table can be data tables in MySQL.

[0059] In one specific embodiment, the resource model data table can be configured according to... Figure 4 The diagram (a) in the table is declared, and each item in diagram (a) can be used as a column in the resource model data table. Therefore, for each item in diagram (a), the user can select or edit the specific information corresponding to that item in the resource model configuration interface displayed on the terminal. For example, when creating a resource model for a host, the "model_name" in diagram (a) can be set to "host".

[0060] In one specific embodiment, the field configuration information data table can be configured according to... Figure 4 The diagram (b) in the diagram is declared, and each item in diagram (a) can be used as a column in the field configuration information data table. Therefore, for each item in diagram (b), the user can set the specific information corresponding to the target resource type in the resource model configuration interface displayed on the terminal by selecting or editing. For example, when creating a resource model for a host, for the host's CPU attribute, the "property_name" in diagram (b) can be set to "Central Processing Unit".

[0061] In the above embodiments, by writing a new data record consisting of the target model description information and the target model identifier into the resource model data table, and writing a new data record consisting of the target field configuration information and the target model identifier into the field configuration information data table, the resource model corresponding to the target resource type can be quickly determined.

[0062] In one embodiment, the creation step further includes: obtaining model grouping information corresponding to the target resource type, wherein the model grouping information is used to describe the classification information of resources under the target resource type in a preset classification method; writing the model grouping information as a new data record into the model grouping data table; and using the instance objects determined by the data records corresponding to the target model identifier in the resource model data table and the field configuration information data table as the resource models corresponding to the target resource type, including: using the instance objects determined by the data records corresponding to the target model identifier in the resource model data table, the field configuration information data table, and the model grouping data table as the resource models corresponding to the target resource type; wherein the model grouping data table is associated with the resource model data table through the model grouping identifier included in the model grouping information; the model grouping data table is used to provide grouping information for each resource model to support the grouping and display of resource models.

[0063] The model grouping information describes the classification information of resources under the target resource type according to a preset classification method. Model grouping information may include, for example, a model group name and a model group identifier. The model group identifier uniquely identifies the model group to which a resource model belongs. The preset classification method refers to categorizing resources according to their nature; for example, hardware resources such as hosts and disks can be grouped into one category, and each category constitutes a model group.

[0064] Specifically, the resource model configuration interface on the terminal may also include a model grouping configuration item. Users can use this item to group resource models corresponding to the target resource type. When the server parses the resource model creation request, it can also obtain the model grouping information. The server has a pre-set model grouping data table. The server can write the model grouping information of the target resource model as a new data record into the model grouping data table. Therefore, the server can use the instance object determined by the data record corresponding to the target model identifier in the resource model data table, field configuration information data table, and model grouping data table as the resource model corresponding to the target resource type. It can be understood that since the model grouping data table is associated with the resource model data table through the model grouping identifier included in the model grouping information, the data record in the model grouping data table corresponding to the target model identifier is the data record corresponding to the model group identifier of the target model identifier.

[0065] In one specific embodiment, the model grouping data table can be arranged according to... Figure 4The diagram (c) in the diagram is declared, and each item in diagram (c) can be used as a column in the model grouping data table. Therefore, for each item in diagram (c), the user can set the specific information of the target resource type corresponding to that item by selecting or editing in the resource model configuration interface displayed on the terminal. For example, when creating a resource model for the host, the "model_group_name" in diagram (c) can be set to "hardware resource".

[0066] The model grouping data table is linked to the resource model data table through the model grouping identifier included in the model grouping information. Both the model grouping data table and the resource model data table can include columns corresponding to the model grouping identifier. (See reference...) Figure 4 , Figure 4 Figures (a) and (c) both contain the `model_group_uuid`. The model grouping data table provides grouping information for each resource model to support grouped display of resource models. When a user needs to view a resource model, the server, after determining the resource model the user wants to view, retrieves the corresponding model group identifier from the resource model data table. Based on the model group identifier, the server can determine the model grouping information of the resource model to be viewed from the model grouping data table. The server can then return the model grouping information of the resource model to the terminal, allowing the terminal interface to display the resource models in groups, making it convenient for users to understand the category to which different resource models belong.

[0067] In the above embodiments, the server uses the instance object determined by the data record corresponding to the target model identifier in the resource model data table, field configuration information data table, and model grouping data table as the resource model corresponding to the target resource type. The resulting target resource model can be better used to express the resource type.

[0068] In one embodiment, the creation step further includes: obtaining field grouping information for each of the multiple data fields included in the target field configuration information, wherein the field grouping information describes the classification information of the data fields under a preset field classification method; combining the field grouping information and the target model identifier to form a new data record and writing it into the field grouping data table; and using the instance object determined by the data record corresponding to the target model identifier in the resource model data table, the field configuration information data table, and the model grouping data table as the resource model corresponding to the target resource type, including: using the instance object determined by the data record corresponding to the target model identifier in the resource model data table, the field configuration information data table, the model grouping data table, and the field grouping data table as the resource model corresponding to the target resource type; wherein the field grouping data table is associated with the field configuration information data table through the field grouping identifier included in the field grouping information; the field grouping data table is used to provide grouping information for the data fields corresponding to each resource model to support the grouped display of the data fields corresponding to the resource models.

[0069] The field grouping information describes the classification information of data fields under the preset field classification method. The field grouping information may include, for example, the field group name and the field group identifier. The preset field classification method refers to the way data fields are classified. For example, for the data fields corresponding to the host model, they can be classified into two categories: "basic hardware" and "business". Each category corresponds to a field group.

[0070] Specifically, the resource model configuration interface on the terminal interface may also include a field grouping configuration item. Users can use this field grouping configuration item to group the various data fields corresponding to the target resource type. Thus, when the server parses the resource model creation request, it can also obtain the field grouping information of each of the multiple data fields included in the target field configuration information. The server has a pre-set field grouping data table. The server can combine the field grouping information of each data field with the target model identifier to form a new data record and write it into the field grouping data table. Thus, the server can use the instance object determined by the data record corresponding to the target model identifier in the resource model data table, field configuration information data table, model grouping data table, and field grouping data table as the resource model corresponding to the target resource type.

[0071] In one specific embodiment, the field-grouped data table can be arranged according to... Figure 4The (d) diagram is declared, and each item in the (d) diagram can be used as a column in the field grouping data table. Therefore, for each item in the (d) diagram, the user can select or edit the specific information corresponding to that item in the target resource model through the resource model configuration interface displayed on the terminal. For example, when creating a resource model for a host, for the host's CPU attribute, the "property_group_name" in the (d) diagram can be set to "basic hardware".

[0072] The field grouping data table is linked to the field configuration information data table through the field grouping identifier included in the field grouping information. Both the field grouping data table and the field configuration information data table can include columns corresponding to the field grouping identifiers. (See reference...) Figure 4 , Figure 4 In diagram (b), `gropu_id` is the field grouping identifier. Figure 4 In diagram (d), 'id' represents the field grouping identifier. The field grouping data table provides grouping information for the data fields corresponding to each resource model, enabling the grouped display of data fields corresponding to resource models. When a user needs to view a resource model, the server, after determining the resource model the user wants to view, retrieves the field grouping identifier corresponding to that resource model from the field configuration information data table. Based on the field grouping identifier, the server can determine the field grouping information of the resource model to be viewed from the field grouping data table. The server can then return the resource model's field grouping information to the terminal, allowing the terminal interface to display the data fields of the resource model in groups, making it convenient for users to understand the category to which different data fields belong.

[0073] In other embodiments, after obtaining the model identifier, model description information, field configuration information of the target resource type represented by the target resource model, model grouping information, and field grouping information of the target resource model to be created, the server can also cache this data in Redis to enable fast querying and management of the model definition.

[0074] In some embodiments, users can also perform operations such as querying, modifying, and deleting the created model through the resource model configuration interface displayed on the terminal.

[0075] In one specific embodiment, the created resource model can be as follows: Figure 5As shown, the resource model can be divided into multiple groups, such as hardware resource group and Kubernetes resource group. Each model group includes multiple resource models. For example, the hardware resource group includes host model, hard disk model and network card model, and the Kubernetes resource group includes pod model. The data fields of each resource model can be divided into multiple groups. For example, the data fields of the host model can be divided into basic hardware group and business group, while the data fields of the hard disk model can be divided into basic hardware group and other groups.

[0076] In the above embodiments, the server obtains the field grouping information of the target resource model, writes the field grouping information into the field grouping data table, and uses the instance object determined by the data record corresponding to the target model identifier in the resource model data table, field configuration information data table, model grouping data table, and field grouping data table as the resource model corresponding to the target resource type. As the target resource model, the obtained target resource model can be better used to express the resource type.

[0077] In one embodiment, the resource data table includes extended field columns and multiple preset field columns; performing the processing operations contained in the processing information on the resource data table storing the resources to be processed includes: when the target processing field includes a preset field, determining the target field column containing the preset field from the multiple preset field columns, and performing the processing operations contained in the processing information on the target field column; when the target processing field includes an extended field, determining the target key-value pair including the extended field from the extended field columns, and performing the processing operations contained in the processing information on the target key-value pair.

[0078] The preset field columns are predefined columns used to store preset data fields during development, with one preset field column corresponding to one data field. The extended field columns, on the other hand, are used to store custom extended fields added by the user. Data in the extended field columns is stored in key-value pairs, where the key is the field name and the value is the field value. For example, a key-value pair could be (landline number, 1234567). An extended field column can correspond to multiple extended fields. In this embodiment, each resource data table corresponding to a resource model can include an extended field column, storing dynamically added data to support the user's need for dynamic model configuration.

[0079] Specifically, in the field configuration information data table, each data field's corresponding data record includes indication information to show whether that data field is a preset field. For example, see [link to example]. Figure 4In diagram (c), when a data field corresponds to a preset value of 1, it indicates that the data field is a preset field; when a data field corresponds to a preset value of 0, it indicates that the data field is an extended field. Thus, for the target processing field requested by the resource processing request, the server can determine whether it is a preset field by querying the field configuration information data table. When the target processing field includes a preset field, the server can determine the field column where the preset field is located from the resource data table as the target field column, and then perform the processing operation contained in the processing information on the target field column. When the target processing field includes an extended field, the server determines the target key-value pair including the extended field from the extended field column and performs the processing operation contained in the processing information on the target key-value pair.

[0080] In one embodiment, when a user needs to add a data field to a certain resource type, the server can combine the field configuration information corresponding to the new data field with the model identifier of the resource type to form a new data record and write it into the field configuration information data table to update the field configuration information data table. Then, the server can manage the corresponding data of the new data field based on the updated field configuration information data table. When it is necessary to synchronize the data of the new data field, after the verification is passed, the corresponding data of the new data field can be written into the extended field column of the resource data table corresponding to the resource type in the form of key-value pairs.

[0081] In one specific embodiment, the resource data table corresponding to each resource model is an independent table in MySQL, and the extended field columns in the table are stored in JSON format.

[0082] In the above embodiments, since extended field columns are set for the resource data table, dynamic extension of fields can be supported to meet the user's need to dynamically add data.

[0083] In one embodiment, the resource data table belongs to a data table set, which includes an extended data table and multiple preset data tables, each preset data table corresponding to a model identifier. The processing operations contained in the processing information are performed on the resource table storing the resource to be processed, including: obtaining data table indication information corresponding to the model identifier in the resource model data table; when the data table indication information indicates that the resource to be processed is stored in a preset data table, determining the corresponding target data table from the multiple preset data tables based on the model identifier corresponding to the resource to be processed, and performing the processing operations contained in the processing information on the target data table; when the data table indication information indicates that the resource to be processed is stored in an extended data table, determining the corresponding target data including multiple key-value pairs from the extended data table based on the model identifier corresponding to the resource to be processed, and performing the processing operations contained in the processing information on the target data.

[0084] The default data table is predefined during development and stores resource data for default resource types. One default data table corresponds to one default resource type. Since each resource type is abstracted into a corresponding resource model, one default data table corresponds to one model identifier. The extended data table stores extended resource types encountered during user operation. Data in the extended data table is stored in key-value pairs, where the key is the field name and the value is the field value. The model identifier in the extended data table is stored in correspondence with the resource data under its corresponding resource type; the resource data under its corresponding resource type can be found through the model identifier. One extended data table can correspond to multiple resource types, meaning it can be used to store resource data for multiple resource types to support users' needs for dynamically adding resource types.

[0085] Specifically, in the resource model data table, each data record corresponding to a resource type can include data table indication information to indicate whether the resource data corresponding to that resource type is stored in a preset data table. For example, see [link to example]. Figure 4 In Figure (a), when a resource type corresponds to a preset value of 1, it indicates that the resource data corresponding to that resource type is stored in a preset data table. When a resource type corresponds to a preset value of 0, it indicates that the resource data corresponding to that resource type is stored in an extended data table. Thus, for the resource type requested by the resource processing request, the server can query the resource model data table to obtain the data table indication information corresponding to the model identifier of that resource type. When the data table indication information indicates that the resource to be processed is stored in a preset data table, the server can determine the corresponding target data table from multiple preset data tables based on the model identifier corresponding to the resource to be processed, and perform the processing operation contained in the processing information on the target data table. When the data table indication information indicates that the resource to be processed is stored in an extended data table, the server can determine the corresponding target data including multiple key-value pairs from the extended data table based on the model identifier corresponding to the resource to be processed, and perform the processing operation contained in the processing information on the target data.

[0086] In one embodiment, when a user needs to add a new resource type, the server can combine the model description information corresponding to the new resource type with the corresponding model identifier to form a new data record and write it into the resource model data table to obtain an updated resource model data table. The server can also combine the field configuration information corresponding to each attribute of the resource type with the model identifier to form a new data record and write it into the field configuration information data table to obtain an updated field configuration information data table. The server can then manage the resource data of the new resource type based on the updated field configuration information data table and the updated resource model data table. When it is necessary to synchronize resource data for the new resource type, the server can write the resource data of the new resource type into an extended data table in the form of key-value pairs after the verification is passed.

[0087] In one specific embodiment, the resource data in the extended data table is stored in JSON format.

[0088] In the above embodiments, the extended data table enables dynamic expansion of the resource model to meet users' needs for dynamically adding new resource types.

[0089] In one embodiment, the method further includes: receiving a resource association request, wherein the resource association request carries a resource identifier of the resource to be associated, a model identifier corresponding to the resource type to which the resource to be associated belongs, and a node identifier of the target node to be associated; the target node is any node in the target business tree; in response to the resource association request, associating the resource to be associated with the target node in the target business tree, generating a resource association record based on the resource identifier of the resource to be associated, the model identifier corresponding to the resource type to which the resource to be associated belongs, and the node identifier of the target business tree, and writing the resource association record into a resource association data table; the resource association data table is used to support querying the resources associated with each node in the target business tree.

[0090] The business tree is a tree-like topology structure that categorizes and manages resources based on the abstract concepts of business functions and their sub-functions. It's used to plan, allocate, and display the resource data available for each different business. For example, business A has two sub-functions, B and C, and B has three smaller sub-functions, D, F, and G. This functional abstraction can be represented as a tree topology. To show that sub-function D uses resources 1 and 2, simply associate these two resources with node D in the tree. Businesses here could be, for example, cloud storage or cloud computing. Each business can correspond to one business tree.

[0091] In related technologies, the business tree stores node data in different tables for each level. These tables are pre-declared during development and cannot be expanded. Therefore, the business tree in related technologies is a fixed hierarchy for users, with only the third level able to associate and partition resources, and the resource types are fixed, such as only using it to partition hosts according to business. This leads to the following two common problems: 1. Inability to manage other resources: Besides hosts, other resources also need to be partitioned according to business. For example, the log system needs to partition and operate on pods and other resources on Kubernetes according to business; the deployment system needs to obtain planning information according to business. 2. The three-level hierarchy cannot partition all business functions: Some businesses need to be divided into four or five levels to describe their sub-functions. The design of fixing the three-level structure and requiring the third level to associate resources cannot meet the functional partitioning requirements of all businesses. Therefore, it is necessary to adjust the business tree in traditional technologies to make it more dynamic. This application's embodiment is based on the concept of a resource model and extends the design to a dynamic business tree. The comparison between the old and new business tree structures is as follows: Figure 6 As shown, Figure 6 Figure (a) shows an example of a business tree structure and associated resources in related technologies. Figure 6 Figure (b) in the figure is an example of the business tree structure and associated resources in an embodiment of this application, by Figure 6 It can be seen that the service tree in this application embodiment may include three or more levels, and each level can be used to associate resources, and the resource type is not limited to hosts.

[0092] Specifically, the terminal interface can display a business tree. For resources to be associated, when a user needs to associate a resource of a certain resource type (i.e., the resource to be associated) with any node in the business tree, they can select that node, which becomes the target node. This triggers a resource association request to be sent to the server. By parsing the resource association request, the server can obtain the resource identifier of the resource to be associated, the model identifier corresponding to the resource type, and the node identifier of the target node to be associated. The server then associates the resource to be associated with the target node in the target business tree. After the resource association is completed, the resource belongs to the function corresponding to the target node.

[0093] Simultaneously, the server generates a resource association record based on the resource identifier of the resource to be associated, the model identifier corresponding to the resource type to which the resource belongs, and the identifier of the target business tree node, and writes the resource association record into the association data table. In a specific embodiment, such as Figure 7 The image shown is an example of a declaration for a related data table. (See reference.) Figure 7The server can uniquely identify a resource association record using a composite primary key consisting of node_uuid (the node identifier of the business tree node), model_uuid (the model identifier), and inst_id (the resource b identifier). It supports associating data with various resource models and uses inst_id to identify a specific resource data configuration.

[0094] The resource association data table supports querying resources associated with each node in the target business tree. Specifically, based on the business tree, the terminal interface can display a display area including a business tree display area, a resource list display area, and a resource model display area. On this display interface, users can query resources by triggering actions on any node of the business tree, enabling them to view and manage resources. For example, the terminal can respond to a triggering action on any node in the business tree display area, sending a query request to the server with the node's identifier as the query condition. The server, by querying the resource association data table, can obtain the model identifiers of all resources associated with that node, and then return the corresponding model description information to the terminal based on the resource identifiers. The terminal can then display the resource models associated with that node in the resource model display area. When a user triggers any resource model, the terminal can respond to this triggering action, sending a query request to the server with the node's identifier and model identifier as query conditions. The server can then query the corresponding resource data based on the query request and return it to the terminal. The terminal can then display the resource list associated with that node in the aforementioned resource list display area. The triggering action can be an action such as clicking.

[0095] In the above embodiments, since the resource association request carries the resource identifier of the resource to be associated and the node identifier of the target node to be associated, the request can generate a resource association record by writing it into the association data table, which includes the resource identifier of the resource to be associated, the model identifier corresponding to the resource type to which the resource to be associated belongs, and the node identifier of the target business tree. This enables support for resource association of any node in the business tree.

[0096] In one embodiment, the target business tree is stored in a business tree data table. Each row in the business tree data table stores the node data corresponding to a node in the target business tree. The node data includes node representation information, node hierarchy information, and associated node representation information. The associated node representation information includes parent node representation information.

[0097] The node data for a given node includes its node representation information, node hierarchy information, and associated node representation information. Node representation information refers to the information used to represent the node, such as either the node name or node identifier. Node hierarchy information indicates the node's level; for example, a node on the second level of the business tree has a hierarchy of 2. Associated node representation information includes the node representation information of the parent nodes associated with this node, and this information must at least include the parent node's representation information. Parent node representation information represents the parent node and can be either the parent node's name or node identifier.

[0098] In a specific embodiment, node data may include the node name, node identifier, parent node identifier, list of preceding node identifiers, node hierarchy, whether it is a child node, node type, association model, etc. The parent node identifier is the identifier of the node's direct parent node, while the list of preceding node identifiers includes the node identifiers of all parent nodes of the node, including parent node identifiers, grandparent node identifiers, etc. Whether it is a leaf node indicates whether the node is a leaf node in the business tree. The association model restricts the resource models that the node can be associated with, and the node type restricts the types of resources that the node can be associated with. Here, the resource types and resource models are categorized according to different dimensions. The association model and node type are determined based on the function corresponding to the node to ensure the rationality of resource association. For example, refer to [reference needed]. Figure 8 Assuming the business tree is as follows: Figure 8 As shown in Figure (a), the business tree data table can be as follows: Figure 8 As shown in Figure (b). (Reference) Figure 8 Taking the pool1 node in the third layer as an example, the node type of this node is host, which means that the types of resources that this node can be associated with are host-related resources. The resource models that this node can be associated with are host and process. Both host and process are host-related resources.

[0099] In the above embodiments, nodes at each level are flattened and stored in the same table. Each node's data records its associated nodes, level number, and whether it is a leaf node, so as to dynamically link node data and realize dynamic hierarchical expansion logic.

[0100] In one embodiment, the node data further includes association model information and node type information. The association model information is used to restrict the resource models that the node corresponding to the node data can be associated with, and the node type information is used to restrict the types of resources that the node corresponding to the node data can be associated with. In response to a resource association request, associating the resource to be associated with a target node on the target business tree includes: verifying the resource to be associated based on the association model information and node type information; if the verification passes, in response to a resource association request, associating the resource to be associated with a target node on the target business tree.

[0101] Specifically, the server parses the resource association request to obtain the resource identifier of the resource to be associated, the model identifier corresponding to the resource type to which the resource belongs, and the identifier of the target business tree node. Based on the resource identifier, the server can determine whether the resource to be associated conforms to the association model information and node type information. If it does, the verification passes, the resource to be associated is valid, and association can proceed. The server then responds to the resource association request, associating the resource to be associated with the target node in the target business tree. If the server determines, based on the resource identifier, that the resource to be associated does not conform to either the association model information or the node type information, the verification fails, the server can reject the association request, and return a failure message.

[0102] In the above embodiments, verifying the rationality of resources when associating them can ensure the accuracy of resource association.

[0103] In one embodiment, the method further includes: receiving a node creation request for a target business tree, the node creation request including node representation information, node hierarchy information, and associated node representation information of the node to be created; determining the corresponding position of the node to be created in the target business tree based on the node hierarchy information and associated node representation information of the node to be created, and creating the node at the corresponding position; after the node is created, writing its corresponding node representation information, node hierarchy information, and associated node representation information as node data into a business tree data table.

[0104] Since the node data of each node is uniformly stored in the business tree data table, when a node is created at any level, the node data of the created node can be stored in the business tree data table. This allows for the dynamic addition of nodes and expansion of levels according to user needs. The added node can be a node at any level, which can be an existing level in the business tree or a newly expanded level.

[0105] Specifically, when a user needs to add a node, they can perform the operation of adding a node to the target business tree on the terminal interface, triggering a node creation request to be sent to the server for the target business tree. The server parses the node creation request and can obtain the node representation information, node level information, and associated node representation information of the node to be created. Based on the node level information and associated node representation information, the server determines the corresponding position of the node to be created in the target business tree, so that the node can be created at the corresponding position. After the node is created, the node representation information, node level information, and associated node representation information corresponding to the node are written into the business tree data table as the node data of the node.

[0106] In the above embodiments, nodes can be created at any level of the business tree to meet users' dynamic needs for business tree levels and nodes.

[0107] In one embodiment, the method further includes: receiving a tag association request, the tag association request including resource representation information of the resource to be associated and a tag to be associated; in response to the tag association request, associating and storing the resource representation information and the tag identifier of the tag to be associated in a tag association data table, so as to associate the resource represented by the resource representation information with the tag to be associated; the tag association data table is used to support querying resources based on tags.

[0108] Since resource allocation based on business trees cannot cover all users' needs for resource categorization—for example, a cloud platform drill system needs to acquire resource data at the component cluster level rather than for business functions—this application also develops a tag management function. This allows users to define and categorize resource data using tags as needed and perform their own business logic processing according to the categorization. This application supports tagging and categorizing any type of resource data. Each tag is a key-value pair. Users can customize and manage tags; a tag can be assigned to data from different resource models, or different tags can be assigned to the same resource data.

[0109] Specifically, users can select the resource data to be tagged (i.e., the resource to be associated) and determine the corresponding tag (i.e., the tag to be associated) on the terminal node, triggering the terminal to send a tag association request to the server. Upon receiving the tag association request, the server can parse the resource representation information of the resource to be associated and the tag to be associated. The resource representation information is used to represent the resource and may include a resource identifier and the model identifier corresponding to the resource. The server then associates the resource representation information and the tag identifier of the tag to be associated into a tag association data table, thus associating the resource represented by the resource representation information with the tag to be associated. In a specific embodiment, such as... Figure 9The table shown is an example of a table corresponding to a tag association. The table on the left is the tag table, which contains the tag's own attributes such as key and value. The table in the middle is the tag association data table, which supports association with resource data of various resource models. The table on the right is sample data of resources of various resource models.

[0110] Since resource representation information and the tag identifiers of the tags to be associated can be stored in a tag association data table, it is possible to query resources based on tags according to this tag association data table.

[0111] In the above embodiments, by receiving a tag association request and associating tags with resources, it is possible to classify and manage resources through tags.

[0112] In one embodiment, the resource processing request further carries a request sending object identifier. Before determining the model identifier of the resource model from the resource model data table based on the model description information, the method further includes: obtaining a preset processing permission data table, which stores at least one processing permission information corresponding to multiple object identifiers, including model description information of the resource model with processing permission and permission indication information under each candidate processing operation; querying the processing permission information corresponding to the request sending object identifier from the processing permission data table, and determining the target processing permission information corresponding to the resource to be processed from the queried processing permission information; performing permission verification on the processing operations contained in the processing information based on the permission indication information under each candidate processing operation in the target processing permission information; and determining the model identifier of the resource model from the resource model data table based on the model description information, including: if the permission verification passes, determining the model identifier of the resource model from the resource model data table based on the model description information.

[0113] The candidate processing operations include at least one of the following: add, delete, query, or modify. Permission indication information is used to indicate whether the user has the necessary permissions.

[0114] Specifically, in this example, the processing of resources by each object is controlled at the granular level of adding, deleting, querying, and modifying resource models, and the permission policy is persistently stored in the processing permission data table. When a new object needs to process a resource, permission verification is performed through the processing permission data table. Only after the verification is successful can the resource be processed. Here, the object can be a system component or a user.

[0115] In a specific embodiment, see Table 1, which is an example of a processing permission data table. The object is a component, and the candidate processing operations include four types of operations: add, delete, query and modify. 1 and 0 are permission indication information, where 1 represents having operation rights and 0 represents not having operation rights.

[0116] Table 1

[0117] Permission 1 Test1 host 1 1 1 1 Permission 2 Test2 host 0 0 1 0 Permission 3 Test3 pod 1 0 1 0

[0118] In one specific embodiment, during resource processing, the server can also record the change history of each resource to achieve traceability of resource changes. Specifically, resource changes can be recorded at the granularity of adding / deleting / modifying specific resources, while also recording data details before and after the change, supporting scenarios requiring data recovery. The changed data can be recorded in the audit log data table. See Table 2 for an example of an audit log data table.

[0119] Table 2

[0120]

[0121] In the above embodiments, permission verification can be performed by processing the permission data table before processing the resources, which can prevent the resources from being maliciously processed and ensure the security of the resources.

[0122] In one embodiment, such as Figure 10 As shown, this application also provides another resource processing method, which is applied to... Figure 1 Taking the server in the example, the following steps are included:

[0123] Step 1002: Obtain the model identifier, model description information, and field configuration information corresponding to the target resource type.

[0124] Step 1004: Write the new data record, consisting of the model description information and the model identifier, into the resource model data table.

[0125] Step 1006: Write the new data record, consisting of the field configuration information and the model identifier, into the field configuration information data table.

[0126] Step 1008: The instance object determined by the data record corresponding to the model identifier in the resource model data table and the field configuration information data table is used as the resource model corresponding to the target resource type.

[0127] The target resource model is used to respond to resource processing requests for resources of the target resource type.

[0128] It should be noted that the specific explanation and description of this embodiment can be found in the above embodiments, and will not be repeated here.

[0129] The above resource processing method, by abstracting resource types into resource models and uniformly storing the model description information and model identifiers corresponding to each resource type in the resource model data table, and storing the field configuration information, including the validation information of each data field corresponding to the resource type, in the field configuration information, can realize unified management of resources through the resource model data table and field configuration information, thereby improving resource processing efficiency.

[0130] In one embodiment, the resource processing method further includes: receiving a field extension request for a resource model, parsing the field extension request to obtain field configuration information corresponding to the target data field to be extended; writing the new data record composed of the model identifier and the field configuration information corresponding to the target data field into the field configuration information data table to update the resource model corresponding to the target resource type; and storing the resource data corresponding to the target data field in key-value pair format.

[0131] Specifically, when the server receives a field expansion request for the resource model, it can respond to the request to expand the fields of the resource model. For these target data fields of expansion, the corresponding resource data can be stored in the form of key-value pairs.

[0132] In a specific embodiment, if the target resource type is a preset resource type, i.e., a resource type pre-set during development, and the resources corresponding to this resource type are stored in a preset data table corresponding to this resource type, and this preset data table includes extended field columns and multiple preset field columns, then the resource data for the target data field requested by the user for expansion can be stored in the extended field column in the form of key-value pairs. Because of the extended field column, all resource data for the expanded target data field can be stored in the extended field column without requiring customized changes to the original preset data table structure, thereby meeting the user's need for dynamically expanding the resource model.

[0133] In one embodiment, the resource processing method further includes: receiving a resource model creation request for a new resource type; parsing the resource model creation request to obtain the model identifier, model description information, and field configuration information corresponding to the new resource type; taking the new resource type as the target resource type and proceeding to the step of obtaining the model identifier, model description information, and field configuration information corresponding to the target resource type to obtain the resource model corresponding to the new resource type; and storing the resource data corresponding to the new resource type in key-value pair format.

[0134] Specifically, when a user triggers a resource model creation request for a new resource type via a terminal, the server can parse the request to obtain the model identifier, model description information, and field configuration information corresponding to the new resource type. The server then uses the new resource type as the target resource type and executes steps 1002 to 1008 to obtain the resource model corresponding to the new resource type. For the resource data corresponding to the new resource type, this application pre-sets an extended data table, where the resource data can be stored as key-value pairs. Because of the extended data table, all resource data for new resource types can be stored there, eliminating the need for custom data table development for each new resource type, thus meeting the user's need for dynamically expanding resource models.

[0135] In a specific embodiment, the resource processing method of this application can be encapsulated and implemented as a resource management engine. Existing data management engines manage hardware resources such as hosts, disks, and networks, but only collect and store data in a database, which has the following problems: 1. Long development process and inability to dynamically expand: Each resource is independently developed, stored, interfaced, managed, and maintained. When customized changes to resource attributes are needed, or when adding new resources, only customized development is possible. 2. Limited classification methods: Resources are usually classified according to field attributes. 3. Inconvenient resource usage: The fields of each resource are inconsistent, and users need to independently develop adaptations for use.

[0136] The resource management engine in this application can solve the above problems to some extent. For example... Figure 11 The diagram shown is the overall architecture of the resource management engine in this embodiment. (Reference) Figure 11 This application's resource management engine is based on a resource model, managing physical assets and virtual resources of various private cloud platforms. It supports dynamic expansion and categorized management, security management, and automated service provision. It also enables extended data management plugins such as full-text search, data synchronization platforms, and data verification. Regarding storage, in this embodiment, resource model-related data is persistently stored in MySQL, and cached data is stored in Redis to improve query performance. Furthermore, this embodiment provides a standardized HTTP protocol interface and a convenient SDK (Software Development Kit).

[0137] See Figure 11This application manages each resource by abstracting it into a "model." Different models have different data fields (configuration attributes), and both the "model" and its data fields can be customized to achieve "dynamic models" and "dynamic fields." Information related to the resource model is stored in the resource model data table, and information related to the data fields is stored in the field configuration information data table. Simultaneously, resource models can be "grouped," and data fields can be grouped for management. The model grouping information corresponding to the resource model can be stored in the model grouping data table, and the model grouping information corresponding to the data field can be stored in the field grouping data table. Based on this, this embodiment provides a unified HTTP protocol management interface (i.e., the resource management interface mentioned above), through which various resources can be processed. Specifically:

[0138] 1. This embodiment can create a resource model through the following steps: obtain the model identifier, model description information, and field configuration information corresponding to the target resource type; write the new data record composed of the model description information and the model identifier into the resource model data table; write the new data record composed of the field configuration information and the model identifier into the field configuration information data table; and use the instance object determined by the data record corresponding to the model identifier in the resource model data table and the field configuration information data table as the resource model corresponding to the target resource type.

[0139] 2. This embodiment implements "dynamic fields" through the following steps: receiving a field expansion request for the resource model, parsing the field expansion request to obtain the field configuration information corresponding to the target data field to be expanded, writing the new data record composed of the model identifier and the field configuration information corresponding to the target data field into the field configuration information data table to update the resource model corresponding to the target resource type; and storing the resource data corresponding to the target data field in the form of key-value pairs.

[0140] 3. This embodiment implements the "dynamic model" through the following steps: receiving a resource model creation request for a new resource type, parsing the resource model creation request to obtain the model identifier, model description information, and field configuration information corresponding to the new resource type; taking the new resource type as the target resource type, proceeding to the step of obtaining the model identifier, model description information, and field configuration information corresponding to the target resource type to obtain the resource model corresponding to the new resource type; and storing the resource data corresponding to the new resource type in key-value pair format.

[0141] 4. This embodiment implements the processing of various resources through the following steps: When a resource processing request generated by calling the resource processing interface is received, the resource processing request is parsed to obtain the target interface parameters. The target interface parameters include the model description information of the resource model corresponding to the resource to be processed and the processing information for the resource to be processed; the model identifier of the resource model is determined from the resource model data table according to the model description information; the field configuration information associated with the model identifier is determined from the field configuration information data table; the processing information is verified based on the target verification information corresponding to the target processing field in the processing information in the field configuration information, and after the verification is passed, the processing operation contained in the processing information is executed on the resource data table storing the resource to be processed.

[0142] See also Figure 11 In this example, resource classification based on a resource model can be achieved with dynamic business tree management as the core and tag management as a supplement. It supports dynamic resource classification to address various resource classification needs. Specifically, resource classification based on the business tree can be achieved by associating resources with any node in the business tree: when a resource association request for any node in the target business tree is received, parsing the request yields the resource identifier of the resource to be associated, the model identifier corresponding to the resource type of the resource to be associated, and the node identifier of the target node to be associated. In response to the resource association request, the resource to be associated is associated with the target node in the target business tree, and a resource association record is generated based on the resource identifier of the resource to be associated, the model identifier corresponding to the resource type of the resource to be associated, and the node identifier of the target business tree. This resource association record is then written to the resource association data table. Among them, resource classification based on the business tree can be achieved by associating resources with tags: when a tag association request is received, the tag association request is parsed, including the resource representation information of the resource to be associated and the tag to be associated. In response to the tag association request, the resource representation information and the tag identifier of the tag to be associated are associated and stored in the tag association data table, so as to associate the resource represented by the resource representation information with the tag to be associated.

[0143] See also Figure 11 In this example, authentication and auditing can be implemented based on resources. Authentication controls each component's access to resources at the granularity of adding, deleting, querying, and modifying resource models, and persistently stores the permission policy in a processing permission data table. Auditing records resource changes at the granularity of adding, deleting, and modifying specific resources, while also recording data details before and after the changes. The specific authentication steps include: obtaining a preset processing permission data table; querying the processing permission information corresponding to the request sending object identifier from the processing permission data table; determining the target processing permission information corresponding to the resource to be processed from the queried processing permission information; and verifying the permissions of the processing operations contained in the processing information based on the permission indication information under each candidate processing operation in the target processing permission information.

[0144] Furthermore, this embodiment also leverages the `generate` function of the Go programming language to automatically generate standardized HTTP protocol SDK code blocks based on declarations. Simply declare the input and output parameters: `ActionName` (interface name), `XXXRequest` (input parameter), and `XXXResponse` (output parameter), and use `gogenerate` to execute the development tool `gen-yunapi-client`. This automatically generates the code function framework and writes it into the HTTP request and parsing modules, forming a complete SDK. This SDK can automatically send HTTP protocol request messages, receive response messages, and complete parsing. (Reference) Figure 12 , Figure 12 The code corresponding to 1202 is an example of input / output parameter declaration, which can be obtained by executing... Figure 12 The code corresponding to error 1204 can automatically generate an SDK. Furthermore, users can reference the generated SDK code block via the proto file "git.woa.com / tce-platform / sre / cmdb-core / proto / httpapi".

[0145] The resource management engine provided in this embodiment enables efficient dynamic configuration and storage of resource models, improving R&D efficiency and system scalability; it achieves dynamic classification management, supporting various complex operation and maintenance scenarios; it also ensures reliability and optimizes the standard service delivery process. It solves the problems of multiple resource types, dynamic resource models, complex resource classification logic, and data reliability in private cloud platforms.

[0146] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0147] Based on the same inventive concept, this application also provides a resource processing apparatus for implementing the resource processing method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more resource processing apparatus embodiments provided below can be found in the limitations of the resource processing method described above, and will not be repeated here.

[0148] In one embodiment, such as Figure 13 As shown, a resource processing apparatus 1300 is provided, comprising:

[0149] The request receiving module 1302 is used to receive resource processing requests generated by calling the resource processing interface, parse the resource processing request to obtain target interface parameters, the target interface parameters include model description information of the resource model corresponding to the resource to be processed and processing information for the resource to be processed, and the resource model is an instance object of the resource type to which the resource to be processed belongs;

[0150] The model identifier determination module 1304 is used to determine the model identifier of the resource model from the resource model data table based on the model description information. The resource model data table stores the model identifiers corresponding to different resource types. The resource model data table is associated with the field configuration information data table through the stored model identifiers.

[0151] The configuration information determination module 1306 is used to determine the field configuration information associated with the model identifier from the field configuration information data table. The field configuration information includes the verification information of each data field corresponding to the resource type.

[0152] The verification module 1308 is used to verify the processing information based on the target verification information corresponding to the target processing field in the processing information in the field configuration information, and after the verification is passed, to execute the processing operation contained in the processing information on the resource data table storing the resources to be processed.

[0153] The aforementioned resource processing device abstracts resource types into resource models and stores the model description information and model identifiers corresponding to each resource type in a unified resource model data table. It also stores field configuration information, including verification information for each data field corresponding to the resource type, in a field configuration information table. Furthermore, the resource model data table and the field configuration information data table are associated through the model identifier. Therefore, upon receiving a resource processing request generated by calling the resource processing interface, the device can parse the request to obtain the target interface parameters. Based on the model description information in the target interface parameters, it determines the model identifier of the resource model from the resource model data table and the field configuration information associated with that model identifier from the field configuration information data table. Based on the target verification information corresponding to the target processing field in the processing information, it verifies the processing information. After successful verification, it executes the processing operations contained in the processing information on the resource table storing the resources to be processed. This allows for the processing of various resource types through a unified resource processing interface. Only the model needs to be declared in the interface parameters, thus saving development and maintenance costs by requiring only the development and maintenance of this unified resource processing interface for various resource types.

[0154] In one embodiment, the apparatus further includes: a model creation step, which involves obtaining a target model identifier, target model description information, and target field configuration information corresponding to the target resource type; combining the target model description information and the target model identifier into a new data record and writing it into a resource model data table; combining the target field configuration information and the target model identifier into a new data record and writing it into a field configuration information data table; and using the instance object determined by the data record corresponding to the target model identifier in the resource model data table and the field configuration information data table as the resource model corresponding to the target resource type.

[0155] In one embodiment, the model creation step is further used to obtain model grouping information corresponding to the target resource type, wherein the model grouping information describes the classification information of resources under the target resource type in a preset classification method; write the model grouping information as a new data record into the model grouping data table; and use the instance objects determined by the data records corresponding to the target model identifier in the resource model data table and the field configuration information data table as the resource models corresponding to the target resource type, including: using the instance objects determined by the data records corresponding to the target model identifier in the resource model data table, the field configuration information data table, and the model grouping data table as the resource models corresponding to the target resource type; wherein the model grouping data table is associated with the resource model data table through the model grouping identifier included in the model grouping information; the model grouping data table is used to provide grouping information for each resource model to support the grouping and display of resource models.

[0156] In one embodiment, the model creation step is further used to obtain the field grouping information of each of the multiple data fields included in the target field configuration information, wherein the field grouping information is used to describe the classification information of the data fields under a preset field classification method; to combine the field grouping information and the target model identifier into a new data record and write it into the field grouping data table; and to use the instance object determined by the data record corresponding to the target model identifier in the resource model data table, the field configuration information data table, and the model grouping data table as the resource model corresponding to the target resource type, including: using the instance object determined by the data record corresponding to the target model identifier in the resource model data table, the field configuration information data table, the model grouping data table, and the field grouping data table as the resource model corresponding to the target resource type; wherein, the field grouping data table is associated with the field configuration information data table through the field grouping identifier included in the field grouping information; the field grouping data table is used to provide the grouping information of the data fields corresponding to each resource model to support the grouped display of the data fields corresponding to the resource models.

[0157] In one embodiment, the resource data table includes an extended field column and multiple preset field columns; the verification module is further configured to, when the target processing field includes a preset field, determine the target field column containing the preset field from the multiple preset field columns and perform the processing operation contained in the processing information on the target field column; when the target processing field includes an extended field, determine the target key-value pair including the extended field from the extended field column and perform the processing operation contained in the processing information on the target key-value pair.

[0158] In one embodiment, the resource data table belongs to a data table set, which includes an extended data table and multiple preset data tables, each preset data table corresponding to a model identifier. The verification module is further configured to obtain data table indication information corresponding to the model identifier in the resource model data table; when the data table indication information indicates that the resource to be processed is stored in a preset data table, the corresponding target data table is determined from the multiple preset data tables based on the model identifier corresponding to the resource to be processed, and the processing operation contained in the processing information is performed on the target data table; when the data table indication information indicates that the resource to be processed is stored in an extended data table, the corresponding target data including multiple key-value pairs is determined from the extended data table based on the model identifier corresponding to the resource to be processed, and the processing operation contained in the processing information is performed on the target data.

[0159] In one embodiment, the apparatus further includes: a business tree association module, configured to receive a resource association request, wherein the resource association request carries a resource identifier of the resource to be associated, a model identifier corresponding to the resource type to which the resource to be associated belongs, and a node identifier of the target node to be associated; the target node is any node in the target business tree; in response to the resource association request, the module associates the resource to be associated with the target node in the target business tree, generates a resource association record based on the resource identifier of the resource to be associated, the model identifier corresponding to the resource type to which the resource to be associated belongs, and the node identifier of the target business tree, and writes the resource association record into a resource association data table; the resource association data table is used to support querying the resources associated with each node in the target business tree.

[0160] In one embodiment, the target business tree is stored in a business tree data table. Each row in the business tree data table stores the node data corresponding to a node in the target business tree. The node data includes node representation information, node hierarchy information, and associated node representation information. The associated node representation information includes parent node representation information.

[0161] In one embodiment, the node data further includes association model information and node type information. The association model information is used to restrict the resource models that the node corresponding to the node data can be associated with, and the node type information is used to restrict the types of resources that the node corresponding to the node data can be associated with. The business tree association module is also used to verify the resource to be associated based on the association model information and node type information. If the verification passes, in response to the resource association request, the resource to be associated is associated with the target node on the target business tree.

[0162] In one embodiment, the above apparatus further includes: a node creation module, configured to receive a node creation request for a target business tree, the node creation request including node representation information, node hierarchy information, and associated node representation information of the node to be created; determine the corresponding position of the node to be created in the target business tree based on the node hierarchy information and associated node representation information of the node to be created, and create the node at the corresponding position; after the node creation is completed, write its corresponding node representation information, node hierarchy information, and associated node representation information as node data into a business tree data table.

[0163] In one embodiment, the above apparatus further includes: a tag association module, configured to receive a tag association request, the tag association request including resource representation information of the resource to be associated and a tag to be associated; in response to the tag association request, to associate and store the resource representation information and the tag identifier of the tag to be associated in a tag association data table, so as to associate the resource represented by the resource representation information with the tag to be associated; the tag association data table is used to support querying resources based on tags.

[0164] In one embodiment, the resource processing request further carries a request sending object identifier, and the apparatus further includes: an authentication module, configured to obtain a preset processing permission data table, the processing permission data table storing at least one processing permission information corresponding to multiple object identifiers, the processing permission information including model description information of resource models with processing permissions and permission indication information under each candidate processing operation; querying the processing permission information corresponding to the request sending object identifier from the processing permission data table, determining the target processing permission information corresponding to the resource to be processed from the queried processing permission information; performing permission verification on the processing operations contained in the processing information based on the permission indication information under each candidate processing operation in the target processing permission information; and a model identifier determination module, further configured to determine the model identifier of the resource model from the resource model data table according to the model description information if the permission verification passes.

[0165] In one embodiment, such as Figure 14 As shown, a resource processing apparatus 1400 is provided, comprising:

[0166] Information acquisition module 1402 is used to acquire the model identifier, model description information and field configuration information corresponding to the target resource type;

[0167] The first data writing module 1404 is used to write new data records, consisting of model description information and model identifier, into the resource model data table.

[0168] The second data writing module 1406 is used to write the new data record, which consists of field configuration information and model identifier, into the field configuration information data table.

[0169] The resource model determination module 1408 is used to determine the instance object determined by the data record corresponding to the model identifier in the resource model data table and the field configuration information data table, as the resource model corresponding to the target resource type; wherein, the resource model is used to respond to resource processing requests for resources under the target resource type.

[0170] The aforementioned resource processing device, by abstracting resource types into resource models and uniformly storing the model description information and model identifiers corresponding to each resource type in the resource model data table, and storing the field configuration information, including the verification information of each data field corresponding to the resource type, in the field configuration information, can realize unified management of resources through the resource model data table and field configuration information, thereby improving resource processing efficiency.

[0171] In one embodiment, the above apparatus further includes: a field expansion module, configured to receive a field expansion request for a resource model, parse the field expansion request to obtain field configuration information corresponding to the target data field to be expanded; write the new data record composed of the model identifier and the field configuration information corresponding to the target data field into the field configuration information data table to update the resource model corresponding to the target resource type; and store the resource data corresponding to the target data field in key-value pair format.

[0172] In one embodiment, the above apparatus is further configured to: receive a resource model creation request for a new resource type, parse the resource model creation request to obtain the model identifier, model description information and field configuration information corresponding to the new resource type; take the new resource type as the target resource type and enter the information acquisition module to execute, so as to obtain the resource model corresponding to the new resource type; and store the resource data corresponding to the new resource type in the form of key-value pairs.

[0173] Each module in the aforementioned resource processing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0174] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 15 As shown, the computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores resource data for the cloud platform. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements the resource processing method in any of the above embodiments.

[0175] Those skilled in the art will understand that Figure 15The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0176] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the resource processing method in any of the above embodiments.

[0177] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the resource processing method in any of the above embodiments.

[0178] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps of the resource processing method in any of the above embodiments.

[0179] 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, data stored, data displayed, 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 the relevant data shall comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0180] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile 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 many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

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

[0182] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A resource processing method, characterized in that, The method includes: Receive a resource processing request generated by calling the resource processing interface, parse the resource processing request to obtain target interface parameters, the target interface parameters include model description information of the resource model corresponding to the resource to be processed and processing information for the resource to be processed, the resource model is an instance object of the resource type to which the resource to be processed belongs; The model identifier of the resource model is determined from the resource model data table based on the model description information. The resource model data table stores model identifiers corresponding to different resource types. The resource model data table is associated with the field configuration information data table through the stored model identifiers. The field configuration information associated with the model identifier is determined from the field configuration information data table. The field configuration information includes the verification information of each data field corresponding to the resource type. Based on the target verification information corresponding to the target processing field in the processing information in the field configuration information, the processing information is verified, and after the verification is passed, the processing operation contained in the processing information is executed on the resource data table storing the resource to be processed. The method further includes a resource model creation step, which includes: obtaining a target model identifier, target model description information, and target field configuration information corresponding to the target resource type. The target field configuration information is obtained by setting multiple field description items declared in the field configuration information data table, including the field description item corresponding to the verification information; adding a new data record by combining the target model description information and the target model identifier, and writing it into the resource model data table; adding a new data record by combining the target field configuration information and the target model identifier, and writing it into the field configuration information data table; and using the instance object determined by the data record corresponding to the target model identifier in the resource model data table and the field configuration information data table as the resource model corresponding to the target resource type.

2. The method according to claim 1, characterized in that, The creation steps also include: Obtain the model grouping information corresponding to the target resource type, wherein the model grouping information is used to describe the classification information of the resources under the target resource type under a preset classification method; Write the model grouping information as a new data record into the model grouping data table; The step of using the instance object determined by the data record corresponding to the target model identifier in the resource model data table and the field configuration information data table as the resource model corresponding to the target resource type includes: The instance object determined by the data record corresponding to the target model identifier in the resource model data table, the field configuration information data table, and the model grouping data table shall be used as the resource model corresponding to the target resource type. The model grouping data table is associated with the resource model data table through the model grouping identifier included in the model grouping information; the model grouping data table is used to provide grouping information for each resource model to support the grouping and display of resource models.

3. The method according to claim 2, characterized in that, The creation steps also include: Obtain the field grouping information of each of the multiple data fields included in the target field configuration information. The field grouping information is used to describe the classification information of the data fields under the preset field classification method. The field grouping information and the target model identifier are combined to form a new data record, which is then written into the field grouping data table. The step of using the instance object determined by the data record corresponding to the target model identifier in the resource model data table, the field configuration information data table, and the model grouping data table as the resource model corresponding to the target resource type includes: The instance object determined by the data record corresponding to the target model identifier in the resource model data table, the field configuration information data table, the model grouping data table, and the field grouping data table shall be used as the resource model corresponding to the target resource type. The field grouping data table is associated with the field configuration information data table through the field grouping identifier included in the field grouping information; the field grouping data table is used to provide grouping information for the data fields corresponding to each resource model, so as to support the grouping and display of the data fields corresponding to the resource models.

4. The method according to claim 1, characterized in that, The resource data table includes extended field columns and multiple preset field columns; the processing operation included in the processing information is performed on the resource data table storing the resources to be processed, including: When the target processing field includes a preset field, the target field column containing the preset field is determined from the plurality of preset field columns, and the processing operation contained in the processing information is performed on the target field column; When the target processing field includes an extended field, the target key-value pair including the extended field is determined from the extended field column, and the processing operation contained in the processing information is performed on the target key-value pair.

5. The method according to claim 1, characterized in that, The resource data table belongs to a data table set, which includes an extended data table and multiple preset data tables, each of which corresponds to a model identifier; the processing operation included in the processing information is performed on the resource table storing the resources to be processed, including: Obtain the data table indication information corresponding to the model identifier from the resource model data table; When the data table indication information indicates that the resource to be processed is stored in a preset data table, the corresponding target data table is determined from the multiple preset data tables based on the model identifier corresponding to the resource to be processed, and the processing operation contained in the processing information is performed on the target data table; When the data table indication information indicates that the resource to be processed is stored in the extended data table, the corresponding target data including multiple key-value pairs is determined from the extended data table based on the model identifier corresponding to the resource to be processed, and the processing operation contained in the processing information is performed on the target data.

6. The method according to claim 1, characterized in that, The method further includes: Receive a resource association request, the resource association request carrying the resource identifier of the resource to be associated, the model identifier corresponding to the resource type to which the resource to be associated belongs, and the node identifier of the target node to be associated; the target node is any node in the target business tree; In response to the resource association request, the resource to be associated is associated with the target node on the target business tree, and a resource association record is generated based on the resource identifier of the resource to be associated, the model identifier corresponding to the resource type to which the resource to be associated belongs, and the target business tree node identifier. The resource association record is then written into the resource association data table. The resource association data table is used to support querying the resources associated with each node in the target business tree.

7. The method according to claim 6, characterized in that, The target business tree is stored in a business tree data table. Each row in the business tree data table stores the node data corresponding to a node in the target business tree. The node data includes node representation information, node hierarchy information, and associated node representation information. The associated node representation information includes parent node representation information.

8. The method according to claim 7, characterized in that, The node data also includes association model information and node type information. The association model information is used to limit the resource models that the node corresponding to the node data can be associated with, and the node type information is used to limit the types of resources that the node corresponding to the node data can be associated with. The step of responding to the resource association request by associating the resource to be associated with the target node on the target service tree includes: The resource to be associated is verified based on the association model information and node type information. If the verification passes, the resource to be associated is associated with the target node on the target business tree in response to the resource association request.

9. The method according to claim 7, characterized in that, The method further includes: Receive a node creation request for the target business tree, the node creation request including node representation information, node hierarchy information and associated node representation information of the node to be created; Based on the node hierarchy information and associated node representation information of the node to be created, the corresponding position of the node to be created in the target business tree is determined, and the node is created at the corresponding position. After a node is created, its corresponding node representation information, node hierarchy information, and associated node representation information are written as node data into the business tree data table.

10. The method according to any one of claims 1 to 9, characterized in that, The method further includes: Receive a tag association request, wherein the tag association request includes resource representation information of the resource to be associated and the tag to be associated; In response to the tag association request, the resource representation information and the tag identifier of the tag to be associated are associated and stored in the tag association data table to associate the resource represented by the resource representation information with the tag to be associated. The tag association data table is used to support querying resources based on tags.

11. The method according to any one of claims 1 to 9, characterized in that, The resource processing request also carries a request sending object identifier. Before determining the model identifier of the resource model from the resource model data table based on the model description information, the method further includes: Obtain a preset processing permission data table. The processing permission data table stores at least one processing permission information corresponding to multiple object identifiers. The processing permission information includes model description information of resource models with processing permissions and permission indication information under each candidate processing operation. From the processing permission data table, the processing permission information corresponding to the request sending object identifier is obtained, and from the obtained processing permission information, the target processing permission information corresponding to the resource to be processed is determined; Based on the permission indication information under each candidate processing operation in the target processing permission information, the permission of the processing operation contained in the processing information is verified. The step of determining the model identifier of the resource model from the resource model data table based on the model description information includes: If the permission verification passes, the model identifier of the resource model is determined from the resource model data table based on the model description information.

12. A resource processing method, characterized in that, The method includes: Obtain the model identifier, model description information, and field configuration information corresponding to the target resource type; the field configuration information is obtained by setting multiple field description items declared in the field configuration information data table, including the field description item corresponding to the verification information; Write the new data record, consisting of the model description information and the model identifier, into the resource model data table; Write the new data record, consisting of the field configuration information and the model identifier, into the field configuration information data table; The instance object determined by the data record corresponding to the model identifier in the resource model data table and the field configuration information data table shall be used as the resource model corresponding to the target resource type. The resource model is used to respond to resource processing requests for resources under the target resource type. The resource data corresponding to the target resource type is stored in the resource data table corresponding to the target resource type. The resource data table includes an extended field column, which is used to store the resource data of the target data field requested by the user in the form of key-value pairs. Alternatively, the resource data table may belong to a data table collection, which includes an extended data table used to store resource data corresponding to newly added resource types in key-value pairs.

13. The method according to claim 12, characterized in that, The method further includes: Receive a field expansion request for the resource model, and parse the field expansion request to obtain the field configuration information corresponding to the target data field to be expanded; The new data record, consisting of the model identifier and the field configuration information corresponding to the target data field, is written into the field configuration information data table to update the resource model corresponding to the target resource type. The resource data corresponding to the target data field is stored in key-value pair format.

14. The method according to claim 12, characterized in that, The method further includes: Receive a resource model creation request for a new resource type, parse the resource model creation request to obtain the model identifier, model description information and field configuration information corresponding to the new resource type; The newly added resource type is used as the target resource type, and the step of obtaining the model identifier, model description information and field configuration information corresponding to the target resource type is executed to obtain the resource model corresponding to the newly added resource type. The resource data corresponding to the newly added resource type is stored in key-value pair format.

15. A resource processing device, characterized in that, The device includes: The request receiving module is used to receive resource processing requests generated by calling the resource processing interface, parse the resource processing request to obtain target interface parameters, the target interface parameters include model description information of the resource model corresponding to the resource to be processed and processing information for the resource to be processed, the resource model is an instance object of the resource type to which the resource to be processed belongs; The model identifier determination module is used to determine the model identifier of the resource model from the resource model data table based on the model description information. The resource model data table stores model identifiers corresponding to different resource types, and the resource model data table is associated with the field configuration information data table through the stored model identifiers. The configuration information determination module is used to determine the field configuration information associated with the model identifier from the field configuration information data table. The field configuration information includes the verification information of each data field corresponding to the resource type. The verification module is used to verify the processing information based on the target verification information corresponding to the target processing field in the processing information in the field configuration information, and after the verification is passed, to execute the processing operation contained in the processing information on the resource data table storing the resource to be processed. The model creation module is used to obtain the target model identifier, target model description information, and target field configuration information corresponding to the target resource type. The target field configuration information is obtained by setting multiple field description items declared in the field configuration information data table, including the field description item corresponding to the verification information. The module then adds a new data record by combining the target model description information and the target model identifier, and writes it into the resource model data table. Finally, it uses the instance object determined by the data record corresponding to the target model identifier in both the resource model data table and the field configuration information data table as the resource model corresponding to the target resource type.

16. The apparatus according to claim 15, characterized in that, The model creation module is also used to: obtain model grouping information corresponding to the target resource type, wherein the model grouping information is used to describe the classification information of the resources under the target resource type under a preset classification method; Write the model grouping information as a new data record into the model grouping data table; The instance object determined by the data record corresponding to the target model identifier in the resource model data table, the field configuration information data table, and the model grouping data table is used as the resource model corresponding to the target resource type; wherein, the model grouping data table is associated with the resource model data table through the model grouping identifier included in the model grouping information; the model grouping data table is used to provide grouping information for each resource model to support the grouping and display of resource models.

17. The apparatus according to claim 16, characterized in that, The model creation module is also used to: obtain the field grouping information of each of the multiple data fields included in the target field configuration information, wherein the field grouping information is used to describe the classification information of the data fields under the preset field classification method; and combine the field grouping information and the target model identifier to form a new data record and write it into the field grouping data table. The instance object determined by the data record corresponding to the target model identifier in the resource model data table, the field configuration information data table, the model grouping data table, and the field grouping data table is used as the resource model corresponding to the target resource type; wherein, the field grouping data table is associated with the field configuration information data table through the field grouping identifier included in the field grouping information; The field grouping data table is used to provide grouping information for the data fields corresponding to each resource model, so as to support the grouping and display of the data fields corresponding to the resource models.

18. The apparatus according to claim 15, characterized in that, The resource data table includes extended field columns and multiple preset field columns; the verification module is further configured to: when the target processing field includes a preset field, determine the target field column containing the preset field from the multiple preset field columns, and perform the processing operation contained in the processing information on the target field column; when the target processing field includes an extended field, determine the target key-value pair including the extended field from the extended field column, and perform the processing operation contained in the processing information on the target key-value pair.

19. The apparatus according to claim 15, characterized in that, The resource data table belongs to a data table set, which includes an extended data table and multiple preset data tables. Each preset data table corresponds to a model identifier. The verification module is further configured to: obtain data table indication information corresponding to the model identifier in the resource model data table; when the data table indication information indicates that the resource to be processed is stored in a preset data table; determine the corresponding target data table from the multiple preset data tables based on the model identifier corresponding to the resource to be processed; and perform the processing operation contained in the processing information on the target data table. When the data table indication information indicates that the resource to be processed is stored in the extended data table, the corresponding target data including multiple key-value pairs is determined from the extended data table based on the model identifier corresponding to the resource to be processed, and the processing operation contained in the processing information is performed on the target data.

20. The apparatus according to claim 15, characterized in that, The device further includes: a business tree association module, configured to receive a resource association request, the resource association request carrying a resource identifier of the resource to be associated, a model identifier corresponding to the resource type to which the resource to be associated belongs, and a node identifier of the target node to be associated; the target node is any node in the target business tree; in response to the resource association request, the module associates the resource to be associated with the target node in the target business tree, generates a resource association record based on the resource identifier of the resource to be associated, the model identifier corresponding to the resource type to which the resource to be associated belongs, and the node identifier of the target business tree, and writes the resource association record into a resource association data table; the resource association data table is used to support querying the resources associated with each node in the target business tree.

21. The apparatus according to claim 20, characterized in that, The target business tree is stored in a business tree data table. Each row in the business tree data table stores the node data corresponding to a node in the target business tree. The node data includes node representation information, node hierarchy information, and associated node representation information. The associated node representation information includes parent node representation information.

22. The apparatus according to claim 21, characterized in that, The node data also includes association model information and node type information. The association model information is used to limit the resource models that the node corresponding to the node data can be associated with, and the node type information is used to limit the types of resources that the node corresponding to the node data can be associated with. The business tree association module is also used to verify the resource to be associated based on the association model information and node type information. If the verification is successful, in response to the resource association request, the resource to be associated is associated with the target node on the target business tree.

23. The apparatus according to claim 21, characterized in that, The device further includes a node creation module, configured to: receive a node creation request for the target business tree, the node creation request including node representation information, node hierarchy information, and associated node representation information of the node to be created; determine the corresponding position of the node to be created in the target business tree based on the node hierarchy information and associated node representation information of the node to be created, and create the node at the corresponding position; after the node creation is completed, write its corresponding node representation information, node hierarchy information, and associated node representation information as node data into the business tree data table.

24. The apparatus according to any one of claims 15 to 23, characterized in that, The device further includes a tag association module, configured to: receive a tag association request, the tag association request including resource representation information of the resource to be associated and a tag to be associated; in response to the tag association request, associate and store the resource representation information and the tag identifier of the tag to be associated in a tag association data table, so as to associate the resource represented by the resource representation information with the tag to be associated; the tag association data table is used to support querying resources based on tags.

25. The apparatus according to any one of claims 15 to 23, characterized in that, The resource processing request also carries a request sending object identifier. The device further includes: an authentication module, configured to: obtain a preset processing permission data table, the processing permission data table storing at least one processing permission information corresponding to multiple object identifiers, the processing permission information including model description information of resource models with processing permissions and permission indication information under each candidate processing operation; query the processing permission information corresponding to the request sending object identifier from the processing permission data table, and determine the target processing permission information corresponding to the resource to be processed from the queried processing permission information; perform permission verification on the processing operations contained in the processing information based on the permission indication information under each candidate processing operation in the target processing permission information; and a model identifier determination module, configured to determine the model identifier of the resource model from the resource model data table according to the model description information if the permission verification passes.

26. A resource processing device, characterized in that, The device includes: The information acquisition module is used to acquire the model identifier, model description information, and field configuration information corresponding to the target resource type; the field configuration information is obtained by setting multiple field description items declared in the field configuration information data table, and the multiple field description items include the field description item corresponding to the verification information; The first data writing module is used to write the new data record, consisting of the model description information and the model identifier, into the resource model data table. The second data writing module is used to write the new data record, consisting of the field configuration information and the model identifier, into the field configuration information data table. The resource model determination module is used to determine the instance object corresponding to the model identifier in the resource model data table and the field configuration information data table as the resource model corresponding to the target resource type; wherein, the resource model is used to respond to resource processing requests for resources under the target resource type, the resource data corresponding to the target resource type is stored in the resource data table corresponding to the target resource type, and the resource data table includes an extended field column, which is used to store the resource data of the target data field requested by the user in the form of key-value pairs; Alternatively, the resource data table may belong to a data table collection, which includes an extended data table used to store resource data corresponding to newly added resource types in key-value pairs.

27. The apparatus according to claim 26, characterized in that, The device further includes a field expansion module, configured to: receive a field expansion request for a resource model; parse the field expansion request to obtain field configuration information corresponding to the target data field to be expanded; write a new data record composed of the model identifier and the field configuration information corresponding to the target data field into the field configuration information data table to update the resource model corresponding to the target resource type; and store the resource data corresponding to the target data field in key-value pair format.

28. The apparatus according to claim 26, characterized in that, The device is further configured to: receive a resource model creation request for a new resource type; parse the resource model creation request to obtain the model identifier, model description information, and field configuration information corresponding to the new resource type; take the new resource type as the target resource type and proceed to the step of obtaining the model identifier, model description information, and field configuration information corresponding to the target resource type to obtain the resource model corresponding to the new resource type; and store the resource data corresponding to the new resource type in key-value pair format.

29. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 11 or 12 to 14.

30. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 11 or 12 to 14.

31. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 11 or 12 to 14.

Citation Information

Patent Citations

  • Configuration-driven lightweight hybrid infrastructure platform and data processing method

    CN112181648A

  • Service resource management method based on resource type metadata and storage medium

    CN114548616A