Resource Matching Method, Device, Storage Medium and Terminal Device for Teaching Cloud Desktop
Through intelligent scheduling and matching cloud desktops, the problem of existing cloud systems being unable to accurately understand student needs has been solved, and more efficient resource utilization and better learning experience has been achieved.
Patent Information
- Application Number
- CN202011552943.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-24
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2040-12-24
AI Technical Summary
The existing cloud system for teaching cannot accurately understand the intensity and duration of students' demand for cloud desktops, resulting in waste of resources, especially during peak usage hours, students find it difficult to obtain cloud desktops.
By obtaining cloud desktop usage requests and teaching activity specifications, analyzing the usage status and waiting time of each cloud desktop, intelligently scheduling matches cloud desktops, ensuring that users can quickly obtain the required cloud desktops.
The intelligent scheduling of cloud desktops by the teaching desktop cloud system is realized, the resource utilization rate is improved, and students can effectively obtain cloud desktops for learning, solving the problems of resource waste and waiting time.
Smart Images

Figure CN112667879B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular, to a resource matching method, device, storage medium and terminal device for a teaching cloud desktop. Background Art
[0002] In the talent cultivation of institutions of higher learning, the teaching activities of computer experiments and training are increasingly applied. Using the computer environment in the computer room to complete teaching has become the most common teaching scenario in schools. The traditional use of computer rooms in teaching is arranged through scheduling, and a specified teaching experiment environment is installed on the computers in the computer room. Each time a different teaching experiment environment is used, a new operating environment needs to be reinstalled. The operating environment of traditional computer room computers is difficult to meet the complex and diverse experiment environments, and the computer use scheduling method cannot meet the needs of students' experimental practice.
[0003] Therefore, the technology of desktop virtualization has emerged in the market. The operating environment originally fixed on each physical computer terminal is transformed into a cloud desktop that runs uniformly in the cloud and can be flexibly allocated. This not only greatly improves the efficiency of computer room experiment environment management, but also realizes the maximization of the computer operating environment originally fixed in the physical space of the computer room during extracurricular free time and provides it for students to use outside of class. However, with the in-depth application of the teaching desktop cloud system in institutions of higher learning, problems also arise in the open utilization value of resources: Since the cloud system cannot accurately know the true demand intensity, usage duration, etc. of students for the cloud desktop, resources are occupied and wasted. Especially during peak usage times, it is easy to cause students to wait for a long time to obtain the cloud desktop, resulting in students being unable to obtain enough practice time and affecting their learning progress. Summary of the Invention
[0004] Embodiments of the present invention provide a resource matching method, device, storage medium and terminal device for a teaching cloud desktop, which are used to solve the technical problem that the existing teaching cloud system cannot accurately know the true demand intensity, usage duration, etc. of students for the cloud desktop, resulting in the occupation and waste of resources.
[0005] In order to achieve the above object, the embodiments of the present invention provide the following technical solutions:
[0006] A resource matching method for a teaching cloud desktop includes the following steps:
[0007] S10. Obtain the usage request of the cloud desktop and the teaching activity specifications corresponding to the cloud desktop;
[0008] S20. Find the corresponding cloud desktops on the teaching desktop cloud system according to the usage request, and obtain the usage status of each cloud desktop;
[0009] S30. Analyze the usage status of each of the cloud desktops to obtain the waiting time for each cloud desktop;
[0010] S40. Match a corresponding cloud desktop according to the usage request in the waiting time of each of the cloud desktops;
[0011] Among them, the usage request includes the cloud desktop name, the user, and the usage duration, and the teaching activity specification includes the cloud desktop name and the usage duration corresponding to the cloud desktop name.
[0012] Preferably, in step S20, the steps of finding the corresponding cloud desktops on the teaching desktop cloud system according to the usage request and obtaining the usage status of each cloud desktop include:
[0013] S21. Obtain the existing usage requests in the teaching desktop cloud system;
[0014] S22. Sort the users in the existing usage requests according to the usage duration in the existing usage requests;
[0015] S23. Traverse the cloud desktops one by one for the sorted existing usage requests, match the users in the existing usage requests to each of the cloud desktops, and obtain the usage status of each cloud desktop.
[0016] Preferably, in step S23, the steps of matching the users in the existing usage requests to each of the cloud desktops include:
[0017] Obtain the number of existing usage requests, which is the number of users;
[0018] According to the remainder obtained by traversing the two-dimensional array formed by the current cloud desktop and the users from 0 to the number of users minus one in the existing usage requests, judge whether there is a user using the current cloud desktop. If the user in the existing usage request matches the current cloud desktop or the next cloud desktop, obtain the matching of the users in the existing usage requests to each of the cloud desktops, that is, the usage status of each cloud desktop.
[0019] Preferably, if it is judged that there is a user using the current cloud desktop, the user in the existing usage request matches the next cloud desktop; if it is judged that there is no user using the current cloud desktop, the user in the existing usage request matches the current cloud desktop.
[0020] Preferably, in step S30, the steps of analyzing the usage status of each of the cloud desktops to obtain the waiting time of each cloud desktop include: obtaining the shortest time that the user of the usage request needs to wait for using each cloud desktop according to the usage duration corresponding to the user matched by each cloud desktop.
[0021] Preferably, before step S40, it further includes: calculating the total waiting time required for all users to use the cloud desktops in the teaching desktop cloud system according to the waiting time of each cloud desktop.
[0022] Preferably, in step S40, matching the corresponding cloud desktop according to the usage request among the waiting times of each cloud desktop includes: selecting the cloud desktop with the shortest waiting time among the waiting times of each cloud desktop as the cloud desktop matched to the usage request.
[0023] The present invention also provides a resource matching device for a teaching cloud desktop, including an acquisition module, a query module, an analysis module, and a matching module;
[0024] The acquisition module is used to acquire the usage request of the cloud desktop and the teaching activity specifications of the corresponding cloud desktop;
[0025] The query module is used to find the corresponding cloud desktops on the teaching desktop cloud system according to the usage request and acquire the usage status of each cloud desktop;
[0026] The analysis module is used to analyze the usage status of each cloud desktop to obtain the waiting time of each cloud desktop;
[0027] The matching module is used to match the corresponding cloud desktop according to the usage request among the waiting times of each cloud desktop;
[0028] Wherein, the usage request includes the cloud desktop name, the user, and the usage duration, and the teaching activity specifications include the cloud desktop name and the usage duration corresponding to the cloud desktop name.
[0029] The present invention also provides a computer-readable storage medium, which is used to store computer instructions. When it runs on a computer, it enables the computer to execute the resource matching method of the teaching cloud desktop described above.
[0030] The present invention also provides a terminal device, including a processor and a memory;
[0031] The memory is used to store program codes and transmit the program codes to the processor;
[0032] The processor is used to execute the resource matching method of the teaching cloud desktop described above according to the instructions in the program codes.
[0033] As can be seen from the above technical solutions, the embodiments of the present invention have the following advantages: The resource matching method, device, storage medium and terminal device of the teaching cloud desktop obtain the usage request of the cloud desktop and the teaching activity specifications of the corresponding cloud desktop; search for the corresponding cloud desktops on the teaching desktop cloud system according to the usage request, and obtain the usage status of each cloud desktop; analyze the usage status of each cloud desktop to obtain the waiting usage time of each cloud desktop; match the corresponding cloud desktop according to the usage request among the waiting usage times of each cloud desktop, realizing the intelligent scheduling of the usage requirements of the cloud desktop by the teaching desktop cloud system automatically, enabling the usage requests of more users to be satisfied, allowing the most needed users to quickly use the cloud desktop for learning, improving the resource utilization rate, and solving the technical problem that the existing teaching cloud system cannot accurately know the true demand intensity, usage duration, etc. of students for the cloud desktop, resulting in waste of occupied resources.
[0034] In the teaching desktop cloud system provided to users by the resource matching method of the teaching cloud desktop of the present invention, after the user submits the requirements of the usage request, the teaching desktop cloud system will prompt the cloud desktop that is being scheduled and adapted. The teaching desktop cloud system adopts the resource matching method of the teaching cloud desktop for overall overall intelligent scheduling, quickly prompts and presents the arrangement result of the cloud desktop to the user, improves the overall utilization value of the teaching desktop cloud system, enables the user to obtain the cloud desktop for experimental training-related learning activities with a better experience, and improves the experimental training learning effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0036] Figure 1 It is a flowchart of the steps of the resource matching method of the teaching cloud desktop according to the embodiments of the present invention.
[0037] Figure 2 It is a flowchart of the steps for the resource matching method of the teaching cloud desktop according to the embodiments of the present invention to obtain the usage status of the cloud desktop.
[0038] Figure 3 It is a framework diagram of the resource matching device of the teaching cloud desktop according to the embodiments of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0039] In order to make the objectives, features, and advantages of the present invention more obvious and understandable, the following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the embodiments described below are only a part of the embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0040] The embodiments of the present application provide a resource matching method, device, storage medium, and terminal device for a teaching cloud desktop. Resource matching is used to enable the teaching desktop cloud system to automatically and intelligently schedule the usage requirements of the overall cloud desktop. By improving the overall efficiency, it is transformed into maximizing the satisfaction of the usage requests of more users (students), enabling the students in greatest need to quickly use the cloud desktop for learning, and enhancing the value quality of resource utilization. This solves the technical problem that the existing teaching cloud system cannot accurately obtain the true demand intensity, usage duration, etc. of students for the cloud desktop, resulting in waste of occupied resources.
[0041] Embodiment 1:
[0042] Figure 1 It is a flowchart of the steps of the resource matching method for the teaching cloud desktop described in the embodiments of the present invention.
[0043] As Figure 1 shown, the embodiments of the present invention provide a resource matching method for a teaching cloud desktop, including the following steps:
[0044] S10. Obtain the usage request of the cloud desktop and the teaching activity specifications of the corresponding cloud desktop;
[0045] S20. Search for the corresponding cloud desktops on the teaching desktop cloud system according to the usage request, and obtain the usage status of each cloud desktop;
[0046] S30. Analyze the usage status of each cloud desktop to obtain the waiting usage time of each cloud desktop;
[0047] S40. Match the corresponding cloud desktop according to the usage request among the waiting usage times of each cloud desktop;
[0048] Among them, the usage request includes the cloud desktop name, user, and usage duration, and the teaching activity specifications include the cloud desktop name and the usage duration corresponding to the cloud desktop name.
[0049] In step S10 of the embodiments of the present invention, it is mainly to obtain the usage request of the user and the teaching activity specifications of the cloud desktop, providing data for the intelligent scheduling and matching of the teaching desktop cloud system.
[0050] It should be noted that the teaching activity specifications of the cloud desktop can be set by the administrator in the teaching desktop cloud system. The usage request can be initiated by the user (student) logging in to the teaching desktop cloud system in the corresponding teaching activity. The teaching desktop cloud system can generate a requirement form according to the usage request of the user.
[0051] In step S20 of the embodiment of the present invention, it is mainly to search for each cloud desktop that meets the cloud desktop name in the usage request and the usage status of each cloud desktop in the teaching desktop cloud system, so as to provide data for analyzing each cloud desktop in step S30.
[0052] It should be noted that the usage status of the cloud desktop refers to whether the cloud desktop is currently being used, how many users are waiting to use it, and how much waiting time is required for this usage requirement, etc.
[0053] In step S30 of the embodiment of the present invention, it is mainly to analyze the usage status of each cloud desktop that meets the usage request, and obtain the waiting usage time for the user of this usage request to use the cloud desktop, so as to provide data for step S40 to match the optimal cloud desktop for the user of the usage request.
[0054] It should be noted that it is mainly to analyze the cloud desktops that meet the usage request to obtain the waiting usage time of the cloud desktops.
[0055] In step S40 of the embodiment of the present invention, among all the cloud desktops that meet the usage request obtained by analysis, the cloud desktop corresponding to the shortest waiting usage time required by the user of the usage request is selected as the cloud desktop to be matched to the usage request, so as to reduce the waiting time of the user of the usage request.
[0056] It should be noted that when the waiting usage time arrives for the user (student), after the user logs in to the teaching desktop cloud system, the user enters the matched cloud desktop for learning, which improves the resource utilization rate of the teaching desktop cloud system.
[0057] A resource matching method for a teaching cloud desktop provided by the present invention includes obtaining the usage request of the cloud desktop and the teaching activity specifications of the corresponding cloud desktop; searching for the corresponding cloud desktops on the teaching desktop cloud system according to the usage request, and obtaining the usage status of each cloud desktop; analyzing the usage status of each cloud desktop to obtain the waiting usage time of each cloud desktop; matching the corresponding cloud desktop according to the waiting usage time of each cloud desktop for the usage request, realizing the automatic intelligent scheduling of the usage requirements of the cloud desktop by the teaching desktop cloud system, enabling the usage requests of more users to be satisfied, enabling the most needed users to quickly use the cloud desktop for learning, improving the resource utilization rate, and solving the technical problem that the existing teaching cloud system cannot accurately know the true demand intensity, usage duration, etc. of students for the cloud desktop, resulting in waste of occupied resources.
[0058] Figure 2 The flowchart of the steps for obtaining the cloud desktop usage status in the resource matching method of the teaching cloud desktop according to the embodiment of the present invention.
[0059] As Figure 2 shown, in an embodiment of the present invention, in step S20, the steps of finding the corresponding cloud desktops on the teaching desktop cloud system according to the usage request and obtaining the usage status of each cloud desktop include:
[0060] S21. Obtain the existing usage requests in the teaching desktop cloud system;
[0061] S22. Sort the users in the existing usage requests according to the usage duration in the existing usage requests;
[0062] S23. Traverse the cloud desktops one by one for the sorted existing usage requests, match the users in the existing usage requests to each cloud desktop, and obtain the usage status of each cloud desktop.
[0063] In the embodiment of the present invention, in step S23, the steps of matching the users in the existing usage requests to each cloud desktop include:
[0064] Obtain the number of existing usage requests, that is, the number of users;
[0065] According to the numbers from 0 to the number of users minus one, traverse the users in the existing usage requests to take the remainder of the two-dimensional array composed of the current cloud desktop and the users, and judge whether there is a user using the current cloud desktop. The users in the existing usage requests are matched to the current cloud desktop or the next cloud desktop, and the users in the existing usage requests are matched to each cloud desktop, that is, the usage status of each cloud desktop is obtained. Among them, if it is judged that there is a user using the current cloud desktop, the user in the existing usage request is matched to the next cloud desktop; if it is judged that there is no user using the current cloud desktop, the user in the existing usage request is matched to the current cloud desktop.
[0066] In an embodiment of the present invention, sort the usage durations of the requirement sheets in ascending order, and then traverse the number of users from 0 to the total number of people (the number of people who need to use the cloud desktop). The number of users in the two-dimensional array composed of the cloud desktop and the user is used as the current traversal value. Take the remainder of the current traversal value divided by the number of cloud desktops to determine whether there is a user using the current desktop. If there is no user using it, assign the cloud desktop to the user being traversed currently. If there is a user using the current cloud desktop, assign the next cloud desktop to the user being traversed currently, so as to obtain the optimal usage order of each cloud desktop user. In this embodiment, traverse the number of cloud desktops to obtain the usage order of each cloud desktop user and the usage status of each cloud desktop. Execute the following program to traverse the cloud desktops one by one for the existing usage requests after sorting, and match the users in the existing usage requests for each cloud desktop to obtain the usage order of each cloud desktop user. The specific program is as follows:
[0067]
[0068]
[0069] In an embodiment of the present invention, in step S30, the steps of analyzing the usage status of each cloud desktop to obtain the waiting time of each cloud desktop include: obtaining the shortest waiting time for the user of the usage request to use each cloud desktop according to the usage duration corresponding to the user matched by each cloud desktop.
[0070] In an embodiment of the present invention, before step S40, it further includes: calculating according to the waiting usage time of each cloud desktop to obtain the total waiting time required for all users in the teaching desktop cloud system to use the cloud desktop.
[0071] It should be noted that traverse the number of cloud desktops to obtain the waiting usage time of the users in the usage requests (requirement sheets) for each cloud desktop, and then calculate the total waiting time required for all users in the teaching desktop cloud system. In this embodiment, the following program can be executed to implement the waiting usage time required for each cloud desktop corresponding to the usage request and the total waiting time required for all users in the teaching desktop cloud system. The program is as follows:
[0072]
[0073]
[0074] In an embodiment of the present invention, in step S40, matching the corresponding cloud desktop according to the waiting usage time of the usage request in each cloud desktop includes: selecting the cloud desktop with the shortest waiting usage time in the waiting usage times of each cloud desktop as the cloud desktop matched to the usage request.
[0075] In an embodiment of the present invention, for the resource matching method of the teaching cloud desktop, three cloud desktops that match the cloud desktop name in the usage request can be set in the teaching desktop cloud system, namely Cloud Desktop 1, Cloud Desktop 2, and Cloud Desktop 3. There are 10 existing usage requests in the teaching desktop cloud system. The users and usage durations of the 10 usage requests are respectively recorded as follows: the usage duration of User 1 is 30 minutes, the usage duration of User 2 is 40 minutes, the usage duration of User 3 is 70 minutes, the usage duration of User 4 is 20 minutes, the usage duration of User 5 is 80 minutes, the usage duration of User 6 is 10 minutes, the usage duration of User 7 is 50 minutes, the usage duration of User 8 is 100 minutes, the usage duration of User 9 is 60 minutes, and the usage duration of User 10 is 90 minutes. The program for invoking the resource matching method of the teaching cloud desktop is as follows:
[0076]
[0077] Through the above program, the usage durations of the users are sorted from smallest to largest as: 10, 20, 30, 40, 50, 60, 70, 80, 90, 100. Match the users in the existing usage requests to each cloud desktop. Specifically: the usage order of Cloud Desktop 1 is: User 6, User 2, User 3, User 8; the usage order of Cloud Desktop 2 is: User 4, User 7, User 5; the usage order of Cloud Desktop 3 is: User 1, User 9, User 10. The waiting times for using each cloud desktop are obtained as follows: the waiting times for the users using Cloud Desktop 1 are: 10, 50, 120; the waiting times for the users using Cloud Desktop 2 are: 20, 70; the waiting times for the users using Cloud Desktop 3 are: 30, 90. Therefore, the total waiting time for all users to use the cloud desktops in the teaching desktop cloud system is: 390. Among the waiting times for using the above three cloud desktops, select Cloud Desktop 2 with the shortest waiting time as the cloud desktop matched to the usage request.
[0078] Thus, in the teaching desktop cloud system provided to users by the resource matching method of the teaching cloud desktop of the present invention, after the users submit the requirements of the usage requests, the teaching desktop cloud system will prompt the cloud desktops that are being scheduled and adapted. The teaching desktop cloud system adopts the resource matching method of the teaching cloud desktop for overall planning and intelligent scheduling, quickly prompts and displays the arrangement results of the cloud desktops to the users, improves the overall utilization value of the teaching desktop cloud system, enables the users to obtain the cloud desktops for experimental training-related learning activities with a better experience, and improves the experimental training learning effect.
[0079] Embodiment 2:
[0080] Figure 3It is a framework diagram of the resource matching device for the teaching cloud desktop according to the embodiments of the present invention.
[0081] As Figure 3 shown, the embodiments of the present invention further provide a resource matching device for a teaching cloud desktop, including an acquisition module 10, a query module 20, an analysis module 30, and a matching module 40;
[0082] The acquisition module 10 is used to acquire the usage request of the cloud desktop and the teaching activity specifications corresponding to the cloud desktop;
[0083] The query module 20 is used to find the corresponding cloud desktops on the teaching desktop cloud system according to the usage request and acquire the usage status of each cloud desktop;
[0084] The analysis module 30 is used to analyze the usage status of each cloud desktop to obtain the waiting usage time of each cloud desktop;
[0085] The matching module 40 is used to match the corresponding cloud desktop according to the usage request among the waiting usage times of each cloud desktop;
[0086] Among them, the usage request includes the cloud desktop name, the user, and the usage duration, and the teaching activity specifications include the cloud desktop name and the usage duration corresponding to the cloud desktop name.
[0087] It should be noted that the modules in the device of Embodiment 2 correspond to the steps in the method of Embodiment 1. The steps in the method of Embodiment 1 have been elaborated in detail in Embodiment 1, and the content of the modules in the device will not be elaborated in detail in Embodiment 2 here.
[0088] Embodiment 3:
[0089] The embodiments of the present invention provide a computer-readable storage medium. The computer storage medium is used to store computer instructions. When it runs on a computer, it enables the computer to execute the above-mentioned resource matching method for the teaching cloud desktop.
[0090] Embodiment 4:
[0091] The embodiments of the present invention provide a terminal device, including a processor and a memory;
[0092] The memory is used to store program codes and transmit the program codes to the processor;
[0093] The processor is used to execute the above-mentioned resource matching method for the teaching cloud desktop according to the instructions in the program codes.
[0094] It should be noted that the processor is used to execute the steps in the above-described embodiment of the resource matching method for a teaching cloud desktop according to the instructions in the program code. Alternatively, when the processor executes the computer program, it implements the functions of the various modules / units in the above-described system / device embodiments.
[0095] Exemplarily, the computer program can be divided into one or more modules / units, and one or more modules / units are stored in the memory and executed by the processor to complete the present application. One or more modules / units can be a series of computer program instruction segments capable of performing specific functions, and these instruction segments are used to describe the execution process of the computer program in the terminal device.
[0096] The terminal device can be a computing device such as a desktop computer, a notebook, a palm computer, and a cloud server. The terminal device may include, but is not limited to, a processor and a memory. Those skilled in the art can understand that this does not limit the terminal device, and it may include more or fewer components than shown in the figure, or combine certain components, or different components. For example, the terminal device may further include input / output devices, network access devices, a bus, etc.
[0097] The so-called processor may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor, or the processor may also be any conventional processor, etc.
[0098] The memory may be an internal storage unit of the terminal device, such as the hard disk or memory of the terminal device. The memory may also be an external storage device of the terminal device, such as a plug-in hard disk equipped on the terminal device, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. Further, the memory may also include both the internal storage unit and the external storage device of the terminal device. The memory is used to store the computer program and other programs and data required by the terminal device. The memory may also be used to temporarily store the data that has been output or will be output.
[0099] Those skilled in the art can clearly understand that for the convenience and conciseness of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.
[0100] In several embodiments provided in the present application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces, and the indirect couplings or communication connections of the devices or units can be in electrical, mechanical, or other forms.
[0101] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0102] In addition, each functional unit in various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
[0103] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.
[0104] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A resource matching method for a teaching cloud desktop, characterized in that, it includes the following steps: S10. Obtain the usage request of the cloud desktop and the teaching activity specifications of the corresponding cloud desktop; S20. Search for the corresponding cloud desktops on the teaching desktop cloud system according to the usage request, and obtain the usage status of each cloud desktop; S30. Analyze the usage status of each cloud desktop to obtain the waiting usage time of each cloud desktop; S40. Match the corresponding cloud desktop according to the waiting usage time of each cloud desktop in the usage request; wherein, the usage request includes the cloud desktop name, the user, and the usage duration, and the teaching activity specifications include the cloud desktop name and the usage duration corresponding to the cloud desktop name; In step S20, the step of searching for the corresponding cloud desktops on the teaching desktop cloud system according to the usage request and obtaining the usage status of each cloud desktop includes: S21. Obtain the existing usage requests in the teaching desktop cloud system; S22. Sort the users in the existing usage requests according to the usage duration in the existing usage requests; S23. Traverse the cloud desktops one by one for the sorted existing usage requests, match the users in the existing usage requests to each cloud desktop, and obtain the usage status of each cloud desktop; In step S23, the step of matching the users in the existing usage requests to each cloud desktop includes: Obtain the number of existing usage requests, which is the number of users; According to the remainder obtained by traversing the two-dimensional array formed by the current cloud desktop and the users from 0 to the number of users minus one in the existing usage requests, determine whether there is a user using the current cloud desktop. The users in the existing usage requests are matched to the current cloud desktop or the next cloud desktop to obtain the matching of the users in the existing usage requests to each cloud desktop, that is, the usage status of each cloud desktop; Analyzing the usage status of each cloud desktop to obtain the waiting usage time of each cloud desktop includes: obtaining the cloud desktop data vmNum and the number of all existing usage requests userNum and the usage duration userTime, and the number is the number of users; calculating the two-dimensional array vmOrder between the cloud desktop and the users by using int[][] vmOrder = new int[vmNum][userNum / vmNum + 1]; obtaining the usage order of the users waiting to use in each cloud desktop by using useOrder(userTime, userNum, vmOrder, vmNum); calculating the shortest waiting duration corresponding to each cloud desktop according to the usage duration requested by all users in each cloud desktop.
2. The resource matching method for a teaching cloud desktop according to claim 1, characterized in that, If it is determined that the current cloud desktop is in use by a user, the user in the existing usage request is matched to the next cloud desktop; if it is determined that the current cloud desktop is not in use by a user, the user in the existing usage request is matched to the current cloud desktop.
3. The resource matching method for the teaching cloud desktop according to claim 1, characterized in that in step S30, the step of analyzing the usage status of each of the cloud desktops to obtain the waiting time of each cloud desktop includes: obtaining the shortest waiting time for the user of the usage request to use each cloud desktop according to the usage duration corresponding to the user matched by each cloud desktop.
4. The resource matching method for the teaching cloud desktop according to claim 1, characterized in that before step S40, it further includes: calculating according to the waiting usage time of each of the cloud desktops to obtain the total waiting time for all users in the teaching desktop cloud system to use the cloud desktops.
5. The resource matching method for the teaching cloud desktop according to claim 1, characterized in that in step S40, the step of matching the corresponding cloud desktop according to the waiting usage time of the usage request in each of the cloud desktops includes: selecting the cloud desktop with the shortest waiting usage time among the waiting usage times of each of the cloud desktops as the cloud desktop matched to the usage request.
6. A resource matching device for a teaching cloud desktop, characterized in that it includes an acquisition module, a query module, an analysis module and a matching module; the acquisition module is used to acquire the usage request of the cloud desktop and the teaching activity specifications of the corresponding cloud desktop; the query module is used to find the corresponding cloud desktops on the teaching desktop cloud system according to the usage request and acquire the usage status of each cloud desktop; the analysis module is used to analyze the usage status of each of the cloud desktops to obtain the waiting usage time of each cloud desktop; the matching module is used to match the corresponding cloud desktop according to the waiting usage time of the usage request in each of the cloud desktops; wherein, the usage request includes the cloud desktop name, the user and the usage duration, and the teaching activity specifications include the cloud desktop name and the usage duration corresponding to the cloud desktop name; the steps of finding the corresponding cloud desktops on the teaching desktop cloud system according to the usage request and acquiring the usage status of each cloud desktop include: S21. Acquire the existing usage requests in the teaching desktop cloud system; S22. Sort the users in the existing usage requests according to the usage duration in the existing usage requests; S23. Traverse the cloud desktops one by one for the sorted existing usage requests, and match the users in the existing usage requests to each of the cloud desktops to obtain the usage status of each cloud desktop; In step S23, the step of matching the users in the existing usage requests to each of the cloud desktops includes: Acquire the number of existing usage requests, which is the number of users; Traverse the users in the existing usage requests from 0 to the number of users minus one, and take the remainder of the two-dimensional array composed of the current cloud desktop and the users to determine whether there is a user using the current cloud desktop. If the users in the existing usage requests match the current cloud desktop or the next cloud desktop, the users in the existing usage requests are matched to each of the cloud desktops, that is, the usage status of each cloud desktop is obtained. Analyze the usage status of each of the cloud desktops to obtain the waiting usage time of each cloud desktop, including: obtaining the cloud desktop data vmNum, the number of all the existing usage requests userNum, and the usage duration userTime, where the number is the number of users; calculating the two-dimensional array vmOrder between the cloud desktop and the users using int[][] vmOrder = new int[vmNum][userNum / vmNum + 1]; obtaining the usage order of the users waiting to use in each of the cloud desktops using useOrder(userTime, userNum, vmOrder, vmNum); calculating the shortest waiting duration corresponding to each of the cloud desktops according to the usage duration requested by all the users in each of the cloud desktops.
7. A computer-readable storage medium characterized in that the computer-readable storage medium is used to store computer instructions, and when it runs on a computer, it causes the computer to execute the resource matching method of the teaching cloud desktop according to any one of claims 1-5.
8. A terminal device characterized in that it includes a processor and a memory; the memory is used to store program code and transmit the program code to the processor; the processor is used to execute the resource matching method of the teaching cloud desktop according to any one of claims 1-5 according to the instructions in the program code.
Citation Information
Patent Citations
Resource scheduling method and device
CN102917014A
Cloud desktop login management and control method and apparatus, and computer readable storage medium
CN108965480A