A virtual reality seat selection method, device, equipment and storage medium

By using virtual reality technology to analyze and render 3D models of airline seats, the problem of lack of intuitiveness and interactivity in existing seat selection methods is solved, providing an immersive seat selection experience and real-time data synchronization, thereby improving the convenience and satisfaction of users in selecting seats.

CN119444949BActive Publication Date: 2025-11-25CHINA SOUTHERN AIRLINES CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411428930.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-14
Publication Date
2025-11-25
Estimated Expiration
2044-10-14

AI Technical Summary

Technical Problem

Existing airline seat selection methods lack intuitiveness and interactivity. Passengers cannot intuitively perceive the actual size, comfort, and view of the seat. The information display is incomplete, leading to difficulty in decision-making and a poor user experience.

Method used

Using virtual reality technology, the system obtains the user's seat selection query command, uses the WebGL context to read 3D model files, parses and renders them, builds a rendering program, outputs the rendered screen to the user, and combines WebSocket or polling mechanism to update seat information, providing immersive interaction and real-time data synchronization.

Benefits of technology

It enables a more intuitive and convenient seat selection method, improving the user experience. Through high-precision 3D modeling and real-time data synchronization, it provides a near-realistic display of seat layouts, supports multi-platform compatibility and a high-availability architecture, and ensures system stability and response speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119444949B_ABST
    Figure CN119444949B_ABST
Patent Text Reader

Abstract

The application discloses a virtual reality seat selection method and device, equipment and storage medium, through obtaining the seat selection query instruction of the user, according to the seat selection query instruction, the seat state information is inquired, according to the seat state information, the WebGL context is obtained, the 3D model file in the WebGL context is read, the 3D model file is parsed, and the key data is extracted, the key data is loaded and handled, the rendering data is constructed and determined, the rendering shader is initialized in advance, the code is compiled, the rendering program is constructed, the rendering data is input into the rendering program for graphic drawing, and the rendering picture is output to the user. The application provides a more intuitive and convenient seat selection method, and improves the user seat selection experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of human-computer interaction technology, and more specifically, to a virtual reality seat selection method, apparatus, device, and storage medium. Background Technology

[0002] VR (Virtual Reality) technology creates an immersive experience by simulating human sensory experiences. It uses computer technology to simulate a three-dimensional environment and allows users to interact with it through special devices (such as VR headsets and controllers). With continuous technological advancements, VR technology has been widely applied in entertainment, education, healthcare, and many other fields, bringing tremendous convenience to people's lives and work.

[0003] Air travel has become a significant mode of transportation for passengers. Beyond traditional factors such as airline brand, aircraft safety, arrival and departure times, and ticket prices, passengers are increasingly focused on their flight experience, including seat comfort, legroom, and seat recline angle. However, when offering services like premium seat pre-selection, passengers often fail to intuitively perceive the extra space offered by front-row seats, leading them to forgo these services. Traditional seat selection methods frequently suffer from issues such as unclear information display and poor user experience. Summary of the Invention

[0004] To address the aforementioned issues, this invention proposes a virtual reality seat selection method, apparatus, device, and storage medium, providing a more intuitive and convenient seat selection method and improving the user's seat selection experience.

[0005] This invention provides a virtual reality seat selection method, the method comprising:

[0006] Retrieve the user's seat selection query command;

[0007] Query the current seat status information according to the seat selection query command;

[0008] Based on the seat status information, obtain the WebGL context, read the 3D model file in the WebGL context, parse the 3D model file, and extract key data;

[0009] The key data is loaded and processed to construct and determine the rendering data;

[0010] Initialize the pre-built rendering shaders, compile the code, and build the rendering program;

[0011] The rendering data is input into the rendering program for graphics drawing, and the rendered screen is output to the user.

[0012] Preferably, the method further includes:

[0013] The user's feedback on seat selection is obtained via WebSocket technology, and the seat information in the seat database is updated accordingly; or,

[0014] The system obtains the user's feedback on seat selection commands through a polling mechanism and updates the seat information in the seat database.

