CN113595772A - Multi-user scene multiplexing method and device in shooting range environment - Google Patents

Multi-user scene multiplexing method and device in shooting range environment Download PDF

Info

Publication number
CN113595772A
CN113595772A CN202110805046.0A CN202110805046A CN113595772A CN 113595772 A CN113595772 A CN 113595772A CN 202110805046 A CN202110805046 A CN 202110805046A CN 113595772 A CN113595772 A CN 113595772A
Authority
CN
China
Prior art keywords
scene
user
idle
multiplexing
scenes
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110805046.0A
Other languages
Chinese (zh)
Other versions
CN113595772B (en
Inventor
殷庆荣
卢成远
谢峥
高庆官
唐海均
王国伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Cyber Peace Technology Co Ltd
Original Assignee
Nanjing Cyber Peace Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing Cyber Peace Technology Co Ltd filed Critical Nanjing Cyber Peace Technology Co Ltd
Priority to CN202110805046.0A priority Critical patent/CN113595772B/en
Publication of CN113595772A publication Critical patent/CN113595772A/en
Application granted granted Critical
Publication of CN113595772B publication Critical patent/CN113595772B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/12Discovery or management of network topologies
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0893Assignment of logical groups to network elements
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Studio Devices (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a scene multiplexing method and a device in a multi-user shooting range environment, the method firstly initializes partial idle scenes, randomly allocates a user to an idle scene if the idle scene is received after receiving a user use request, and starts a new thread to try to continue initializing the idle scene; if no idle scene exists, a scene multiplexing strategy is obtained, if multi-user multiplexing of the same scene is supported, the user is randomly distributed to a scene which is not used for the maximum number of multiplexing people, and otherwise, the user is tried to be added into a scene waiting queue. And when the scene is released, if a user waits, scheduling the user in the scene waiting queue to the released scene, otherwise, cleaning and recovering. The invention can be applied and used when the scene number does not reach the bottleneck of system hardware resources; after the maximum number of scenes which can be borne by the system is reached, the concurrent behaviors of the users are controlled through multiplexing and queue waiting technologies, and the stable operation of the system is ensured.

Description

Multi-user scene multiplexing method and device in shooting range environment
Technical Field
The invention relates to a scene multiplexing method and a scene multiplexing device in a multi-user shooting range environment, and belongs to the technical field of networks.
Background
In a network target range, a scene topology is defined as a graph set of points and edges formed by a series of network devices such as virtual machines and routers, each point in the set represents one network device, and the edges represent the connection relationship between the devices. All node devices in the topology can be instantiated through virtualization technologies such as OpenStack, and the instantiated topology is defined as a scene. Depending on the scene, the user can complete various network experiments and scientific verification in the shooting range.
The typical scene topology mainly comprises a network, a router, a target machine, various operating machines and other equipment. In the actual use process of the user, the user needs to wait for the completion of the topology instantiation before the subsequent operation can be performed. The instantiation needs to apply for physical computing resources one by one from a virtualization platform such as OpenStack according to various configurations of devices in the network (for an operating machine, for example, a win10 version operating machine of 4-core 16G), and each physical resource executes serial instantiation; a scenario is in an available state only after all corresponding physical resources have been instantiated. Physical resource instantiation is a time-consuming operation, users often need to wait for minutes, and the user experience is not friendly. Under the condition of overlarge user amount, each user competitively starts a scene and applies for physical resources in parallel; the lack of a control mechanism causes the bottom-layer physical resources to be exhausted, so that the response of the whole system is slowed down, and the overall throughput of the system is reduced.
Disclosure of Invention
The purpose of the invention is as follows: aiming at the problems in the prior art, the invention aims to provide a method and a device for multiplexing scenes in a multi-user shooting range environment, which can be applied and used immediately by a pre-starting technology under the condition that the number of scenes does not reach the bottleneck of system hardware resources; after the maximum number of scenes which can be borne by the system is reached, the concurrent behaviors of the users are controlled through multiplexing and queue waiting technologies, and the stable operation of the system is ensured.
The technical scheme is as follows: in order to achieve the above object, the present invention provides a method for multiplexing scenes in a multi-user shooting range environment, comprising the following steps:
step 1, initializing an idle scene according to a predefined minimum number of idle scenes;
step 2, monitoring a request of a user for applying for scene use, and judging whether an idle scene exists or not after receiving the scene use request of the user; if yes, jumping to the step 3, otherwise, jumping to the step 5;
step 3, randomly allocating users to an idle scene, and marking the state of the allocated scene as in use; if the scene is defined as a shared scene, at least one operating machine is allocated to the current user, and the rest virtual machines in the scene are added into an idle operating machine list;
step 4, when the number of the current idle scenes is lower than the predefined maximum number of the idle scenes, asynchronously starting a new thread to execute the work of initializing the idle scenes;
and 5, if the scene is a sharing scene, supporting multi-user multiplexing, and multiplexing the scene by using the following strategy: traversing a running scene list, acquiring a scene with the number of multiplexing people not reaching the maximum number, distributing users to the scene in use, and marking the number of multiplexing people of the scene plus one; if all scenes reach the maximum multiplexing number of people, adding the users into a scene waiting queue, if the queue is not full, prompting the current waiting number of people of the users, and if the queue is full, prompting the current unavailable scenes of the users; and if the scene does not support multiplexing, trying to add the user into a scene waiting queue, if the queue is not full, prompting the current waiting number of people of the user, and if the queue is full, prompting the user that no available scene exists currently.
Preferably, the scenario supporting multiplexing comprises at least two virtual machines and network intermediary equipment, wherein the virtual machines in the scenario are divided into an operating machine and a target drone; when an idle scene is initialized, if one index of the physical resources does not meet the scene requirement, the application of the idle scene is abandoned; the physical resource indexes comprise a memory, a CPU, a disk and a network.
Preferably, the method for judging whether the scene reaches the maximum number of multiplexed people is as follows: after the scene is actually started, adding virtual machines which do not exist as operation machines in the scene into an idle operation machine list; when a user applies for scene multiplexing, judging whether the length of a list of current idle operating machines is larger than N, if the length of the list is larger than N, popping or randomly selecting N idle operating machines from the head of the list to serve as operating machines distributed to the current user; otherwise, the current scene is considered to reach the maximum multiplexing number, and the reuse is not supported; where N is the number of operators required for each user.
Preferably, in step 4, before the new thread performs the actual initialization of the scene, a distributed lock for initializing the new scene is acquired from the distributed consistency server, and if the lock can be successfully acquired, the actual initialization of the idle scene is performed; otherwise, the thread enters a distributed lock waiting state, monitors the use condition of the lock, and continues to try to acquire the lock and subsequent initialization work after other threads release the lock.
Further, the method comprises the following steps:
step 6, when the user actively releases the scene or the system periodically releases the scene, judging whether a user waits for using the scene in the current scene waiting queue, if so, jumping to step 7, otherwise, jumping to step 8;
step 7, clearing the scene operation record of the current user, notifying a scene waiting queue, scheduling a first user in the waiting queue to a scene needing to be released by the current user, and ending a scene releasing process;
step 8, judging whether the scene is a sharing scene, if so, skipping to step 9, otherwise skipping to step 10;
step 9, if the user is not the last user in the scene, subtracting one from the number of the sharing users in the current scene, adding the operation machines distributed by the current user into an idle operation machine list after executing the cleaning action, and ending the scene release process; otherwise, entering the step 10;
step 10, judging whether the physical resources of the current scene need to be released, if so, jumping to step 11, otherwise, jumping to step 12;
step 11, the system releases the physical resources occupied by the scene, and the scene release process is ended after the release is finished;
and 12, cleaning use traces in the scene, recovering the scene to an initialization state, and marking the scene to be in an idle state.
Preferably, in step 10, when the number of idle scenes in the system is greater than the maximum number of idle scenes, the physical resources of the current scene need to be released.
Based on the same inventive concept, the invention provides a multi-user scene multiplexing device in a shooting range environment, which comprises:
the scene initialization unit is used for initializing the idle scene according to the predefined minimum number of the idle scenes and monitoring the request of the user for applying the scene; when the number of the current idle scenes is lower than the predefined maximum number of the idle scenes, asynchronously starting a new thread to execute the work of initializing the idle scenes;
the scene application distribution unit is used for judging whether idle scenes exist or not after receiving a scene use request of a user; if yes, randomly allocating the user to an idle scene, marking the state of the allocated scene as in use, if the scene is defined as a sharing scene, allocating at least one operating machine to the current user, and adding the rest virtual machines in the scene into an idle operating machine list; if no idle scene exists, acquiring and judging whether the scene is a shared scene, and if the same scene is multiplexed by multiple users, multiplexing the scene by using the following strategies: traversing a running scene list, acquiring a scene with the number of multiplexing people not reaching the maximum number, distributing users to the scene in use, and marking the number of multiplexing people of the scene plus one; if all scenes reach the maximum multiplexing number of people, adding the users into a scene waiting queue, if the queue is not full, prompting the current waiting number of people of the users, and if the queue is full, prompting the current unavailable scenes of the users; and if the scene does not support multiplexing, trying to add the user into a scene waiting queue, if the queue is not full, prompting the current waiting number of people of the user, and if the queue is full, prompting the user that no available scene exists currently.
Further, the apparatus further comprises: the scene release processing unit is used for judging whether a user waits for using a scene in the current scene waiting queue or not when the user actively releases the scene or the system regularly releases the scene, if so, clearing the scene operation record of the current user and informing the scene waiting queue, scheduling the first user in the waiting queue to the scene which needs to be released by the current user, and ending the scene release process; otherwise, judging whether the scene is a sharing scene, if the scene is the sharing scene and the user is not the last user in the scene, subtracting one from the number of sharing users in the current scene, adding the operating machines distributed by the current user into an idle operating machine list after executing the cleaning action, and ending the scene release process; if the scene is a shared scene and the user is the last user in the scene or not, judging whether the physical resources of the current scene need to be released or not, if so, releasing the physical resources occupied by the scene by the system, and ending the scene release process after the release is finished; and if the release is not needed, cleaning the use trace in the scene, recovering the scene to an initialization state, and marking the scene to be in an idle state.
Based on the same inventive concept, the scene multiplexing device in the multi-user shooting range environment provided by the invention comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the computer program realizes the scene multiplexing method in the multi-user shooting range environment when being loaded to the processor.
Has the advantages that: compared with the prior art, the invention has the following advantages:
1. and the user experience is improved. The system realizes scene pre-starting according to the use habits of all current users, and the users do not need to wait for actual starting of the scene when using the scene, so that the users can use the scene immediately.
2. The total number of scenes can be limited according to actual physical resources, the robustness of the system is improved, and physical resource exhaustion caused by the fact that too many users use the scenes at the same time is avoided.
3. A fair queuing mechanism and a scene sharing scheme are used, so that the method is suitable for the conditions of schools and the like with more people and limited bottom layer computing resources.
Drawings
FIG. 1 is a flow chart of a scenario application in an embodiment of the present invention;
fig. 2 is a flow chart of releasing a scenario in the embodiment of the present invention.
Detailed Description
The technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings and specific embodiments.
As shown in fig. 1, a scene multiplexing method in a multi-user shooting range environment disclosed in the embodiment of the present invention, wherein an application process of a scene mainly includes the following steps:
(1) after a service system is started, initializing partial idle scenes according to the minimum number of idle scenes predefined by the system, and monitoring a request of a user for applying for scene use;
(2) after receiving the application of a user, judging whether an idle scene exists at present; jumping to the step (3) if an idle scene exists, otherwise, jumping to the step (5);
(3) randomly distributing users to a certain idle scene, and marking the current scene state as in use; if the scene is defined as a shared scene, at least one operating machine is allocated to the current user, and the rest virtual machines in the scene are added into an idle operating machine list;
(4) according to the maximum number of idle scenes preset by the system, judging whether the number of the current idle scenes is lower than a preset value, and asynchronously starting a new scene, wherein the starting process comprises the following steps:
asynchronously starting a new thread, trying to initialize an idle scene in the new thread, and ensuring that the number of the idle scenes is maintained at a certain stable level; before the thread carries out actual scene initialization, a distributed lock for initializing a new scene is obtained from a distributed consistency server, the lock ensures the uniqueness of scene initialization, and the problem of resource deadlock caused by simultaneous initialization of a plurality of scenes can be avoided; if the lock can be successfully acquired, actual idle scene initialization work is carried out; otherwise, the thread enters a distributed lock waiting state, monitors the use condition of the lock, and continues to try to acquire the lock and perform subsequent initialization work after other threads release the lock; the initialization process is as follows:
when initializing the idle scene, firstly judging whether the current physical resource can support the application of more scenes, if so, starting a new idle scene, otherwise, abandoning the application. The physical resources comprise key indexes such as memory, CPU number, disk size, network and the like, and as long as the surplus of a certain index of the physical resources does not meet the current application requirement, the physical resources are judged not to support the application of more scenes;
(5) inquiring a multiplexing strategy of a scene, if the current scene is a sharing scene, and supporting multiple users to multiplex the same scene (multiple students are allowed to use the same set of environment to complete network experiments together in use environments such as school teaching and the like), multiplexing the scene by using the following strategies:
traversing a running scene list, acquiring a scene with the number of multiplexing people not reaching the maximum number, distributing users to the scene in use, and marking the number of multiplexing people of the scene plus one; and if all scenes reach the maximum multiplexing number of people, adding the users into a scene waiting queue, if the queue is not full, prompting the current waiting number of people of the users, and if the queue is full, prompting the current unavailable scenes of the users.
And if the scene does not support multiplexing, trying to add the user into a scene waiting queue, if the queue is not full, prompting the current waiting number of people of the user, and if the queue is full, prompting the user that no available scene exists currently.
The scenario is composed of a plurality of virtual machines and necessary network intermediary devices (such as routers), and the scenario supporting multiplexing (shared scenario) has the following characteristics:
A) the scene is composed of at least two virtual machines;
B) a single user only operates part of virtual machines in the scene, the machines are called as operation machines, and the rest machines exist as target drone machines. The user needs to start from the current operation machine and obtain the designated content of the drone as the necessary basis for completing the training according to the necessary guide. The drone is used as a carrier of appointed contents, and has no actual calculation task, so that in the task of the type, the drone of one user can be reused as an operating machine of another user.
C) The multiplexing scheme is as follows: assuming that the total number of virtual machines in a scene is M (M > = 2), and the number of required operating machines for each user is N (N > = 1); after the scene is actually started, adding virtual machines which do not exist as operation machines in the scene into an idle operation machine list; when a user applies for scene multiplexing, judging whether the length of a list of current idle operating machines is larger than N, if the length of the list is larger than N, popping or randomly selecting N idle operating machines from the head of the list to serve as operating machines distributed to the current user; otherwise, the current scene is considered to reach the maximum multiplexing number of people, and the reuse is not supported.
As shown in fig. 2, the release flow of the scenario mainly includes the following steps:
(6) the user actively releases the scene after the scene is used, or the system actively releases the scene after a certain scene reaches the maximum use time; when the scene is released, judging whether a user waits for using the scene in the current scene waiting queue, if so, performing a jump step (7), otherwise, performing a jump step (8);
(7) clearing the scene operation record of the current user, informing a scene waiting queue, scheduling a first user in the waiting queue to a scene needing to be released by the current user, and ending a scene releasing process;
(8) judging whether the scene is a sharing scene, and jumping the sharing scene (9), otherwise jumping (10);
(9) if the number of the shared users in the current scene is reduced by one by the last user in the non-scene of the user, adding the operation machines distributed by the current user into an idle operation machine list after executing a cleaning action, and ending the scene release process; otherwise, go to step (10)
(10) And judging whether the physical resources of the current scene need to be released or not. The judgment standard is as follows: and if the number of the idle scenes in the system is larger than the preset idle scene value, indicating that the physical resources of the current scene need to be released. If the physical resource needs to be released, a step (11) of jumping is carried out, otherwise, a step (12) of jumping is carried out
(11) The system releases the physical resources occupied by the scene, such as CPU, disk, network, memory and the like, and finishes the scene release process after the release is finished;
(12) cleaning the use trace in the scene, recovering the scene to the initialization state, and marking the scene to be in the idle state for the next user to use.
Based on the same inventive concept, the scene multiplexing device in the multi-user shooting range environment provided by the embodiment of the invention comprises: the scene initialization unit is used for initializing the idle scene according to the predefined minimum number of the idle scenes and monitoring the request of the user for applying the scene; when the number of the current idle scenes is lower than the predefined maximum number of the idle scenes, asynchronously starting a new thread to execute the work of initializing the idle scenes; the scene application distribution unit is used for judging whether idle scenes exist or not after receiving a scene use request of a user; if yes, randomly allocating the user to an idle scene, marking the state of the allocated scene as in use, if the scene is defined as a sharing scene, allocating at least one operating machine to the current user, and adding the rest virtual machines in the scene into an idle operating machine list; if no idle scene exists, acquiring and judging whether the scene is a shared scene, and if the same scene is multiplexed by multiple users, multiplexing the scene by using the following strategies: traversing a running scene list, acquiring a scene with the number of multiplexing people not reaching the maximum number, distributing users to the scene in use, and marking the number of multiplexing people of the scene plus one; if all scenes reach the maximum multiplexing number of people, adding the users into a scene waiting queue, if the queue is not full, prompting the current waiting number of people of the users, and if the queue is full, prompting the current unavailable scenes of the users; and if the scene does not support multiplexing, trying to add the user into a scene waiting queue, if the queue is not full, prompting the current waiting number of people of the user, and if the queue is full, prompting the user that no available scene exists currently.
The device further comprises a scene release processing unit, which is used for judging whether a user waits for using a scene in the current scene waiting queue when the user actively releases the scene or the system regularly releases the scene, if so, clearing the scene operation record of the current user and informing the scene waiting queue, scheduling the first user in the waiting queue to the scene needing to be released by the current user, and ending the scene release process; otherwise, judging whether the scene is a sharing scene, if the scene is the sharing scene and the user is not the last user in the scene, subtracting one from the number of sharing users in the current scene, adding the operating machines distributed by the current user into an idle operating machine list after executing the cleaning action, and ending the scene release process; if the scene is a shared scene and the user is the last user in the scene or not, judging whether the physical resources of the current scene need to be released or not, if so, releasing the physical resources occupied by the scene by the system, and ending the scene release process after the release is finished; and if the release is not needed, cleaning the use trace in the scene, recovering the scene to an initialization state, and marking the scene to be in an idle state.
Based on the same inventive concept, the scene multiplexing apparatus in the multi-user shooting range environment provided by the embodiment of the invention comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, and when the computer program is loaded to the processor, the scene multiplexing method in the multi-user shooting range environment is realized.

