Component scheduling method and device, electronic equipment and storage medium

By performing multiple test scheduling and scoring of open source components, updating the score, and selecting high-rating components during formal scheduling, the problem of open source component security vulnerabilities affecting system security performance is solved, and higher security and scheduling effects are achieved.

CN119622711AActive Publication Date: 2025-03-14STATE GRID ELECTRONIC COMMERCE TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411671187.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-03-14
Estimated Expiration
2044-11-21

Smart Images

  • Figure CN119622711A_ABST
    Figure CN119622711A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of electric power, and discloses a component scheduling method and device, electronic equipment and a storage medium. According to the specific scheme, the method comprises the steps that first test scheduling operation is executed for multiple first assemblies for multiple times, and first scores of all the first assemblies are obtained; in response to a current scheduling request for the plurality of first components, determining a plurality of second components in the plurality of first components based on the first score of each first component; performing scheduling processing on each second component to obtain a scheduling result of each second component; and based on the scheduling result of each second component, the first score of each first component is updated, and the updated first score of each first component is used for responding to the next scheduling request for the plurality of first components.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of electric power technology, and in particular to a component scheduling method, system, electronic device and storage medium. Background Art

[0002] Open source components, distributed and used under open source licenses that state that the software can be used for commercial applications under specified conditions, making it a popular choice in both commercial and non-commercial software projects.

[0003] In some software application systems, some open source components are scheduled to perform corresponding operations. However, some open source components may have some known or unknown security vulnerabilities, which are difficult to defend against external attacks, thus affecting the security performance of the software application system. Summary of the invention

[0004] The present disclosure provides a component scheduling method, system, electronic device and storage medium, which can solve at least one of the above problems.

[0005] The present disclosure provides a component scheduling method, comprising:

[0006] Performing the following first test scheduling operation multiple times for multiple first components to obtain a first score for each of the first components, wherein the first test scheduling operation includes: determining two first components from the multiple first components, and performing test scheduling on the two first components respectively, scoring the two first components based on the execution time of the two first components in the respective test scheduling processes to obtain respective second scores of the two first components, and updating respective first scores of the two first components based on the respective second scores of the two first components;

[0007] In response to the current scheduling request for the plurality of first components, determining a plurality of second components from the plurality of first components based on the first scores of the respective first components;

[0008] Perform scheduling processing on each of the second components respectively to obtain scheduling results of each of the second components;

[0009] Based on the scheduling results of each of the second components, the first scores of each of the first components are updated, wherein the updated first scores of each of the first components are used to respond to the next scheduling request for the multiple first components.

[0010] According to another aspect of the present disclosure, a component scheduling device is provided, comprising:

[0011] A test scheduling module, configured to perform the following first test scheduling operation multiple times for multiple first components to obtain a first score for each of the first components, wherein the first test scheduling operation includes: determining two first components from the multiple first components, and performing test scheduling on the two first components respectively, scoring the two first components based on the execution time of the two first components in their respective test scheduling processes to obtain respective second scores of the two first components, and updating respective first scores of the two first components based on the respective second scores of the two first components;

[0012] a scheduling request response module, configured to respond to the current scheduling request for the plurality of first components and determine a plurality of second components from the plurality of first components based on a first score of each of the first components;

[0013] A scheduling processing module, used to perform scheduling processing on each of the second components respectively to obtain a scheduling result of each of the second components;

[0014] A score update module is used to update the first score of each of the first components based on the scheduling results of each of the second components, wherein the updated first score of each of the first components is used to respond to the next scheduling request for the multiple first components.

[0015] According to another aspect of the present disclosure, there is provided an electronic device, comprising:

[0016] at least one processor; and

[0017] a memory communicatively connected to the at least one processor; wherein,

[0018] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute any component scheduling method in the embodiments of the present disclosure.

[0019] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to execute any component scheduling method in the embodiments of the present disclosure.