[0015] Preferably, obtaining the user's seat selection query instruction includes:

[0016] Based on the component-based development mode of Vue.js configured on the front end, it provides instructions and event handling to obtain user interaction operations;

[0017] The seat selection query instruction is determined based on the interactive operation;

[0018] The interactive operations include clicking on a seat, dragging the view, or selecting a flight.

[0019] As a preferred embodiment, querying the current seat status information according to the seat selection query instruction includes:

[0020] The system communicates with the front end via a RESTful API and queries the current seat status information in a preset relational database or NoSQL database according to the seat selection query command.

[0021] Preferably, the WebGL context is obtained based on the seat status information, the 3D model file in the WebGL context is read, and the 3D model file is parsed to extract key data, including:

[0022] By selecting the canvas element on the page and calling its getContext'webgl' method, the interface for interacting with the graphics hardware is obtained, and the model format of the 3D model file is determined.

[0023] The model file is retrieved from a pre-defined server using XMLHttpRequest or the Fetch API;

[0024] The model file is parsed, and vertex data and face data are extracted as the 3D model file according to the rules of the model format;

[0025] Convert the vertex data into a file in a preset format;

[0026] The key data is obtained by associating the texture image loaded from the face data with the vertex data.

[0027] Preferably, initializing the pre-built rendering shaders, compiling the code, and building the rendering program includes:

[0028] Use the requestAnimationFrame function to create a continuous animation loop, performing rendering operations in each frame;

[0029] Inside the rendering loop, the clearColor function is used to set the color to clear the color buffer, and then the clear method is used to clear both the color buffer and the depth buffer.

[0030] Write a vertex shader to handle the position and color attributes of vertices, and write a fragment shader to calculate the color of each pixel.

[0031] The vertex shader and the fragment shader are combined into the rendering program.

[0032] Preferably, inputting the rendering data into the rendering program for graphics drawing includes:

[0033] Create and populate the buffer using the createBuffer or bufferData function;

[0034] Use the bindBuffer function to bind the buffer, and enable the vertex attribute array using the enableVertexAttribArray function;

[0035] Vertex attribute data is retrieved from the buffer using the vertexAttribPointer function;

[0036] Use the drawArrays or drawElements function to draw the graphics based on the rendering data.

[0037] This invention also provides a virtual reality seat selection device, the device comprising:

[0038] The instruction acquisition module is used to acquire the user's seat selection query instruction;

[0039] The query module is used to query the current seat status information according to the seat selection query instruction;

[0040] The parsing module is used to obtain the WebGL context based on the seat status information, read the 3D model file in the WebGL context, parse the 3D model file, and extract key data.

[0041] The loading module is used to load and process the key data to construct and determine the rendering data;

[0042] The compilation module is used to initialize pre-built rendering shaders, compile the code, and build the rendering program;

[0043] The rendering module is used to input the rendering data into the rendering program for graphics drawing and output the rendered screen to the user.

[0044] Preferably, the device further includes a data synchronization module for:

[0045] The user's feedback on seat selection is obtained via WebSocket technology, and the seat information in the seat database is updated accordingly; or,

[0046] The system obtains the user's feedback on seat selection commands through a polling mechanism and updates the seat information in the seat database.

[0047] Preferably, the instruction acquisition module is used for:

[0048] Based on the component-based development mode of Vue.js configured on the front end, it provides instructions and event handling to obtain user interaction operations;

[0049] The seat selection query instruction is determined based on the interactive operation;

[0050] The interactive operations include clicking on a seat, dragging the view, or selecting a flight.

[0051] Preferably, the query module is used for:

[0052] The system communicates with the front end via a RESTful API and queries the current seat status information in a preset relational database or NoSQL database according to the seat selection query command.

[0053] Preferably, the parsing module is used for:

[0054] By selecting the canvas element on the page and calling its getContext'webgl' method, the interface for interacting with the graphics hardware is obtained, and the model format of the 3D model file is determined.

[0055] The model file is retrieved from a pre-defined server using XMLHttpRequest or the Fetch API;