Claims (10)

1. A scene multiplexing method in a multi-user shooting range environment is characterized by comprising the following steps:
step 1, initializing an idle scene according to a predefined minimum number of idle scenes;
step 2, monitoring a request of a user for applying for scene use, and judging whether an idle scene exists or not after receiving the scene use request of the user; if yes, jumping to the step 3, otherwise, jumping to the step 5;
step 3, randomly allocating users to an idle scene, and marking the state of the allocated scene as in use; if the scene is defined as a shared scene, at least one operating machine is allocated to the current user, and the rest virtual machines in the scene are added into an idle operating machine list;
step 4, when the number of the current idle scenes is lower than the predefined maximum number of the idle scenes, asynchronously starting a new thread to execute the work of initializing the idle scenes;
and 5, if the scene is a sharing scene, supporting multi-user multiplexing, and multiplexing the scene by using the following strategy: traversing a running scene list, acquiring a scene with the number of multiplexing people not reaching the maximum number, distributing users to the scene in use, and marking the number of multiplexing people of the scene plus one; if all scenes reach the maximum multiplexing number of people, adding the users into a scene waiting queue, if the queue is not full, prompting the current waiting number of people of the users, and if the queue is full, prompting the current unavailable scenes of the users; and if the scene does not support multiplexing, trying to add the user into a scene waiting queue, if the queue is not full, prompting the current waiting number of people of the user, and if the queue is full, prompting the user that no available scene exists currently.
2. The method for multiplexing scenes in the multi-user shooting range environment according to claim 1, wherein the scenes supporting multiplexing comprise at least two virtual machines and network intermediary equipment, and the virtual machines in the scenes are divided into operating machines and target shooting machines; when an idle scene is initialized, if one index of the physical resources does not meet the scene requirement, the application of the idle scene is abandoned; the physical resource indexes comprise a memory, a CPU, a disk and a network.
3. The method for multiplexing scenes in the multi-user shooting range environment according to claim 1, wherein the method for judging whether the scenes reach the maximum number of multiplexed people is as follows: after the scene is actually started, adding virtual machines which do not exist as operation machines in the scene into an idle operation machine list; when a user applies for scene multiplexing, judging whether the length of a list of current idle operating machines is larger than N, if the length of the list is larger than N, popping or randomly selecting N idle operating machines from the head of the list to serve as operating machines distributed to the current user; otherwise, the current scene is considered to reach the maximum multiplexing number, and the reuse is not supported; where N is the number of operators required for each user.
4. The method for multiplexing scenes in the multi-user shooting range environment according to claim 1, wherein in step 4, the new thread acquires a distributed lock for initializing the new scene from the distributed consistency server before the actual initialization of the scene, and if the lock can be acquired successfully, the actual initialization of the idle scene is performed; otherwise, the thread enters a distributed lock waiting state, monitors the use condition of the lock, and continues to try to acquire the lock and subsequent initialization work after other threads release the lock.
5. The method for scene reuse in a multi-user shooting range environment according to claim 1, further comprising the steps of:
step 6, when the user actively releases the scene or the system periodically releases the scene, judging whether a user waits for using the scene in the current scene waiting queue, if so, jumping to step 7, otherwise, jumping to step 8;
step 7, clearing the scene operation record of the current user, notifying a scene waiting queue, scheduling a first user in the waiting queue to a scene needing to be released by the current user, and ending a scene releasing process;
step 8, judging whether the scene is a sharing scene, if so, skipping to step 9, otherwise skipping to step 10;
step 9, if the user is not the last user in the scene, subtracting one from the number of the sharing users in the current scene, adding the operation machines distributed by the current user into an idle operation machine list after executing the cleaning action, and ending the scene release process; otherwise, entering the step 10;
step 10, judging whether the physical resources of the current scene need to be released, if so, jumping to step 11, otherwise, jumping to step 12;
step 11, the system releases the physical resources occupied by the scene, and the scene release process is ended after the release is finished;
and 12, cleaning use traces in the scene, recovering the scene to an initialization state, and marking the scene to be in an idle state.
6. The method for multiplexing scenes in a multi-user shooting range environment according to claim 5, wherein in step 10, when the number of idle scenes in the system is greater than the maximum number of idle scenes, the physical resources of the current scene need to be released.
7. A multi-user scene reuse apparatus in a shooting range environment, comprising:
the scene initialization unit is used for initializing the idle scene according to the predefined minimum number of the idle scenes and monitoring the request of the user for applying the scene; when the number of the current idle scenes is lower than the predefined maximum number of the idle scenes, asynchronously starting a new thread to execute the work of initializing the idle scenes;
the scene application distribution unit is used for judging whether idle scenes exist or not after receiving a scene use request of a user; if yes, randomly allocating the user to an idle scene, marking the state of the allocated scene as in use, if the scene is defined as a sharing scene, allocating at least one operating machine to the current user, and adding the rest virtual machines in the scene into an idle operating machine list; if no idle scene exists, acquiring and judging whether the scene is a shared scene, and if the same scene is multiplexed by multiple users, multiplexing the scene by using the following strategies: traversing a running scene list, acquiring a scene with the number of multiplexing people not reaching the maximum number, distributing users to the scene in use, and marking the number of multiplexing people of the scene plus one; if all scenes reach the maximum multiplexing number of people, adding the users into a scene waiting queue, if the queue is not full, prompting the current waiting number of people of the users, and if the queue is full, prompting the current unavailable scenes of the users; and if the scene does not support multiplexing, trying to add the user into a scene waiting queue, if the queue is not full, prompting the current waiting number of people of the user, and if the queue is full, prompting the user that no available scene exists currently.
8. The multi-user device for multiplexing scenes in the shooting range environment according to claim 7, wherein the new thread in the scene initialization unit obtains a distributed lock for initializing the new scene from the distributed consistency server before the actual scene initialization is performed, and performs the actual idle scene initialization if the lock can be successfully obtained; otherwise, the thread enters a distributed lock waiting state, monitors the use condition of the lock, and continues to try to acquire the lock and subsequent initialization work after other threads release the lock.
9. The apparatus for scene multiplexing in a multi-user shooting range environment according to claim 7, further comprising:
the scene release processing unit is used for judging whether a user waits for using a scene in the current scene waiting queue or not when the user actively releases the scene or the system regularly releases the scene, if so, clearing the scene operation record of the current user and informing the scene waiting queue, scheduling the first user in the waiting queue to the scene which needs to be released by the current user, and ending the scene release process; otherwise, judging whether the scene is a sharing scene, if the scene is the sharing scene and the user is not the last user in the scene, subtracting one from the number of sharing users in the current scene, adding the operating machines distributed by the current user into an idle operating machine list after executing the cleaning action, and ending the scene release process; if the scene is a shared scene and the user is the last user in the scene or not, judging whether the physical resources of the current scene need to be released or not, if so, releasing the physical resources occupied by the scene by the system, and ending the scene release process after the release is finished; and if the release is not needed, cleaning the use trace in the scene, recovering the scene to an initialization state, and marking the scene to be in an idle state.
10. An apparatus for scene reuse in a multi-user aperture ground environment, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the computer program, when loaded onto the processor, implementing a method for scene reuse in a multi-user aperture ground environment according to any one of claims 1-6.
CN202110805046.0A 2021-07-16 2021-07-16 Scene multiplexing method and device in multi-user shooting range environment Active CN113595772B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110805046.0A CN113595772B (en) 2021-07-16 2021-07-16 Scene multiplexing method and device in multi-user shooting range environment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110805046.0A CN113595772B (en) 2021-07-16 2021-07-16 Scene multiplexing method and device in multi-user shooting range environment