[0020] According to the technical solution disclosed in the present invention, the following first test scheduling operation is performed multiple times for multiple first components to obtain the first score of each first component, wherein the first test scheduling operation includes: determining two first components from multiple first components, and performing test scheduling on the two first components respectively, scoring the two first components based on the execution time of the two first components in their respective test scheduling processes to obtain the second score of each of the two first components, and updating the first score of each of the two first components respectively based on the second score of each of the two first components. In this way, the score of the component can be determined according to the test running time of the component for later formal scheduling. During formal scheduling, in response to the current scheduling request for multiple first components, multiple second components are determined from the multiple first components based on the first score of each first component; scheduling processing is performed on each second component respectively to obtain the scheduling results of each second component; based on the scheduling results of each second component, the first score of each first component is updated, wherein the updated first score of each first component is used to respond to the next scheduling request for multiple first components. In this way, when scheduling components each time, multiple components are scheduled at the same time, and even if a component is attacked, other components can still be used for scheduling, which does not affect the generation of scheduling results. Moreover, each time a component is scheduled, the component score is updated according to the scheduling result, so that the next time the component is scheduled, the scheduling effect is better and the security is higher. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 is a flowchart of a component scheduling method according to an embodiment of the present disclosure;

[0022] Figure 2 is a flowchart of a component scheduling method according to another embodiment of the present disclosure;

[0023] Figure 3 is a structural block diagram of a component scheduling device according to an embodiment of the present disclosure;

[0024] Figure 4 is a block diagram of an electronic device for implementing an embodiment of the present disclosure. DETAILED DESCRIPTION

[0025] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0026] Figure 1 It is a flowchart of a component scheduling method according to an embodiment of the present disclosure.

[0027] like Figure 1 As shown, the component scheduling method may include:

[0028] S110, performing the following first test scheduling operation multiple times for the multiple first components to obtain a first score for each first component, wherein the first test scheduling operation includes: determining two first components from the multiple first components, and performing test scheduling on the two first components respectively, scoring the two first components based on the execution time of the two first components in the respective test scheduling processes to obtain respective second scores of the two first components, and updating respective first scores of the two first components based on the respective second scores of the two first components;

[0029] S120, in response to the current scheduling request for the plurality of first components, determining a plurality of second components from the plurality of first components based on the first scores of the respective first components;

[0030] S130, performing scheduling processing on each second component respectively to obtain a scheduling result of each second component;

[0031] S140, based on the scheduling results of each second component, the first score of each first component is updated, wherein the updated first score of each first component is used to respond to the next scheduling request for the plurality of first components.

[0032] It can be understood that step S110 is a pre-test step, and steps S120 to S140 are operation steps for formally responding to the scheduling request. Among them, steps S120 to S140 can be performed multiple times. Step S110 can be performed only once or multiple times, which is used to initialize the first score of each first component.

[0033] Exemplarily, the test scheduling operation is performed 100 times or 1000 times for 10 or 20 first components.

[0034] Exemplarily, the above-mentioned multiple first components are components whose functional similarity exceeds a preset threshold.

[0035] Illustratively, these components may be open source components.

[0036] Exemplarily, determining two first components from a plurality of first components may be done randomly or according to an arrangement order of the plurality of first components.

[0037] Exemplarily, when testing the first component, timing may be performed from the start of the test to the end of the test to obtain the execution time of the first component during the test scheduling process.

[0038] Exemplarily, each time the test scheduling operation is performed, the first scores of any two first components are updated. In this way, after multiple executions, the first scores of the first components can be obtained.

[0039] It can be understood that in the above step S110, a test scheduling process is performed in a component safety environment.

[0040] It can be understood that in the above step S120, based on the first scores of the respective first components, determining multiple second components from the multiple first components may include selecting the top three components in the score ranking, or the top five three components from the multiple first components.

[0041] It can be understood that the above step S130 is a scheduling operation performed in response to this scheduling request, and its specific process can be an operation that can be performed by any component, which will not be described in detail here.

[0042] Exemplarily, when the scheduling results of the second components are obtained, one result may be selected from the same scheduling results as the target scheduling result of this scheduling request.

[0043] Exemplarily, when the scheduling result is obtained, the above step S140 needs to be executed to update the score of each first component so as to respond to the next scheduling request for the above multiple first components.

[0044] Exemplarily, the first scores of the first components are updated, which may be all the first components or some of the first components. For example, the first score of the second component among the plurality of first components is updated, while the first scores of the non-second components among the plurality of first components are not updated.

[0045] According to the above implementation, the following first test scheduling operation is performed multiple times for multiple first components to obtain the first score of each first component, wherein the first test scheduling operation includes: determining two first components from multiple first components, and performing test scheduling on the two first components respectively, scoring the two first components based on the execution time of the two first components in their respective test scheduling processes to obtain the second score of each of the two first components, and updating the first score of each of the two first components based on the second score of each of the two first components. In this way, by testing the components multiple times and determining the scores of the components based on the test running time, the scores can be used for the subsequent formal scheduling.