[0056] The model file is parsed, and vertex data and face data are extracted as the 3D model file according to the rules of the model format;

[0057] Convert the vertex data into a file in a preset format;

[0058] The key data is obtained by associating the texture image loaded from the face data with the vertex data.

[0059] Preferably, the compilation module is used for:

[0060] Use the requestAnimationFrame function to create a continuous animation loop, performing rendering operations in each frame;

[0061] Inside the rendering loop, the clearColor function is used to set the color to clear the color buffer, and then the clear method is used to clear both the color buffer and the depth buffer.

[0062] Write a vertex shader to handle the position and color attributes of vertices, and write a fragment shader to calculate the color of each pixel.

[0063] The vertex shader and the fragment shader are combined into the rendering program.

[0064] Preferably, the rendering module is used for:

[0065] Create and populate the buffer using the createBuffer or bufferData function;

[0066] Use the bindBuffer function to bind the buffer, and enable the vertex attribute array using the enableVertexAttribArray function;

[0067] Vertex attribute data is retrieved from the buffer using the vertexAttribPointer function;

[0068] Use the drawArrays or drawElements function to draw the graphics based on the rendering data.

[0069] This invention also provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements a virtual reality seat selection method as described in any of the above embodiments.

[0070] This invention also provides a computer-readable storage medium, which includes a stored computer program, wherein the computer program, when running, controls the device where the computer-readable storage medium is located to execute a virtual reality seat selection method as described in any of the above embodiments.

[0071] This invention provides a virtual reality seat selection method, apparatus, device, and storage medium. The method involves: acquiring a user's seat selection query command; querying the current seat status information based on the command; obtaining a WebGL context based on the seat status information; reading a 3D model file from the WebGL context and parsing the 3D model file to extract key data; loading the key data to construct and determine rendering data; initializing a pre-built rendering shader, compiling the code, and constructing a rendering program; inputting the rendering data into the rendering program for graphics rendering, and outputting the rendered image to the user. This solution provides a more intuitive and convenient seat selection method, improving the user's seat selection experience. Attached Figure Description

[0072] Figure 1 This is a flowchart illustrating a virtual reality seat selection method provided in an embodiment of the present invention;

[0073] Figure 2 This is a partial flowchart illustrating a virtual reality seat selection method provided in an embodiment of the present invention;

[0074] Figure 3 This is a schematic diagram of the system structure in which the virtual reality seat selection method provided in this embodiment of the invention operates;

[0075] Figure 4 This is a schematic diagram of the structure of a virtual reality seat selection device provided in an embodiment of the present invention;

[0076] Figure 5 This is a schematic diagram of the structure of a terminal device provided in an embodiment of the present invention. Detailed Implementation

[0077] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0078] Current aircraft seat selection methods are generally categorized into three types:

[0079] 2D floor plan seat selection: Most airlines currently use 2D floor plans for passengers to select seats. This method is simple and intuitive, but it does not provide a real visual experience of the seat, making it difficult for passengers to judge the specific location of the seat, the view, and the relationship with the surrounding facilities.

[0080] Static image display: Some airlines provide static images or videos of the cabin interior, but these only provide limited angles and information and cannot fully reflect the actual situation of the passenger's selected seat.

[0081] Textual description: Another approach is to describe seat types and characteristics in words, such as "seats near emergency exits" or "seats near the aisle." This method also lacks intuitiveness and interactivity.

[0082] The main problems with existing technologies include the following aspects:

[0083] Lack of intuitive experience: Passengers cannot intuitively perceive the actual size, comfort, and view of the seat.

[0084] Incomplete information display: The existing seat selection method cannot provide detailed information about the surrounding area of ​​the seat, such as the distance between the seat and facilities such as restrooms and kitchens.

[0085] Decision-making difficulties: Due to a lack of sufficient information, passengers may feel hesitant when selecting seats and find it difficult to make the best choice.

[0086] Poor user experience: Traditional seat selection methods lack interactivity and immersion, which reduces the overall user experience.