Publications (2)

Publication Number Publication Date
CN113595772A true CN113595772A (en) 2021-11-02
CN113595772B CN113595772B (en) 2023-08-29

Family

ID=78248415

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110805046.0A Active CN113595772B (en) 2021-07-16 2021-07-16 Scene multiplexing method and device in multi-user shooting range environment

Country Status (1)

Country Link
CN (1) CN113595772B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114281514A (en) * 2022-03-08 2022-04-05 南京赛宁信息技术有限公司 Method and system for recovering multi-stage queue scenes in shooting range environment
CN115373804A (en) * 2022-10-27 2022-11-22 合肥综合性国家科学中心人工智能研究院(安徽省人工智能实验室) Virtual machine scheduling method facing network test in cloud infrastructure

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110362380A (en) * 2019-06-17 2019-10-22 东南大学 A kind of multiple-objection optimization virtual machine deployment method in network-oriented target range
CN111651242A (en) * 2020-08-10 2020-09-11 南京赛宁信息技术有限公司 System and method for scheduling operating machine in network target range actual combat drilling scene
CN111741134A (en) * 2020-08-18 2020-10-02 南京赛宁信息技术有限公司 System and method for quickly constructing virtual machine in large-scale scene of network shooting range
CN112270085A (en) * 2020-10-26 2021-01-26 广州锦行网络科技有限公司 Dynamic design method of 3D network shooting range
CN112311816A (en) * 2020-12-30 2021-02-02 博智安全科技股份有限公司 Initialization method and reset method for virtual and real combined network target range environment
CN112416469A (en) * 2020-12-30 2021-02-26 博智安全科技股份有限公司 Initialization method and reset method of virtualized network target range environment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110362380A (en) * 2019-06-17 2019-10-22 东南大学 A kind of multiple-objection optimization virtual machine deployment method in network-oriented target range
CN111651242A (en) * 2020-08-10 2020-09-11 南京赛宁信息技术有限公司 System and method for scheduling operating machine in network target range actual combat drilling scene
CN111741134A (en) * 2020-08-18 2020-10-02 南京赛宁信息技术有限公司 System and method for quickly constructing virtual machine in large-scale scene of network shooting range
CN112270085A (en) * 2020-10-26 2021-01-26 广州锦行网络科技有限公司 Dynamic design method of 3D network shooting range
CN112311816A (en) * 2020-12-30 2021-02-02 博智安全科技股份有限公司 Initialization method and reset method for virtual and real combined network target range environment
CN112416469A (en) * 2020-12-30 2021-02-26 博智安全科技股份有限公司 Initialization method and reset method of virtualized network target range environment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114281514A (en) * 2022-03-08 2022-04-05 南京赛宁信息技术有限公司 Method and system for recovering multi-stage queue scenes in shooting range environment
CN115373804A (en) * 2022-10-27 2022-11-22 合肥综合性国家科学中心人工智能研究院(安徽省人工智能实验室) Virtual machine scheduling method facing network test in cloud infrastructure
CN115373804B (en) * 2022-10-27 2023-03-07 合肥综合性国家科学中心人工智能研究院(安徽省人工智能实验室) Virtual machine scheduling method facing network test in cloud infrastructure