[0046] During formal scheduling, in response to the current scheduling request for multiple first components, multiple second components are determined from the multiple first components based on the first scores of each first component; each second component is scheduled separately to obtain the scheduling results of each second component; based on the scheduling results of each second component, the first scores of each first component are updated, wherein the updated first scores of each first component are used to respond to the next scheduling request for multiple first components. In this way, multiple components are scheduled at the same time each time a component is scheduled, and even if a component is attacked, other components can still be used for scheduling without affecting the generation of scheduling results. In addition, each time a component is scheduled, the score of the component is updated according to the scheduling result, so that the scheduling effect is better and the security is higher when the component is scheduled next time.

[0047] In one embodiment, the two first components are scored based on the execution time of the two first components in their respective test scheduling processes to obtain current scores of the two first components, including: when the first execution time of a third component among the two first components is greater than the second execution time of a fourth component, the second score of the third component is determined based on the benchmark score value, and the second score of the fourth component is determined based on the benchmark score value and the ratio of the first execution time to the second execution time.

[0048] It can be understood that the third component and the fourth component are any one of the two first components mentioned above.

[0049] Exemplarily, the benchmark score value may be preset, such as 20 points or 30 points.

[0050] Exemplarily, the benchmark score value is used as the second score of the third component. Alternatively, the benchmark score data is multiplied by a preset coefficient to obtain the second score of the third component.

[0051] Exemplarily, the second score of the fourth component is obtained by adding the benchmark score value and the ratio of the first execution time to the second execution time. Alternatively, the second score of the fourth component is obtained by adding the benchmark score value and the product of the ratio of the first execution time to the second execution time and a preset coefficient.

[0052] According to the above implementation, for the two components that execute test scheduling, the score of the component with a longer execution time is adjusted, for example, its score is increased, and the score of the component with a shorter execution time remains unchanged.

[0053] In one embodiment, based on a baseline score value and a ratio of the first execution time to the second execution time, a second score of the fourth component is determined, including: multiplying the ratio between the first execution time and the second execution time by a first coefficient, and adding the multiplication result to the baseline score value to obtain the second score of the fourth component.

[0054] For example, it is assumed that there are ten open source components with similar functions, and the initial first score of each component is defined as 20 points. Two components A and B are randomly selected each time for scheduling and execution.

[0055] The execution process of these two components is recorded as PA and PB, and the corresponding execution time is TA and TB. Assuming TA>TB, the latest score of A after execution is SA=20+0.2*TA / TA. The latest score of B is SB=20+0.2*TA / TB. In this way, the new first scores of these 10 components are obtained.

[0056] The above operation is repeated 1000 times in this way, and the first score of each first component after the initialization result can be obtained.

[0057] According to the above implementation, the first scores of the plurality of first components with similar functions may be determined based on the test running time of the plurality of first components, so as to subsequently determine the scheduling priorities of the components.

[0058] The following will introduce the adaptive scheduling process of components.

[0059] In one embodiment, the first score of each first component is updated based on the scheduling results of each second component, including: determining the third score of each second component based on the maximum value of the scheduling resource consumption values ​​of multiple second components and the scheduling resource consumption value of each second component; updating the first score of each second component based on the third score of each second component to obtain an updated first score of each second component; updating the first score of each first component based on the updated first score of each second component to obtain an updated first score of each first component.

[0060] For example, the scheduling resource consumption value may include the CPU consumption value, memory consumption value, execution time, and disk input / output I / O consumption value.

[0061] Exemplarily, the third score of the second component can be determined based on the ratio of the maximum value to the scheduling resource consumption value of the second component. For example, the ratio of the maximum value to the scheduling resource consumption value of the second component is used as the third score of the second component. Alternatively, the ratio is multiplied by a coefficient to obtain the third score of the second component.

[0062] Exemplarily, when there are multiple scheduling resource consumption values, operations such as normalization or averaging can be performed on them to obtain a unified scheduling resource consumption value.

[0063] Exemplarily, the third score of each second component is used as the updated first score of each second component.

[0064] Exemplarily, based on the updated first scores of the second components, the first scores of the second components in the plurality of first components are updated, while the first scores of the non-second components in the plurality of first components remain unchanged.

[0065] According to the above implementation, the scheduling results of each second component can be used to update the score of each second component to facilitate the next scheduling.

