Resource level determination method and device, electronic equipment and storage medium
By building data links and updating resource levels, and grading resources according to business importance and scope of impact, the problem of unreasonable resource grading in the existing technology is solved, and the rationality of resource allocation and business satisfaction are improved.
Patent Information
- Application Number
- CN202410991985.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2024-11-01
AI Technical Summary
In the prior art, it is difficult to reasonably classify resources based on the actual business situation when manually classifying resources, resulting in resource levels not meeting business needs and unreasonable resource allocation.
By obtaining the business resource collection of to-do business, building a data link, determining the number of downstream business resources and preset resource levels of each business resource, updating the resource level, and grading according to the importance and scope of influence of the business to resources.
It realizes the rational allocation of resource levels, meets the actual business needs, improves the rationality of budget allocation, and avoids the problem of resource levels inconsistency caused by manual grading.
Smart Images

Figure CN118885294A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of resource classification, and in particular to a method, device, electronic device and storage medium for determining a resource level. Background Art
[0002] Data link refers to the entire data processing flow for realizing a certain actual business, from the earliest data collection, to data storage and data analysis, to the final business realization. This data processing flow is called data link, and each actual business corresponds to a data link.
[0003] Each task node of the data link requires corresponding resources to execute normally (for example, specific data resources are required to perform computing tasks). When there are a large number of data links, it is difficult to reasonably allocate the budget to various resources due to limitations in manpower and computing power, and it is impossible to maximize the use of the budget.
[0004] In the prior art, in order to reasonably allocate the budget, different levels are usually set manually for each resource, and when allocating the budget, the budget is tilted towards resources with higher levels.
[0005] However, when there are a large number of businesses in the entire company, a large amount of resources are needed to support business implementation. At this time, the company usually contains multiple data links, and a resource may appear in multiple links. The level of such resources should be higher than the level of resources that only appear in one link. The manual classification method is difficult to classify a large number of resources according to the actual situation of such business data links, and it is also difficult to reasonably and accurately classify different resources according to the actual business situation, resulting in the resource level not meeting the actual needs of the business and causing unreasonable allocation of resources. Summary of the invention
[0006] The present application provides a method, device, electronic device and storage medium for determining resource levels to solve the problem caused by the prior art of manually grading resources, that is, the problem of being unable to reasonably grade different resources according to the actual business situation. By determining the importance of resources to the business and the scope of their impact on the business, resources are graded according to their importance and scope of impact, ensuring that the level of resources meets the actual needs of the business and improving the rationality of budget allocation.
[0007] In a first aspect, the present application provides a method for determining a resource level, comprising:
[0008] Acquire a business resource set for the pending business, wherein the business resource set includes all relevant business resources for the pending business;
[0009] Acquire the upstream and downstream relationship of each business resource in the business resource set according to the business process, and construct the data link of the pending business according to the upstream and downstream relationship;
[0010] Determining the number of downstream service resources of each service resource in the data link;
[0011] Obtaining the preset resource level of each service resource in the data link;
[0012] According to the number of downstream business resources corresponding to each business resource in the data link and the preset resource level of the corresponding downstream business resource, the preset resource level of the business resource is updated, and the updated level is used as the resource level of the business resource.
[0013] Optionally, acquiring the upstream and downstream relationship of each business resource in the business resource set according to the business process includes:
[0014] Establishing identifiers of various business resources corresponding to the pending business according to the business process;
[0015] Determine the upstream and downstream relationship of each business resource according to the identifier;
[0016] Among them, the identifier includes a first identifier and a second identifier, the first identifier is used to characterize the resource characteristics of the business resource, the resource characteristics are the business parameters of the business resource, and the second identifier is used to characterize the transmission relationship between the business resource and other business resources, and the transmission relationship is the business process transmission relationship between the business resource and other business resources.
[0017] Optionally, determining the upstream and downstream relationship of each business resource according to the identifier includes:
[0018] Determine, according to the second identifier, a downstream business resource and an upstream business resource of the business resource, wherein the downstream business resource is a business resource other than the business resource in the data link that affects a resource level of the business resource, and the upstream business resource is a business resource other than the business resource in the data link whose resource level is affected by the business resource;
[0019] Utilize the downstream business resources and upstream business resources of each business resource to determine the upstream and downstream relationships of each business resource.
[0020] Optionally, updating the preset resource level of the business resource according to the number of downstream business resources corresponding to each business resource in the data link and the preset resource level of the corresponding downstream business resource, and using the updated level as the resource level of the business resource, includes:
[0021] According to the number of downstream business resources corresponding to each upstream business resource, the business dependency level of each upstream business resource is obtained;
[0022] Determining an initial resource level of each upstream service resource in the data link according to the service dependency level and a preset resource level of the downstream service corresponding to each upstream service resource;
[0023] In a case where the preset resource level of the upstream service resource is lower than the initial resource level of the upstream service resource, the preset resource level of the upstream service resource is updated to the initial resource level.
[0024] Optionally, obtaining the service dependency level of each upstream service resource according to the number of downstream service resources corresponding to each upstream service resource includes:
[0025] Get the preset high dependency threshold and low dependency threshold;
[0026] Determine the relationship between the number of downstream business resources corresponding to each upstream business resource and the high dependency threshold and the low dependency threshold;
[0027] The service dependency level of each upstream service resource is determined according to the size relationship.
[0028] Optionally, determining the initial resource level of each upstream service resource in the data link according to the service dependency level and a preset resource level of the downstream service corresponding to each upstream service resource includes:
[0029] In the case where the service dependency level of the upstream service resource is higher than the preset resource level of the downstream service corresponding to the upstream service resource, using the service dependency level as the initial resource level of the upstream service resource;
[0030] When the service dependency level of the upstream service resource is lower than the preset resource level of the downstream service corresponding to the upstream service resource, the preset resource level of the downstream service corresponding to the upstream service resource is used as the initial resource level of the upstream service resource.
[0031] Optionally, the method further comprises:
[0032] When the business resources of the pending business are modified, determine the modified business resource set, and use the modified business resource set as a new business resource to re-execute the steps of obtaining the upstream and downstream relationships of each business resource in the business resource set according to the business process, and constructing the data link of the pending business based on the upstream and downstream relationships.
[0033] In a second aspect, the present application further provides a device for determining a resource level, comprising:
[0034] Resource acquisition module, used to obtain a collection of business resources for pending business;
[0035] A link construction module, used to obtain the upstream and downstream relationship of each business resource in the business resource set according to the business process, and construct the data link of the pending business according to the upstream and downstream relationship;
[0036] A determination module, used to determine the number of downstream business resources of each business resource in the data link;
[0037] A level acquisition module, used to acquire the preset resource level of each service resource in the data link;
[0038] The level update module is used to update the preset resource level of the business resources according to the number of downstream business resources corresponding to each business resource in the data link and the preset resource level of the corresponding downstream business resources, and use the updated level as the resource level of the business resources.
[0039] In a third aspect, the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the method for determining the resource level described in any one of the embodiments of the first aspect are implemented.
[0040] In a fourth aspect, the present application further provides a computer storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the method for determining a resource level as described in any one of the embodiments of the first aspect are implemented.
[0041] The above-mentioned technical scheme provided by the embodiment of the present application has the following advantages compared with the prior art: the method provided by the embodiment of the present application, after obtaining the preset resource level of each business resource, updates the preset resource level of each upstream business resource in the data link according to the preset resource level of the downstream business in the data link and the number of downstream business resources corresponding to each upstream business resource, and obtains the resource level through the pre-business resource level and the resource dependency, which can reasonably determine the resource level according to the actual needs of the business, avoids the problem of resource level not meeting the actual needs of the business caused by manual grading, and improves the rationality of budget allocation. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0043] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0044] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0045] Figure 1 A schematic diagram of a method for determining a resource level provided in an embodiment of the present application;
[0046] Figure 2 A schematic diagram of an actual data link provided in an embodiment of the present application;
[0047] Figure 3 A flowchart of pending services provided in an embodiment of the present application;
[0048] Figure 4 A schematic diagram of another actual data link provided in an embodiment of the present application;
[0049] Figure 5 A schematic diagram of the structure of a device for determining a resource level provided in an embodiment of the present application;
[0050] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, 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 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 making creative work are within the scope of protection of this application.
[0052] The disclosure below provides many different embodiments or examples to implement different structures of the present invention. In order to simplify the disclosure of the present invention, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present invention. In addition, the present invention can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.
[0053] In order to solve the problem in the prior art that different resources cannot be reasonably classified according to the actual business situation, the present application provides a method for determining resource levels, which can realize classification based on the importance and impact scope of resources to the business, ensure that resource classification meets the actual needs of the business, and improve the rationality of budget allocation.
[0054] Figure 1 A flowchart of a method for determining a resource level provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the method for determining the resource level includes:
[0055] S11, obtaining a business resource set for a pending business, wherein the business resource set includes all relevant business resources for the pending business;
[0056] When determining the level of resources, you first need to determine the various pending businesses that the company needs to achieve, and the level of resources related to any pending business needs to be determined. When determining which resources are related to the business, first determine which resource is ultimately required by the pending business, then determine another resource related to that resource, then determine other resources related to that resource, and so on to find out the resources that are related to each other. All the resources found are business-related resources.
[0057] Let's take a practical example as an illustration: suppose the pending business is to display a poster image. First, determine the resources that the business ultimately requires, and obtain the resource of the task of displaying a poster image; then determine the related business resources related to the resource (the task of displaying a poster image), and obtain the resource of the poster image itself; then determine other resources related to the resource (poster image), and obtain the resource of the task of reading the poster image from the memory, and so on, and continuously determine the related resources, and determine that all the related business resources constitute the business resource set of the pending business of displaying a poster image. Similarly, for other businesses, the business resource set is determined in the same way.
[0058] The business resource collection contains all the related business resources used. Taking the above example as an illustration, the pending resource is the task of reading a poster image from the memory. If there are multiple poster images in the memory, and different poster images need to be displayed on different businesses, then these businesses need to use the pending resource.
[0059] In actual applications, the business resource collection can be determined based on the relationship between resources. First, the pending resource itself is known, and then other resources that perform actions such as reading, writing, and calling the pending resource are found. Then resources that perform various actions on other resources are found, and so on, until it is determined which business the resource ultimately points to, and the business that is ultimately pointed to is added to the business collection.
[0060] S12, acquiring the upstream and downstream relationship of each business resource in the business resource set according to the business process, and constructing the data link of the pending business according to the upstream and downstream relationship;
[0061] In this embodiment, the front-end and back-end relationships between each business resource in the business resource set are obtained, and these upstream and downstream relationships are used to design corresponding data links so that data can flow in an orderly manner between each business resource, ensuring the consistency and accuracy of the entire business process.
[0062] Figure 2 A schematic diagram of an actual data link provided in an embodiment of the present application, Figure 3 A flowchart of pending services provided in the embodiment of the present application. Figure 2 and Figure 3 This article describes a specific example of building a data link: Assuming that the actual business is to calculate the number of times a video is played, the data resources in the data link of this business are divided into resources such as Hive tables, Iceberg tables, Kafka data streams, and Mysql tables; the process resources are divided into resources such as Flink tasks, Spark tasks, Trino tasks, and backend programs.
[0063] Figure 3 It is a Flink task resource. We know that the task needs to read Kafka data and write MySQL data. We know that the Flink task itself is a resource, Kafka data is the upstream resource of the Flink task, and MySQL data is the downstream resource of the Flink task. Based on this, we can build a data link between the three.
[0064] For the business of calculating the number of times a video is played, a Flink task can be used to execute it. At this time, the upstream and downstream relationship of resources needs to be determined based on the second identifier of different Flink tasks, such as Figure 3 As shown in the figure, one Flink task needs to write ODS layer Kafka data and read original data, while another Flink task is to read ODS layer Kafka data and write DWD layer Kafka data. According to the relationship between tasks and data (that is, the second identifier), the entire data link can be constructed. The final data link is Figure 3 The style of the link being displayed.
[0065] S13, determining the number of downstream service resources of each service resource in the data link;
[0066] S14, obtaining a preset resource level of each service resource in the data link;
[0067] Each actual business has its own business level, which can be set manually or automatically. For manual setting, company employees can set different business levels according to the importance of different businesses. For automatic setting, it can be set according to the functions achieved by different businesses. The more relevant the function is to the company's core interests, the higher the business level. For example, the poster image display business mentioned above has a higher level because it will affect the company's advertising economic benefits. In addition, it can also be set according to the number of resource nodes in the data link of each business. The more resource nodes, the more resources are required for the business to be realized, and the higher the business level.
[0068] Taking the display of poster images as an example of pending business, the specific level of the following three types of resources is determined: the first type is resources that have never been determined; the second type is resources that have been modified (such as daily maintenance or fault repair by staff); the third type is other resources on the same data link as the modified resources. If the modified resources are on multiple data links at the same time, the other resources on these data links need to be re-leveled. For any pending resource, this application process needs to be executed. In order to distinguish between various resources, only the resources participating in the level determination process will be referred to as pending resources in the future.
[0069] S15, according to the number of downstream business resources corresponding to each business resource in the data link and the preset resource level of the corresponding downstream business resource, update the preset resource level of the business resource, and use the updated level as the resource level of the business resource
[0070] In this embodiment, the data link ultimately serves the downstream business, and the importance level of the downstream business determines the importance level of the resources in the upstream link. For example, if the advertising business is an important source of income for the company, the upstream resources it relies on are all of high priority level; another business is only used for troubleshooting, and the upstream resources it relies on are of low priority level, and the upstream resource level cannot be lower than the downstream business level; in addition, business resources that are relied on more mean that they have a wide impact and should be more important; therefore, according to the preset resource level corresponding to the downstream business in the data link, and the number of downstream business resources corresponding to each upstream business resource, the preset resource level of each upstream business resource in the data link is updated, and the updated level is used as the resource level of each upstream business resource; the resource level obtained by this method can reasonably determine the resource level according to the actual needs of the business, avoiding the problem that the resource level does not meet the actual needs of the business due to manual grading, and improving the rationality of budget allocation.
[0071] The method for determining resource levels proposed in this embodiment obtains the preset resource level of each business resource, and then updates the preset level of each upstream business resource in the data link according to the preset resource level of the downstream business in the data link and the number of downstream business resources corresponding to each upstream business resource. The resource level is obtained by the preset business resource level and the degree of resource dependence, and the resource level can be reasonably determined according to the actual needs of the business, thereby avoiding the problem that manual grading may cause the resource level to be inconsistent with the actual needs of the business, improving the rationality of budget allocation, ensuring that resources are reasonably allocated, so as to better meet business needs and improve the efficiency and performance of the entire system.
[0072] Considering that the resource identifiers obtained in the above embodiments are only identifiers that characterize the characteristics of the resources themselves, and do not reflect the relationship between resources, since the data link is the result of the mutual association of multiple resources, when a resource is abnormal, if the relationship between resources cannot be determined, the abnormal resource cannot be located based on other resources, which reduces the efficiency of daily maintenance. Therefore, in order to determine the relationship between resources, the present application also provides another method. In an optional scheme of the embodiment of the present invention, the upstream and downstream relationships of each business resource in the business resource set are obtained according to the business process, including:
[0073] Establishing identifiers of various business resources corresponding to the pending business according to the business process;
[0074] Determine the upstream and downstream relationship of each business resource according to the identifier;
[0075] Among them, the identifier includes a first identifier and a second identifier, the first identifier is used to characterize the resource characteristics of the business resource, the resource characteristics are the business parameters of the business resource, and the second identifier is used to characterize the transmission relationship between the business resource and other business resources, and the transmission relationship is the business process transmission relationship between the business resource and other business resources.
[0076] A different first identifier is set for each pending resource. For data resources, parameters that can uniquely characterize the resource, such as the data type, the data name, and the name of the data cluster, can be used as the first identifier of the data resource;
[0077] The specific resource characteristics are the business parameters of the business resources. For process-type resources, the name of the task (custom name or task header name), the type of task (the type that describes the actual function of the task), and the information when the task is created (such as the creation time) and other business parameters that can uniquely characterize the task can be used as the first identifier of the process-type resource.
[0078] Take a practical example as an example: for Kafka data stream, the name of Kafka data and the name of the cluster can be set as the first identifier of the Kafka data stream; for MySQL information, the MySQL data table name and database name can be set as the first identifier of the MySQL information.
[0079] A data link contains multiple resources, each resource corresponds to at least one first identifier. When determining whether a certain service uses pending resources, each first identifier of the pending resource will be compared with each first identifier in the identifier set. If at least one comparison result is consistent, it is determined that the service uses the pending resource and the service needs to be added to the service set.
[0080] The transmission relationship is the business process transmission relationship between the business resource and other business resources. In actual application scenarios, after a new resource is detected or a resource change is detected, the identifier of the resource will be immediately obtained so that the resource can be subsequently classified. For process resources, because process resources represent the process of a task, the execution of the task will inevitably affect other data. It can be seen that there must be a process transmission relationship between process resources and other resources. Therefore, it is also necessary to record the business process transmission relationship between process resources and other resources and use this relationship as the second identifier of the process resources.
[0081] For data resources, they can be passively read or written by other resources. One data resource may be affected by multiple other resources. If a second identifier is also set for data resources, not only duplicate second identifiers will be generated, but also complex relationship lines will exist for data resources. Based on this, only set the second identifier for process resources, and not for data resources; or after setting the second identifier for data resources, deduplicate the second identifier.
[0082] like Figure 3 As shown, there is a task that reads Kafka data and writes MySQL data. The name of the task is Flink. In addition to using the name Flink as the identifier of the Flink task, the relationship between the Flink task writing MySQL data and the Flink task reading Kafka data also needs to be set as the identifier of the Flink task.
[0083] When considering how to represent the identifier of the Flink task writing MySQL data and the identifier of the Flink task reading Kafka data, you can combine the identifiers of the two business resources to represent the relationship between the two resources. For example, you can set the string Flink-MySQL to represent the Flink task writing MySQL data; set the string Kafka-Flink to represent the Flink task reading Kafka data. Finally, use both Flink-MySQL and Kafka-Flink as the second identifier of the Flink task.
[0084] In an optional solution of the embodiment of the present invention, determining the upstream and downstream relationship of each service resource according to the identifier includes:
[0085] Determine, according to the second identifier, a downstream business resource and an upstream business resource of the business resource, wherein the downstream business resource is a business resource other than the business resource in the data link that affects a resource level of the business resource, and the upstream business resource is a business resource other than the business resource in the data link whose resource level is affected by the business resource;
[0086] Utilize the downstream business resources and upstream business resources of each business resource to determine the upstream and downstream relationships of each business resource.
[0087] In this embodiment, the relationship between business resources can be determined by determining the second identifier, and all data links can be automatically constructed based on the relationship without manual construction, which significantly improves efficiency and reduces workload.
[0088] In an optional solution of the embodiment of the present invention, updating the preset resource level of the business resource according to the number of downstream business resources corresponding to each business resource in the data link and the preset resource level of the corresponding downstream business resource, and using the updated level as the resource level of the business resource, includes:
[0089] According to the number of downstream business resources corresponding to each upstream business resource, the business dependency level of each upstream business resource is obtained;
[0090] Determining an initial resource level of each upstream service resource in the data link according to the service dependency level and a preset resource level of the downstream service corresponding to each upstream service resource;
[0091] In a case where the preset resource level of the upstream service resource is lower than the initial resource level of the upstream service resource, the preset resource level of the upstream service resource is updated to the initial resource level.
[0092] From the perspective of a single data link, it usually includes data collection, data warehouse construction, and business scenarios. The dependent data and computing tasks usually include more than 10 resources. However, the value of the entire data link is reflected in the final business application (downstream business resources), so the level of resources in the link is determined by the downstream business resources.
[0093] For example, if the advertising business is an important source of revenue for the company, the upstream resources it relies on are all of high priority level; if another business is only used for troubleshooting, the upstream resources it relies on are of low priority level.
[0094] Usually contains multiple data links, a resource may appear in multiple links, the level of such resources should be higher than the level of resources that only appear in one link.
[0095] In this embodiment, firstly, the service dependency level of each upstream service resource is obtained according to the number of downstream service resources corresponding to each upstream service resource, and then the higher level of the service dependency level and the preset resource level of the downstream service corresponding to each upstream service resource is used as the resource level of the upstream service resource. The data link is automatically sorted out, and then all resources are automatically graded based on the service level and resource dependency.
[0096] In an optional solution of the embodiment of the present invention, obtaining the service dependency level of each upstream service resource according to the number of downstream service resources corresponding to each upstream service resource includes:
[0097] Get the preset high dependency threshold and low dependency threshold;
[0098] Determine the relationship between the number of downstream business resources corresponding to each upstream business resource and the high dependency threshold and the low dependency threshold;
[0099] The service dependency level of each upstream service resource is determined according to the size relationship.
[0100] Take a practical example as an illustration: the number of downstream business resources corresponding to each upstream business resource is compared with the low dependency threshold and the high dependency threshold respectively, and the high dependency threshold is greater than the low dependency threshold; when the number of downstream business resources corresponding to the upstream business resources is greater than or equal to the high dependency threshold, the business dependency level of the upstream business resources is the first level; when the number of downstream business resources corresponding to the upstream business resources is less than the high dependency threshold and greater than the low dependency threshold, the business dependency level of the upstream business resources is the second level; when the number of downstream business resources corresponding to the upstream business resources is less than or equal to the low dependency threshold, the business dependency level of the upstream business resources is the third level.
[0101] In this embodiment, a preset low-dependency quantity and a high-dependency quantity are set, and further, the number of downstream service resources is compared with the preset dependency quantity to determine the service dependency level of the upstream service resources.
[0102] For example, the levels are divided into three levels: A / B / C (corresponding to the first level, the second level, and the third level in sequence), with the highest importance level for A, followed by B, and the lowest for C. At the same time, two thresholds x and y of the number of dependencies are given to determine the level of resources, where x < y. If the number of dependencies of a resource is less than x, the level is C; if it is greater than x and less than y, the level is B; if it is greater than y, the level is A. The level of a resource is equal to the highest level among the downstream service level and the level calculated based on the threshold.
[0103] For example, assume that the company has a total of 10 actual services, and the service levels are ranked from high to low as A / B / C. The number of services of most resources is in the range of 1 to 4, and only a few resources have a service number greater than 4. When setting the corresponding quantity range of the service quantity, 1 can be divided into the range corresponding to level C, 2 to 4 can be divided into the range corresponding to level B, and 5 to 10 can be divided into the range corresponding to level A.
[0104] In an alternative solution of the embodiment of the present invention, determining the initial resource level of each upstream service resource in the data link according to the service dependency level and the preset resource level of the downstream service corresponding to each upstream service resource includes:
[0105] When the service dependency level of the upstream service resource is higher than the preset resource level of the downstream service corresponding to the upstream service resource, the service dependency level is used as the initial resource level of the upstream service resource;
[0106] When the service dependency level of the upstream service resource is lower than the preset resource level of the downstream service corresponding to the upstream service resource, the preset resource level of the downstream service corresponding to the upstream service resource is used as the initial resource level of the upstream service resource.
[0107] In this embodiment, the higher level is selected from the service dependency level of the upstream service resource and the preset resource level of the downstream service corresponding to the upstream service resource as the initial resource level of the upstream service resource.
[0108] In this way, the situation where a large number of resources reach the highest level due to too many actual service quantities is avoided, thereby avoiding the situation where unimportant resources obtain a relatively high level, and improving the rationality of level classification.
[0109] Figure 4 Another schematic diagram of an actual data link provided for the embodiment of the present application is as Figure 4As shown, because data-7 only affects business A and the affected business scope is relatively narrow, the actual level of data-7 is determined to be C, while data-4 affects task-C and task-D, and the affected business scope is relatively wide, so the actual level of data-7 is determined to be C; in addition, since the level of the corresponding downstream business resource business D of data-3 is the highest level A, the level of data-3 is A.
[0110] Through the above-mentioned automated hierarchical management of business resource levels, each resource management platform can provide different guarantees for resources at different levels, which is conducive to reserving more computing or storage redundant resources for high-quality resources, configuring a dedicated monitoring disk, supporting more comprehensive inspections, and providing faster operation and maintenance response.
[0111] In an optional solution of the embodiment of the present invention, the method further includes:
[0112] When the business resources of the pending business are modified, determine the modified business resource set, and use the modified business resource set as a new business resource to re-execute the steps of obtaining the upstream and downstream relationships of each business resource in the business resource set according to the business process, and constructing the data link of the pending business based on the upstream and downstream relationships.
[0113] In actual applications, in addition to the need to classify when new resources are added, if existing classified resources are modified, the level of the modified resources needs to be re-determined.
[0114] In addition, other resources on the same data link as the modified resource also need to re-determine their levels; while other resources not on the same data link as the modified resource do not need to re-determine their levels.
[0115] Specifically, resources to be re-ranked are determined from downstream to upstream, that is, from the last actual business to the earliest resource. When a resource is modified, other resources upstream of the resource need to be re-ranked.
[0116] Please refer to Figure 4 , if Task-E is modified, the levels of Data-5, Task-A, Data-2, and Data-1 need to be re-determined. If the level of service D changes, Data-10, Task-F, Data-6, Task-B, and Data-3 all need to be re-determined. Furthermore, if another data link uses the resources whose levels are re-determined, the upstream resources of the other data link also need to be re-determined. Taking the figure as an example, assuming that Task-A will write Data-6, if the level of service D changes, Task-A, Data-2, and Data-1 also need to be re-determined.
[0117] It should be noted that, when the preset resource level of a business resource is actively modified, the levels of other resources located upstream of the resource need to be re-determined based on the modified preset resource level.
[0118] Through the above-mentioned automatic update of business resource levels, when business resources are modified, a new business resource set is determined, and a new data link is constructed according to the upstream and downstream relationships in the new business resource set to achieve resource level determination of each business resource in the data link. It is possible to track changes in business resources in real time and ensure that resource level updates are always synchronized with business needs. There is no need to manually update the level of each business resource in the business resource set one by one, which reduces the tediousness and errors of manual operations and improves the accuracy and consistency of data.
[0119] Figure 5 A schematic diagram of a structure of a device for determining a resource level provided in an embodiment of the present application, such as Figure 5 As shown, the device specifically includes:
[0120] Resource acquisition module 501, used to acquire a business resource set of a pending business, wherein the business resource set includes all relevant business resources of the pending business;
[0121] The link construction module 502 is used to obtain the upstream and downstream relationship of each business resource in the business resource set according to the business process, and construct the data link of the pending business according to the upstream and downstream relationship;
[0122] A determination module 503, configured to determine the number of downstream service resources of each service resource in the data link;
[0123] The level acquisition module 504 is used to acquire the preset resource level of each service resource in the data link;
[0124] The level update module 505 is used to update the preset resource level of the business resources according to the number of downstream business resources corresponding to each business resource in the data link and the preset resource level of the corresponding downstream business resources, and use the updated level as the resource level of the business resources.
[0125] In one possible implementation, the link construction module 502 is also used to establish identifiers for each business resource corresponding to the pending business according to the business process; determine the upstream and downstream relationships of each business resource according to the identifier; wherein the identifier includes a first identifier and a second identifier, the first identifier is used to characterize the resource characteristics of the business resource, the resource characteristics are the business parameters of the business resource, and the second identifier is used to characterize the transmission relationship between the business resource and other business resources, and the transmission relationship is the business process transmission relationship between the business resource and other business resources.
[0126] In one possible implementation, the link construction module 502 is also used to determine the downstream business resources and upstream business resources of the business resources based on the second identifier, wherein the downstream business resources are business resources other than business resources in the data link that affect the resource level of the business resources, and the upstream business resources are business resources other than business resources in the data link whose resource level is affected by the business resources; the upstream and downstream relationships of each business resource are determined by utilizing the downstream business resources and upstream business resources of each business resource.
[0127] In one possible implementation, the level update module 505 is also used to obtain the business dependency level of each upstream business resource based on the number of downstream business resources corresponding to each upstream business resource; determine the initial resource level of each upstream business resource in the data link based on the business dependency level and the preset resource level of the downstream business corresponding to each upstream business resource; and update the preset resource level of the upstream business resource to the initial resource level when the preset resource level of the upstream business resource is lower than the initial resource level of the upstream business resource.
[0128] In one possible implementation, the level update module 505 is also used to obtain a preset high dependency threshold and a low dependency threshold; determine the relationship between the number of downstream business resources corresponding to each upstream business resource and the high dependency threshold and the low dependency threshold; and determine the business dependency level of each upstream business resource based on the relationship.
[0129] In one possible implementation, the level update module 505 is also used to, when the business dependency level of the upstream business resource is higher than the preset resource level of the downstream business corresponding to the upstream business resource, use the business dependency level as the initial resource level of the upstream business resource; and, when the business dependency level of the upstream business resource is lower than the preset resource level of the downstream business corresponding to the upstream business resource, use the preset resource level of the downstream business corresponding to the upstream business resource as the initial resource level of the upstream business resource.
[0130] In one possible embodiment, the device also includes a modification module 506, which is used to determine a modified business resource set when the business resources of the pending business are modified, and use the modified business resource set as a new business resource to re-execute the steps of obtaining the upstream and downstream relationships of each business resource in the business resource set according to the business process, and constructing a data link of the pending business based on the upstream and downstream relationships.
[0131] The text game implementation system provided in this embodiment can be as follows Figure 5 The resource level determination device shown in can be executed as follows: Figure 1-4All steps in determining the resource level in Figure 1-4 The technical effect of determining the resource level shown is shown in the table. For details, please refer to Figure 1-4 For the sake of brevity, the relevant description is not repeated here.
[0132] The system embodiment described above is merely illustrative, wherein 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 modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0133] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 6 As shown, an embodiment of the present application provides an electronic device, including a processor 601, a communication interface 602, a memory 603 and a communication bus 604, wherein the processor 601, the communication interface 602, and the memory 603 communicate with each other through the communication bus 604; the memory 603 is used to store computer programs; the processor 601 is used to execute the program stored in the memory 603, and implement the steps of the word game implementation method provided by any of the above method embodiments:
[0134] Obtain a business resource set for pending business, wherein the business resource set includes all relevant business resources for the pending business; obtain the upstream and downstream relationships of each business resource in the business resource set according to the business process, and construct a data link for the pending business based on the upstream and downstream relationships; determine the number of downstream business resources for each business resource in the data link; obtain the preset resource level of each business resource in the data link; update the preset resource level of the business resource based on the number of downstream business resources corresponding to each business resource in the data link and the preset resource level of the corresponding downstream business resource, and use the updated level as the resource level of the business resource.
[0135] In one possible implementation, an identifier for each business resource corresponding to the pending business is established based on the business process; the upstream and downstream relationships of each business resource are determined based on the identifier; wherein the identifier includes a first identifier and a second identifier, the first identifier is used to characterize the resource characteristics of the business resource, the resource characteristics are the business parameters of the business resource, and the second identifier is used to characterize the transmission relationship between the business resource and other business resources, the transmission relationship is the business process transmission relationship between the business resource and other business resources.
[0136] In one possible implementation, the downstream business resources and upstream business resources of the business resources are determined based on the second identifier, wherein the downstream business resources are business resources other than business resources in the data link that affect the resource level of the business resources, and the upstream business resources are business resources other than business resources in the data link whose resource level is affected by the business resources; the upstream and downstream relationships of each business resource are determined by utilizing the downstream business resources and upstream business resources of each business resource.
[0137] In one possible implementation, the business dependency level of each upstream business resource is obtained based on the number of downstream business resources corresponding to each upstream business resource; the initial resource level of each upstream business resource in the data link is determined based on the business dependency level and the preset resource level of the downstream business corresponding to each upstream business resource; and when the preset resource level of the upstream business resource is lower than the initial resource level of the upstream business resource, the preset resource level of the upstream business resource is updated to the initial resource level.
[0138] In one possible implementation, a preset high dependency threshold and a low dependency threshold are obtained; the relationship between the number of downstream business resources corresponding to each upstream business resource and the high dependency threshold and the low dependency threshold is determined; and the business dependency level of each upstream business resource is determined based on the relationship.
[0139] In one possible implementation, when the business dependency level of the upstream business resource is higher than the preset resource level of the downstream business corresponding to the upstream business resource, the business dependency level is used as the initial resource level of the upstream business resource; when the business dependency level of the upstream business resource is lower than the preset resource level of the downstream business corresponding to the upstream business resource, the preset resource level of the downstream business corresponding to the upstream business resource is used as the initial resource level of the upstream business resource.
[0140] In one possible implementation, when the business resources of the pending business are modified, the modified business resource set is determined, and the modified business resource set is used as a new business resource to re-execute the steps of obtaining the upstream and downstream relationships of each business resource in the business resource set according to the business process, and constructing the data link of the pending business based on the upstream and downstream relationships.
[0141] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or some parts of the embodiment.
[0142] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "" as used herein may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive and therefore specify the presence of stated features, steps, operations, elements and / or parts, but do not exclude the presence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.
[0143] The above is only a specific embodiment of the present invention, so that those skilled in the art can understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but should conform to the widest scope consistent with the principles and novel features applied herein.
Claims
1. A method for determining resource level, characterized in that: include: Acquire a business resource set for the pending business, wherein the business resource set includes all relevant business resources for the pending business; Acquire the upstream and downstream relationship of each business resource in the business resource set according to the business process, and construct the data link of the pending business according to the upstream and downstream relationship; Determining the number of downstream service resources of each service resource in the data link; Obtaining the preset resource level of each service resource in the data link; According to the number of downstream business resources corresponding to each business resource in the data link and the preset resource level of the corresponding downstream business resource, the preset resource level of the business resource is updated, and the updated level is used as the resource level of the business resource.
2. The method according to claim 1, characterized in that: The obtaining of the upstream and downstream relationship of each business resource in the business resource set according to the business process includes: Establishing identifiers of each business resource corresponding to the pending business according to the business process; Determine the upstream and downstream relationship of each business resource according to the identifier; Among them, the identifier includes a first identifier and a second identifier, the first identifier is used to characterize the resource characteristics of the business resource, the resource characteristics are the business parameters of the business resource, and the second identifier is used to characterize the transmission relationship between the business resource and other business resources, and the transmission relationship is the business process transmission relationship between the business resource and other business resources.
3. The method according to claim 2, characterized in that Determining the upstream and downstream relationship of each business resource according to the identifier includes: Determine, according to the second identifier, a downstream business resource and an upstream business resource of the business resource, wherein the downstream business resource is a business resource other than the business resource in the data link that affects a resource level of the business resource, and the upstream business resource is a business resource other than the business resource in the data link whose resource level is affected by the business resource; Utilize the downstream business resources and upstream business resources of each business resource to determine the upstream and downstream relationships of each business resource.
4. The method according to claim 1, characterized in that: The updating of the preset resource level of the service resource according to the number of downstream service resources corresponding to each service resource in the data link and the preset resource level of the corresponding downstream service resource, and using the updated level as the resource level of the service resource, comprises: According to the number of downstream business resources corresponding to each upstream business resource, the business dependency level of each upstream business resource is obtained; Determining an initial resource level of each upstream service resource in the data link according to the service dependency level and a preset resource level of the downstream service corresponding to each upstream service resource; In a case where the preset resource level of the upstream service resource is lower than the initial resource level of the upstream service resource, the preset resource level of the upstream service resource is updated to the initial resource level.
5. The method according to claim 4, characterized in that The obtaining of the service dependency level of each upstream service resource according to the number of downstream service resources corresponding to each upstream service resource includes: Get the preset high dependency threshold and low dependency threshold; Determine the relationship between the number of downstream business resources corresponding to each upstream business resource and the high dependency threshold and the low dependency threshold; The service dependency level of each upstream service resource is determined according to the size relationship.
6. The method according to claim 4, characterized in that The determining, according to the service dependency level and the preset resource level of the downstream service corresponding to each upstream service resource, the initial resource level of each upstream service resource in the data link comprises: In the case where the service dependency level of the upstream service resource is higher than the preset resource level of the downstream service corresponding to the upstream service resource, using the service dependency level as the initial resource level of the upstream service resource; When the service dependency level of the upstream service resource is lower than the preset resource level of the downstream service corresponding to the upstream service resource, the preset resource level of the downstream service corresponding to the upstream service resource is used as the initial resource level of the upstream service resource.
7. The method according to claim 1, characterized in that The method further comprises: When the business resources of the pending business are modified, determine the modified business resource set, and use the modified business resource set as a new business resource to re-execute the steps of obtaining the upstream and downstream relationships of each business resource in the business resource set according to the business process, and constructing the data link of the pending business based on the upstream and downstream relationships.
8. A device for determining resource level, characterized in that: include: Resource acquisition module, used to obtain a collection of business resources for pending business; A link construction module, used to obtain the upstream and downstream relationship of each business resource in the business resource set according to the business process, and construct the data link of the pending business according to the upstream and downstream relationship; A determination module, used to determine the number of downstream business resources of each business resource in the data link; A level acquisition module, used to obtain the preset resource level of each service resource in the data link; The level update module is used to update the preset resource level of the business resources according to the number of downstream business resources corresponding to each business resource in the data link and the preset resource level of the corresponding downstream business resources, and use the updated level as the resource level of the business resources.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method for determining a resource level according to any one of claims 1 to 7 are implemented.
10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the computer program implements the steps of the method for determining a resource level according to any one of claims 1 to 7.