Also Published As

Publication number Publication date
CN113595772B (en) 2023-08-29

Similar Documents

Publication Publication Date Title
CN110647394B (en) Resource allocation method, device and equipment
CN109936604B (en) Resource scheduling method, device and system
CN107018091B (en) Resource request scheduling method and device
CN113595772B (en) Scene multiplexing method and device in multi-user shooting range environment
CN108304260B (en) Virtualization operation scheduling system based on high-performance cloud computing and implementation method thereof
CN106411558B (en) Method and system for limiting data flow
US9875139B2 (en) Graphics processing unit controller, host system, and methods
CN111367630A (en) Multi-user multi-priority distributed cooperative processing method based on cloud computing
JP2017526049A5 (en)
CN111431970B (en) Resource allocation method, device, equipment and storage medium based on micro-service architecture
WO2016095535A1 (en) Resource allocation method and apparatus, and server
CN112416585A (en) GPU resource management and intelligent scheduling method for deep learning
CN111798113A (en) Resource allocation method, device, storage medium and electronic equipment
CN115576683A (en) Coroutine pool scheduling management method, system, device and storage medium
CN111163140A (en) Method, apparatus and computer readable storage medium for resource acquisition and allocation
US20150212859A1 (en) Graphics processing unit controller, host system, and methods
CN113419839A (en) Resource scheduling method and device for multi-type jobs, electronic equipment and storage medium
CN111143063B (en) Task resource reservation method and device
US9128769B2 (en) Processor with dedicated virtual functions and dynamic assignment of functional resources
CN115601221B (en) Resource allocation method and device and artificial intelligent training system
US7086059B2 (en) Throttling queue
CN115361349B (en) Resource using method and device
CN115063282A (en) GPU resource scheduling method, device, equipment and storage medium
CN117234742B (en) Processor core allocation method, device, equipment and storage medium
KR102446717B1 (en) Appartus for processing container, method thereof and storage storing a program for processing container

Legal Events

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