[0066] In one embodiment, the third score of each second component is determined based on the maximum value among the scheduling resource consumption values ​​of multiple second components and the scheduling resource consumption value of each second component, including: determining the first value, the second value, the third value and the fourth value based on the maximum value among the central processing unit consumption values, the maximum value among the memory consumption values, the maximum value among the execution time and the maximum value among the disk input and output consumption values ​​of multiple second components; determining the third score of the second component based on the ratio between the first value and the central processing unit consumption value of the second component, the ratio between the second value and the memory consumption value of the second component, the ratio between the third value and the execution time of the second component, and the ratio between the fourth value and the disk input and output consumption value of the second component.

[0067] Exemplarily, weights are determined for the four ratios respectively, and then the four ratios are weightedly summed using the respective weights to obtain a third score for the second component.

[0068] Exemplarily, the above four ratios are summed to obtain a third score for the second component.

[0069] According to the above implementation, a third score of the second component in the resource consumption during the scheduling process can be calculated to update the first score of the first component.

[0070] In one implementation, based on the third scores of the respective second components, the first scores of the respective second components are updated respectively to obtain updated first scores of the respective second components, including:

[0071] When there are at least two fifth components with the same scheduling results and at least one sixth component with a scheduling result different from that of any fifth component among multiple second components, the first scores of the fifth components are added to the third scores of the fifth components to obtain an updated first score of the fifth component, and the third scores of the second components are subtracted from the first scores of the sixth components to obtain an updated first score of the second component.

[0072] In one embodiment, it further includes:

[0073] When the scheduling results of multiple second components are the same, the first scores of the second components are added to the second scores of the second components to obtain updated first scores of the second components;

[0074] When the scheduling results of multiple second components are different, the second score of each second component is subtracted from the first score of each second component to obtain an updated first score of the second component.

[0075] For example, Figure 2 As shown, the process of updating the first score of each second component can be as follows:

[0076] The top three components were selected for execution, and the results were classified into three cases.

[0077] Record the CPU consumption, memory consumption, disk I / O consumption, and execution time of the three components respectively.

[0078] In the first case, if the results of the three requests are consistent, the request is responded to and the three components are scored respectively to obtain the first score after the three components are updated.

[0079] In the second case, if the results of the three requests are inconsistent, they will be intercepted and reported to the system for record, and points will be deducted from the three components respectively, and the first scores of the three components will be updated.

[0080] In the third case, if the results of the two requests are consistent, the system will report them to the system for record, and add points to the two components with consistent execution results, deduct points from the inconsistent ones, and update the first score of the three components.

[0081] According to the above implementation, in the adaptive scheduling process of this component, the main focus is on the security of the component. This is because the security vulnerabilities between components are inconsistent (that is, component A has a vulnerability that component B does not have because the code logic of the two components is different). Attention is also paid to the consumption of resource classes by the components. Three components are selected, and this 3 is an empirical value. On the one hand, performance is considered (selecting one more will consume one more resource), and on the other hand, security is considered (eliminating the situation where two components have the same vulnerability at the same time, although the probability is very, very low).

[0082] The execution process refers to the process from when the application system receives an HTTP request to when it returns an HTTP request. The execution duration refers to the time from when the three-party component receives data to when it returns data. The same execution result (scheduling result) means that when the three-party components receive the same data, the data they return is exactly the same.

[0083] For example, if the execution results of the three selected components are the same, then it can be considered that the three components are safe in this execution, and points need to be added based on the formula logic. If the three request results are not completely consistent, it proves that there is a security vulnerability in the logic of processing the data, and points need to be deducted based on the formula logic.

[0084] In this way, components with high average security can be screened out, and components with high scores, that is, high security, will be prioritized in the next execution process. If the software system is attacked by an unknown vulnerability, there will be a situation where the three request results are not completely consistent. In this case, the score of the component with the unknown vulnerability will be reduced, and the scores of other components without unknown vulnerabilities may become the highest, and the next scheduling will call the safer component.

[0085] Therefore, when an attacker exploits a new unknown vulnerability to attack a software system, components that do not have the unknown vulnerability will be prioritized in the scheduling order, thus preventing the system from being attacked.

[0086] Figure 3 It is a structural block diagram of a component scheduling device according to an embodiment of the present disclosure.

[0087] like Figure 3 As shown, the component scheduling device may include:

[0088] The test scheduling module 310 is used to perform the following first test scheduling operation multiple times for multiple first components to obtain a first score for each of the first components, wherein the first test scheduling operation includes: determining two first components from the multiple first components, and performing test scheduling on the two first components respectively, scoring the two first components based on the execution time of the two first components in the respective test scheduling processes to obtain respective second scores of the two first components, and updating respective first scores of the two first components based on the respective second scores of the two first components;