[0087] To address the aforementioned technical problems, this application provides a virtual reality seat selection method, see [link to relevant documentation]. Figure 1 This is a flowchart illustrating a virtual reality seat selection method provided in an embodiment of the present invention, the method comprising steps S1 to S6;

[0088] S1, retrieve the user's seat selection query command;

[0089] S2, query the current seat status information according to the seat selection query instruction;

[0090] S3, obtain the WebGL context based on the seat status information, read the 3D model file in the WebGL context, parse the 3D model file, and extract key data;

[0091] S4, Load the key data to construct and determine the rendering data;

[0092] S5 initializes the pre-built rendering shaders, compiles the code, and builds the rendering program;

[0093] S6, input the rendering data into the rendering program for graphics drawing, and output the rendered screen to the user.

[0094] The virtual reality seat selection method provided in this case mainly includes a front-end user interface, 3D rendering, a data interaction module, and a back-end server.

[0095] The front-end user interface is configured on the device or apparatus that interacts with the user to obtain the user's seat selection query command.

[0096] The seat selection query command is used to start the seat selection rendering system and determine the corresponding seat status information based on the user's seat selection query command, including the seat's location, seat size information, and surrounding environment information.

[0097] When performing a status information query, the corresponding information query needs to be performed in the backend database.

[0098] The backend system is primarily responsible for handling data storage, business logic, and data interaction with the frontend. It employs a high-efficiency server architecture and database design to ensure data real-time performance and accuracy.

[0099] After the front-end obtains the status information, it performs the corresponding rendering processing. For details, please refer to [link / reference]. Figure 2 This is a partial flowchart of a virtual reality seat selection method provided in an embodiment of the present invention.

[0100] First, obtain the WebGL context based on the seat status information.

[0101] Perform 3D model file format conversion, that is, obtain the WebGL context based on the seat status information and read the 3D model file in the WebGL context.

[0102] After obtaining the 3D model file, it is necessary to parse and process the 3D model file, including vertex data conversion and texture information processing.

[0103] Then, a rendering loop and initialization are performed, the key data is loaded and processed, and the rendering data is constructed and determined.

[0104] The process involves initializing pre-built rendering shaders, compiling code, building the rendering program, constructing vertex and fragment shaders, and creating and compiling the rendering program.

[0105] After completing the rendering data binding and configuration, the buffer object is created and filled, and the rendering data is input into the rendering program for graphics drawing.

[0106] Output the rendered screen to the user, that is, provide feedback on the corresponding rendered screen to the interactive interface.

[0107] It should be noted that the user interface can be displayed through specific virtual reality equipment to achieve the best display effect.

[0108] This application provides a method for displaying seat layouts in a virtual reality environment by rendering images to users using virtual reality rendering. It can highly reproduce the actual seat layout in the virtual environment, including details such as seat spacing and luggage racks, providing a more intuitive and convenient way to select seats and improving the user's seat selection experience.

[0109] In another embodiment provided by the present invention, the method further includes:

[0110] The user's feedback on seat selection is obtained via WebSocket technology, and the seat information in the seat database is updated accordingly; or,

[0111] The system obtains the user's feedback on seat selection commands through a polling mechanism and updates the seat information in the seat database.

[0112] In the specific implementation of this embodiment, please refer to Figure 3 This is a schematic diagram of the system in which the virtual reality seat selection method provided in the embodiment of the present invention operates.

[0113] The portal in the system includes APP, PC and VR device, and interacts with users through the portal device.

[0114] The front end consists of an entry point and application services. The entry point is used to collect interactive devices of the portal device, obtain the interactive operation commands entered by the user through the portal via CDN and nginx, and transmit them to the application services for corresponding processing, including rendering.

[0115] During rendering, the application service also needs to interact with the backend, including log collection, which uses Logstash, Kibana, and Elasticsearch to collect backend logs. Business data is stored in MySQL, and buffered data is stored in Redis.

