CN-121997538-A - Virtual queue simulation method, device, equipment, storage medium and program product
Abstract
The invention relates to the technical field of virtual environment development and provides a virtual queue simulation method, a device, equipment, a storage medium and a program product, wherein the method comprises the steps of creating a path point sequence according to a base node sequence and a queuing interval, wherein the base node sequence is used for defining a queue trend and a queue shape, and the distance between two adjacent path points in the path point sequence is equal to the queuing interval; initializing a target virtual queue containing a queue tail trigger area by utilizing a path point sequence, wherein the target virtual queue is an empty queue initially, the initial position of the queue tail trigger area is the initial path point of the path point sequence, if a new target virtual object is received, the current path point corresponding to the queue tail trigger area is distributed to the target virtual object, and the position of the queue tail trigger area is updated from the current path point to the next path point of the path point sequence. According to the technical scheme provided by one or more embodiments of the present disclosure, queuing behavior conforming to real world observation can be reliably simulated.
Inventors
- YANG DI
- ZHENG WEIDIAN
- CHEN QIYI
- CHEN Jin
Assignees
- 佳都科技集团股份有限公司
- 广州佳都智通科技有限公司
- 广东华之源信息工程有限公司
- 广州华佳软件有限公司
- 广州佳都城轨智慧运维服务有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20251217
Claims (10)
- 1. A method of virtual queue simulation, the method comprising: Creating a path point sequence according to a base node sequence and a queuing interval, wherein the base node sequence is used for defining a queue trend and a queue shape, and the distance between two adjacent path points in the path point sequence is equal to the queuing interval; initializing a target virtual queue comprising a tail trigger area by using the path point sequence, wherein the target virtual queue is initially an empty queue, and the initial position of the tail trigger area is the initial path point of the path point sequence; if a new target virtual object is received, distributing the current path point corresponding to the queue tail trigger area to the target virtual object, and adding the information to be processed of the target virtual object to the tail of a preset information list; and updating the position of the tail trigger area from the current path point to the next path point of the path point sequence.
- 2. The method of claim 1, wherein creating a sequence of path points from the sequence of base nodes and the queuing interval comprises: acquiring the base node sequence and the queuing interval; Determining the starting path point in the base node sequence; And interpolating and generating each subsequent path point in the base node sequence from the starting path point according to the queuing interval.
- 3. The method according to claim 1 or 2, characterized in that the method further comprises: Circularly checking whether a head object of the target virtual queue reaches the initial path point; If the head of queue object reaches the initial path point, processing the head of queue object based on the information matched with the head of queue object in the preset information list; When the queue head object processing is completed, removing the queue head object from the target virtual queue, and moving all the rest objects in the target virtual queue forward by one path point in the path point sequence; And in response to the queue update of the target virtual queue, correspondingly advancing the position of the tail trigger area by one path point in the path point sequence.
- 4. A method according to claim 3, characterized in that the method further comprises: If the head object reaches the initial path point, starting a processing timer for the head object, wherein the processing timer is used for recording the processing time of the head object; and if the processing time of the head-of-queue object reaches the preset processing time limit of the head-of-queue object, confirming that the head-of-queue object is processed.
- 5. The method of claim 4, wherein the method comprises at least one of: determining the preset processing time limit according to the information matched with the queue head object in the preset information list; determining the preset processing time limit according to a global time value input by a user in advance; and randomly determining the preset processing time limit according to the global time range input by the user in advance.
- 6. The method according to claim 1 or 2, characterized in that the method further comprises: circularly checking whether the target virtual queue has a midway dequeue object; If the midway dequeue object is detected, removing the midway dequeue object from the target virtual queue, and moving all the rest objects in the target virtual queue after the midway dequeue object forward by one path point in the path point sequence; And in response to the queue update of the target virtual queue, correspondingly advancing the position of the tail trigger area by one path point in the path point sequence.
- 7. A virtual queue simulation apparatus, the apparatus comprising: The path initialization module is used for creating a path point sequence according to a base node sequence and a queuing interval, wherein the base node sequence is used for defining a trend and a shape of a queue, and the distance between two adjacent path points in the path point sequence is equal to the queuing interval; The queue initial module is used for initializing a target virtual queue comprising a queue tail trigger area by utilizing the path point sequence, wherein the target virtual queue is initially an empty queue, and the initial position of the queue tail trigger area is the initial path point of the path point sequence; The enqueue management module is used for distributing the current path point corresponding to the queue tail triggering area to the target virtual object if a new target virtual object is received, and adding the information to be processed of the target virtual object to the tail of a preset information list; And the dynamic updating module is used for updating the position of the tail trigger area from the current path point to the next path point of the path point sequence.
- 8. An electronic device, comprising: A memory and a processor, the memory and the processor being communicatively coupled to each other, the memory having stored therein computer instructions, the processor executing the computer instructions to perform the virtual queue simulation method of any one of claims 1 to 6.
- 9. A computer-readable storage medium having stored thereon computer instructions for causing a computer to perform the virtual queue simulation method of any one of claims 1 to 6.
- 10. A computer program product comprising computer instructions for causing a computer to perform the virtual queue simulation method of any one of claims 1 to 6.
Description
Virtual queue simulation method, device, equipment, storage medium and program product Technical Field The present disclosure relates to the field of virtual environment development technologies, and in particular, to a virtual queue simulation method, apparatus, device, storage medium, and program product. Background In the field of virtual environment development technologies, such as game development, smart cities, station operation management, industrial digital twinning, virtual reality experience, etc., it is often necessary to simulate queuing scenarios in the real world. Such simulated queuing scenarios include, but are not limited to, simulating passenger queues of subway station ticket vending machines, security check ports, simulating customer waiting queues of banking outlets, dining tables, simulating processing queues of workpieces in factory pipelines, and simulating queuing of tourists in amusement parks in front of amusement facilities. However, how to reliably simulate such queuing scenarios in a dynamic, interactive virtual environment, so that they truly conform to the queuing behavior observed in the real world, is a technical problem that the developer needs to face. Disclosure of Invention The present disclosure provides a virtual queue simulation method, apparatus, device, storage medium, and program product, capable of efficiently and reliably simulating queuing behavior conforming to real world observation in a dynamic, interactive virtual environment, and ensuring accuracy and fidelity of a simulated queuing scene. The virtual queue simulation method comprises the steps of creating a path point sequence according to a base node sequence and a queuing interval, wherein the base node sequence is used for defining the trend and the shape of a queue, the distance between two adjacent path points in the path point sequence is equal to the queuing interval, initializing a target virtual queue comprising a queue tail trigger area by using the path point sequence, wherein the target virtual queue is initially an empty queue, the initial position of the queue tail trigger area is the initial path point of the path point sequence, if a new target virtual object is received, distributing the current path point corresponding to the queue tail trigger area to the target virtual object, adding information to be processed of the target virtual object to the end of a preset information list, and updating the position of the queue tail trigger area from the current path point to the next path point of the path point sequence. In an alternative embodiment, the creating the path point sequence according to the base node sequence and the queuing interval comprises the steps of acquiring the base node sequence and the queuing interval, determining the starting path point in the base node sequence, and interpolating and generating each subsequent path point in the base node sequence according to the queuing interval from the starting path point. In an alternative implementation mode, the method further comprises the steps of circularly checking whether a head object of the target virtual queue reaches the starting path point, processing the head object based on information matched with the head object in the preset information list if the head object reaches the starting path point, removing the head object from the target virtual queue when the head object processing is completed, moving all the rest objects in the target virtual queue forwards by one path point in the path point sequence, and correspondingly advancing the position of the tail trigger area by one path point in the path point sequence in response to the updating of the queue of the target virtual queue. In an alternative implementation mode, the method further comprises the steps of starting a processing timer for the head-of-queue object if the head-of-queue object reaches the starting path point, wherein the processing timer is used for recording the processing time of the head-of-queue object, and confirming that the head-of-queue object is processed if the processing time of the head-of-queue object reaches the preset processing time limit of the head-of-queue object. In an alternative embodiment, the method comprises at least one of determining the preset processing time limit according to information matched with the queue head object in the preset information list, determining the preset processing time limit according to a global time value input by a user in advance, and randomly determining the preset processing time limit according to a global time range input by the user in advance. In an alternative embodiment, the method further comprises the steps of circularly checking whether the target virtual queue has a midway dequeue object, removing the midway dequeue object from the target virtual queue if the midway dequeue object is detected, moving all the remaining objects in the target virtual queue after the midway dequeue