[0089] A scheduling request response module 320, configured to respond to the current scheduling request for the plurality of first components, and determine a plurality of second components from the plurality of first components based on the first scores of the first components;

[0090] The scheduling processing module 330 is used to perform scheduling processing on each of the second components respectively to obtain a scheduling result of each of the second components;

[0091] The score update module 340 is used to update the first score of each of the first components based on the scheduling results of each of the second components, wherein the updated first score of each of the first components is used to respond to the next scheduling request for the multiple first components.

[0092] In one implementation, the test scheduling module 310 is specifically configured to:

[0093] When the first execution time of the third component among the two first components is greater than the second execution time of the fourth component, the second score of the third component is determined based on the benchmark score value, and the second score of the fourth component is determined based on the benchmark score value and the ratio of the first execution time to the second execution time.

[0094] In one embodiment, determining the second score of the fourth component based on the benchmark score value and the ratio of the first execution time to the second execution time includes: multiplying the ratio between the first execution time and the second execution time by a first coefficient, and adding the multiplication result to the benchmark score value to obtain the second score of the fourth component.

[0095] In one implementation, the score updating module 340 includes:

[0096] a score calculation unit, configured to determine a third score of each of the second components based on a maximum value of the scheduling resource consumption values ​​of the plurality of second components and the scheduling resource consumption value of each of the second components;

[0097] A first score updating unit, configured to update the first score of each of the second components based on the third score of each of the second components, to obtain an updated first score of each of the second components;

[0098] The second score updating unit is used to update the first score of each of the first components based on the updated first score of each of the second components to obtain the updated first score of each of the first components.

[0099] In one embodiment, the score calculation unit is specifically used to: determine a first value, a second value, a third value and a fourth value respectively based on the maximum value of the CPU consumption values, the maximum value of the memory consumption values, the maximum value of the execution time and the maximum value of the disk input and output consumption values ​​of the multiple second components; determine a third score of the second component based on the ratio between the first value and the CPU consumption value of the second component, the ratio between the second value and the memory consumption value of the second component, the ratio between the third value and the execution time of the second component, and the ratio between the fourth value and the disk input and output consumption value of the second component.

[0100] In one embodiment, the first score updating unit is specifically used to: when there are at least two fifth components with the same scheduling results and at least one sixth component with a scheduling result different from any of the fifth components among the multiple second components, add the first scores of each of the fifth components to the third scores of each of the fifth components to obtain an updated first score of the fifth component, and subtract the third scores of each of the second components from the first scores of each of the sixth components to obtain an updated first score of the second component.

[0101] In one embodiment, the first score updating unit is further used for: when the scheduling results of the multiple second components are the same, adding the first scores of each second component to the second scores of each second component to obtain the updated first scores of each second component; when the scheduling results of the multiple second components are different, subtracting the second scores of each second component from the first scores of each second component to obtain the updated first scores of the second components.

[0102] For the description of specific functions and examples of each module and submodule of the system in the embodiment of the present disclosure, please refer to the relevant description of the corresponding steps in the above method embodiment, which will not be repeated here.

[0103] According to an embodiment of the present disclosure, the above method of the present disclosure may be applied to an electronic device and a readable storage medium.

[0104] Figure 4A schematic block diagram of an example electronic device 600 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0105] like Figure 4 As shown, the device 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 can also be stored. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0106] A number of components in the device 600 are connected to the I / O interface 605, including: an input unit 606, such as a keyboard, a mouse, etc.; an output unit 607, such as various types of displays, speakers, etc.; a storage unit 608, such as a disk, an optical disk, etc.; and a communication unit 609, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0107] The computing unit 601 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 601 performs the various methods and processes described above, such as a component scheduling method. For example, in some embodiments, a component scheduling method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 600 via the ROM 602 and / or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the computing unit 601, one or more steps of a component scheduling method described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform a component scheduling method in any other appropriate manner (e.g., by means of firmware).

[0108] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs, which may be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general programmable processor, which may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0109] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0110] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0111] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0112] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0113] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0114] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0115] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the principles of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A component scheduling method, characterized in that: include: Performing the following first test scheduling operation multiple times for multiple first components to obtain a first score for each of the first components, wherein the first test scheduling operation includes: determining two first components from the multiple first components, and performing test scheduling on the two first components respectively, scoring the two first components based on the execution time of the two first components in the respective test scheduling processes to obtain respective second scores of the two first components, and updating respective first scores of the two first components based on the respective second scores of the two first components; In response to the current scheduling request for the plurality of first components, determining a plurality of second components from the plurality of first components based on the first scores of the respective first components; Perform scheduling processing on each of the second components respectively to obtain scheduling results of each of the second components; Based on the scheduling results of each of the second components, the first scores of each of the first components are updated, wherein the updated first scores of each of the first components are used to respond to the next scheduling request for the multiple first components.

