Data element resource consumption assessment method, electronic device, and storage medium
By traversing the lineage diagram of data elements to determine the upstream data elements and perform evaluation, the problem of inaccurate resource consumption evaluation of data elements in the existing technology is solved, and higher evaluation accuracy is achieved.
Patent Information
- Application Number
- CN202410558060.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-07
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2044-05-07
AI Technical Summary
The existing data element resource consumption assessment model is difficult to accurately consider the characteristics and needs of the data element market, resulting in inaccurate resource consumption assessment results.
By obtaining the data elements to be processed, traversing their corresponding data lineage graph, determining the upstream data elements associated with them, and conducting resource consumption assessment based on the upstream data elements, the total resource consumption of the data elements to be processed is obtained, thereby improving the accuracy of the assessment.
By evaluating resource consumption from the perspective of the entire production and operation of data elements, the accuracy of the evaluation is improved, more factors are considered, and a higher accuracy of resource consumption evaluation is obtained.
Smart Images

Figure CN118134530B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of cloud computing, and more specifically, to a method for evaluating resource consumption of data elements, an electronic device, and a storage medium. Background Art
[0002] At present, with the continuous development of the data factor market, the circulation and transaction of data assets has become an important field. Data factor transactions require accurate evaluation and pricing of data assets. Currently, data factors are evaluated through data asset evaluation models, but the existing models are difficult to fully consider the characteristics and needs of the data factor market, resulting in inaccurate evaluation results of resource consumption.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] The embodiments of the present application provide a method for evaluating resource consumption of data elements, an electronic device, and a storage medium, so as to at least solve the technical problem of low accuracy in evaluating resource consumption of data elements in related technologies.
[0005] According to one aspect of an embodiment of the present application, a method for assessing resource consumption of data elements is provided, including: obtaining a data element to be processed; traversing a data lineage graph corresponding to the data element to be processed, and determining an upstream data element associated with the data element to be processed, wherein the data lineage graph is used to characterize the association relationship between multiple data elements in a production chain to which the data element to be processed belongs, and the upstream data element is used to characterize the data source for producing the data element to be processed; performing resource consumption assessment on the data element to be processed based on the upstream data elements, and obtaining the total resource consumption of the data element to be processed, wherein the total resource consumption is used to characterize the amount of resources consumed to produce and / or maintain the data element to be processed.
[0006] According to another aspect of an embodiment of the present application, a method for evaluating resource consumption of data elements is also provided, including: obtaining cloud data elements of a cloud server; traversing a data lineage graph corresponding to the cloud data elements, and determining upstream data elements associated with the cloud data elements, wherein the data lineage graph is used to characterize the association relationship between multiple data elements in a production chain to which the cloud data elements belong, and the upstream data elements are used to characterize the data source of the production cloud data elements; performing resource consumption evaluation on the cloud data elements based on the upstream data elements to obtain the total resource consumption of the cloud data elements, wherein the total resource consumption is used to characterize the amount of resources consumed to produce and / or maintain the cloud data elements.
[0007] According to another aspect of an embodiment of the present application, a device for evaluating resource consumption of data elements is also provided, including: an acquisition module, used to acquire data elements to be processed; a traversal module, used to traverse the data lineage graph corresponding to the data elements to be processed, and determine the upstream data elements associated with the data elements to be processed, wherein the data lineage graph is used to characterize the association relationship between multiple data elements in the production chain to which the data elements to be processed belong, and the upstream data elements are used to characterize the data source for producing the data elements to be processed; an evaluation module, used to perform resource consumption evaluation on the data elements to be processed based on the upstream data elements, and obtain the total resource consumption of the data elements to be processed, wherein the total resource consumption is used to characterize the amount of resources consumed to produce and / or maintain the data elements to be processed.
[0008] According to another aspect of an embodiment of the present application, a device for evaluating resource consumption of data elements is also provided, including: an acquisition module for acquiring cloud data elements of a cloud server; a traversal module for traversing a data lineage graph corresponding to the cloud data elements, and determining upstream data elements associated with the cloud data elements, wherein the data lineage graph is used to characterize the association relationship between multiple data elements in a production chain to which the cloud data elements belong, and the upstream data elements are used to characterize the data source for producing the cloud data elements; an evaluation module for performing resource consumption evaluation on the cloud data elements based on the upstream data elements to obtain the total resource consumption of the cloud data elements, wherein the total resource consumption is used to characterize the amount of resources consumed in producing and / or maintaining the cloud data elements.
[0009] According to another aspect of the embodiments of the present application, a computer terminal is further provided, including: a memory storing an executable program; and a processor for running the program, wherein the method in each embodiment of the present application is executed when the program is running.
[0010] According to another aspect of an embodiment of the present application, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the methods in each embodiment of the present application.
[0011] According to another aspect of the embodiments of the present application, a computer program product is also provided, including a computer program, and when the computer program is executed by a processor, the method in each embodiment of the present application is implemented.
[0012] According to another aspect of an embodiment of the present application, a computer program product is also provided, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method in each embodiment of the present application is implemented.
[0013] According to another aspect of the embodiments of the present application, a computer program is also provided, and when the computer program is executed by a processor, the methods in the various embodiments of the present application are implemented.
[0014] In an embodiment of the present application, a data element to be processed is obtained; a data lineage graph corresponding to the data element to be processed is traversed to determine an upstream data element associated with the data element to be processed, wherein the data lineage graph is used to characterize the association relationship between multiple data elements in a production chain to which the data element to be processed belongs, and the upstream data element is used to characterize the data source for producing the data element to be processed; a resource consumption assessment is performed on the data element to be processed based on the upstream data elements to obtain the total resource consumption of the data element to be processed, wherein the total resource consumption is used to characterize the amount of resources consumed to produce and / or maintain the data element to be processed, thereby improving the accuracy of the resource consumption assessment of the data element to be processed. It is easy to notice that in the process of evaluating the data elements to be processed, the upstream data elements associated with the data elements to be processed can be determined by traversing the data lineage graph corresponding to the data elements to be processed, and the resource consumption of the production process of the data elements to be processed can be determined based on the upstream data elements. By combining the data elements to be processed and the upstream data elements, the total resource consumption of the data elements to be processed can be evaluated from the full-link perspective of the production and operation of the data elements to be processed, thereby improving the accuracy of the resource consumption evaluation of the data elements to be processed, so that the resource consumption evaluation of the data elements can take into account more factors, thereby obtaining the total resource consumption of the data elements to be processed with higher accuracy, thereby solving the technical problem of low accuracy of resource consumption evaluation of data elements in related technologies.
[0015] It is easy to notice that the above general description and the following detailed description are only for the purpose of exemplifying and explaining the present application, and do not constitute a limitation of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0017] Figure 1 It is a hardware structure block diagram of a computer terminal (or mobile device) for implementing a method for evaluating resource consumption of data elements according to an embodiment of the present application;
[0018] Figure 2 is a structural block diagram of a computing environment according to an embodiment of the present application;
[0019] Figure 3 is a structural block diagram of a service grid according to an embodiment of the present application;
[0020] Figure 4 is a flow chart of a method for evaluating resource consumption of data elements according to Embodiment 1 of the present application;
[0021] Figure 5 It is a schematic diagram of querying downstream dependencies of a physical table based on a data lineage graph according to an embodiment of the present application;
[0022] Figure 6 It is a schematic diagram of downstream dependencies of querying a data development node based on a data lineage graph according to an embodiment of the present application;
[0023] Figure 7 is a flow chart for calculating the production cost of a physical table according to an embodiment of the present application;
[0024] Figure 8 is a flow chart for calculating the production cost of an application program interface according to an embodiment of the present application;
[0025] Fig. 9 is a cost allocation schematic diagram according to an embodiment of the present application;
[0026] Fig.10 It is a data lineage graph model of a physical table according to an embodiment of the present application;
[0027] Fig.11 is a flow chart of a method for evaluating resource consumption of a data element according to Embodiment 2 of the present application;
[0028] Fig.12 is a schematic diagram of a data element resource consumption assessment device according to an embodiment of the present application;
[0029] Fig.13 is a schematic diagram of a data element resource consumption assessment device according to an embodiment of the present application;
[0030] Fig.14 It is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0031] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0032] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0033] First, some nouns or terms that appear in the description of the embodiments of the present application are subject to the following explanations:
[0034] Data elements refer to computer data and their derivative forms that are gathered, organized, and processed according to specific production needs. Original data sets, standardized data sets, various data products used in production, and systems, information, and knowledge generated based on data can be included in the scope of data element discussion.
[0035] A physical table refers to a table in a specific data source, which contains metadata and project data. The metadata includes information such as table name, field name, and data type.
[0036] Data development nodes refer to various nodes involved in the data development process, such as data cleaning, data synchronization, data integration, data modeling, etc.
[0037] Application Programming Interface (API) is a computing interface that enables different applications to communicate with each other.
[0038] Original cost, also called direct cost or operating cost, represents the cost required to maintain the operation of a data asset.
[0039] Production cost, also known as processing cost, refers to the cost required for the production process of a data asset from scratch.
[0040] At present, in the data asset management system, physical tables and application programming interfaces are two of the more important types of assets, and are also the main content carriers in the data circulation market. How to evaluate the cost of physical tables and application programming interfaces is called data element transactions, which is a technical problem that needs to be solved urgently.
[0041] This application provides a factor cost assessment method based on data lineage, which can evaluate the cost of data elements from two perspectives: the entire chain of data element production and online operation.
[0042] Example 1
[0043] According to an embodiment of the present application, a method for assessing resource consumption of data elements is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0044] The method embodiment provided in the first embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 1 is a hardware structure block diagram of a computer terminal (or mobile device) for implementing a method for evaluating resource consumption of data elements according to an embodiment of the present application. Figure 1 As shown, the computer terminal 10 (or mobile device) may include one or more (102a, 102b, ..., 102n are used to illustrate) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission module 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a Universal Serial Bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0045] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10 (or mobile device). As involved in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0046] The memory 104 can be used to store software programs and modules of application software, such as program instructions / data storage devices corresponding to the methods in the embodiments of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, implementing the methods in the above embodiments. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0047] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0048] The display may be, for example, a touch screen liquid crystal display (LCD), which may enable a user to interact with a user interface of the computer terminal 10 (or mobile device).
[0049] Figure 1 The hardware structure block diagram shown can be used not only as an exemplary block diagram of the above-mentioned computer terminal 10 (or mobile device), but also as an exemplary block diagram of the above-mentioned server. In an optional embodiment, Figure 2 The block diagram shows the use of the above Figure 1 The computer terminal 10 (or mobile device) shown is an embodiment of a computing node in the computing environment 201 . Figure 2 is a structural block diagram of a computing environment according to an embodiment of the present application, such as Figure 2As shown, computing environment 201 includes multiple computing nodes (such as servers) running on a distributed network (shown as 210-1, 210-2, ..., in the figure). The computing nodes all contain local processing and memory resources, and end users 202 can remotely run applications or store data in computing environment 201. Applications can be provided as multiple services 220-1, 220-2, 220-3 and 220-4 in computing environment 201, representing services "A", "D", "E" and "H" respectively.
[0050] The end user 202 can provide and access services through a web browser or other software application on the client, and in some embodiments, the end user 202's provision and / or request can be provided to the entry gateway 230. The entry gateway 230 can include a corresponding agent to handle the provision and / or request for the service (one or more services provided in the computing environment 201).
[0051] Services are provided or deployed based on various virtualization technologies supported by the computing environment 201. In some embodiments, services can be provided based on virtual machine (VM)-based virtualization, container-based virtualization, and / or similar methods. Virtual machine-based virtualization can be to simulate a real computer by initializing a virtual machine, and execute programs and applications without directly contacting any actual hardware resources. While the virtual machine virtualizes the machine, according to container-based virtualization, a container can be started to virtualize the entire operating system (OS) so that multiple workloads can run on a single operating system instance.
[0052] In an embodiment based on container virtualization, several containers of a service can be assembled into a Pod (e.g., a Kubernetes Pod). Figure 2 As shown, service 220-2 can be equipped with one or more Pods 240-1, 240-2, ..., 240-N (collectively referred to as Pods). Pods can include a proxy 245 and one or more containers 242-1, 242-2, ..., 242-M (collectively referred to as containers). One or more containers in a Pod process requests related to one or more corresponding functions of the service, and the proxy 245 generally controls network functions related to the service, such as routing, load balancing, etc. Other services can also be equipped with similar Pods.
[0053] During operation, executing a user request from end user 202 may require invoking one or more services in computing environment 201, and executing one or more functions of a service may require invoking one or more functions of another service. Figure 2As shown, service "A" 220-1 receives a user request from end user 202 from ingress gateway 230, service "A" 220-1 may call service "D" 220-2, and service "D" 220-2 may request service "E" 220-3 to perform one or more functions.
[0054] The computing environment described above can be a cloud computing environment, where the allocation of resources is managed by the cloud service provider, allowing the development of functions without considering the implementation, adjustment or expansion of servers. The computing environment allows developers to execute code in response to events without building or maintaining complex infrastructure. Services can be divided into a set of functions that can be automatically and independently scaled, rather than expanding a single hardware device to handle potential loads.
[0055] In another optional embodiment, Figure 3 The block diagram shows the use of the above Figure 1 The computer terminal 10 (or mobile device) is shown as an embodiment of the service grid. Figure 3 is a structural block diagram of a service grid according to an embodiment of the present application, such as Figure 3 As shown, the service grid 300 is mainly used to facilitate secure and reliable communication between multiple microservices. Microservices refer to decomposing an application into multiple smaller services or instances and distributing them on different clusters / machines.
[0056] like Figure 3 As shown, the microservice may include an application service instance A and an application service instance B, which form a functional application layer of the service grid 300. In one embodiment, the application service instance A runs in a machine / workload container group 314 (Pod) in the form of a container / process 308, and the application service instance B runs in a machine / workload container group 316 (Pod) in the form of a container / process 310.
[0057] In one implementation, application service instance A may be a product query service, and application service instance B may be a product ordering service.
[0058] like Figure 3As shown, application service instance A and grid proxy (sidecar) 303 coexist in machine workload container group 314, and application service instance B and grid proxy 305 coexist in machine workload container 316. Grid proxy 303 and grid proxy 305 form the data plane layer (dataplane) of service grid 300. Grid proxy 303 and grid proxy 305 run in the form of container / process 304 and container / process 306 respectively, and can receive request 312 for commodity query service, and grid proxy 303 and application service instance A can communicate bidirectionally, and grid proxy 305 and application service instance B can communicate bidirectionally. In addition, grid proxy 303 and grid proxy 305 can also communicate bidirectionally.
[0059] In one embodiment, the traffic of application service instance A is routed to a suitable destination through grid proxy 303, and the network traffic of application service instance B is routed to a suitable destination through grid proxy 305. It should be noted that the network traffic mentioned here includes but is not limited to Hyper Text Transfer Protocol (HTTP), Representational State Transfer (REST), high-performance, general open source framework (google Remote Procedure Call, gRPC), open source in-memory data structure storage system (Redis), etc.
[0060] In one embodiment, the function of extending the data plane layer can be implemented by writing a custom filter for the proxy (Envoy) in the service mesh 300. The service mesh proxy configuration can be to enable the service mesh to correctly proxy service traffic and achieve service intercommunication and service governance. Mesh proxy 303 and mesh proxy 305 can be configured to perform at least one of the following functions: service discovery, health checking, routing, load balancing, authentication and authorization, and observability.
[0061] like Figure 3 As shown, the service grid 300 also includes a control plane layer. The control plane layer may be a group of services running in a dedicated namespace, and these services are hosted by a hosting control plane component 301 in a machine / workload container group (machine / Pod) 302. Figure 3As shown, the managed control plane component 301 performs bidirectional communication with the grid agent 303 and the grid agent 305. The managed control plane component 301 is configured to perform some control management functions. For example, the managed control plane component 301 receives telemetry data transmitted by the grid agent 303 and the grid agent 305, and can further aggregate the telemetry data. For these services, the managed control plane component 301 can also provide a user-oriented application programming interface (Application Programming Interface, API) to more easily manipulate network behavior and provide configuration data to the grid agent 303 and the grid agent 305.
[0062] Under the above operating environment, this application provides Figure 4 Resource consumption assessment method for the data elements shown. Figure 4 1 is a flow chart of a method for evaluating resource consumption of data elements according to Example 1 of the present application. Figure 4 As shown, the method includes:
[0063] Step S402, obtaining data elements to be processed;
[0064] The above-mentioned data elements to be processed can be used to represent data assets, and may include but are not limited to physical tables, application programming interfaces, and data dictionaries.
[0065] Among them, the physical table can be the table structure for storing data in the database, including fields, data types, indexes and other information; the data dictionary can be used to describe and manage the meaning of fields, value ranges, project rules, etc. in the data table; the application program interface can be an interface for data access and exchange, including data extraction, data writing and other functions.
[0066] The data elements to be processed may be data elements for which resource consumption evaluation is to be performed, that is, they may be data elements for which cost evaluation is required, so as to facilitate application of the data elements in the data circulation market for data circulation.
[0067] In an optional embodiment, in a data asset management system, a data element can be a data asset in the data asset management system, or it can be a main content carrier in a data circulation market. In the data circulation market, it is necessary to conduct a resource consumption assessment on the data element to assess the cost of the data element, so as to realize operations such as trading of the data element.
[0068] Step S404, traversing the data lineage graph corresponding to the data element to be processed, and determining the upstream data element associated with the data element to be processed;
[0069] Among them, the data lineage diagram is used to represent the association relationship between multiple data elements in the production chain to which the data elements to be processed belong, and the upstream data elements are used to represent the data source of the production of the data elements to be processed.
[0070] The data lineage diagram of the above-mentioned data elements refers to a diagram that shows the data sources and data derivative relationships that the data elements rely on. Through the data lineage diagram, we can clearly understand the relationship between data elements, including the source of data, the data processing process and the derived results of data.
[0071] In an optional embodiment, the data lineage graph corresponding to the data element to be processed can be traversed. Since the data lineage graph contains the association relationship between the data elements, the upstream data elements associated with the data element to be processed can be traced back according to the data lineage graph, so as to reasonably evaluate the resource consumption of the data element to be processed in combination with the upstream data elements.
[0072] In another optional embodiment, when calculating the production consumption resources of the data elements to be processed, when calculating the generation consumption resources of the physical tables and application program interfaces for the dependent upstream data elements, the costs of the dependent physical tables and nodes can be calculated exclusively by default. In actual applications, physical tables and data development nodes may be referenced by multiple downstreams. Therefore, when calculating the production consumption resources, the production consumption resources can be further updated according to the actual allocation ratio.
[0073] Step S406, performing resource consumption evaluation on the data elements to be processed based on the upstream data elements to obtain the total resource consumption of the data elements to be processed.
[0074] The total resource consumption is used to characterize the amount of resources consumed to produce and / or maintain the data elements to be processed.
[0075] The total resource consumption mentioned above may be the total cost of the data elements to be processed, wherein the total cost may include the production cost of the data elements to be processed and the operation cost of the data elements to be processed.
[0076] The above-mentioned resource consumption assessment is used to represent the resources consumed by the data elements to be processed, so as to determine the billing for the data elements to be processed, wherein the billing method may include a time-based billing method and a usage-based billing method. This is only an example, and billing can also be performed in other ways.
[0077] In an optional embodiment, resource consumption of the data elements to be processed can be evaluated based on the upstream data elements, so as to evaluate the total resource consumption of the data elements to be processed from the full-link perspective of the production and operation of the data elements to be processed, thereby improving the evaluation accuracy of the data elements to be processed.
[0078] Furthermore, after obtaining the total resource consumption of the data elements to be processed, the total resource consumption of the data elements to be processed can be stored in a database. Optionally, after obtaining the total resource consumption of the data elements to be processed, the total resource consumption can be sent to the user's client. If the user believes that the total resource consumption is accurate, the total resource consumption can be stored in the database. If the user believes that the total resource consumption is incorrect, the total resource consumption can be adjusted and the adjusted total resource consumption can be stored in the database.
[0079] The configuration items for time-based billing include resource name, billing start time, billing end time, and resource cost, which can be expressed by the following formula:
[0080] ;
[0081] in, Indicates the cost of resource billing. Represents the amount of time of 1 day, which is 86400 seconds. Indicates the amount of time in the resource billing period (in seconds).
[0082] The configuration items for billing by usage include resource name, billing item name, and billing item unit price. For example, container service resources are charged according to compute units (CU) and memory (MEM), and the unit prices are (Unit: Yuan / CU·day) (Unit: Yuan / GB·day), which can be expressed by the following formula:
[0083] ;
[0084] in, The computing resources consumed are is the unit price of computing resources, The memory resources consumed are The unit price of memory resources.
[0085] It should be noted that if the resources are purchased from a third-party platform, another way to obtain the daily cost of the resources is to query the daily bill of the third-party platform to obtain the actual daily cost of the resources.
[0086] The above-mentioned total resource consumption can be the amount of resources consumed for producing and maintaining the data elements to be processed, the amount of resources consumed for producing the data elements to be processed, or the amount of resources consumed for maintaining the data elements to be processed. Combined with the data lineage diagram, the corresponding data elements can be retrieved according to the actual consumption type of the resource amount to be calculated, so as to quickly determine the total resource consumption of the data elements to be processed, facilitate the evaluation of resource consumption, and obtain the total resource consumption corresponding to the consumption type.
[0087] Through the above steps, the data elements to be processed are obtained; the data lineage graph corresponding to the data elements to be processed is traversed to determine the upstream data elements associated with the data elements to be processed, wherein the data lineage graph is used to characterize the association relationship between multiple data elements in the production chain to which the data elements to be processed belong, and the upstream data elements are used to characterize the data source for producing the data elements to be processed; based on the upstream data elements, the resource consumption of the data elements to be processed is evaluated to obtain the total resource consumption of the data elements to be processed, wherein the total resource consumption is used to characterize the amount of resources consumed to produce and / or maintain the data elements to be processed, thereby improving the accuracy of the resource consumption evaluation of the data elements to be processed. It is easy to notice that in the process of evaluating the data elements to be processed, the upstream data elements associated with the data elements to be processed can be determined by traversing the data lineage graph corresponding to the data elements to be processed, and the resource consumption of the production process of the data elements to be processed can be determined based on the upstream data elements. By combining the data elements to be processed and the upstream data elements, the total resource consumption of the data elements to be processed can be evaluated from the full-link perspective of the production and operation of the data elements to be processed, thereby improving the accuracy of the resource consumption evaluation of the data elements to be processed, so that the resource consumption evaluation of the data elements can take into account more factors, thereby obtaining the total resource consumption of the data elements to be processed with higher accuracy, thereby solving the technical problem of low accuracy of resource consumption evaluation of data elements in related technologies.
[0088] This application uses physical tables and application programming interfaces as examples to introduce the calculation logic and process of data element cost assessment.
[0089] In the above embodiments of the present application, resource consumption of the data elements to be processed is evaluated based on the upstream data elements to obtain the total resource consumption of the data elements to be processed, including: determining the original resource consumption of the data elements to be processed, and the original resource consumption of the upstream data elements, wherein the original resource consumption is used to characterize the amount of resources consumed to maintain the operation of the corresponding data elements; determining the production resource consumption of the data elements to be processed based on the original resource consumption of the upstream data elements, wherein the production resource consumption is used to characterize the amount of resources consumed to produce the data elements to be processed; obtaining the sum of the original resource consumption and the production resource consumption of the data elements to be processed to obtain the total resource consumption.
[0090] The above-mentioned original resource consumption may be the original cost of the data element to be processed, and the original cost may also be referred to as direct cost or operating cost, which indicates the cost required to maintain the operation of a data element.
[0091] The resource consumption of the above-mentioned data elements can be divided into two categories, one is original resource consumption and the other is production resource consumption.
[0092] The above-mentioned original resource consumption can be the original cost of the data element. The original cost can also be called direct cost or operating cost, which is used to represent the cost required to maintain the operation of a data asset.
[0093] For example, when the data element to be processed is a physical table, the original cost of a physical table can be expressed by the storage space occupied by the physical table; when the data element to be processed is a data development node, the original cost of a data development node can be expressed by the amount of computing resources occupied by the node operation; when the data element to be processed is an application interface, the original cost of an application interface can be expressed by the amount of server resources occupied by the application interface hosted in a container.
[0094] The above-mentioned production resource consumption can be the production cost of the data element. The production cost can also be called processing cost, which is used to represent the cost required for the production process of a data element from scratch.
[0095] For example, the data element to be processed may be physical table a, and the upstream data elements of the data element to be processed may be data development node b, physical table c, and physical table d. A physical table a is produced by a data development node b, and the data development node b uses physical table c and physical table d as input tables. Therefore, the production cost of physical table a can be expressed as the sum of the original costs of node b, physical table c, and physical table d.
[0096] In an optional embodiment, the original resource consumption of the data element to be processed and the original resource consumption of the upstream data element can be determined. By obtaining the original resource consumption, the amount of resources consumed to maintain the operation of the corresponding data element can be preliminarily evaluated. The production resource consumption of the data element to be processed produced by the upstream data element can be determined based on the original resource consumption of the upstream data element, that is, the production resource consumption required to produce the data element to be processed from scratch. The total resource consumption of the data element to be processed can be determined based on the sum of the original resource consumption and the production resource consumption of the data element to be processed. By combining the original resource consumption of the upstream data element, the production resource consumption of the data element to be processed can be efficiently and accurately determined, so that the total resource consumption of the data element can be quickly determined.
[0097] Optionally, the original resource consumption of the data element to be processed may be determined, and the total resource consumption may be determined based on the original resource consumption, so as to obtain the resources consumed to maintain the data element to be processed.
[0098] Optionally, the production resource consumption of the data elements to be processed may be determined, and the total resource consumption may be determined based on the production resource consumption of the data elements to be processed, so as to obtain the resources consumed in producing the data elements to be processed.
[0099] In the above embodiments of the present application, determining the original resource consumption of the data elements to be processed and the original resource consumption of the upstream data elements includes: determining a target evaluation method corresponding to the data elements to be processed from multiple evaluation methods, wherein different evaluation methods use different dimensions to evaluate the data elements to be processed; and determining the original resource consumption of the data elements to be processed and the original resource consumption of the upstream data elements based on the target evaluation method.
[0100] The above-mentioned multiple evaluation methods can be pre-set methods for evaluating the data elements to be processed using different dimensions. Among them, the multiple evaluation methods can be different resource billing methods. The multiple evaluation methods can include but are not limited to evaluation methods based on time billing and evaluation methods based on usage billing.
[0101] The above-mentioned target evaluation method may be the evaluation method required by the dimension to which the data element to be processed belongs.
[0102] The resource consumption involved in the data elements to be processed may include cloud computing resources, container service resources, etc., and there is no limitation on the type of resources here.
[0103] The above-mentioned raw resource consumption can be divided into two categories. One is the cloud computing resources of various database engines, such as Relational Database Service (RDS), High-Performance Analytical Database for PostgreSQL (ADB_PG), Big Data Computing Service (MaxCompute), Multi-Model Analytical Database (PolarDB). The other is the container service resources used to run application programming interfaces and data development nodes with separate storage and computing, such as K8S clusters (Kubernetes Cluster). The evaluation method can include two forms. One is to charge by time, such as annual and monthly packages, which can be used for proprietary cloud projects; the other is to charge by usage.
[0104] In an optional embodiment, it can be determined whether the data elements to be processed need to be billed according to time or according to usage, so as to determine the target evaluation method corresponding to the data elements to be processed from the existing multiple evaluation methods. If it is necessary to evaluate the data elements to be processed in the time dimension, the target evaluation method can be determined as a resource billing method that charges according to time. If it is necessary to evaluate the data elements to be processed in terms of usage, the target evaluation method can be determined as a resource billing method that charges according to usage.
[0105] By determining the target evaluation method corresponding to the data element to be processed from multiple evaluation methods, a more flexible evaluation method can be provided. The target evaluation method can also be randomly determined from multiple evaluation methods so that the data element to be processed can be evaluated in different dimensions, thereby achieving a multi-faceted evaluation effect, thereby improving the evaluation accuracy of the data element to be processed.
[0106] In the above embodiments of the present application, the data elements to be processed include one of the following: a physical table and an application program interface, and the upstream data elements include one of the following: a physical table and a data development node.
[0107] When the data element to be processed is a physical table, the upstream data element can be a physical table or a data development node. When the data element to be processed is an application program interface, the upstream data element can be a physical table or a data development node.
[0108] In an optional embodiment, the original cost calculation may include cost calculation logic for different data elements such as physical tables, data development nodes, application programming interfaces, etc., wherein the data development nodes may include nodes such as data cleaning, data synchronization, and data processing.
[0109] In the above embodiments of the present application, the type of data elements to be processed includes physical tables, or the type of upstream data elements includes physical tables; the original resource consumption of the physical table is determined based on the target evaluation method, including: determining the storage space size occupied by the physical table, the total size of the physical tables participating in the resource consumption evaluation under the resources to which the physical table belongs, and the first usage time of the resources to which the physical table belongs; when the target evaluation method is the first evaluation method, the original resource consumption of the physical table is determined based on the storage space size, the total size, the first usage time and the unit resource consumption corresponding to the first evaluation method; when the target evaluation method is the second evaluation method, the original resource consumption of the physical table is determined based on the storage space size and the unit resource consumption corresponding to the second evaluation method.
[0110] When the data elements to be processed include physical tables, or the types of upstream data elements include physical tables, the original resource consumption of the physical tables can be determined by two evaluation methods respectively.
[0111] The storage metric indicator of the physical table may be the storage space occupied by the physical table, and the unit may be Byte.
[0112] The size of the storage space occupied by the physical table may be the size of the storage space occupied by the physical table.
[0113] The total size of the physical tables participating in the resource consumption evaluation under the resource to which the physical tables belong may be the size of the storage space occupied by the physical tables participating in the resource consumption evaluation under the resource to which the physical tables belong.
[0114] The first usage time amount of the resource belonging to the above-mentioned physical table may be the usage amount of the physical table in one day.
[0115] The first evaluation method mentioned above may be a time-based billing method, and the second evaluation method mentioned above may be a usage-based billing method. Optionally, it may be determined according to user needs or actual billing conditions whether to calculate the original resource consumption of the physical table according to the first evaluation method or to calculate the original resource consumption of the physical table according to the second evaluation method.
[0116] The unit resource consumption corresponding to the first evaluation method may be a preset unit resource consumption, or a unit resource consumption of the first evaluation method set according to market conditions. The unit resource consumption corresponding to the second evaluation method may be a preset unit resource consumption, or a unit resource consumption of the second evaluation method set according to market conditions.
[0117] In the above embodiment of the present application, the original resource consumption of the physical table is determined based on the storage space size, the total size, the first usage time amount and the unit resource consumption corresponding to the first evaluation method, including: obtaining the ratio of the storage space size and the total size to obtain the space share; obtaining the ratio of the first preset time amount to the first usage time amount to obtain the first time amount ratio; obtaining the product of the space share, the first time amount ratio and the unit resource consumption corresponding to the first evaluation method to obtain the original resource consumption of the physical table.
[0118] The first evaluation method mentioned above may be a time-based billing method. When the target evaluation method is a time-based billing method, the original cost (original resource consumption) of a physical table t can be expressed by the formula:
[0119] ;
[0120] in, Indicates the storage space occupied by the physical table T. Indicates the total size of the physical table participating in the cost measurement under the cloud computing resource S, is the space ratio, represents the average daily procurement cost of cloud computing resources, The procurement cost of cloud computing resources. is a first preset amount of time, is the first time quantity ratio, is the first usage time, The billing start time for the cloud computing resource procurement cost. The billing end time for the cloud computing resource procurement costs.
[0121] The above-mentioned first preset time amount can be counted according to days, weeks, quarters, months, years, etc., and is not specifically limited here.
[0122] It should be noted that, since there are some temporary tables or system tables that do not participate in the cost calculation, the total space of cloud computing resources may not be directly used as the denominator in the calculation process. In an optional embodiment, if the total space of cloud computing resources is directly used as the denominator, the final total cost of the physical table will be less than the actual purchase cost of the cloud computing resources. Therefore, the total storage space of the physical tables participating in the cost evaluation can be selected as the denominator for calculation. However, it is not limited to this. In the actual application process, the calculation method can be adjusted according to the actual application scenario to achieve a better effect.
[0123] In the above embodiment of the present application, the original resource consumption of the physical table is determined based on the storage space size and the unit resource consumption corresponding to the second evaluation method, including: performing unit conversion on the storage space size to obtain the converted space usage; obtaining the converted space usage and the unit resource consumption corresponding to the second evaluation method to obtain the original resource consumption of the physical table.
[0124] The second evaluation method mentioned above may be a usage-based billing method. When the target evaluation method is a usage-based billing method, the original cost (original resource consumption) of a physical table t can be expressed by the formula:
[0125] ;
[0126] in, Indicates the storage space occupied by the physical table T. Indicates unit resource consumption, that is, the unit price of database storage, and the unit can be RMB / GB·day.
[0127] In an optional embodiment, the unit conversion of the storage space size can be performed to obtain the converted space usage. The storage space size can be converted into common units, such as GB can be converted into TB, or MB can be converted into GB, so as to intuitively understand the usage of the storage space. The product of the converted space usage and the unit resource consumption corresponding to the second evaluation method can be obtained to obtain the original resource consumption of the physical table.
[0128] In the above embodiments of the present application, the type of data elements to be processed includes an application program interface, or the upstream data elements include a data development node; based on the target evaluation method, the original resource consumption of the application program interface or the data development node is determined, including: determining a second usage time amount of the application program interface or the data development node, a first unit usage amount of the processor consumed by the application program interface or the data development node when running on the server cluster, a second unit usage amount of the processor consumed by the multiple nodes on the server cluster when running, a third unit usage amount of the memory consumed by the application program interface or the data development node when running on the server cluster, and a fourth unit usage amount of the memory consumed by the multiple nodes on the server cluster when running; when the target evaluation method is the first evaluation method, the original resource consumption of the application program interface or the data development node is determined based on the first unit usage amount, the second unit usage amount, the third unit usage amount, the fourth unit usage amount, the second usage time amount, and the unit resource consumption corresponding to the first evaluation method; when the target evaluation method is the second evaluation method, the original resource consumption of the application program interface or the data development node is determined based on the first unit usage amount, the third unit usage amount, and the unit resource consumption corresponding to the second evaluation method.
[0129] The first unit usage may be the unit usage of resources on a processor by an application program interface or a data development node. The second unit usage may be the unit usage of resources on a processor by multiple nodes. The third unit usage may be the unit usage of resources on a server cluster by an application program interface or a data development node. The fourth unit usage may be the unit usage of resources on a server cluster by multiple nodes.
[0130] In an optional embodiment, the first unit usage may be the usage of resources on a processor by a single application program interface or data development node. This includes the consumption of resources such as the computing power, memory, and storage of the processor. The first unit usage may be used to evaluate the performance and resource utilization of a single node.
[0131] The second unit usage may be the usage of processor resources by multiple nodes. The second unit usage may determine the allocation and utilization of processor resources when multiple nodes are running simultaneously. By monitoring and analyzing this indicator, resource allocation may be optimized to improve the performance and efficiency of the overall system.
[0132] The third unit usage may be the usage of resources by a single application program interface or data development node on the server cluster. Alternatively, in a large-scale distributed system, the usage of the entire cluster resources by a single node is very important for the stability and scalability of the system.
[0133] The fourth unit usage can be the usage of resources on the server cluster by multiple nodes. By monitoring and analyzing this indicator, we can understand the resource competition between nodes in the cluster, optimize resource allocation strategies, and improve the overall performance and reliability of the cluster.
[0134] The logic of determining the original resource consumption of the application interface and the data development node is similar. Here, the original consumption resource calculation process of the data development node is used as an example to illustrate.
[0135] The original consumption resources of the above data development nodes can be expressed by the formula:
[0136] ;
[0137] in, The computing resource consumption of the container side running the data development node, Computing resource consumption on the cloud computing resource engine side running on the data development node.
[0138] The cost of running a synchronization node once includes the resource consumption of the synchronization node task running in the container service, as well as the cloud computing resource consumption of reading data from the source table (Source node) and writing data to the target table (Sink node). This application can ignore the computing resource consumption on the cloud computing resource engine side and consider the computing resource consumption on the container side. This is only an example, and you can determine whether to ignore the computing resource consumption on the cloud computing resource engine side based on actual conditions.
[0139] The above container-side computing resource consumption metrics may include the average processing resources, average memory, and running time occupied by the node operation. The unit of average memory may be Byte, and the unit of running time may be milliseconds. During the task operation of the data development node, the average processing resources, average memory, and running time occupied by the platform collection task operation process can be used to calculate the original resource consumption of the data development node in the following manner.
[0140] In the above embodiments of the present application, the original resource consumption of the application interface or the data development node is determined based on the first unit usage, the second unit usage, the third unit usage, the fourth unit usage, the second usage time and the unit resource consumption corresponding to the first evaluation method, including: obtaining the ratio of the first preset time amount to the second usage time amount to obtain the second time amount ratio; obtaining the product of the second time amount ratio and the unit resource consumption corresponding to the second evaluation method to obtain the average resource consumption of the server cluster; obtaining the ratio of the first unit usage to the second unit usage to obtain the first usage share; obtaining the ratio of the third unit usage to the fourth unit usage to obtain the second usage share; obtaining the product of the average resource consumption, the first usage share and the first weight value to obtain the first usage consumption; obtaining the product of the second usage share and the second weight value to obtain the second usage consumption, wherein the sum of the first weight value and the second weight value is the preset value; obtaining the sum of the first usage consumption and the second usage consumption to obtain the original resource consumption of the application interface or the data development node.
[0141] The above preset value may be 1, which is not limited here, and other values may be selected according to actual needs.
[0142] The first evaluation method mentioned above is a time-based billing method. When the target evaluation method is a time-based billing method, the original resource consumption of a data development node can be expressed by the following formula:
[0143] ;
[0144] in, Indicates the average daily purchase cost of a container service cluster, that is, the average daily price of the service cluster. Indicates the resource usage of the data development node when running on the container service cluster on that day, that is, the first unit usage; Indicates the total amount of resources consumed by each node in the container service cluster on that day, that is, the second unit usage; Indicates the weight of resources in cost conversion, that is, the first weight value; Indicates the total amount of memory consumed by the data development node when it runs n times on the container service cluster on that day, that is, the third unit usage; Indicates the total amount of content consumed by each node in the container service cluster on that day, which is the fourth unit usage; The total cost of the data development node is the sum of the costs of running on k clusters every day; 1- is the second weight value.
[0145] In the above-mentioned embodiment of the present application, the original resource consumption of the application interface or the data development node is determined based on the first unit usage, the third unit usage and the unit resource consumption corresponding to the second evaluation method, including: obtaining the ratio of the first unit usage to the second preset time amount to obtain the second time amount ratio; obtaining the ratio of the third unit usage to the second preset time amount to obtain the third time amount ratio; performing unit conversion on the third time amount ratio to obtain the converted time amount ratio; obtaining the product of the second time amount ratio and the first unit resource consumption corresponding to the second evaluation method to obtain the first time amount consumption, wherein the first unit resource consumption is used to characterize the unit resource consumption of the computing unit of the server cluster; obtaining the product of the converted time amount ratio and the second unit resource consumption corresponding to the second evaluation method to obtain the second time amount consumption, wherein the second unit resource consumption is used to characterize the unit resource consumption of the memory of the server cluster; obtaining the sum of the first time amount consumption and the second time amount consumption to obtain the original resource consumption of the application interface or the data development node.
[0146] The second preset time amount mentioned above can be a preset time amount of one day.
[0147] The second evaluation method mentioned above is the pay-per-use method. When the target evaluation method is the pay-per-use method, the original resource consumption of a data development node can be expressed by the following formula:
[0148] ;
[0149] in, Indicates the unit price of a container service cluster (unit: yuan / CU·day), that is, the first unit resource consumption; Represents the number of milliseconds in a day (i.e., 86400000), which is the second preset time amount; Indicates the unit price of a container service cluster (unit: RMB / GB·day), which is the second unit resource consumption. is the first unit usage; The third unit usage.
[0150] When the type of data element to be processed is an application program interface, the original resource consumption of the application program interface may be the container service resource cost required by the application program interface, which may include the resource consumption on the container side required to host the application program interface service, such as processor, memory, bandwidth, etc.
[0151] The container-side resource consumption measurement indicators can be the average running resources (in CU), average memory (in Byte), running time (in ms), etc. occupied by the node.
[0152] It should be noted that the calculation logic of the daily operating cost of the above-mentioned application interface is similar to the cost conversion logic of the data development node.
[0153] In the above embodiment of the present application, the production resource consumption of the data element to be processed is determined based on the original resource consumption of the upstream data element, including: traversing the data lineage graph to determine the first branch data element connected to the same data element as the data element to be processed, and traversing the data lineage graph to determine the second branch data element connected to the same data element as any one of the upstream data elements; determining a first consumption weight corresponding to the data element to be processed based on the data element to be processed and the first branch data element; determining a second consumption weight corresponding to any one data element based on any one data element and the second branch data element; and weighting the original resource consumption of the upstream data element based on the first consumption weight and the second consumption weight to obtain the production resource consumption of the data element to be processed.
[0154] When calculating the production resource consumption of physical tables and application interfaces, the costs of dependent physical tables and nodes can be calculated exclusively by default. In actual applications, physical tables and data development nodes may be referenced by multiple downstreams, so when calculating the production resource consumption, it is necessary to further calculate according to the actual allocation ratio.
[0155] The first consumption weight mentioned above may be the apportionment ratio of the data element to be processed, and the second consumption weight mentioned above may be the apportionment ratio of any data element.
[0156] Figure 5 is a schematic diagram of querying downstream dependencies of a physical table based on a data lineage graph according to an embodiment of the present application, such as Figure 5 As shown, each application program interface and data development node of the physical table can be queried through the data lineage graph. Figure 6 is a schematic diagram of querying downstream dependencies of a data development node based on a data lineage graph according to an embodiment of the present application, such as Figure 6 As shown, the downstream physical table of the data development node can be queried through the data lineage graph.
[0157] In an optional embodiment, when the data element to be processed is a physical table, the first consumption weight, the second consumption weight and the original resource consumption of the upstream data element can be weighted to obtain the production resource consumption of the data element to be processed. Here, only the data element to be processed is a physical table as an example for explanation. The data element to be processed can also be other data assets, which are not specifically limited here. The production resource consumption calculation formula based on blood relationship sharing is as follows:
[0158] ;
[0159] in, Indicates the original resource consumption of the i-th upstream data development node that the physical table depends on, that is, the original resource consumption of the upstream data element; represents the apportioned cost of data development node i in the physical table production link, which is also the first consumption weight mentioned above; Indicates the original resource consumption of the jth upstream physical table that the physical table depends on, that is, the original resource consumption of the upstream data element. It represents the allocation ratio of physical table j in the production link of the physical table, that is, the second consumption weight mentioned above.
[0160] Figure 7 is a flow chart for calculating the production cost of a physical table according to an embodiment of the present application, such as Figure 7 As shown, the method includes:
[0161] Step S701, query the physical table t for which production cost needs to be calculated;
[0162] The above-mentioned production cost may be the production resource consumption of the physical table t.
[0163] Step S702, traversing the data lineage graph to query the data development nodes and physical table p that the physical table t depends on;
[0164] The data development nodes and physical tables that the physical table t depends on may be upstream data elements of the physical table t.
[0165] Step S703, querying the direct downstream dependencies of the data development node and the physical table p from the data lineage graph, and respectively calculating the allocation ratios of the data development node and the physical table p in the production link of the current physical table t;
[0166] The above-mentioned apportionment ratio refers to the first consumption weight and the second consumption weight.
[0167] Step S704, query and obtain the original resource consumption of the data development node and the physical table p;
[0168] Step S705, input the first consumption weight, the second consumption weight and the original resource consumption into the blood relationship sharing formula to calculate the production resource consumption of the physical table t;
[0169] The above-mentioned original resource consumption may be original cost, and the above-mentioned production resource consumption may be production cost.
[0170] Step S706, saving the production resource consumption of physical table t into the database.
[0171] In another optional embodiment, when the data element to be processed is an application program interface, the first consumption weight, the second consumption weight and the original resource consumption of the upstream data element may be weighted to obtain the production resource consumption of the data element to be processed. The production resource consumption calculation formula based on lineage sharing is as follows:
[0172] ;
[0173] in, It represents the original resource consumption of the i-th upstream data development node that the application interface depends on, that is, the original cost of the upstream data element; represents the allocation ratio of data development node i in the application program interface production link, which is also the first consumption weight mentioned above. represents the original cost of the jth upstream physical table that the application interface depends on, Indicates the allocation ratio of physical table j in the production link of this application interface.
[0174] Figure 8 is a flow chart for calculating the production cost of an application program interface according to an embodiment of the present application, such as Figure 8 As shown, the method includes:
[0175] Step S801, querying the application program interface a that needs to calculate the production cost;
[0176] The above-mentioned production cost may be the production resource consumption of the application program interface a.
[0177] Step S802, traversing the data lineage graph to query the data development nodes and physical table p that the application interface a depends on;
[0178] The data development nodes and physical tables that the above-mentioned application interface a depends on may be upstream data elements of application interface a.
[0179] Step S803, querying the direct downstream dependencies of the data development node and the physical table p from the data lineage graph, and respectively calculating the allocation ratios of the data development node and the physical table p in the production link of the current application program interface a;
[0180] The above-mentioned apportionment ratio refers to the first consumption weight and the second consumption weight.
[0181] Step S804, query and obtain the original resource consumption of the data development node and the physical table p;
[0182] Step S805, inputting the first consumption weight, the second consumption weight and the original resource consumption into the bloodline allocation formula to calculate the production resource consumption of the application program interface a;
[0183] Step S806, saving the production resource consumption of the application program interface a into the database.
[0184] Fig. 9 is a schematic diagram of cost allocation according to an embodiment of the present application, such as Fig. 9 As shown, the upstream data elements of data development node D include physical table A, physical table B, and physical table C. The upstream data elements of data development node E include physical table C. The apportionment ratio of physical table A and physical table B to data development node D is 100%, the apportionment ratio of physical table C to data development node D is 50%, and the apportionment ratio of physical table C to data development node E is 50%. The upstream data elements of physical table F and physical table G are data development node D, the apportionment ratio of data development node D to physical table F is 50%, and the apportionment ratio of data development node D to physical table G is 50%, the upstream data element of physical table H is data development node E, and the apportionment ratio of data development node E to physical table H is 100%. The upstream data elements of application interface M include physical table F and physical table G, and the upstream data elements of application interface N include physical table G and physical table H. Therefore, the apportionment ratio of physical table F to application interface M is 100%, the apportionment ratio of physical table G to application interface M is 50%, the apportionment ratio of physical table G to application interface N is 50%, and the apportionment ratio of physical table H to application interface N is 100%.
[0185] In an optional embodiment, for physical tables, application programming interfaces, etc., in addition to calculating the cost required for data operation, it is also necessary to calculate the production cost of the data, that is, the cost required for the entire production process from scratch, which is the above-mentioned production resource consumption.
[0186] For a physical table, the production cost of the physical table can be expressed as the sum of the original resource consumption of the upstream data development node that produces the physical table and the sum of the original resource consumption of the physical table that the processing process depends on. The following formula is expressed as:
[0187] ;
[0188] in, The sum of the raw resource consumption of the upstream data development nodes for this physical table, It is the sum of the original resource consumption of the physical tables that the processing depends on.
[0189] For an application program interface, the production cost of the application program interface can be expressed as the sum of the original resource consumption of the upstream data development node that produces the application program interface and the sum of the original resource consumption of the physical table that is dependent on the processing process. The following formula is expressed as:
[0190] ;
[0191] in, The sum of the raw resource consumption of the upstream data development nodes for this application interface, It is the sum of the raw resource consumption of the physical tables that the process depends on.
[0192] Fig.10 is a data lineage graph model of a physical table according to an embodiment of the present application, such as Fig.10 As shown, cloud computing resources include multiple physical tables, which share the original resource consumption of cloud computing resources; a physical table includes multiple fields; a physical table can be used as the input of a data development node or the output of a data development node; a specific data development scenario includes a group of data development nodes; an application program interface is associated with a project application, an application program interface includes multiple fields, and the data of the application program interface can come from a physical table or from the call results of other application program interfaces.
[0193] In the above embodiments of the present application, based on the data elements to be processed and the first branch data elements, determining the first consumption weight corresponding to the data elements to be processed includes one of the following: obtaining a first total number of the data elements to be processed and the first branch data elements, determining the proportion of the data elements to be processed in the first total number, and obtaining the first consumption weight; determining the first consumption of the data elements to be processed within a preset period, and the first total consumption of the data elements to be processed and the first branch data elements, obtaining the proportion of the first consumption in the first total consumption, and obtaining the first consumption weight.
[0194] The first branch data element mentioned above may be a data element connected to the same data element as the data element to be processed. For example, a physical table may be used as the input of two data development nodes, then one of the data development nodes may be the first branch data element of the other data development node, and the physical table may be the same data element to which the data element to be processed and the first branch data element are simultaneously connected.
[0195] The first total quantity mentioned above may be the number of data elements to be processed and the number of first branch data elements. The proportion of the data elements to be processed in the first total quantity may be determined to obtain the first consumption weight. For example, if a physical table is used as the input of two nodes, the two nodes respectively allocate 50% of the physical table. This is only an example, and the specific proportion may be adjusted according to the actual situation.
[0196] In an optional embodiment, a first total number of data elements to be processed and first branch data elements can be obtained, and the apportionment ratio, that is, the first consumption weight, is determined by determining the proportion of the data elements to be processed in the first total number. If the proportion of the data elements to be processed in the first total number is large, the apportionment ratio is large, that is, the first consumption weight is large; if the proportion of the data elements to be processed in the first total number is small, the apportionment ratio is small, that is, the first consumption weight is small.
[0197] The above-mentioned preset period may be a statistical period of a pre-set data element, and the statistical period may be set according to actual conditions, for example, it may be set according to hours, days, weeks, months, quarters, years, etc.
[0198] The above-mentioned first consumption can be the usage of the data element to be processed, such as the number of runs, the running resource consumption, etc., which is not limited here. The above-mentioned first total consumption can be the sum of the usage of the data element to be processed and the usage of the first branch data element. For example, a physical table A is used as the input of the data development node B and the data development node C. In a statistical period, the data development node B runs 2 times and the data development node C runs 1 time. Then the allocation ratio of physical table A to data development node B is 2 / 3, and the allocation ratio of physical table A to node C is 1 / 3. This is only an example, and the specific allocation ratio can be adjusted according to the actual situation.
[0199] In an optional embodiment, the first consumption of the data element to be processed within a preset period and the first total consumption of the data element to be processed and the first branch data element can be determined. By obtaining the consumption of the data element within the preset period, the actual usage of the data element can be determined, thereby reasonably allocating the consumption weights of the data element to be processed and the first branch data element for the same connected data element, and obtaining a more reasonable first consumption weight of the data element to be processed.
[0200] In the above embodiments of the present application, based on any data element and the second branch data element, determining the second consumption weight corresponding to any data element includes one of the following: obtaining the second total quantity of any data element and the second branch data element, determining the proportion of any data element in the second total quantity, and obtaining the second consumption weight; determining the second consumption of any data element within a preset period, and the second total consumption of any data element and the second branch data element, obtaining the proportion of the second consumption in the second total consumption, and obtaining the second consumption weight.
[0201] The second branch data element mentioned above can be a data element connected to the same data element as any data element in the upstream data elements.
[0202] The second branch data element mentioned above can be a data element connected to the same data element as any other data element. For example, a physical table can be used as the input of two data development nodes, then one of the data development nodes can be the second branch data element of the other data development node, and the physical table can be the same data element that is connected to any other data element and the second branch data element at the same time.
[0203] The second total quantity mentioned above can be the quantity of any data element and the second branch data element. The proportion of any data element in the second total quantity can be determined to obtain the second consumption weight. For example, if a physical table is used as the input of two nodes, the two nodes will share 50% of the physical table respectively. This is only an example, and the specific proportion can be adjusted according to the actual situation.
[0204] In an optional embodiment, the second total quantity of any data element and the second branch data element can be obtained, and the apportionment ratio, that is, the second consumption weight, can be determined by determining the proportion of the data element to be processed in the second total quantity. If the proportion of any data element in the second total quantity is large, the apportionment ratio is large, that is, the second consumption weight is large. If the proportion of any data element in the second total quantity is small, the apportionment ratio is small, that is, the second consumption weight is small.
[0205] The above-mentioned preset period may be a statistical period of a pre-set data element, and the statistical period may be set according to actual conditions, for example, it may be set according to hours, days, weeks, months, quarters, years, etc.
[0206] The above-mentioned second consumption can be the usage of any data element, such as the number of runs, running resource consumption, etc., which is not limited here. The above-mentioned second total consumption can be the sum of the usage of any data element and the usage of the second branch data element. For example, a physical table A is used as the input of data development node B and data development node C. In a statistical period, data development node B runs 2 times and data development node C runs 1 time. Then the allocation ratio of physical table A to data development node B is 2 / 3, and the allocation ratio of physical table A to node C is 1 / 3. This is only an example, and the specific allocation ratio can be adjusted according to actual conditions.
[0207] In an optional embodiment, the second consumption of any data element within a preset period and the second total consumption of any data element and the second branch data element can be determined. By obtaining the consumption of the data element within the preset period, the actual usage of the data element can be determined, thereby reasonably allocating the consumption weight of any data element and the second branch data element for the same connected data element, and obtaining a more reasonable second consumption weight of any data element.
[0208] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0209] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0210] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.
[0211] Example 2
[0212] According to an embodiment of the present application, a method for evaluating resource consumption of data elements is also provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from this.
[0213] Fig.11 is a flow chart of a method for evaluating resource consumption of a data element according to Example 2 of the present application, such as Fig.11 As shown, the method comprises the following steps:
[0214] Step S1102, obtaining cloud data elements of the cloud server;
[0215] The above-mentioned cloud server can be a virtualized server that provides computing resources, storage space and network functions through the Internet. Cloud servers can allocate the resources of physical servers to multiple virtual servers through cloud computing technology. Users can adjust the configuration and scale of the server at any time as needed to achieve elastic expansion and flexible management. Cloud servers can provide a variety of services, including website hosting, application deployment, data storage and backup, etc. Cloud servers are flexible and scalable.
[0216] The cloud data elements of the above-mentioned cloud server include data storage, data processing, data transmission and data security, etc., which are only examples here and are not specifically limited. Data storage refers to the storage of user data on the cloud server, which can be files, databases, logs, etc. Data processing refers to the analysis, calculation, mining and other operations on the cloud server. Data transmission refers to the upload, download, transmission and other operations of data on the cloud server. Data security refers to the encryption, backup, recovery and other security measures of data on the cloud server.
[0217] Step S1104, traversing the data lineage graph corresponding to the cloud data element to determine the upstream data element associated with the cloud data element;
[0218] Among them, the data lineage diagram is used to characterize the relationship between multiple data elements in the production chain to which the cloud data elements belong, and the upstream data elements are used to characterize the data source of the production cloud data elements.
[0219] Step S1106, performing resource consumption evaluation on the cloud data elements based on the upstream data elements to obtain the total resource consumption of the cloud data elements.
[0220] Among them, total resource consumption is used to characterize the amount of resources consumed to produce and / or maintain cloud data elements.
[0221] Through the above steps, the cloud data elements of the cloud server are obtained; the data lineage graph corresponding to the cloud data elements is traversed to determine the upstream data elements associated with the cloud data elements, wherein the data lineage graph is used to characterize the association relationship between multiple data elements in the production chain to which the cloud data elements belong, and the upstream data elements are used to characterize the data source of the production cloud data elements; based on the upstream data elements, the resource consumption of the cloud data elements is evaluated to obtain the total resource consumption of the cloud data elements, wherein the total resource consumption is used to characterize the amount of resources consumed to produce and / or maintain the cloud data elements, thereby improving the accuracy of the resource consumption evaluation of the data elements to be processed. It is easy to notice that in the process of evaluating the data elements to be processed, the upstream data elements associated with the data elements to be processed can be determined by traversing the data lineage graph corresponding to the data elements to be processed, and the resource consumption of the production process of the data elements to be processed can be determined based on the upstream data elements. By combining the data elements to be processed and the upstream data elements, the total resource consumption of the data elements to be processed can be evaluated from the full-link perspective of the production and operation of the data elements to be processed, thereby improving the accuracy of the resource consumption evaluation of the data elements to be processed, so that the resource consumption evaluation of the data elements can take into account more factors, thereby obtaining the total resource consumption of the data elements to be processed with higher accuracy, thereby solving the technical problem of low accuracy of resource consumption evaluation of data elements in related technologies.
[0222] In the above embodiments of the present application, resource consumption of cloud data elements is evaluated based on upstream data elements to obtain total resource consumption of cloud data elements, including: determining original resource consumption of cloud data elements and original resource consumption of upstream data elements, wherein original resource consumption is used to characterize the amount of resources consumed to maintain the operation of corresponding data elements; determining production resource consumption of cloud data elements based on original resource consumption of upstream data elements, wherein production resource consumption is used to characterize the amount of resources consumed to produce cloud data elements; obtaining the sum of original resource consumption and production resource consumption of cloud data elements to obtain total resource consumption.
[0223] It should be noted that the preferred implementation scheme involved in the above embodiments of the present application is the same as the scheme provided in Example 1, as well as the application scenario and implementation process, but is not limited to the scheme provided in Example 1.
[0224] Example 3
[0225] According to an embodiment of the present application, a data element resource consumption assessment device for implementing the above-mentioned data element resource consumption assessment method is also provided. Fig.12 is a schematic diagram of a data element resource consumption evaluation device according to an embodiment of the present application, such as Fig.12 As shown, the device 1200 includes: an acquisition module 1202 , a traversal module 1204 , and an evaluation module 1206 .
[0226] Among them, the acquisition module is used to acquire the data elements to be processed; the traversal module is used to traverse the data lineage graph corresponding to the data elements to be processed, and determine the upstream data elements associated with the data elements to be processed, wherein the data lineage graph is used to characterize the association relationship between multiple data elements in the production chain to which the data elements to be processed belong, and the upstream data elements are used to characterize the data source for producing the data elements to be processed; the evaluation module is used to perform resource consumption evaluation on the data elements to be processed based on the upstream data elements, and obtain the total resource consumption of the data elements to be processed, wherein the total resource consumption is used to characterize the amount of resources consumed to produce and / or maintain the data elements to be processed.
[0227] It should be noted that the acquisition module 1202, the traversal module 1204, and the evaluation module 1206 correspond to steps S402 to S406 in Embodiment 1, and the three modules and the corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in the above Embodiment 1. It should be noted that the above modules or units may be hardware components or software components stored in a memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n), and the above modules may also be part of the device and may be run in the computer terminal 10 provided in Embodiment 1.
[0228] In the above embodiments of the present application, the evaluation module is also used to determine the original resource consumption of the data elements to be processed, and the original resource consumption of the upstream data elements, wherein the original resource consumption is used to characterize the amount of resources consumed to maintain the operation of the corresponding data elements; based on the original resource consumption of the upstream data elements, the production resource consumption of the data elements to be processed is determined, wherein the production resource consumption is used to characterize the amount of resources consumed to produce the data elements to be processed; the sum of the original resource consumption and the production resource consumption of the data elements to be processed is obtained to obtain the total resource consumption.
[0229] In the above embodiments of the present application, the evaluation module is also used to determine a target evaluation method corresponding to the data elements to be processed from multiple evaluation methods, wherein different evaluation methods use different dimensions to evaluate the data elements to be processed; and determine the original resource consumption of the data elements to be processed and the original resource consumption of the upstream data elements based on the target evaluation method.
[0230] In the above embodiments of the present application, the data elements to be processed include one of the following: a physical table and an application program interface, and the upstream data elements include one of the following: a physical table and a data development node.
[0231] In the above embodiments of the present application, the evaluation module is also used to determine the size of the storage space occupied by the physical table, the total size of the physical tables participating in the resource consumption evaluation under the resources to which the physical table belongs, and the first usage time of the resources to which the physical table belongs; when the target evaluation method is the first evaluation method, the original resource consumption of the physical table is determined based on the storage space size, the total size, the first usage time and the unit resource consumption corresponding to the first evaluation method; when the target evaluation method is the second evaluation method, the original resource consumption of the physical table is determined based on the storage space size and the unit resource consumption corresponding to the second evaluation method.
[0232] In the above embodiments of the present application, the evaluation module is also used to store the ratio of the space size to the total size to obtain the space share; obtain the ratio of the first preset time amount to the first usage time amount to obtain the first time amount ratio; obtain the product of the space share, the first time amount ratio and the unit resource consumption corresponding to the first evaluation method to obtain the original resource consumption of the physical table.
[0233] In the above embodiment of the present application, the evaluation module is also used to convert the unit of storage space size to obtain the converted space usage; obtain the converted space usage and the unit resource consumption corresponding to the second evaluation method to obtain the original resource consumption of the physical table.
[0234] In the above embodiments of the present application, the evaluation module is also used to determine a second usage time of the application interface or data development node, a first unit usage of the processor consumed by the application interface or data development node when running on a server cluster, a second unit usage of the processor consumed by the multiple nodes on the server cluster when running, a third unit usage of the memory consumed by the application interface or data development node when running on the server cluster, and a fourth unit usage of the memory consumed by the multiple nodes on the server cluster when running; when the target evaluation method is the first evaluation method, the original resource consumption of the application interface or data development node is determined based on the first unit usage, the second unit usage, the third unit usage, the fourth unit usage, the second usage time and the unit resource consumption corresponding to the first evaluation method; when the target evaluation method is the second evaluation method, the original resource consumption of the application interface or data development node is determined based on the first unit usage, the third unit usage and the unit resource consumption corresponding to the second evaluation method.
[0235] In the above embodiments of the present application, the evaluation module is also used to obtain the ratio of the first preset time amount to the second usage time amount to obtain the second time amount ratio; obtain the product of the second time amount ratio and the unit resource consumption corresponding to the second evaluation method to obtain the average resource consumption of the server cluster; obtain the ratio of the first unit usage to the second unit usage to obtain the first usage proportion; obtain the ratio of the third unit usage to the fourth unit usage to obtain the second usage proportion; obtain the product of the average resource consumption, the first usage proportion and the first weight value to obtain the first usage consumption; obtain the product of the second usage proportion and the second weight value to obtain the second usage consumption, wherein the sum of the first weight value and the second weight value is the preset value; obtain the sum of the first usage consumption and the second usage consumption to obtain the original resource consumption of the application interface or data development node.
[0236] In the above embodiments of the present application, the evaluation module is also used to obtain the ratio of the first unit usage to the second preset time amount to obtain the second time amount ratio; obtain the ratio of the third unit usage to the second preset time amount to obtain the third time amount ratio; perform unit conversion on the third time amount ratio to obtain the converted time amount ratio; obtain the product of the second time amount ratio and the first unit resource consumption corresponding to the second evaluation method to obtain the first time amount consumption, wherein the first unit resource consumption is used to characterize the unit resource consumption of the computing unit of the server cluster; obtain the product of the converted time amount ratio and the second unit resource consumption corresponding to the second evaluation method to obtain the second time amount consumption, wherein the second unit resource consumption is used to characterize the unit resource consumption of the memory of the server cluster; obtain the sum of the first time amount consumption and the second time amount consumption to obtain the original resource consumption of the application interface or data development node.
[0237] In the above embodiments of the present application, the evaluation module is also used to traverse the data lineage graph to determine the first branch data element connected to the same data element as the data element to be processed, and traverse the data lineage graph to determine the second branch data element connected to the same data element as any data element in the upstream data elements; determine the first consumption weight corresponding to the data element to be processed based on the data element to be processed and the first branch data element; determine the second consumption weight corresponding to any data element based on any data element and the second branch data element; and perform weighted processing on the original resource consumption of the upstream data element based on the first consumption weight and the second consumption weight to obtain the production resource consumption of the data element to be processed.
[0238] In the above embodiment of the present application, the evaluation module is also used to obtain a first total number of data elements to be processed and first branch data elements, determine the proportion of the data elements to be processed in the first total number, and obtain a first consumption weight; determine the first consumption of the data elements to be processed within a preset period, and the first total consumption of the data elements to be processed and the first branch data elements, obtain the proportion of the first consumption in the first total consumption, and obtain the first consumption weight.
[0239] In the above embodiments of the present application, the evaluation module is also used to obtain the second total quantity of any one data element and the second branch data element, determine the proportion of any one data element in the second total quantity, and obtain the second consumption weight; determine the second consumption of any one data element within a preset period, and the second total consumption of any one data element and the second branch data element, obtain the proportion of the second consumption in the second total consumption, and obtain the second consumption weight.
[0240] It should be noted that the preferred implementation scheme involved in the above embodiments of the present application is the same as the scheme provided in Example 1, as well as the application scenario and implementation process, but is not limited to the scheme provided in Example 1.
[0241] Example 4
[0242] According to an embodiment of the present application, a data element resource consumption assessment device for implementing the above-mentioned data element resource consumption assessment method is also provided. Fig.13 is a schematic diagram of a data element resource consumption evaluation device according to an embodiment of the present application, such as Fig.13 As shown, the device 1300 includes: an acquisition module 1302 , a traversal module 1304 , and an evaluation module 1306 .
[0243] Among them, the acquisition module is used to obtain the cloud data elements of the cloud server; the traversal module is used to traverse the data lineage graph corresponding to the cloud data elements, and determine the upstream data elements associated with the cloud data elements, wherein the data lineage graph is used to characterize the association relationship between multiple data elements in the production chain to which the cloud data elements belong, and the upstream data elements are used to characterize the data source of the production cloud data elements; the evaluation module is used to perform resource consumption evaluation on the cloud data elements based on the upstream data elements to obtain the total resource consumption of the cloud data elements, wherein the total resource consumption is used to characterize the amount of resources consumed in producing and / or maintaining the cloud data elements.
[0244] It should be noted that the acquisition module 1302, the traversal module 1304, and the evaluation module 1306 correspond to steps S1102 to S1106 in Example 1, and the three modules and the corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in the above-mentioned Example 1. It should be noted that the above-mentioned modules or units may be hardware components or software components stored in a memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n), and the above-mentioned modules may also be part of the device and may be run in the computer terminal 10 provided in Example 1.
[0245] In the above embodiments of the present application, the evaluation module is also used to determine the original resource consumption of the cloud data elements and the original resource consumption of the upstream data elements, wherein the original resource consumption is used to characterize the amount of resources consumed to maintain the operation of the corresponding data elements; based on the original resource consumption of the upstream data elements, the production resource consumption of the cloud data elements is determined, wherein the production resource consumption is used to characterize the amount of resources consumed to produce the cloud data elements; the sum of the original resource consumption and the production resource consumption of the cloud data elements is obtained to obtain the total resource consumption.
[0246] Example 5
[0247] The embodiment of the present application may provide an electronic device, which may be any electronic device in a group of electronic devices. Optionally, in this embodiment, the electronic device may also be replaced by a terminal device such as a mobile terminal.
[0248] Optionally, in this embodiment, the electronic device may be located in at least one network device among a plurality of network devices of a computer network.
[0249] In this embodiment, the computer terminal can execute the program code in the method.
[0250] Optionally, Fig.14 is a structural block diagram of an electronic device according to an embodiment of the present application. Fig.14As shown, the electronic device A may include: one or more (only one is shown in the figure) processors 102, a memory 104, a storage controller, and a peripheral interface, wherein the peripheral interface is connected to a radio frequency module, an audio module, and a display.
[0251] Among them, the memory can be used to store software programs and modules, such as program instructions / modules corresponding to the methods and devices in the embodiments of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, implementing the methods in the above embodiments. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the terminal A via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0252] The processor can call the information and application programs stored in the memory through the transmission device to execute the following steps: obtain the data element to be processed; traverse the data lineage graph corresponding to the data element to be processed, and determine the upstream data element associated with the data element to be processed, wherein the data lineage graph is used to characterize the association relationship between multiple data elements in the production chain to which the data element to be processed belongs, and the upstream data element is used to characterize the data source for producing the data element to be processed; based on the upstream data elements, perform resource consumption evaluation on the data element to be processed to obtain the total resource consumption of the data element to be processed, wherein the total resource consumption is used to characterize the amount of resources consumed to produce and / or maintain the data element to be processed.
[0253] The processor can call the information and application programs stored in the memory through the transmission device to execute the following steps: obtain the cloud data elements of the cloud server; traverse the data lineage graph corresponding to the cloud data elements, and determine the upstream data elements associated with the cloud data elements, wherein the data lineage graph is used to characterize the association relationship between multiple data elements in the production chain to which the cloud data elements belong, and the upstream data elements are used to characterize the data source of the production cloud data elements; based on the upstream data elements, perform resource consumption evaluation on the cloud data elements to obtain the total resource consumption of the cloud data elements, wherein the total resource consumption is used to characterize the amount of resources consumed to produce and / or maintain the cloud data elements.
[0254] By adopting the embodiment of the present application, a data element to be processed is obtained; the data lineage graph corresponding to the data element to be processed is traversed to determine the upstream data element associated with the data element to be processed, wherein the data lineage graph is used to characterize the association relationship between multiple data elements in the production chain to which the data element to be processed belongs, and the upstream data element is used to characterize the data source for producing the data element to be processed; based on the upstream data elements, a resource consumption assessment is performed on the data element to be processed to obtain the total resource consumption of the data element to be processed, wherein the total resource consumption is used to characterize the amount of resources consumed to produce and / or maintain the data element to be processed, thereby improving the accuracy of the resource consumption assessment of the data element to be processed. It is easy to notice that in the process of evaluating the data elements to be processed, the upstream data elements associated with the data elements to be processed can be determined by traversing the data lineage graph corresponding to the data elements to be processed, and the resource consumption of the production process of the data elements to be processed can be determined based on the upstream data elements. By combining the data elements to be processed and the upstream data elements, the total resource consumption of the data elements to be processed can be evaluated from the full-link perspective of the production and operation of the data elements to be processed, thereby improving the accuracy of the resource consumption evaluation of the data elements to be processed, so that the resource consumption evaluation of the data elements can take into account more factors, thereby obtaining the total resource consumption of the data elements to be processed with higher accuracy, thereby solving the technical problem of low accuracy of resource consumption evaluation of data elements in related technologies.
[0255] Those skilled in the art will understand that Fig.14 The structure shown is for illustration only, and the electronic device may also be a smart phone (such as , tablet computers, PDAs, and mobile Internet devices (MID), PADs, and other terminal devices. This figure does not limit the structure of the above electronic devices. For example, electronic device A may also include more or fewer components (such as network interfaces, display devices, etc.) than those shown in the figure, or have a different configuration from that shown in the figure.
[0256] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0257] Example 6
[0258] The embodiment of the present application further provides a computer-readable storage medium. Optionally, in this embodiment, the computer-readable storage medium can be used to store the program code executed by the method provided in the above embodiment.
[0259] Optionally, in this embodiment, the storage medium may be located in any electronic device in a group of electronic devices in a computer network, or in any mobile terminal in a group of mobile terminals.
[0260] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: obtaining the data element to be processed; traversing the data lineage graph corresponding to the data element to be processed, and determining the upstream data element associated with the data element to be processed, wherein the data lineage graph is used to characterize the association relationship between multiple data elements in the production chain to which the data element to be processed belongs, and the upstream data element is used to characterize the data source for producing the data element to be processed; performing resource consumption evaluation on the data element to be processed based on the upstream data elements to obtain the total resource consumption of the data element to be processed, wherein the total resource consumption is used to characterize the amount of resources consumed to produce and / or maintain the data element to be processed.
[0261] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: obtaining cloud data elements of a cloud server; traversing a data lineage graph corresponding to the cloud data elements, and determining upstream data elements associated with the cloud data elements, wherein the data lineage graph is used to characterize the association relationship between multiple data elements in a production chain to which the cloud data elements belong, and the upstream data elements are used to characterize the data source for producing the cloud data elements; performing a resource consumption assessment on the cloud data elements based on the upstream data elements to obtain the total resource consumption of the cloud data elements, wherein the total resource consumption is used to characterize the amount of resources consumed to produce and / or maintain the cloud data elements.
[0262] By adopting the embodiment of the present application, a data element to be processed is obtained; the data lineage graph corresponding to the data element to be processed is traversed to determine the upstream data element associated with the data element to be processed, wherein the data lineage graph is used to characterize the association relationship between multiple data elements in the production chain to which the data element to be processed belongs, and the upstream data element is used to characterize the data source for producing the data element to be processed; based on the upstream data elements, a resource consumption assessment is performed on the data element to be processed to obtain the total resource consumption of the data element to be processed, wherein the total resource consumption is used to characterize the amount of resources consumed to produce and / or maintain the data element to be processed, thereby improving the accuracy of the resource consumption assessment of the data element to be processed. It is easy to notice that in the process of evaluating the data elements to be processed, the upstream data elements associated with the data elements to be processed can be determined by traversing the data lineage graph corresponding to the data elements to be processed, and the resource consumption of the production process of the data elements to be processed can be determined based on the upstream data elements. By combining the data elements to be processed and the upstream data elements, the total resource consumption of the data elements to be processed can be evaluated from the full-link perspective of the production and operation of the data elements to be processed, thereby improving the accuracy of the resource consumption evaluation of the data elements to be processed, so that the resource consumption evaluation of the data elements can take into account more factors, thereby obtaining the total resource consumption of the data elements to be processed with higher accuracy, thereby solving the technical problem of low accuracy of resource consumption evaluation of data elements in related technologies.
[0263] Example 7
[0264] The embodiment of the present application further provides a computer program product. Optionally, in this embodiment, the computer program product may include a computer program, and the computer program implements the method provided in the embodiment when executed by a processor.
[0265] Example 8
[0266] The embodiments of the present application also provide a computer program product. Optionally, the computer program product may include a non-volatile computer-readable storage medium, which may be used to store a computer program, and when the computer program is executed by a processor, the method provided in the embodiments is implemented.
[0267] Example 9
[0268] The embodiment of the present application further provides a computer program. Optionally, in this embodiment, when the computer program is executed by a processor, the method provided in the above embodiment is implemented.
[0269] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0270] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0271] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0272] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0273] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0274] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc., which can store program code.
[0275] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for evaluating resource consumption of data elements, characterized in that: include: Obtaining data elements to be processed; Traversing the data lineage graph corresponding to the data element to be processed, determining the upstream data element associated with the data element to be processed, wherein the data lineage graph is used to characterize the association relationship between multiple data elements in the production chain to which the data element to be processed belongs, and the upstream data element is used to characterize the data source for producing the data element to be processed; Performing resource consumption evaluation on the data element to be processed based on the upstream data element to obtain total resource consumption of the data element to be processed, wherein the total resource consumption is used to characterize the amount of resources consumed to produce and / or maintain the data element to be processed; The total resource consumption is determined based on the original resource consumption of the data element to be processed and the original resource consumption of the upstream data element, and the original resource consumption of the data element to be processed or the original resource consumption of the upstream data element is determined based on a target evaluation method, and the target evaluation method is an evaluation method corresponding to the data element to be processed determined from multiple evaluation methods, and the multiple evaluation methods include a time billing method and a usage billing method; Among them, the type of data elements to be processed includes application programming interfaces, or the upstream data elements include data development nodes. When the target evaluation method is the time billing method, the original resource consumption of the application programming interface or the data development node is determined based on the unit usage of resources consumed by the application programming interface or the data development node when running on the server cluster, the unit usage of resources consumed by the operation of multiple nodes on the server cluster, the usage time of the application programming interface or the data development node, and the unit resource consumption of the time billing method; when the target evaluation method is the usage billing method, the original resource consumption of the application programming interface or the data development node is determined based on the unit usage of resources consumed by the application programming interface or the data development node when running on the server cluster and the unit resource consumption of the usage billing method.
2. The method according to claim 1, characterized in that The performing resource consumption evaluation on the data element to be processed based on the upstream data element to obtain the total resource consumption of the data element to be processed includes: Determine the original resource consumption of the data element to be processed and the original resource consumption of the upstream data element, wherein the original resource consumption is used to characterize the amount of resources consumed to maintain the operation of the corresponding data element; Determine the production resource consumption of the data element to be processed based on the original resource consumption of the upstream data element, wherein the production resource consumption is used to characterize the amount of resources consumed in producing the data element to be processed; The sum of the original resource consumption and the production resource consumption of the data element to be processed is obtained to obtain the total resource consumption.
3. The method according to claim 2, characterized in that The determining the original resource consumption of the data element to be processed and the original resource consumption of the upstream data element includes: Determining a target evaluation method corresponding to the data element to be processed from a plurality of evaluation methods, wherein different evaluation methods use different dimensions to evaluate the data element to be processed; The original resource consumption of the data element to be processed and the original resource consumption of the upstream data element are determined based on the target evaluation method.
4. The method according to claim 1, characterized in that: The data elements to be processed include one of the following: a physical table and an application program interface, and the upstream data elements include one of the following: a physical table and a data development node.
5. The method according to claim 3, characterized in that: The type of the data element to be processed includes a physical table, or the type of the upstream data element includes a physical table; Determining the original resource consumption of the physical table based on the target evaluation method includes: Determine the storage space size occupied by the physical table, the total size of the physical tables participating in resource consumption assessment under the resource to which the physical table belongs, and the first usage time amount of the resource to which the physical table belongs; In a case where the target evaluation method is the first evaluation method, determining the original resource consumption of the physical table based on the storage space size, the total size, the first usage time amount, and the unit resource consumption corresponding to the first evaluation method; When the target evaluation method is the second evaluation method, the original resource consumption of the physical table is determined based on the storage space size and the unit resource consumption corresponding to the second evaluation method.
6. The method according to claim 3, characterized in that The type of the data element to be processed includes an application program interface, or the upstream data element includes a data development node; based on the target evaluation method, determining the original resource consumption of the application program interface or the data development node includes: Determining a second usage time amount of the application program interface or the data development node, a first unit usage amount of a processor consumed by running the application program interface or the data development node on a server cluster, a second unit usage amount of a processor consumed by running multiple nodes on the server cluster, a third unit usage amount of a memory consumed by running the application program interface or the data development node on the server cluster, and a fourth unit usage amount of a memory consumed by running multiple nodes on the server cluster; In the case where the target evaluation method is the first evaluation method, determining the original resource consumption of the application program interface or the data development node based on the first unit usage, the second unit usage, the third unit usage, the fourth unit usage, the second usage time, and the unit resource consumption corresponding to the first evaluation method, wherein the first evaluation method is the time billing method; In the case where the target evaluation method is the second evaluation method, determining the original resource consumption of the application program interface or the data development node based on the first unit usage, the third unit usage, and the unit resource consumption corresponding to the second evaluation method, wherein the second evaluation method is the usage billing method; Wherein, based on the first unit usage, the second unit usage, the third unit usage, the fourth unit usage, the second usage time and the unit resource consumption corresponding to the first evaluation method, the original resource consumption of the application interface or the data development node is determined, including: obtaining the ratio of the first preset time amount to the second usage time amount to obtain the second time amount ratio; obtaining the product of the second time amount ratio and the unit resource consumption corresponding to the second evaluation method to obtain the average resource consumption of the server cluster; obtaining the ratio of the first unit usage to the second unit usage to obtain the first usage share; obtaining the ratio of the third unit usage to the fourth unit usage to obtain the second usage share; obtaining the product of the average resource consumption, the first usage share and the first weight value to obtain the first usage consumption; obtaining the product of the second usage share and the second weight value to obtain the second usage consumption, wherein the sum of the first weight value and the second weight value is the preset value; obtaining the sum of the first usage consumption and the second usage consumption to obtain the original resource consumption of the application interface or the data development node; Among them, based on the first unit usage, the third unit usage and the unit resource consumption corresponding to the second evaluation method, the original resource consumption of the application interface or the data development node is determined, including: obtaining the ratio of the first unit usage to the second preset time amount to obtain the second time amount ratio; obtaining the ratio of the third unit usage to the second preset time amount to obtain the third time amount ratio; performing unit conversion on the third time amount ratio to obtain the converted time amount ratio; obtaining the product of the second time amount ratio and the first unit resource consumption corresponding to the second evaluation method to obtain the first time amount consumption, wherein the first unit resource consumption is used to characterize the unit resource consumption of the computing unit of the server cluster; obtaining the product of the converted time amount ratio and the second unit resource consumption corresponding to the second evaluation method to obtain the second time amount consumption, wherein the second unit resource consumption is used to characterize the unit resource consumption of the memory of the server cluster; obtaining the sum of the first time amount consumption and the second time amount consumption to obtain the original resource consumption of the application interface or the data development node.
7. The method according to claim 2, characterized in that The determining the production resource consumption of the data element to be processed based on the original resource consumption of the upstream data element includes: Traversing the data lineage graph to determine a first branch data element connected to the same data element as the data element to be processed, and traversing the data lineage graph to determine a second branch data element connected to the same data element as any one of the upstream data elements; Determining a first consumption weight corresponding to the data element to be processed based on the data element to be processed and the first branch data element; Determining a second consumption weight corresponding to the any one data element based on the any one data element and the second branch data element; The original resource consumption of the upstream data element is weighted based on the first consumption weight and the second consumption weight to obtain the production resource consumption of the data element to be processed.
8. The method according to claim 7, characterized in that The determining, based on the data element to be processed and the first branch data element, a first consumption weight corresponding to the data element to be processed includes one of the following: Obtaining a first total quantity of the data elements to be processed and the first branch data elements, determining a proportion of the data elements to be processed in the first total quantity, and obtaining the first consumption weight; Determine the first consumption of the data element to be processed within a preset period, and the first total consumption of the data element to be processed and the first branch data element, obtain the proportion of the first consumption in the first total consumption, and obtain the first consumption weight.
9. The method according to claim 7, characterized in that: The determining, based on the any one data element and the second branch data element, a second consumption weight corresponding to the any one data element includes one of the following: Obtaining a second total quantity of the any one data element and the second branch data element, determining a proportion of the any one data element in the second total quantity, and obtaining the second consumption weight; Determine the second consumption of any one of the data elements within a preset period, and the second total consumption of any one of the data elements and the second branch data element, obtain the proportion of the second consumption in the second total consumption, and obtain the second consumption weight.
10. A method for evaluating resource consumption of data elements, characterized in that: include: Obtain cloud data elements of the cloud server; Traversing the data lineage graph corresponding to the cloud data element, determining the upstream data element associated with the cloud data element, wherein the data lineage graph is used to characterize the association relationship between multiple data elements in the production chain to which the cloud data element belongs, and the upstream data element is used to characterize the data source for producing the cloud data element; Performing resource consumption evaluation on the cloud data element based on the upstream data element to obtain total resource consumption of the cloud data element, wherein the total resource consumption is used to characterize the amount of resources consumed to produce and / or maintain the cloud data element; The total resource consumption is determined based on the original resource consumption of the cloud data element and the original resource consumption of the upstream data element, and the original resource consumption of the cloud data element or the original resource consumption of the upstream data element is determined based on a target evaluation method, and the target evaluation method is an evaluation method corresponding to the cloud data element determined from multiple evaluation methods, and the multiple evaluation methods include a time billing method and a usage billing method; Among them, the type of cloud data elements includes application programming interfaces, or the cloud data elements include data development nodes. When the target evaluation method is the time billing method, the original resource consumption of the application programming interface or the data development node is determined based on the unit usage of resources consumed by the application programming interface or the data development node when running on the server cluster, the unit usage of resources consumed by the operation of multiple nodes on the server cluster, the usage time of the application programming interface or the data development node, and the unit resource consumption of the time billing method; when the target evaluation method is the usage billing method, the original resource consumption of the application programming interface or the data development node is determined based on the unit usage of resources consumed by the application programming interface or the data development node when running on the server cluster and the unit resource consumption of the usage billing method.
11. The method according to claim 10, characterized in that The performing resource consumption evaluation on the cloud data element based on the upstream data element to obtain the total resource consumption of the cloud data element includes: Determine the original resource consumption of the cloud data element and the original resource consumption of the upstream data element, wherein the original resource consumption is used to represent the amount of resources consumed to maintain the operation of the corresponding data element; Determining the production resource consumption of the cloud data element based on the original resource consumption of the upstream data element, wherein the production resource consumption is used to characterize the amount of resources consumed in producing the cloud data element; The sum of the original resource consumption and the production resource consumption of the cloud data element is obtained to obtain the total resource consumption.
12. An electronic device, characterized in that: include: A memory storing an executable program; A processor, configured to run the program, wherein the program executes the method according to any one of claims 1 to 11 when running.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored executable program, wherein when the executable program is executed, the device where the storage medium is located is controlled to execute the method according to any one of claims 1 to 11.
14. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 11.