[0116] During real-time data updates, WebSocket technology is used to achieve real-time communication between the front-end and back-end, ensuring instant updates of seat status. During seat selection, the front-end can receive seat selection information from other users in real time, avoiding seat conflicts. In cases where WebSocket is not supported, a polling mechanism can be used, with the front-end periodically sending requests to the back-end to obtain the latest seat status.

[0117] In another embodiment provided by the present invention, when obtaining the user's seat selection query instruction in step S1 above, the following steps are specifically performed:

[0118] The front-end system is the part where users directly interact, and it's built on the Vue.js framework. Vue.js is a lightweight JavaScript framework suitable for building modern single-page applications (SPAs). The front-end system mainly consists of two parts: the user interface and 3D rendering.

[0119] User Interface: Leveraging Vue.js's component-based development model, the various functions of the seat selection system are modularized, such as seat selection, seat information display, and payment confirmation. CSS and Vue.js's reactive data binding mechanism ensure good display performance across different devices and screen sizes. User interaction with the system is achieved through directives and event handling provided by Vue.js, such as clicking on seats, dragging views, and selecting flights.

[0120] In another embodiment of the present invention, the step of querying the current seat status information according to the seat selection query instruction includes:

[0121] The system communicates with the front end via a RESTful API and queries the current seat status information in a preset relational database or NoSQL database according to the seat selection query command.

[0122] In practical use, the backend system is primarily responsible for handling data storage, business logic, and data interaction with the frontend. The backend system employs an efficient server architecture and database design to ensure data real-time performance and accuracy.

[0123] Server-side architecture: The backend communicates with the frontend via a RESTful API, providing functions such as seat status query and seat selection request processing. The RESTful API is designed to be concise, easy to extend, and maintain. To ensure real-time updates to seat status, the backend can use WebSocket technology to establish a real-time communication connection between the frontend and backend. When seat status changes, the frontend is promptly notified to update. The backend server is responsible for handling business logic such as seat selection requests, verifying seat status, and updating seat information. Efficient algorithms and data processing technologies ensure system responsiveness and stability.

[0124] Relational or NoSQL databases are used to store seat information, user information, and flight information. A well-designed database table structure and indexes are implemented to improve the efficiency of data retrieval and updates. Real-time synchronization of front-end and back-end data is achieved via API or WebSocket to ensure consistency between the seat status displayed on the front-end and the data in the back-end database.

[0125] In another embodiment of the present invention, in step S4 above, the WebGL context is obtained based on the seat status information, the 3D model file in the WebGL context is read, and the 3D model file is parsed to extract key data, including:

[0126] By selecting the canvas element on the page and calling its getContext'webgl' method, the interface for interacting with the graphics hardware is obtained, and the model format of the 3D model file is determined.

[0127] The model file is retrieved from a pre-defined server using XMLHttpRequest or the Fetch API;

[0128] The model file is parsed, and vertex data and face data are extracted as the 3D model file according to the rules of the model format;

[0129] Convert the vertex data into a file in a preset format;

[0130] The key data is obtained by associating the texture image loaded from the face data with the vertex data.

[0131] In this specific implementation, the core of the virtual reality seat selection system is realized by rendering a realistic 3D model of the aircraft interior; to provide passengers with a more convenient and intuitive seat selection experience, the workflow of this method is as follows:

[0132] First, obtain the WebGL context. This is done by selecting a canvas element on the page and calling its `getContext('webgl')` method to obtain the interface for interacting with the graphics hardware. This context is fundamental for 3D rendering. Next, determine the format of the 3D model; here, OBJ format is used. Model files typically contain information such as vertex positions, texture coordinates, normals, and face definitions, which need to be read. Retrieve the model file content from the server using XMLHttpRequest or the Fetch API. After obtaining the file content, it needs to be parsed. Based on the model format rules, extract key information such as vertex data and face data. For vertex data, it needs to be converted to a format that WebGL can handle, usually stored in a buffer object. Face data is used to determine which vertices form a triangle or polygon, thus constructing the model's surface. Texture information also needs to be processed. If the model contains textures, the texture image needs to be loaded and associated with the vertex data to ensure correct texture display during rendering.