2. The method according to claim 1, characterized in that Scoring the two first components based on the execution time of the two first components in the respective test scheduling processes to obtain the current scores of the two first components respectively includes: When the first execution time of the third component among the two first components is greater than the second execution time of the fourth component, the second score of the third component is determined based on the benchmark score value, and the second score of the fourth component is determined based on the benchmark score value and the ratio of the first execution time to the second execution time.

3. The method according to claim 2, characterized in that The determining the second score of the fourth component based on the benchmark score value and the ratio of the first execution time to the second execution time includes: The ratio of the first execution time to the second execution time is multiplied by a first coefficient, and the multiplication result is added to the benchmark score value to obtain a second score of the fourth component.

4. The method according to claim 1, characterized in that: The updating of the first scores of the first components based on the scheduling results of the second components includes: Determine a third score of each of the second components based on a maximum value of the scheduling resource consumption values ​​of the plurality of second components and the scheduling resource consumption value of each of the second components; Based on the third scores of the second components, respectively update the first scores of the second components to obtain updated first scores of the second components; Based on the updated first scores of the second components, the first scores of the first components are updated to obtain the updated first scores of the first components.

5. The method according to claim 4, characterized in that The determining, based on the maximum value of the scheduling resource consumption values ​​of the plurality of second components and the scheduling resource consumption values ​​of the respective second components, a third score of each second component comprises: Determine a first value, a second value, a third value, and a fourth value based on a maximum value among the CPU consumption values, a maximum value among the memory consumption values, a maximum value among the execution time, and a maximum value among the disk input / output consumption values ​​of the plurality of second components, respectively; A third score of the second component is determined based on the ratio between the first value and the central processing unit consumption value of the second component, the ratio between the second value and the memory consumption value of the second component, the ratio between the third value and the execution time of the second component, and the ratio between the fourth value and the disk input and output consumption value of the second component.

6. The method according to claim 4, characterized in that The updating of the first scores of the second components based on the third scores of the second components to obtain the updated first scores of the second components includes: In the case that there are at least two fifth components with the same scheduling results and at least one sixth component with a scheduling result different from that of any of the fifth components among the multiple second components, the first scores of the fifth components are added to the third scores of the fifth components to obtain an updated first score of the fifth component, and the third scores of the second components are subtracted from the first scores of the sixth components to obtain an updated first score of the second component.

7. The method according to claim 6, characterized in that Also includes: When the scheduling results of the plurality of second components are the same, the first score of each second component is added to the second score of each second component to obtain an updated first score of each second component; When the scheduling results of the multiple second components are different, the second score of each second component is subtracted from the first score of each second component to obtain an updated first score of the second component.

8. A component scheduling device, characterized in that: include: A test scheduling module, configured to perform the following first test scheduling operation multiple times for multiple first components to obtain a first score for each of the first components, wherein the first test scheduling operation includes: determining two first components from the multiple first components, and performing test scheduling on the two first components respectively, scoring the two first components based on the execution time of the two first components in their respective test scheduling processes to obtain respective second scores of the two first components, and updating respective first scores of the two first components based on the respective second scores of the two first components; a scheduling request response module, configured to respond to the current scheduling request for the plurality of first components and determine a plurality of second components from the plurality of first components based on a first score of each of the first components; A scheduling processing module, used to perform scheduling processing on each of the second components respectively to obtain a scheduling result of each of the second components; A score update module is used to update the first score of each of the first components based on the scheduling results of each of the second components, wherein the updated first score of each of the first components is used to respond to the next scheduling request for the multiple first components.

9. An electronic device, comprising: at least one processor; as well as a memory communicatively coupled to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute any one of the methods of claims 1-7.

10. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are for causing a computer to execute a method according to any one of claims 1-7.

Citation Information

Patent Citations

  • Software release quality management system, method and device

    CN110413513A

  • Integration test method and device, storage medium and electronic equipment

    CN115237742A

  • Automatic safety assessment method and device for open source project

    CN116305137A

  • Scheduling method and device, scheduler and readable storage medium

    CN117492929A

  • Open source component scoring method and system, and computer storage medium

    CN118535834A