技术领域Technical field
本发明涉及云计算技术领域,尤其涉及一种基于云计算的访问设备资源分配方法及相关装置。The present invention relates to the technical field of cloud computing, and in particular to a cloud computing-based access device resource allocation method and related devices.
背景技术Background technique
随着云计算技术的普及,现在对于一些需要较大运行计算资源的程序进程的运行,均是交给云计算服务器进行运行处理,但是由于程序进程运行所需要的计算资源是一个可能存在波动的情况,所需要的计算资源可能突然增高,因此在请求端请求运行某一个程序进程或者多个程序进程,需要给到充足的计算资源来运行某一个程序进程或者多个程序进程;但是大部分运行这些程序进程时间内不需要那么多的计算资源,因此导致较大的计算资源的浪费,使得云计算服务器的计算资源利用率较低。With the popularization of cloud computing technology, the running of some program processes that require large computing resources are now handed over to cloud computing servers for processing. However, because the computing resources required for running program processes are subject to fluctuations, In some cases, the computing resources required may suddenly increase. Therefore, when the requesting end requests to run a certain program process or multiple program processes, sufficient computing resources need to be given to run a certain program process or multiple program processes; but most operations These programs do not require so much computing resources during the process time, thus resulting in a large waste of computing resources and making the computing resource utilization of the cloud computing server low.
发明内容Contents of the invention
本发明的目的在于克服现有技术的不足,本发明提供了一种基于云计算的访问设备资源分配方法及相关装置,可以为访问设备分配相应的计算资源,保证程序进程稳定运行,同时使得云计算服务器的计算资源的利用效率更高。The purpose of the present invention is to overcome the shortcomings of the existing technology. The present invention provides a cloud computing-based access device resource allocation method and related devices, which can allocate corresponding computing resources to the access device, ensure the stable operation of the program process, and at the same time enable the cloud The computing resources of the computing server are utilized more efficiently.
为了解决上述技术问题,本发明实施例提供了一种基于云计算的访问设备资源分配方法,所述方法包括:In order to solve the above technical problems, embodiments of the present invention provide a cloud computing-based access device resource allocation method, which method includes:
云计算服务器与访问设备建立网络连接,并接收所述访问设备的运行资源分配请求,所述运行资源分配请求包含所述访问设备需要在所述云计算服务器上运行的若干个待运行程序进程;The cloud computing server establishes a network connection with the access device, and receives a running resource allocation request from the access device, where the running resource allocation request includes several to-be-run program processes that the access device needs to run on the cloud computing server;
所述云计算服务器对所述运行资源分配请求中的若干个待运行程序进程进行运行资源需求分析处理,获得若干个待运行程序进程对应所需要的固定运行资源数据及备用运行资源数据;The cloud computing server analyzes and processes the operating resource requirements of several program processes to be run in the operating resource allocation request, and obtains fixed operating resource data and backup operating resource data corresponding to the several program processes to be run;
在所述云计算服务器中基于所述访问设备的设备ID进行命名空间的创建处理,获得所述访问设备在所述云计算服务器中的命名空间;Performing a namespace creation process in the cloud computing server based on the device ID of the access device to obtain the namespace of the access device in the cloud computing server;
所述云计算服务器基于所述若干个待运行程序进程对应所需要的固定运行资源数据及备用运行资源数据在所述命名空间中进行固定运行资源数据和备用运行资源数据分配处理,获得所述命名空间内的分配固定运行资源数据和分配备用运行资源数据;The cloud computing server performs fixed operation resource data and backup operation resource data allocation processing in the namespace based on the fixed operation resource data and backup operation resource data required for the plurality of program processes to be run, and obtains the naming Allocate fixed operating resource data and allocate standby operating resource data in the space;
控制所述若干个待运行程序进程在所述命名空间内利用所述分配固定运行资源数据和所述分配备用运行资源数据进行进程运行处理,并将程序运行结果加载至所述访问设备进行显示。Control the several to-be-run program processes to use the allocated fixed running resource data and the allocated standby running resource data to perform process running processing in the namespace, and load the program running results to the access device for display.
可选的,所述接收所述访问设备的运行资源分配请求,包括:Optionally, receiving a running resource allocation request from the access device includes:
所述云计算服务器接收用户在所述访问设备上基于需要在云计算服务器上运行的若干个待运行程序进程进行请求操作生成的运行资源分配请求。The cloud computing server receives a running resource allocation request generated by a user on the access device based on a request operation for several program processes to be run that need to be run on the cloud computing server.
可选的,所述云计算服务器对所述运行资源分配请求中的若干个待运行程序进程进行运行资源需求分析处理,获得若干个待运行程序进程对应所需要的固定运行资源数据及备用运行资源数据,包括:Optionally, the cloud computing server analyzes and processes the running resource requirements of several to-be-run program processes in the running resource allocation request, and obtains the fixed running resource data and backup running resources required for the several to-be-run program processes. Data, including:
所述云计算服务器获得所述若干个待运行程序进程中每一个待运行程序进程在一段时间内所需的历史需求运行资源数据;The cloud computing server obtains the historical demand running resource data required by each of the plurality of to-be-run program processes within a period of time;
对所述若干个待运行程序进程中每一个待运行程序进程在一段时间内所需的历史需求运行资源数据进行分析处理,获得若干个待运行程序进程中每一个待运行程序进程在一段时间内平稳运行时的历史需求平稳运行资源数据及历史需求峰值运行资源数据;Analyze and process the historical demand running resource data required by each of the several to-be-run program processes within a period of time, and obtain the data of each to-be-run program process within a period of time among the several to-be-run program processes. Historical demand smooth operation resource data during smooth operation and historical demand peak operation resource data;
基于所述若干个待运行程序进程中每一个待运行程序进程在一段时间内平稳运行时的历史需求平稳运行资源数据及历史需求峰值运行资源数据计算获得若干个待运行程序进程对应所需要的固定运行资源数据及备用运行资源数据。Based on the historical demand smooth operation resource data and the historical demand peak operation resource data of each of the plurality of to-be-run program processes when each to-be-run program process runs smoothly within a period of time, the corresponding fixed requirements for the several to-be-run program processes are obtained. Operating resource data and standby operating resource data.
可选的,所述基于所述若干个待运行程序进程中每一个待运行程序进程在一段时间内平稳运行时的历史需求平稳运行资源数据及历史需求峰值运行资源数据计算获得若干个待运行程序进程对应所需要的固定运行资源数据及备用运行资源数据,包括:Optionally, several to-be-run programs are calculated based on historical demand smooth operation resource data and historical demand peak operation resource data when each of the several to-be-run program processes runs smoothly within a period of time. The process corresponds to the fixed operating resource data and backup operating resource data required, including:
将所述若干个待运行程序进程中每一个待运行程序进程在一段时间内平稳运行时的历史需求平稳运行资源数据进行相加处理,获得若干个待运行程序进程对应所需要的固定运行资源数据;The smooth operation resource data of the historical requirements of each of the several to-be-run program processes when running smoothly within a period of time are added together to obtain the fixed operation resource data corresponding to the several to-be-run program processes. ;
将所述若干个待运行程序进程中每一个待运行程序进程在一段时间内平稳运行时的历史需求峰值运行资源数据进行相加处理,获得相加结果;Add the historical demand peak operating resource data of each of the several to-be-run program processes when they are running smoothly within a period of time to obtain the addition result;
利用所述相加结果减去所述固定运行资源数据获得相减结果;Use the addition result to subtract the fixed operating resource data to obtain a subtraction result;
在所述相减结果上增加预设运行资源数据量,形成若干个待运行程序进程对应所需要的备用运行资源数据;Add the preset operating resource data amount to the subtraction result to form the backup operating resource data required for several program processes to be run;
所述预设运行资源数据量为预设比例与所述相加结果减相乘获得。The preset operating resource data amount is obtained by subtracting and multiplying the preset ratio and the addition result.
可选的,所述在所述云计算服务器中基于所述访问设备的设备ID进行命名空间的创建处理,包括:Optionally, the creation of a namespace in the cloud computing server based on the device ID of the access device includes:
在所述云计算服务器中基于所述访问设备的设备ID调用JavaScript框架中的function()函数进行命名空间的创建处理。In the cloud computing server, the function() function in the JavaScript framework is called based on the device ID of the access device to perform namespace creation processing.
可选的,所述云计算服务器基于所述若干个待运行程序进程对应所需要的固定运行资源数据及备用运行资源数据在所述命名空间中进行固定运行资源数据和备用运行资源数据分配处理,包括:Optionally, the cloud computing server performs allocation processing of fixed operation resource data and backup operation resource data in the namespace based on the required fixed operation resource data and backup operation resource data corresponding to the plurality of program processes to be run, include:
在所述云计算服务器中获得各个计算节点中的剩余计算资源数据和所述云计算服务器中的共享计算资源数据;Obtain the remaining computing resource data in each computing node and the shared computing resource data in the cloud computing server from the cloud computing server;
所述云计算服务器基于所述若干个待运行程序进程对应所需要的固定运行资源数据利用所述剩余计算资源数据在所述命名空间中进行固定运行资源数据分配处理,所述固定运行资源数据为仅在所述命名空间内使用的资源数据;The cloud computing server uses the remaining computing resource data to perform fixed operation resource data allocation processing in the namespace based on the fixed operation resource data required for the plurality of program processes to be run, and the fixed operation resource data is Resource data used only within said namespace;
所述云计算服务器基于所述若干个待运行程序进程对应所需要的备用运行资源数据利用所述共享计算资源数据在在所述命名空间中进行备用运行资源数据分配处理,所述备用运行资源数据为有所述命名空间中随时调用的运行资源数据,所述共享计算资源数据为重复分配到不同的所述命名空间内的备用运行资源数据,且所述共享计算资源数据和所述剩余计算资源数据之间为在所述云计算服务器中不重叠的资源数据。The cloud computing server uses the shared computing resource data to perform backup operation resource data allocation processing in the namespace based on the required backup operation resource data corresponding to the plurality of program processes to be run. The backup operation resource data There is running resource data that can be called at any time in the namespace, the shared computing resource data is backup running resource data that is repeatedly allocated to different namespaces, and the shared computing resource data and the remaining computing resources The data is resource data that does not overlap in the cloud computing server.
可选的,所述控制所述若干个待运行程序进程在所述命名空间内利用所述分配固定运行资源数据和所述分配备用运行资源数据进行进程运行处理,包括:Optionally, the controlling the several to-be-run program processes to use the allocated fixed running resource data and the allocated standby running resource data to perform process running processing in the namespace includes:
在所述云计算服务器中获得所述若干个待运行程序进程,并控制所述若干个待运行程序进程在所述命名空间内基于所述若干个待运行程序进程的当前所需要的运行资源数据调用所述分配固定运行资源数据和所述分配备用运行资源数据进行进程运行处理。Obtain the plurality of program processes to be run in the cloud computing server, and control the plurality of program processes to be run in the namespace based on the currently required running resource data of the plurality of program processes to be run. The allocated fixed running resource data and the allocated standby running resource data are called to perform process running processing.
另外,本发明实施例还提供了一种基于云计算的访问设备资源分配装置,所述装置包括:In addition, embodiments of the present invention also provide a device for allocating access device resources based on cloud computing. The device includes:
接收模块:用于云计算服务器与访问设备建立网络连接,并接收所述访问设备的运行资源分配请求,所述运行资源分配请求包含所述访问设备需要在所述云计算服务器上运行的若干个待运行程序进程;Receiving module: used to establish a network connection between the cloud computing server and the access device, and receive the operating resource allocation request of the access device. The operating resource allocation request includes several data that the access device needs to run on the cloud computing server. Program process to be run;
分析模块:用于所述云计算服务器对所述运行资源分配请求中的若干个待运行程序进程进行运行资源需求分析处理,获得若干个待运行程序进程对应所需要的固定运行资源数据及备用运行资源数据;Analysis module: used by the cloud computing server to analyze and process the running resource requirements of several to-be-run program processes in the running resource allocation request, and to obtain the fixed running resource data and backup operations required for the several to-be-run program processes. resource data;
构建模块:用于在所述云计算服务器中基于所述访问设备的设备ID进行命名空间的创建处理,获得所述访问设备在所述云计算服务器中的命名空间;Building module: configured to create a namespace in the cloud computing server based on the device ID of the access device, and obtain the namespace of the access device in the cloud computing server;
分配模块:用于所述云计算服务器基于所述若干个待运行程序进程对应所需要的固定运行资源数据及备用运行资源数据在所述命名空间中进行固定运行资源数据和备用运行资源数据分配处理,获得所述命名空间内的分配固定运行资源数据和分配备用运行资源数据;Allocation module: used by the cloud computing server to allocate fixed operation resource data and backup operation resource data in the namespace based on the fixed operation resource data and backup operation resource data required for the plurality of program processes to be run. , obtain the allocated fixed operating resource data and allocated standby operating resource data in the namespace;
运行控制模块:用于控制所述若干个待运行程序进程在所述命名空间内利用所述分配固定运行资源数据和所述分配备用运行资源数据进行进程运行处理,并将程序运行结果加载至所述访问设备进行显示。Run control module: used to control the several to-be-run program processes to use the allocated fixed running resource data and the allocated standby running resource data to perform process running processing in the namespace, and load the program running results into the display on the access device described above.
另外,本发明实施例还提供了一种云计算服务器,包括处理器和存储器,所述处理器运行存储于所述存储器中的计算机程序或代码,实现如上述中任一项所述的访问设备资源分配方法。In addition, embodiments of the present invention also provide a cloud computing server, including a processor and a memory. The processor runs a computer program or code stored in the memory to implement the access device as described in any one of the above. Resource allocation methods.
另外,本发明实施例还提供了一种计算机可读存储介质,用于存储计算机程序或代码,当所述计算机程序或代码被处理器执行时,实现如上述中任一项所述的访问设备资源分配方法。In addition, embodiments of the present invention also provide a computer-readable storage medium for storing computer programs or codes. When the computer programs or codes are executed by the processor, the access device as described in any one of the above is implemented. Resource allocation methods.
在本发明实施例中,在请求端需要云计算服务器运行相关的待运行程序进程时,通过在命名空间内为待运行程序进程分配对应的分配固定运行资源数据和分配备用运行资源数据,其中分配比用运行资源数据为可共享的运行资源数据,这样即可实现为访问设备分配相应的计算资源,保证程序进程稳定运行,并且减少云计算服务器中的资源浪费,同时使得云计算服务器的计算资源的利用效率更高。In the embodiment of the present invention, when the requesting end needs the cloud computing server to run a related program process to be run, the program process to be run is allocated corresponding fixed operation resource data and backup operation resource data in the namespace, where allocation By using the running resource data as sharable running resource data, it is possible to allocate corresponding computing resources to the access device, ensure the stable operation of the program process, and reduce the waste of resources in the cloud computing server. At the same time, the computing resources of the cloud computing server are increased. The utilization efficiency is higher.
附图说明Description of the drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见的,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings in the following description are only These are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without exerting creative efforts.
图1是本发明实施例中的基于云计算的访问设备资源分配方法的流程示意图;Figure 1 is a schematic flowchart of a cloud computing-based access device resource allocation method in an embodiment of the present invention;
图2是本发明实施例中的基于云计算的访问设备资源分配装置的结构组成示意图;Figure 2 is a schematic structural diagram of a cloud computing-based access device resource allocation device in an embodiment of the present invention;
图3是本发明实施例中的云计算服务器的结构组成示意图。Figure 3 is a schematic structural diagram of a cloud computing server in an embodiment of the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其它实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present invention.
实施例一,请参阅图1,图1是本发明实施例中的基于云计算的访问设备资源分配方法的流程示意图。Embodiment 1. Please refer to Figure 1. Figure 1 is a schematic flowchart of a cloud computing-based access device resource allocation method in an embodiment of the present invention.
如图1所示,一种基于云计算的访问设备资源分配方法,所述方法包括:As shown in Figure 1, a cloud computing-based access device resource allocation method includes:
S11:云计算服务器与访问设备建立网络连接,并接收所述访问设备的运行资源分配请求,所述运行资源分配请求包含所述访问设备需要在所述云计算服务器上运行的若干个待运行程序进程;S11: The cloud computing server establishes a network connection with the access device, and receives a running resource allocation request from the access device. The running resource allocation request includes several to-be-run programs that the access device needs to run on the cloud computing server. process;
在本发明具体实施过程中,所述接收所述访问设备的运行资源分配请求,包括:所述云计算服务器接收用户在所述访问设备上基于需要在云计算服务器上运行的若干个待运行程序进程进行请求操作生成的运行资源分配请求。In the specific implementation process of the present invention, the receiving the running resource allocation request of the access device includes: the cloud computing server receives several to-be-run programs that the user needs to run on the cloud computing server based on the access device. A running resource allocation request generated by a process performing a requested operation.
具体的,访问设备需要通过身份认证的方式与云计算服务器建立网络连接,具体的身份认证方式可以通过多种方式,包括账户密码、生物特征或者第三方所提供的认证方式;在访问设备与计算服务器建立网络连接之后,云计算服务器既可以接收访问设备发送的运行组员分配请求;其中该运行资源分配请求是用户在该访问设备上根据需要在云计算服务器上运行的若干个待运行程序进程来进行相关的请求操作所生成的运行资源分配请求。Specifically, the access device needs to establish a network connection with the cloud computing server through identity authentication. The specific identity authentication method can be through a variety of methods, including account passwords, biometrics, or authentication methods provided by third parties; when accessing the device and computing After the server establishes a network connection, the cloud computing server can receive the running group member allocation request sent by the access device; where the running resource allocation request is a number of program processes to be run on the cloud computing server according to the user's needs on the access device. To perform running resource allocation requests generated by related request operations.
S12:所述云计算服务器对所述运行资源分配请求中的若干个待运行程序进程进行运行资源需求分析处理,获得若干个待运行程序进程对应所需要的固定运行资源数据及备用运行资源数据;S12: The cloud computing server analyzes and processes the running resource requirements of several to-be-run program processes in the running resource allocation request, and obtains the fixed running resource data and backup running resource data corresponding to the several to-be-run program processes;
在本发明具体实施过程中,所述云计算服务器对所述运行资源分配请求中的若干个待运行程序进程进行运行资源需求分析处理,获得若干个待运行程序进程对应所需要的固定运行资源数据及备用运行资源数据,包括:所述云计算服务器获得所述若干个待运行程序进程中每一个待运行程序进程在一段时间内所需的历史需求运行资源数据;对所述若干个待运行程序进程中每一个待运行程序进程在一段时间内所需的历史需求运行资源数据进行分析处理,获得若干个待运行程序进程中每一个待运行程序进程在一段时间内平稳运行时的历史需求平稳运行资源数据及历史需求峰值运行资源数据;基于所述若干个待运行程序进程中每一个待运行程序进程在一段时间内平稳运行时的历史需求平稳运行资源数据及历史需求峰值运行资源数据计算获得若干个待运行程序进程对应所需要的固定运行资源数据及备用运行资源数据。During the specific implementation process of the present invention, the cloud computing server analyzes and processes the running resource requirements of several to-be-run program processes in the running resource allocation request, and obtains the corresponding fixed running resource data required for the several to-be-run program processes. and backup operating resource data, including: the cloud computing server obtains the historical demand operating resource data required by each of the several to-be-run program processes within a period of time; and the several to-be-run programs. The historical demand running resource data required by each to-be-run program process within a period of time in the process is analyzed and processed to obtain the historical demand for smooth operation of each to-be-run program process within a period of time among several to-be-run program processes. Resource data and historical demand peak operation resource data; based on the historical demand smooth operation resource data and historical demand peak operation resource data when each of the several to-be-run program processes runs smoothly within a period of time, several calculations are obtained Each program process to be run corresponds to the required fixed running resource data and backup running resource data.
进一步的,所述基于所述若干个待运行程序进程中每一个待运行程序进程在一段时间内平稳运行时的历史需求平稳运行资源数据及历史需求峰值运行资源数据计算获得若干个待运行程序进程对应所需要的固定运行资源数据及备用运行资源数据,包括:将所述若干个待运行程序进程中每一个待运行程序进程在一段时间内平稳运行时的历史需求平稳运行资源数据进行相加处理,获得若干个待运行程序进程对应所需要的固定运行资源数据;将所述若干个待运行程序进程中每一个待运行程序进程在一段时间内平稳运行时的历史需求峰值运行资源数据进行相加处理,获得相加结果;利用所述相加结果减去所述固定运行资源数据获得相减结果;在所述相减结果上增加预设运行资源数据量,形成若干个待运行程序进程对应所需要的备用运行资源数据;所述预设运行资源数据量为预设比例与所述相加结果减相乘获得。Further, several to-be-run program processes are calculated based on the historical demand smooth operation resource data and the historical demand peak operation resource data when each of the to-be-run program processes runs smoothly within a period of time. Corresponding to the required fixed operation resource data and standby operation resource data includes: adding the historical demand smooth operation resource data of each of the several to-be-run program processes when they run smoothly within a period of time. , obtain the fixed operating resource data required for several to-be-run program processes; add the historical demand peak operating resource data of each of the several to-be-run program processes when they run smoothly within a period of time. Process to obtain an addition result; use the addition result to subtract the fixed running resource data to obtain a subtraction result; add a preset running resource data amount to the subtraction result to form several to-be-run program processes corresponding to Required backup operation resource data; the preset operation resource data amount is obtained by subtracting and multiplying the preset ratio and the addition result.
具体的,首先需要通过该云计算服务器来获得若干个待运行程序进程中每一个待运行程序进程在最近的一段时间内在运行时所需要的历史需求运行资源数据;然后对若干个待运行程序进程中每一个待运行程序进程在一段时间内所需的历史需求运行资源数据进行分析处理,从而得到若干个待运行程序进程中每一个待运行程序进程在一段时间内平稳运行时的历史需求平稳运行资源数据及历史需求峰值运行资源数据;再通过若干个待运行程序进程中每一个待运行程序进程在一段时间内平稳运行时的历史需求平稳运行资源数据及历史需求峰值运行资源数据来计算获得若干个待运行程序进程对应所需要的固定运行资源数据及备用运行资源数据。Specifically, it is first necessary to use the cloud computing server to obtain the historical demand running resource data required by each of the several to-be-run program processes when running in the most recent period of time; then, the several to-be-run program processes are Analyze and process the historical demand running resource data required by each to-be-run program process within a period of time, thereby obtaining the historical demand for smooth operation of each to-be-run program process within a period of time among several to-be-run program processes. resource data and historical demand peak operating resource data; and then calculate and obtain several historical demand smooth operating resource data and historical demand peak operating resource data when each of the several to-be-run program processes runs smoothly within a period of time. Each program process to be run corresponds to the required fixed running resource data and backup running resource data.
即,将若干个待运行程序进程中每一个待运行程序进程在一段时间内平稳运行时的历史需求平稳运行资源数据进行相加处理,即可得到若干个待运行程序进程对应所需要的固定运行资源数据;对于备用运行资源数据,则需要将若干个待运行程序进程中每一个待运行程序进程在一段时间内平稳运行时的历史需求峰值运行资源数据进行相加处理,获得相加结果;然后再利用相加结果减去固定运行资源数据获得相减结果;在相减结果上增加预设运行资源数据量,即可形成若干个待运行程序进程对应所需要的备用运行资源数据;预设运行资源数据量为预设比例与所述相加结果减相乘获得;即假设相减结果为100,备用运行资源数据的计算为:100+100*X,其中X为预设比例,可以为10%、15%,具体由具有相关权限的人设置生成。That is, by adding up the historical demand for smooth operation resource data of each of the several to-be-run program processes when running smoothly within a period of time, the fixed operation requirements corresponding to the several to-be-run program processes can be obtained. Resource data; for standby operating resource data, it is necessary to add the historical demand peak operating resource data of each of several to-be-run program processes when they are running smoothly within a period of time to obtain the addition result; then Then use the addition result to subtract the fixed running resource data to obtain the subtraction result; add the preset running resource data amount to the subtraction result to form several backup running resource data corresponding to the program processes to be run; preset running The amount of resource data is obtained by subtracting and multiplying the preset ratio and the addition result; that is, assuming that the subtraction result is 100, the calculation of the backup operating resource data is: 100+100*X, where X is the preset ratio, which can be 10 %, 15%, specifically set and generated by people with relevant permissions.
S13:在所述云计算服务器中基于所述访问设备的设备ID进行命名空间的创建处理,获得所述访问设备在所述云计算服务器中的命名空间;S13: Perform a namespace creation process in the cloud computing server based on the device ID of the access device, and obtain the namespace of the access device in the cloud computing server;
在本发明具体实施过程中,所述在所述云计算服务器中基于所述访问设备的设备ID进行命名空间的创建处理,包括:在所述云计算服务器中基于所述访问设备的设备ID调用JavaScript框架中的function()函数进行命名空间的创建处理。In the specific implementation process of the present invention, the creation process of the namespace based on the device ID of the access device in the cloud computing server includes: calling in the cloud computing server based on the device ID of the access device The function() function in the JavaScript framework creates a namespace.
具体的,在云计算服务器中利用JavaScript框架中的function()函数来创建命名空间,即,根据访问设备的设备ID调用JavaScript框架中的function()函数进行命名空间的创建处理;所创建的命名空间为逻辑隔离机制空间,每一个访问设备对应创建一个命名空间,该访问设备所请求运行的待运行程序进程后续均在其所对应的命名空间内根据所分配的资源数据进行运行,可以有效的实现每一个访问设备之间的数据隔离,保证每一个访问设备之间的数据安全。Specifically, the function() function in the JavaScript framework is used to create the namespace in the cloud computing server, that is, the function() function in the JavaScript framework is called according to the device ID of the access device to create the namespace; the created name The space is a logical isolation mechanism space. A namespace is created for each access device. The to-be-run program processes requested by the access device are subsequently run in the corresponding namespace according to the allocated resource data, which can be effectively Realize data isolation between each access device and ensure data security between each access device.
S14:所述云计算服务器基于所述若干个待运行程序进程对应所需要的固定运行资源数据及备用运行资源数据在所述命名空间中进行固定运行资源数据和备用运行资源数据分配处理,获得所述命名空间内的分配固定运行资源数据和分配备用运行资源数据;S14: The cloud computing server performs allocation processing of fixed operation resource data and backup operation resource data in the namespace based on the required fixed operation resource data and backup operation resource data corresponding to the plurality of program processes to be run, and obtains the required fixed operation resource data and backup operation resource data. The allocation of fixed running resource data and the allocation of standby running resource data in the namespace are described;
在本发明具体实施过程中,所述云计算服务器基于所述若干个待运行程序进程对应所需要的固定运行资源数据及备用运行资源数据在所述命名空间中进行固定运行资源数据和备用运行资源数据分配处理,包括:During the specific implementation process of the present invention, the cloud computing server performs fixed operation resource data and backup operation resource data in the namespace based on the required fixed operation resource data and backup operation resource data corresponding to the plurality of program processes to be run. Data distribution processing, including:
在所述云计算服务器中获得各个计算节点中的剩余计算资源数据和所述云计算服务器中的共享计算资源数据;所述云计算服务器基于所述若干个待运行程序进程对应所需要的固定运行资源数据利用所述剩余计算资源数据在所述命名空间中进行固定运行资源数据分配处理,所述固定运行资源数据为仅在所述命名空间内使用的资源数据;所述云计算服务器基于所述若干个待运行程序进程对应所需要的备用运行资源数据利用所述共享计算资源数据在在所述命名空间中进行备用运行资源数据分配处理,所述备用运行资源数据为有所述命名空间中随时调用的运行资源数据,所述共享计算资源数据为重复分配到不同的所述命名空间内的备用运行资源数据,且所述共享计算资源数据和所述剩余计算资源数据之间为在所述云计算服务器中不重叠的资源数据。The remaining computing resource data in each computing node and the shared computing resource data in the cloud computing server are obtained in the cloud computing server; the cloud computing server corresponds to the required fixed operation based on the several program processes to be run. The resource data uses the remaining computing resource data to perform fixed operation resource data allocation processing in the namespace, and the fixed operation resource data is resource data used only in the namespace; the cloud computing server is based on the Several to-be-run program processes use the shared computing resource data to perform backup operation resource data allocation processing in the namespace corresponding to the required backup operation resource data. The backup operation resource data is available in the namespace at any time. The called running resource data, the shared computing resource data is backup running resource data repeatedly allocated to different namespaces, and the shared computing resource data and the remaining computing resource data are in the cloud. Compute non-overlapping resource data in the server.
具体的,首先是通过云计算服务器来获得其上的各个计算节点中所剩余的剩余计算资源数据和云计算服务器中的共享计算资源数据;然后该云计算服务器根据若干个待运行程序进程对应所需要的固定运行资源数据利用剩余计算资源数据在命名空间中进行固定运行资源数据分配处理,其中,固定运行资源数据为仅在该命名空间内使用的资源数据;然后该云计算服务器再根据若干个待运行程序进程对应所需要的备用运行资源数据利用共享计算资源数据在命名空间中进行备用运行资源数据分配处理,其中,备用运行资源数据为有命名空间中随时调用的运行资源数据,共享计算资源数据为可以重复分配到不同的命名空间内的备用运行资源数据,同时共享计算资源数据和剩余计算资源数据之间为在云计算服务器中不重叠的资源数据。Specifically, the cloud computing server is first used to obtain the remaining computing resource data in each computing node and the shared computing resource data in the cloud computing server; then the cloud computing server obtains the data corresponding to several program processes to be run. The required fixed operation resource data uses the remaining computing resource data to perform fixed operation resource data allocation processing in the namespace, where the fixed operation resource data is resource data that is only used within the namespace; then the cloud computing server will use the remaining computing resource data to perform fixed operation resource data allocation processing in the namespace. The spare running resource data required by the program process to be run uses the shared computing resource data to allocate the spare running resource data in the namespace. The spare running resource data is the running resource data that can be called at any time in the namespace. The shared computing resource The data is spare operating resource data that can be repeatedly allocated to different namespaces. At the same time, the shared computing resource data and the remaining computing resource data are resource data that do not overlap in the cloud computing server.
可以理解的是,剩余计算资源数据在分配到一个命名空间内作为分配固定运行资源数据之后,剩余计算资源数据将变少,在该命名空间内分配固定运行资源数据减少时,减少的部分将重新成为剩余计算资源数据,才能被分配到其他的命名空间中;而共享计算资源数据则不同,可以将共享计算资源数据同时分配给多个命名空间中,成为分配备用运行资源数据;具体假设共享计算资源数据的量为1000,现在有10个命名空间中,每个命名空间所需要的分配备用运行资源数据均为200,则可以利用共享计算资源数据按照每个命名空间所需要的分配备用运行资源数据进行资源分配,主要是考虑到这些命名空间一般不会同时需要用到分配备用运行资源数据,这样分配可以更大限度的提高云计算服务器的资源利用效率,减少资源浪费问题。It can be understood that after the remaining computing resource data is allocated to a namespace as allocated fixed running resource data, the remaining computing resource data will become less. When the fixed running resource data allocated in the namespace is reduced, the reduced part will be reset. Only when it becomes residual computing resource data can it be allocated to other namespaces; shared computing resource data is different. Shared computing resource data can be allocated to multiple namespaces at the same time and become allocated backup running resource data; specifically assuming shared computing The amount of resource data is 1000. There are now 10 namespaces, and the allocated standby running resource data required for each namespace is 200. You can use the shared computing resource data to allocate standby running resources according to the needs of each namespace. Data resource allocation is mainly based on the fact that these namespaces generally do not need to be used to allocate backup operating resource data at the same time. Such allocation can maximize the resource utilization efficiency of cloud computing servers and reduce resource waste.
S15:控制所述若干个待运行程序进程在所述命名空间内利用所述分配固定运行资源数据和所述分配备用运行资源数据进行进程运行处理,并将程序运行结果加载至所述访问设备进行显示。S15: Control the several to-be-run program processes to use the allocated fixed running resource data and the allocated standby running resource data to perform process running processing in the namespace, and load the program running results to the access device for processing. show.
在本发明具体实施过程中,所述控制所述若干个待运行程序进程在所述命名空间内利用所述分配固定运行资源数据和所述分配备用运行资源数据进行进程运行处理,包括:在所述云计算服务器中获得所述若干个待运行程序进程,并控制所述若干个待运行程序进程在所述命名空间内基于所述若干个待运行程序进程的当前所需要的运行资源数据调用所述分配固定运行资源数据和所述分配备用运行资源数据进行进程运行处理。In the specific implementation process of the present invention, the control of the several to-be-run program processes to use the allocated fixed running resource data and the allocated standby running resource data to perform process running processing in the namespace includes: Obtain the plurality of program processes to be run from the cloud computing server, and control the plurality of program processes to be run to call in the namespace based on the currently required operating resource data of the plurality of program processes to be run. The allocation of fixed operation resource data and the allocation of standby operation resource data are performed for process operation processing.
具体的,在该云计算服务器中获得若干个待运行程序进程,然后再控制若干个待运行程序进程在命名空间内根据若干个待运行程序进程的当前所需要的运行资源数据调用分配固定运行资源数据和分配备用运行资源数据进行进程运行处理,在运行过程中所形成的运行结果将生成视频流,然后通过网络连接加载至访问设备中进行显示。Specifically, several program processes to be run are obtained in the cloud computing server, and then the several program processes to be run are controlled to call and allocate fixed running resources in the namespace according to the currently required running resource data of the several program processes to be run. The data and allocated backup operation resources are processed by the process, and the operation results formed during the operation will generate a video stream, which is then loaded into the access device for display through a network connection.
在本发明实施例中,在请求端需要云计算服务器运行相关的待运行程序进程时,通过在命名空间内为待运行程序进程分配对应的分配固定运行资源数据和分配备用运行资源数据,其中分配比用运行资源数据为可共享的运行资源数据,这样即可实现为访问设备分配相应的计算资源,保证程序进程稳定运行,并且减少云计算服务器中的资源浪费,同时使得云计算服务器的计算资源的利用效率更高。In the embodiment of the present invention, when the requesting end needs the cloud computing server to run a related program process to be run, the program process to be run is allocated corresponding fixed operation resource data and backup operation resource data in the namespace, where allocation By using the running resource data as sharable running resource data, it is possible to allocate corresponding computing resources to the access device, ensure the stable operation of the program process, and reduce the waste of resources in the cloud computing server. At the same time, the computing resources of the cloud computing server are increased. The utilization efficiency is higher.
实施例二,1请参阅图2,图2是本发明实施例中的基于云计算的访问设备资源分配装置的结构组成示意图。Embodiment 2. 1 Please refer to Figure 2. Figure 2 is a schematic structural diagram of a cloud computing-based access device resource allocation device in an embodiment of the present invention.
如图2所示,一种基于云计算的访问设备资源分配装置,所述装置包括:As shown in Figure 2, a cloud computing-based access device resource allocation device includes:
接收模块21:用于云计算服务器与访问设备建立网络连接,并接收所述访问设备的运行资源分配请求,所述运行资源分配请求包含所述访问设备需要在所述云计算服务器上运行的若干个待运行程序进程;Receiving module 21: used to establish a network connection between the cloud computing server and the access device, and receive the operating resource allocation request of the access device. The operating resource allocation request includes a number of resources that the access device needs to run on the cloud computing server. A program process to be run;
在本发明具体实施过程中,所述接收所述访问设备的运行资源分配请求,包括:所述云计算服务器接收用户在所述访问设备上基于需要在云计算服务器上运行的若干个待运行程序进程进行请求操作生成的运行资源分配请求。In the specific implementation process of the present invention, the receiving the running resource allocation request of the access device includes: the cloud computing server receives several to-be-run programs that the user needs to run on the cloud computing server based on the access device. A running resource allocation request generated by a process performing a requested operation.
具体的,访问设备需要通过身份认证的方式与云计算服务器建立网络连接,具体的身份认证方式可以通过多种方式,包括账户密码、生物特征或者第三方所提供的认证方式;在访问设备与计算服务器建立网络连接之后,云计算服务器既可以接收访问设备发送的运行组员分配请求;其中该运行资源分配请求是用户在该访问设备上根据需要在云计算服务器上运行的若干个待运行程序进程来进行相关的请求操作所生成的运行资源分配请求。Specifically, the access device needs to establish a network connection with the cloud computing server through identity authentication. The specific identity authentication method can be through a variety of methods, including account passwords, biometrics, or authentication methods provided by third parties; when accessing the device and computing After the server establishes a network connection, the cloud computing server can receive the running group member allocation request sent by the access device; where the running resource allocation request is a number of program processes to be run on the cloud computing server according to the user's needs on the access device. To perform running resource allocation requests generated by related request operations.
分析模块22:用于所述云计算服务器对所述运行资源分配请求中的若干个待运行程序进程进行运行资源需求分析处理,获得若干个待运行程序进程对应所需要的固定运行资源数据及备用运行资源数据;Analysis module 22: used by the cloud computing server to analyze and process the running resource requirements of several to-be-run program processes in the running resource allocation request, and obtain the fixed running resource data and backup required for the several to-be-run program processes. Run resource data;
在本发明具体实施过程中,所述云计算服务器对所述运行资源分配请求中的若干个待运行程序进程进行运行资源需求分析处理,获得若干个待运行程序进程对应所需要的固定运行资源数据及备用运行资源数据,包括:所述云计算服务器获得所述若干个待运行程序进程中每一个待运行程序进程在一段时间内所需的历史需求运行资源数据;对所述若干个待运行程序进程中每一个待运行程序进程在一段时间内所需的历史需求运行资源数据进行分析处理,获得若干个待运行程序进程中每一个待运行程序进程在一段时间内平稳运行时的历史需求平稳运行资源数据及历史需求峰值运行资源数据;基于所述若干个待运行程序进程中每一个待运行程序进程在一段时间内平稳运行时的历史需求平稳运行资源数据及历史需求峰值运行资源数据计算获得若干个待运行程序进程对应所需要的固定运行资源数据及备用运行资源数据。During the specific implementation process of the present invention, the cloud computing server analyzes and processes the running resource requirements of several to-be-run program processes in the running resource allocation request, and obtains the corresponding fixed running resource data required for the several to-be-run program processes. and backup operating resource data, including: the cloud computing server obtains the historical demand operating resource data required by each of the several to-be-run program processes within a period of time; and the several to-be-run programs. The historical demand running resource data required by each to-be-run program process within a period of time in the process is analyzed and processed to obtain the historical demand for smooth operation of each to-be-run program process within a period of time among several to-be-run program processes. Resource data and historical demand peak operation resource data; based on the historical demand smooth operation resource data and historical demand peak operation resource data when each of the several to-be-run program processes runs smoothly within a period of time, several calculations are obtained Each program process to be run corresponds to the required fixed running resource data and backup running resource data.
进一步的,所述基于所述若干个待运行程序进程中每一个待运行程序进程在一段时间内平稳运行时的历史需求平稳运行资源数据及历史需求峰值运行资源数据计算获得若干个待运行程序进程对应所需要的固定运行资源数据及备用运行资源数据,包括:将所述若干个待运行程序进程中每一个待运行程序进程在一段时间内平稳运行时的历史需求平稳运行资源数据进行相加处理,获得若干个待运行程序进程对应所需要的固定运行资源数据;将所述若干个待运行程序进程中每一个待运行程序进程在一段时间内平稳运行时的历史需求峰值运行资源数据进行相加处理,获得相加结果;利用所述相加结果减去所述固定运行资源数据获得相减结果;在所述相减结果上增加预设运行资源数据量,形成若干个待运行程序进程对应所需要的备用运行资源数据;所述预设运行资源数据量为预设比例与所述相加结果减相乘获得。Further, several to-be-run program processes are calculated based on the historical demand smooth operation resource data and the historical demand peak operation resource data when each of the to-be-run program processes runs smoothly within a period of time. Corresponding to the required fixed operation resource data and standby operation resource data includes: adding the historical demand smooth operation resource data of each of the several to-be-run program processes when they run smoothly within a period of time. , obtain the fixed operating resource data required for several to-be-run program processes; add the historical demand peak operating resource data of each of the several to-be-run program processes when they run smoothly within a period of time. Process to obtain an addition result; use the addition result to subtract the fixed running resource data to obtain a subtraction result; add a preset running resource data amount to the subtraction result to form several to-be-run program processes corresponding to Required backup operation resource data; the preset operation resource data amount is obtained by subtracting and multiplying the preset ratio and the addition result.
具体的,首先需要通过该云计算服务器来获得若干个待运行程序进程中每一个待运行程序进程在最近的一段时间内在运行时所需要的历史需求运行资源数据;然后对若干个待运行程序进程中每一个待运行程序进程在一段时间内所需的历史需求运行资源数据进行分析处理,从而得到若干个待运行程序进程中每一个待运行程序进程在一段时间内平稳运行时的历史需求平稳运行资源数据及历史需求峰值运行资源数据;再通过若干个待运行程序进程中每一个待运行程序进程在一段时间内平稳运行时的历史需求平稳运行资源数据及历史需求峰值运行资源数据来计算获得若干个待运行程序进程对应所需要的固定运行资源数据及备用运行资源数据。Specifically, it is first necessary to use the cloud computing server to obtain the historical demand running resource data required by each of the several to-be-run program processes when running in the most recent period of time; then, the several to-be-run program processes are Analyze and process the historical demand running resource data required by each to-be-run program process within a period of time, thereby obtaining the historical demand for smooth operation of each to-be-run program process within a period of time among several to-be-run program processes. resource data and historical demand peak operating resource data; and then calculate and obtain several historical demand smooth operating resource data and historical demand peak operating resource data when each of the several to-be-run program processes runs smoothly within a period of time. Each program process to be run corresponds to the required fixed running resource data and backup running resource data.
即,将若干个待运行程序进程中每一个待运行程序进程在一段时间内平稳运行时的历史需求平稳运行资源数据进行相加处理,即可得到若干个待运行程序进程对应所需要的固定运行资源数据;对于备用运行资源数据,则需要将若干个待运行程序进程中每一个待运行程序进程在一段时间内平稳运行时的历史需求峰值运行资源数据进行相加处理,获得相加结果;然后再利用相加结果减去固定运行资源数据获得相减结果;在相减结果上增加预设运行资源数据量,即可形成若干个待运行程序进程对应所需要的备用运行资源数据;预设运行资源数据量为预设比例与所述相加结果减相乘获得;即假设相减结果为100,备用运行资源数据的计算为:100+100*X,其中X为预设比例,可以为10%、15%,具体由具有相关权限的人设置生成。That is, by adding up the historical demand for smooth operation resource data of each of the several to-be-run program processes when running smoothly within a period of time, the fixed operation requirements corresponding to the several to-be-run program processes can be obtained. Resource data; for standby operating resource data, it is necessary to add the historical demand peak operating resource data of each of several to-be-run program processes when they are running smoothly within a period of time to obtain the addition result; then Then use the addition result to subtract the fixed running resource data to obtain the subtraction result; add the preset running resource data amount to the subtraction result to form several backup running resource data corresponding to the program processes to be run; preset running The amount of resource data is obtained by subtracting and multiplying the preset ratio and the addition result; that is, assuming that the subtraction result is 100, the calculation of the backup operating resource data is: 100+100*X, where X is the preset ratio, which can be 10 %, 15%, specifically set and generated by people with relevant permissions.
构建模块23:用于在所述云计算服务器中基于所述访问设备的设备ID进行命名空间的创建处理,获得所述访问设备在所述云计算服务器中的命名空间;Building module 23: configured to create a namespace in the cloud computing server based on the device ID of the access device, and obtain the namespace of the access device in the cloud computing server;
在本发明具体实施过程中,所述在所述云计算服务器中基于所述访问设备的设备ID进行命名空间的创建处理,包括:在所述云计算服务器中基于所述访问设备的设备ID调用JavaScript框架中的function()函数进行命名空间的创建处理。In the specific implementation process of the present invention, the creation process of the namespace based on the device ID of the access device in the cloud computing server includes: calling in the cloud computing server based on the device ID of the access device The function() function in the JavaScript framework creates a namespace.
具体的,在云计算服务器中利用JavaScript框架中的function()函数来创建命名空间,即,根据访问设备的设备ID调用JavaScript框架中的function()函数进行命名空间的创建处理;所创建的命名空间为逻辑隔离机制空间,每一个访问设备对应创建一个命名空间,该访问设备所请求运行的待运行程序进程后续均在其所对应的命名空间内根据所分配的资源数据进行运行,可以有效的实现每一个访问设备之间的数据隔离,保证每一个访问设备之间的数据安全。Specifically, the function() function in the JavaScript framework is used to create the namespace in the cloud computing server, that is, the function() function in the JavaScript framework is called according to the device ID of the access device to create the namespace; the created name The space is a logical isolation mechanism space. A namespace is created for each access device. The to-be-run program processes requested by the access device are subsequently run in the corresponding namespace according to the allocated resource data, which can be effectively Realize data isolation between each access device and ensure data security between each access device.
分配模块24:用于所述云计算服务器基于所述若干个待运行程序进程对应所需要的固定运行资源数据及备用运行资源数据在所述命名空间中进行固定运行资源数据和备用运行资源数据分配处理,获得所述命名空间内的分配固定运行资源数据和分配备用运行资源数据;Allocation module 24: used by the cloud computing server to allocate fixed operation resource data and backup operation resource data in the namespace based on the fixed operation resource data and backup operation resource data required for the plurality of program processes to be run. Processing to obtain allocated fixed operating resource data and allocated standby operating resource data within the namespace;
在本发明具体实施过程中,所述云计算服务器基于所述若干个待运行程序进程对应所需要的固定运行资源数据及备用运行资源数据在所述命名空间中进行固定运行资源数据和备用运行资源数据分配处理,包括:During the specific implementation process of the present invention, the cloud computing server performs fixed operation resource data and backup operation resource data in the namespace based on the required fixed operation resource data and backup operation resource data corresponding to the plurality of program processes to be run. Data distribution processing, including:
在所述云计算服务器中获得各个计算节点中的剩余计算资源数据和所述云计算服务器中的共享计算资源数据;所述云计算服务器基于所述若干个待运行程序进程对应所需要的固定运行资源数据利用所述剩余计算资源数据在所述命名空间中进行固定运行资源数据分配处理,所述固定运行资源数据为仅在所述命名空间内使用的资源数据;所述云计算服务器基于所述若干个待运行程序进程对应所需要的备用运行资源数据利用所述共享计算资源数据在在所述命名空间中进行备用运行资源数据分配处理,所述备用运行资源数据为有所述命名空间中随时调用的运行资源数据,所述共享计算资源数据为重复分配到不同的所述命名空间内的备用运行资源数据,且所述共享计算资源数据和所述剩余计算资源数据之间为在所述云计算服务器中不重叠的资源数据。The remaining computing resource data in each computing node and the shared computing resource data in the cloud computing server are obtained in the cloud computing server; the cloud computing server corresponds to the required fixed operation based on the several program processes to be run. The resource data uses the remaining computing resource data to perform fixed operation resource data allocation processing in the namespace, and the fixed operation resource data is resource data used only in the namespace; the cloud computing server is based on the Several to-be-run program processes use the shared computing resource data to perform backup operation resource data allocation processing in the namespace corresponding to the required backup operation resource data. The backup operation resource data is available in the namespace at any time. The called running resource data, the shared computing resource data is backup running resource data repeatedly allocated to different namespaces, and the shared computing resource data and the remaining computing resource data are in the cloud. Compute non-overlapping resource data in the server.
具体的,首先是通过云计算服务器来获得其上的各个计算节点中所剩余的剩余计算资源数据和云计算服务器中的共享计算资源数据;然后该云计算服务器根据若干个待运行程序进程对应所需要的固定运行资源数据利用剩余计算资源数据在命名空间中进行固定运行资源数据分配处理,其中,固定运行资源数据为仅在该命名空间内使用的资源数据;然后该云计算服务器再根据若干个待运行程序进程对应所需要的备用运行资源数据利用共享计算资源数据在命名空间中进行备用运行资源数据分配处理,其中,备用运行资源数据为有命名空间中随时调用的运行资源数据,共享计算资源数据为可以重复分配到不同的命名空间内的备用运行资源数据,同时共享计算资源数据和剩余计算资源数据之间为在云计算服务器中不重叠的资源数据。Specifically, the cloud computing server is first used to obtain the remaining computing resource data in each computing node and the shared computing resource data in the cloud computing server; then the cloud computing server obtains the data corresponding to several program processes to be run. The required fixed operation resource data uses the remaining computing resource data to perform fixed operation resource data allocation processing in the namespace, where the fixed operation resource data is resource data that is only used within the namespace; then the cloud computing server will use the remaining computing resource data to perform fixed operation resource data allocation processing in the namespace. The spare running resource data required by the program process to be run uses the shared computing resource data to allocate the spare running resource data in the namespace. The spare running resource data is the running resource data that can be called at any time in the namespace. The shared computing resource The data is spare operating resource data that can be repeatedly allocated to different namespaces. At the same time, the shared computing resource data and the remaining computing resource data are resource data that do not overlap in the cloud computing server.
可以理解的是,剩余计算资源数据在分配到一个命名空间内作为分配固定运行资源数据之后,剩余计算资源数据将变少,在该命名空间内分配固定运行资源数据减少时,减少的部分将重新成为剩余计算资源数据,才能被分配到其他的命名空间中;而共享计算资源数据则不同,可以将共享计算资源数据同时分配给多个命名空间中,成为分配备用运行资源数据;具体假设共享计算资源数据的量为1000,现在有10个命名空间中,每个命名空间所需要的分配备用运行资源数据均为200,则可以利用共享计算资源数据按照每个命名空间所需要的分配备用运行资源数据进行资源分配,主要是考虑到这些命名空间一般不会同时需要用到分配备用运行资源数据,这样分配可以更大限度的提高云计算服务器的资源利用效率,减少资源浪费问题。It can be understood that after the remaining computing resource data is allocated to a namespace as allocated fixed running resource data, the remaining computing resource data will become less. When the fixed running resource data allocated in the namespace is reduced, the reduced part will be reset. Only when it becomes residual computing resource data can it be allocated to other namespaces; shared computing resource data is different. Shared computing resource data can be allocated to multiple namespaces at the same time and become allocated backup running resource data; specifically assuming shared computing The amount of resource data is 1000. There are now 10 namespaces, and the allocated standby running resource data required for each namespace is 200. You can use the shared computing resource data to allocate standby running resources according to the needs of each namespace. Data resource allocation is mainly based on the fact that these namespaces generally do not need to be used to allocate backup operating resource data at the same time. Such allocation can maximize the resource utilization efficiency of cloud computing servers and reduce resource waste.
运行控制模块25:用于控制所述若干个待运行程序进程在所述命名空间内利用所述分配固定运行资源数据和所述分配备用运行资源数据进行进程运行处理,并将程序运行结果加载至所述访问设备进行显示。Run control module 25: used to control the several to-be-run program processes to use the allocated fixed running resource data and the allocated standby running resource data to perform process running processing in the namespace, and load the program running results into The access device performs the display.
在本发明具体实施过程中,所述控制所述若干个待运行程序进程在所述命名空间内利用所述分配固定运行资源数据和所述分配备用运行资源数据进行进程运行处理,包括:在所述云计算服务器中获得所述若干个待运行程序进程,并控制所述若干个待运行程序进程在所述命名空间内基于所述若干个待运行程序进程的当前所需要的运行资源数据调用所述分配固定运行资源数据和所述分配备用运行资源数据进行进程运行处理。In the specific implementation process of the present invention, the control of the several to-be-run program processes to use the allocated fixed running resource data and the allocated standby running resource data to perform process running processing in the namespace includes: Obtain the plurality of program processes to be run from the cloud computing server, and control the plurality of program processes to be run to call in the namespace based on the currently required operating resource data of the plurality of program processes to be run. The allocation of fixed operation resource data and the allocation of standby operation resource data are performed for process operation processing.
具体的,在该云计算服务器中获得若干个待运行程序进程,然后再控制若干个待运行程序进程在命名空间内根据若干个待运行程序进程的当前所需要的运行资源数据调用分配固定运行资源数据和分配备用运行资源数据进行进程运行处理,在运行过程中所形成的运行结果将生成视频流,然后通过网络连接加载至访问设备中进行显示。Specifically, several program processes to be run are obtained in the cloud computing server, and then the several program processes to be run are controlled to call and allocate fixed running resources in the namespace according to the currently required running resource data of the several program processes to be run. The data and allocated backup operation resources are processed by the process, and the operation results formed during the operation will generate a video stream, which is then loaded into the access device for display through a network connection.
在本发明实施例中,在请求端需要云计算服务器运行相关的待运行程序进程时,通过在命名空间内为待运行程序进程分配对应的分配固定运行资源数据和分配备用运行资源数据,其中分配比用运行资源数据为可共享的运行资源数据,这样即可实现为访问设备分配相应的计算资源,保证程序进程稳定运行,并且减少云计算服务器中的资源浪费,同时使得云计算服务器的计算资源的利用效率更高。In the embodiment of the present invention, when the requesting end needs the cloud computing server to run a related program process to be run, the program process to be run is allocated corresponding fixed operation resource data and backup operation resource data in the namespace, where allocation By using the running resource data as sharable running resource data, it is possible to allocate corresponding computing resources to the access device, ensure the stable operation of the program process, and reduce the waste of resources in the cloud computing server. At the same time, the computing resources of the cloud computing server are increased. The utilization efficiency is higher.
本发明实施例提供的一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,该程序被处理器执行时实现上述实施例中任意一个实施例的访问设备资源分配方法。其中,所述计算机可读存储介质包括但不限于任何类型的盘(包括软盘、硬盘、光盘、CD-ROM、和磁光盘)、ROM(Read-Only Memory,只读存储器)、RAM(Random AcceSSMemory,随即存储器)、EPROM(EraSable Programmable Read-Only Memory,可擦写可编程只读存储器)、EEPROM(Electrically EraSable ProgrammableRead-Only Memory,电可擦可编程只读存储器)、闪存、磁性卡片或光线卡片。也就是,存储设备包括由设备(例如,计算机、手机)以能够读的形式存储或传输信息的任何介质,可以是只读存储器,磁盘或光盘等。An embodiment of the present invention provides a computer-readable storage medium. The computer-readable storage medium stores a computer program. When the program is executed by a processor, the access device resource allocation method in any of the above embodiments is implemented. Wherein, the computer-readable storage medium includes but is not limited to any type of disk (including floppy disk, hard disk, optical disk, CD-ROM, and magneto-optical disk), ROM (Read-Only Memory), RAM (Random Access Memory) , random access memory), EPROM (EraSable Programmable Read-Only Memory, erasable programmable read-only memory), EEPROM (Electrically EraSable ProgrammableRead-Only Memory, electrically erasable programmable read-only memory), flash memory, magnetic card or light card . That is, storage devices include any medium that stores or transmits information in a readable form by a device (eg, computer, mobile phone), which can be a read-only memory, a magnetic disk or an optical disk, etc.
本发明实施例还提供了一种计算机应用程序,其运行在计算机上,该计算机应用程序用于执行上述中任意一个实施例的访问设备资源分配方法。An embodiment of the present invention also provides a computer application program, which runs on a computer. The computer application program is used to execute the access device resource allocation method in any of the above embodiments.
此外,图3是本发明实施例中的云计算服务器的结构组成示意图。In addition, FIG. 3 is a schematic structural diagram of a cloud computing server in an embodiment of the present invention.
本发明实施例还提供了一种云计算服务器,如图3所示。所述云计算服务器包括处理器302、存储器303、输入单元304以及显示单元305等器件。本领域技术人员可以理解,图3示出的设备结构器件并不构成对所有设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件。存储器303可用于存储应用程序301以及各功能模块,处理器302运行存储在存储器303的应用程序301,从而执行设备的各种功能应用以及数据处理。存储器可以是内存储器或外存储器,或者包括内存储器和外存储器两者。内存储器可以包括只读存储器(ROM)、可编程 ROM(PROM)、电可编程ROM(EPROM)、电可擦写可编程ROM(EEPROM)、快闪存储器、或者随机存储器。外存储器可以包括硬盘、软盘、ZIP盘、U盘、磁带等。本发明所公开的存储器包括但不限于这些类型的存储器。本发明所公开的存储器只作为例子而非作为限定。An embodiment of the present invention also provides a cloud computing server, as shown in Figure 3. The cloud computing server includes a processor 302, a memory 303, an input unit 304, a display unit 305 and other devices. Those skilled in the art can understand that the equipment structural components shown in Figure 3 do not constitute a limitation to all equipment, and may include more or fewer components than shown in the figure, or combine certain components. The memory 303 can be used to store the application program 301 and each functional module. The processor 302 runs the application program 301 stored in the memory 303 to execute various functional applications and data processing of the device. The memory may be internal memory or external memory, or include both internal memory and external memory. Internal memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), flash memory, or random access memory. External storage can include hard disks, floppy disks, ZIP disks, U disks, tapes, etc. The memory disclosed in the present invention includes but is not limited to these types of memory. The memory disclosed in the present invention is only an example and not a limitation.
输入单元304用于接收信号的输入,以及接收用户输入的关键字。输入单元304可包括触控面板以及其它输入设备。触控面板可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板上或在触控面板附近的操作),并根据预先设定的程序驱动相应的连接装置;其它输入设备可以包括但不限于物理键盘、功能键(比如播放控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。显示单元305可用于显示用户输入的信息或提供给用户的信息以及终端设备的各种菜单。显示单元305可采用液晶显示器、有机发光二极管等形式。处理器302是终端设备的控制中心,利用各种接口和线路连接整个设备的各个部分,通过运行或执行存储在存储器303内的软件程序和/或模块,以及调用存储在存储器内的数据,执行各种功能和处理数据。The input unit 304 is used to receive signal input and receive keywords input by the user. The input unit 304 may include a touch panel and other input devices. The touch panel can collect the user's touch operations on or near it (such as the user's operations on or near the touch panel using fingers, stylus, or any suitable objects or accessories), and perform operations based on preset The program drives the corresponding connection device; other input devices may include but are not limited to one or more of physical keyboards, function keys (such as playback control keys, switch keys, etc.), trackballs, mice, joysticks, etc. The display unit 305 may be used to display information input by the user or information provided to the user as well as various menus of the terminal device. The display unit 305 may be in the form of a liquid crystal display, an organic light emitting diode, or the like. The processor 302 is the control center of the terminal device, using various interfaces and lines to connect various parts of the entire device, and executing software programs and/or modules stored in the memory 303 by running or executing them, and calling data stored in the memory. Various functions and processing data.
作为一个实施例,所述云计算服务器包括:一个或多个处理器302,存储器303,一个或多个应用程序301,其中所述一个或多个应用程序301被存储在存储器303中并被配置为由所述一个或多个处理器302执行,所述一个或多个应用程序301配置用于执行上述实施例中的任意一实施例中对的访问设备资源分配方法。As an embodiment, the cloud computing server includes: one or more processors 302, a memory 303, and one or more application programs 301, wherein the one or more application programs 301 are stored in the memory 303 and configured. To be executed by the one or more processors 302, the one or more application programs 301 are configured to execute the access device resource allocation method in any one of the above embodiments.
在本发明实施例中,在请求端需要云计算服务器运行相关的待运行程序进程时,通过在命名空间内为待运行程序进程分配对应的分配固定运行资源数据和分配备用运行资源数据,其中分配比用运行资源数据为可共享的运行资源数据,这样即可实现为访问设备分配相应的计算资源,保证程序进程稳定运行,并且减少云计算服务器中的资源浪费,同时使得云计算服务器的计算资源的利用效率更高。In the embodiment of the present invention, when the requesting end needs the cloud computing server to run a related program process to be run, the program process to be run is allocated corresponding fixed operation resource data and backup operation resource data in the namespace, where allocation By using the running resource data as sharable running resource data, it is possible to allocate corresponding computing resources to the access device, ensure the stable operation of the program process, and reduce the waste of resources in the cloud computing server. At the same time, the computing resources of the cloud computing server are increased. The utilization efficiency is higher.
另外,以上对本发明实施例所提供的一种基于云计算的访问设备资源分配方法及相关装置进行了详细介绍,本文中应采用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。In addition, the cloud computing-based access device resource allocation method and related devices provided by the embodiments of the present invention have been introduced in detail. This article shall use specific examples to illustrate the principles and implementation methods of the present invention. The above implementation The description of the examples is only used to help understand the method and the core idea of the present invention; at the same time, for those of ordinary skill in the art, there will be changes in the specific implementation and application scope based on the idea of the present invention. In summary, As mentioned above, the contents of this description should not be construed as limitations of the present invention.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310843886.5ACN116560859B (en) | 2023-07-11 | 2023-07-11 | Cloud computing-based access equipment resource allocation method and related device |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310843886.5ACN116560859B (en) | 2023-07-11 | 2023-07-11 | Cloud computing-based access equipment resource allocation method and related device |
| Publication Number | Publication Date |
|---|---|
| CN116560859A CN116560859A (en) | 2023-08-08 |
| CN116560859Btrue CN116560859B (en) | 2023-09-22 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202310843886.5AActiveCN116560859B (en) | 2023-07-11 | 2023-07-11 | Cloud computing-based access equipment resource allocation method and related device |
| Country | Link |
|---|---|
| CN (1) | CN116560859B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102917077A (en)* | 2012-11-20 | 2013-02-06 | 无锡城市云计算中心有限公司 | Resource allocation method in cloud computing system |
| CN103353867A (en)* | 2005-12-29 | 2013-10-16 | 亚马逊科技公司 | Distributed replica storage system with web services interface |
| CN106105152A (en)* | 2014-05-22 | 2016-11-09 | 华为技术有限公司 | A node interconnection device, resource control node and server system |
| CN108431778A (en)* | 2015-12-28 | 2018-08-21 | 亚马逊科技公司 | Management of virtual desktop instance pools |
| CN109213555A (en)* | 2018-08-16 | 2019-01-15 | 北京交通大学 | A kind of resource dynamic dispatching method of Virtual desktop cloud |
| CN112650575A (en)* | 2021-01-15 | 2021-04-13 | 百度在线网络技术(北京)有限公司 | Resource scheduling method and device and cloud service system |
| CN113424144A (en)* | 2019-03-12 | 2021-09-21 | 英特尔公司 | Computing data storage system |
| CN114090271A (en)* | 2022-01-24 | 2022-02-25 | 中诚华隆计算机技术有限公司 | Cloud computing resource allocation method and device, computing equipment and storage medium |
| CN114116909A (en)* | 2021-12-01 | 2022-03-01 | 敏博科技(武汉)有限公司 | Distributed cloud native database management method and system |
| CN114385342A (en)* | 2020-10-16 | 2022-04-22 | 中国电信股份有限公司 | Container cloud overload protection method and device, computer device and storage medium |
| CN114846448A (en)* | 2020-01-09 | 2022-08-02 | 思科技术公司 | Providing multiple namespace support to applications in containers under KUBERNETES |
| US11442927B1 (en)* | 2019-09-30 | 2022-09-13 | EMC IP Holding Company LLC | Storage performance-based distribution of deduplicated data to nodes within a clustered storage environment |
| CN115334084A (en)* | 2022-08-18 | 2022-11-11 | 陈水兰 | Cloud platform based on cloud computing and internet |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9471384B2 (en)* | 2012-03-16 | 2016-10-18 | Rackspace Us, Inc. | Method and system for utilizing spare cloud resources |
| US9038068B2 (en)* | 2012-11-15 | 2015-05-19 | Bank Of America Corporation | Capacity reclamation and resource adjustment |
| US12417126B2 (en)* | 2021-06-18 | 2025-09-16 | International Business Machines Corporation | Dynamic renewable runtime resource management |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103353867A (en)* | 2005-12-29 | 2013-10-16 | 亚马逊科技公司 | Distributed replica storage system with web services interface |
| CN102917077A (en)* | 2012-11-20 | 2013-02-06 | 无锡城市云计算中心有限公司 | Resource allocation method in cloud computing system |
| CN106105152A (en)* | 2014-05-22 | 2016-11-09 | 华为技术有限公司 | A node interconnection device, resource control node and server system |
| CN108431778A (en)* | 2015-12-28 | 2018-08-21 | 亚马逊科技公司 | Management of virtual desktop instance pools |
| CN109213555A (en)* | 2018-08-16 | 2019-01-15 | 北京交通大学 | A kind of resource dynamic dispatching method of Virtual desktop cloud |
| CN113424144A (en)* | 2019-03-12 | 2021-09-21 | 英特尔公司 | Computing data storage system |
| US11442927B1 (en)* | 2019-09-30 | 2022-09-13 | EMC IP Holding Company LLC | Storage performance-based distribution of deduplicated data to nodes within a clustered storage environment |
| CN114846448A (en)* | 2020-01-09 | 2022-08-02 | 思科技术公司 | Providing multiple namespace support to applications in containers under KUBERNETES |
| CN114385342A (en)* | 2020-10-16 | 2022-04-22 | 中国电信股份有限公司 | Container cloud overload protection method and device, computer device and storage medium |
| CN112650575A (en)* | 2021-01-15 | 2021-04-13 | 百度在线网络技术(北京)有限公司 | Resource scheduling method and device and cloud service system |
| CN114116909A (en)* | 2021-12-01 | 2022-03-01 | 敏博科技(武汉)有限公司 | Distributed cloud native database management method and system |
| CN114090271A (en)* | 2022-01-24 | 2022-02-25 | 中诚华隆计算机技术有限公司 | Cloud computing resource allocation method and device, computing equipment and storage medium |
| CN115334084A (en)* | 2022-08-18 | 2022-11-11 | 陈水兰 | Cloud platform based on cloud computing and internet |
| Title |
|---|
| 基于网格环境的协同CAE系统的构架及理论研究;倪晓宇;吴宏章;刘英;;中国制造业信息化(第15期);全文* |
| Publication number | Publication date |
|---|---|
| CN116560859A (en) | 2023-08-08 |
| Publication | Publication Date | Title |
|---|---|---|
| CN111913794B (en) | Method, apparatus, electronic device and readable storage medium for sharing GPU | |
| CN107885762A (en) | Intelligent big data system, the method and apparatus that intelligent big data service is provided | |
| CN110083399B (en) | Mini program running method, computer device and storage medium | |
| US20160269479A1 (en) | Cloud virtual server scheduling method and apparatus | |
| CN111400000A (en) | Network request processing method, device, equipment and storage medium | |
| CN109951553B (en) | Data processing method, system, electronic device and computer readable storage medium | |
| CN112269659A (en) | Resource management method, system, electronic equipment and storage medium | |
| CN111290842A (en) | Task execution method and device | |
| US9473572B2 (en) | Selecting a target server for a workload with a lowest adjusted cost based on component values | |
| CN111885184A (en) | Method and device for processing hot spot access keywords in high concurrency scene | |
| WO2022148086A1 (en) | Information processing method and apparatus, and device and storage medium | |
| CN113986402A (en) | Function calling method and device, electronic equipment and storage medium | |
| WO2025124172A1 (en) | Method and apparatus for component deployment and updating, computer device, and storage medium | |
| CN111586177B (en) | Cluster session loss prevention method and system | |
| CN110781159B (en) | Ceph directory file information reading method and device, server and storage medium | |
| US9338229B2 (en) | Relocating an application from a device to a server | |
| US9229980B2 (en) | Composition model for cloud-hosted serving applications | |
| CN115801785A (en) | Multi-user management method and device for cloud mobile phone, server and storage medium | |
| CN109614242B (en) | A computing power sharing method, device, equipment and medium | |
| CN115629853A (en) | Task scheduling method and device | |
| CN116560859B (en) | Cloud computing-based access equipment resource allocation method and related device | |
| CN105677481A (en) | Method and system for processing data and electronic equipment | |
| CN114064403A (en) | Task delay analysis processing method and device | |
| CN118132010A (en) | Data storage method and device | |
| CN115484149B (en) | Network switching method, network switching device, electronic equipment and storage medium |
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| PE01 | Entry into force of the registration of the contract for pledge of patent right | Denomination of invention:A cloud computing based access device resource allocation method and related device Granted publication date:20230922 Pledgee:Ningxiang sub branch of Bank of Changsha Co.,Ltd. Pledgor:Henghui Xinda Technology Co.,Ltd. Registration number:Y2025980023476 | |
| PE01 | Entry into force of the registration of the contract for pledge of patent right |