[0133] In another embodiment of the present invention, step S5 initializes the pre-built rendering shader, compiles the code, and builds the rendering program, including:

[0134] Use the requestAnimationFrame function to create a continuous animation loop, performing rendering operations in each frame;

[0135] Inside the rendering loop, the clearColor function is used to set the color to clear the color buffer, and then the clear method is used to clear both the color buffer and the depth buffer.

[0136] Write a vertex shader to handle the position and color attributes of vertices, and write a fragment shader to calculate the color of each pixel.

[0137] The vertex shader and the fragment shader are combined into the rendering program.

[0138] In this specific implementation, during the rendering phase, parsing is used, and the `requestAnimationFrame` function is used to create a continuous animation loop, performing rendering operations in each frame. Inside the rendering loop, the `clearColor` function is first used to set and clear the color buffer, and then the `clear` method is used to clear the color buffer and depth buffer, preparing for the new rendering. For the actual rendering operations, vertex shaders and fragment shaders need to be written. The vertex shader is responsible for handling the position, color, and other attributes of the vertices, while the fragment shader is responsible for calculating the color of each pixel. The shader code is compiled and linked into a rendering program. The vertex shader and fragment shader are created and compiled using the `createShader`, `shaderSource`, and `compileShader` functions, and then combined into a rendering program using the `createProgram`, `attachShader`, and `linkProgram` functions.

[0139] In another embodiment of the present invention, step S6, in which the rendering data is input into the rendering program for graphics drawing, includes:

[0140] Create and populate the buffer using the createBuffer or bufferData function;

[0141] Use the bindBuffer function to bind the buffer, and enable the vertex attribute array using the enableVertexAttribArray function;

[0142] Vertex attribute data is retrieved from the buffer using the vertexAttribPointer function;

[0143] Use the drawArrays or drawElements function to draw the graphics based on the rendering data.

[0144] In this specific implementation, the data required for rendering, such as vertex positions, colors, and texture coordinates, is prepared and stored in a buffer object. The buffer is created and populated using the `createBuffer` and `bufferData` functions. During rendering, the buffer is bound using the `bindBuffer` function, the vertex attribute array is enabled using the `enableVertexAttribArray` function, and the `vertexAttribPointer` function is configured to retrieve vertex attribute data from the buffer. Finally, the graphics are drawn based on the prepared data using either the `drawArrays` or `drawElements` function.

[0145] For 3D rendering, the Three.js library is used to build and render the 3D scene. Three.js is a powerful JavaScript 3D library that simplifies the use of WebGL. External 3D model files (such as OBJ, FBX, etc.) are loaded using Three.js to create detailed 3D models of the cabin interior, including seats, aisles, and overhead bins. Scene, camera, and lighting effects are configured in Three.js to ensure the realism and efficiency of the 3D rendering. The camera position and angle can be adjusted by the user through dragging and zooming. Raycasting technology is used to enable user interaction by clicking on the 3D model, obtaining detailed seat information and displaying it on the interface.

[0146] This application solution utilizes high-precision 3D modeling technology: employing advanced 3D reconstruction technology, it accurately restores the internal structure of the aircraft, including different seat layouts, cabin types, and aircraft features, allowing users to obtain a near-realistic seat selection experience in a virtual environment.

[0147] This project provides immersive interactive technology. The system allows users to move freely, rotate the view, zoom in and out, and perform other operations using a mouse and keyboard. It utilizes WebGL technology to achieve real-time rendering and provide an immersive interactive experience.

[0148] This project provides a personalized recommendation engine that integrates machine learning algorithms. Based on the user's preferences (such as legroom needs, whether they prefer a window seat, etc.), the system automatically recommends the best seating options.

[0149] This project provides real-time data synchronization technology, which synchronizes the system with the airline's seat reservation system in real time, ensuring that users see the latest seat status and avoiding misselection due to data delays.

[0150] This system achieves multi-platform compatibility, supports multiple browsers, ensures access for a wide range of users, and utilizes HTML5 technology to achieve cross-platform compatibility.

[0151] This project employs a high-availability architecture, utilizing CDN acceleration technology and a distributed server architecture to ensure stable system operation and rapid response, maintaining a smooth user experience even under high concurrency conditions.

[0152] The solution provided in this application features high performance and stability. High-performance web server: Utilizing NGINX's high performance and stability to handle a large number of concurrent connections, ensuring a smooth real-time VR experience. Load balancing and traffic management: Using NGINX's load balancing capabilities ensures that traffic is evenly distributed across multiple servers, improving the overall stability and response speed of the system.

[0153] Another embodiment of the present invention provides a virtual reality seat selection device, see [link to previous document]. Figure 4 This is a schematic diagram of a virtual reality seating selection device provided in an embodiment of the present invention. The device includes:

[0154] The instruction acquisition module is used to acquire the user's seat selection query instruction;

[0155] The query module is used to query the current seat status information according to the seat selection query instruction;

[0156] The parsing module is used to obtain the WebGL context based on the seat status information, read the 3D model file in the WebGL context, parse the 3D model file, and extract key data.

[0157] The loading module is used to load and process the key data to construct and determine the rendering data;

[0158] The compilation module is used to initialize pre-built rendering shaders, compile the code, and build the rendering program;

[0159] The rendering module is used to input the rendering data into the rendering program for graphics drawing and output the rendered screen to the user.

[0160] The virtual reality seat selection device provided in this embodiment can perform all the steps and functions of the virtual reality seat selection method provided in any of the above embodiments. The specific functions of the device will not be described in detail here.

[0161] See Figure 5This is a schematic diagram of a terminal device provided in an embodiment of the present invention. The terminal device includes a processor, a memory, and a computer program stored in the memory and executable on the processor, such as a virtual reality seat selection program. When the processor executes the computer program, it implements the steps in the various embodiments of the virtual reality seat selection method described above, for example... Figure 1 The steps S1 to S6 are shown. Alternatively, when the processor executes the computer program, it implements the functions of each module in the above-described device embodiments.

[0162] For example, the computer program can be divided into one or more modules, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules can be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program in the terminal device. For example, the computer program can be divided into several modules, the specific functions of which have been described in detail in the virtual reality seat selection method provided in any of the above embodiments; therefore, the specific functions of this device will not be repeated here.

[0163] The terminal device described can be a desktop computer, laptop, handheld computer, or cloud server, etc. The terminal device may include, but is not limited to, a processor and memory. Those skilled in the art will understand that the schematic diagram is merely an example of a terminal device and does not constitute a limitation on any terminal device. It may include more or fewer components than illustrated, or combine certain components, or use different components. For example, the terminal device may also include input / output devices, network access devices, buses, etc.

[0164] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the terminal device, connecting all parts of the terminal device via various interfaces and lines.

[0165] The memory can be used to store the computer programs and / or modules. The processor implements various functions of the virtual reality seating device by running or executing the computer programs and / or modules stored in the memory and by calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created based on the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0166] If the module integrated into the terminal device is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.

[0167] It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of this invention, and these improvements and modifications are also considered to be within the scope of protection of this invention.

Claims

1. A virtual reality seat selection method, characterized in that, The method includes: Retrieve the user's seat selection query command; Query the current seat status information according to the seat selection query command; Based on the seat status information, obtain the WebGL context, read the 3D model file in the WebGL context, parse the 3D model file, and extract key data; The key data is loaded and processed to construct and determine the rendering data; Initialize the pre-built rendering shaders, compile the code, and build the rendering program; The rendering data is input into the rendering program for graphics drawing, and the rendered screen is output to the user. Based on the seat status information, the WebGL context is obtained, the 3D model file in the WebGL context is read, and the 3D model file is parsed to extract key data, including: By selecting the canvas element on the page and calling its getContext'webgl' method, the interface for interacting with the graphics hardware is obtained, and the model format of the 3D model file is determined. Retrieve model files from a pre-defined server using XMLHttpRequest or the Fetch API; The model file is parsed, and vertex data and face data are extracted as the 3D model file according to the rules of the model format; Convert the vertex data into a file in a preset format; The key data is obtained by associating the texture image loaded from the face data with the vertex data; Initialize the pre-built rendering shaders, compile the code, and build the renderer, including: Use the requestAnimationFrame function to create a continuous animation loop, performing rendering operations in each frame; Inside the rendering loop, the clearColor function is used to set the color to clear the color buffer, and then the clear method is used to clear both the color buffer and the depth buffer. Write a vertex shader to handle the position and color attributes of vertices, and write a fragment shader to calculate the color of each pixel. The vertex shader and the fragment shader are combined into the rendering program.

2. The virtual reality seat selection method according to claim 1, characterized in that, The method further includes: The user's feedback on seat selection is obtained via WebSocket technology, and the seat information in the seat database is updated accordingly; or, The system obtains the user's feedback on seat selection commands through a polling mechanism and updates the seat information in the seat database.

3. The virtual reality seat selection method according to claim 1, characterized in that, Obtain the user's seat selection query command, including: Based on the component-based development mode of Vue.js configured on the front end, it provides instructions and event handling to obtain user interaction operations; The seat selection query instruction is determined based on the interactive operation; The interactive operations include clicking on a seat, dragging the view, or selecting a flight.

4. The virtual reality seat selection method according to claim 1, characterized in that, The current seat status information is retrieved according to the seat selection query command, including: The system communicates with the front end via a RESTful API and queries the current seat status information in a preset relational database or NoSQL database according to the seat selection query command.

5. The virtual reality seat selection method according to claim 1, characterized in that, Inputting the rendering data into the rendering program for graphics drawing includes: Create and populate the buffer using the createBuffer or bufferData function; Use the bindBuffer function to bind the buffer, and enable the vertex attribute array using the enableVertexAttribArray function; Vertex attribute data is retrieved from the buffer using the vertexAttribPointer function; Use the drawArrays or drawElements function to draw the graphics based on the rendering data.

6. A virtual reality seat selection device, characterized in that, The device includes: The instruction acquisition module is used to acquire the user's seat selection query instruction; The query module is used to query the current seat status information according to the seat selection query instruction; The parsing module is used to obtain the WebGL context based on the seat status information, read the 3D model file in the WebGL context, parse the 3D model file, and extract key data. The loading module is used to load and process the key data to construct and determine the rendering data; The compilation module is used to initialize pre-built rendering shaders, compile the code, and build the rendering program; The rendering module is used to input the rendering data into the rendering program for graphics drawing and output the rendered screen to the user. Based on the seat status information, the WebGL context is obtained, the 3D model file in the WebGL context is read, and the 3D model file is parsed to extract key data, including: By selecting the canvas element on the page and calling its getContext'webgl' method, the interface for interacting with the graphics hardware is obtained, and the model format of the 3D model file is determined. Retrieve model files from a pre-defined server using XMLHttpRequest or the Fetch API; The model file is parsed, and vertex data and face data are extracted as the 3D model file according to the rules of the model format; Convert the vertex data into a file in a preset format; The key data is obtained by associating the texture image loaded from the face data with the vertex data; Initialize the pre-built rendering shaders, compile the code, and build the renderer, including: Use the requestAnimationFrame function to create a continuous animation loop, performing rendering operations in each frame; Inside the rendering loop, the clearColor function is used to set the color to clear the color buffer, and then the clear method is used to clear both the color buffer and the depth buffer. Write a vertex shader to handle the position and color attributes of vertices, and write a fragment shader to calculate the color of each pixel. The vertex shader and the fragment shader are combined into the rendering program.

7. A terminal device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor executes the computer program to implement the virtual reality seat selection method as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein, when the computer program is executed, it controls the device on which the computer-readable storage medium is located to perform the virtual reality seat selection method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Online seat selection method and system

    CN106779117A

  • Seat selection application for social distancing compliance

    US10915231B1