Virtual vehicle gear shifting method and apparatus, device, and storage medium

By using terminal motion sensors to collect data in racing games, users can manually control gears in the virtual vehicle interface through tapping operations, solving the problem of inaccurate control in automatic gear mode and achieving precise control of virtual vehicles. .

WO2024222231A1PCT designated stage expired Publication Date: 2024-10-31TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/080561
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-04-28
Filing Date
2024-03-07
Publication Date
2024-10-31

AI Technical Summary

Technical Problem

In racing games, users cannot manually control the gear of the virtual vehicle, making it impossible to accurately control the virtual vehicle.

Method used

By displaying the virtual environment in the user interface and using the motion sensors in the terminal to collect data, users can trigger shifting instructions by tapping the surface of the terminal to raise or lower the gear of the virtual vehicle.

Benefits of technology

It achieves precise control of virtual vehicles, improves operation accuracy, enables users to accurately switch gears, and solves the problem of inaccurate control in automatic transmission mode.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024080561_31102024_PF_FP_ABST
    Figure CN2024080561_31102024_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the field of applications supporting virtual environments, and discloses a virtual vehicle gear shifting method and apparatus, a device, and a storage medium. The method comprises: displaying, in a user interface, a virtual environment and a moving virtual vehicle in the virtual environment (602); during displaying the user interface, acquiring terminal motion data collected by a motion sensor in a terminal (604); according to the terminal motion data, determining a tapping operation for the terminal (606); and in response to a gear shifting instruction triggered by the tapping operation, displaying, according to the gear shifting instruction, at least one of the higher gear of the virtual vehicle and the lower gear of the virtual vehicle (608). The tapping operation is different from a touch operation on a display screen of the terminal and thus will not affect the touch operation of a user on the display screen, and has high operation precision. Therefore, the user can accurately control the gear of the virtual vehicle by means of the tapping operation, thereby implementing precise control of the virtual vehicle.
Need to check novelty before this filing date? Find Prior Art

Description

Virtual vehicle gear shifting method, device, equipment and storage medium

[0001] This application claims priority to Chinese patent application No. 202310489031.7 filed on April 28, 2023, with the invention name “Shifting method, device, equipment and storage medium for virtual vehicle”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of applications supporting virtual environments, and in particular to a gear shifting method, apparatus, device, and storage medium for a virtual vehicle. Background Art

[0003] In racing games, users can control virtual vehicles to drive in a virtual environment. The user's control of the virtual vehicle includes controlling the direction of the virtual vehicle (e.g., forward, backward, left turn, right turn), the driving speed, and the virtual props used (e.g., nitrogen acceleration props). For vehicles in the real world, there are gear switching situations when driving. The gear is inversely proportional to the vehicle's acceleration ability and directly proportional to the vehicle's top speed. In related technologies, virtual vehicles usually adopt an automatic gear shifting mode, that is, the gear of the virtual vehicle is automatically switched by a client installed and running in a computer device (e.g., a terminal).

[0004] The gear position of the virtual vehicle is automatically controlled through the automatic gear mode, but there is a situation where the user cannot manually control the gear position of the virtual vehicle, resulting in the inability to accurately control the virtual vehicle.

[0005] Summary of the Invention

[0006] This application provides a virtual vehicle shifting method, device, equipment, and storage medium, which can achieve precise control of the virtual vehicle. The technical solution is as follows:

[0007] According to one aspect of the present application, a method for shifting gears of a virtual vehicle is provided, the method being executed by a computer device and comprising:

[0008] Displaying a virtual environment and the virtual vehicle in a driving state in the virtual environment in a user interface, wherein the virtual vehicle corresponds to at least two gears;

[0009] During the display of the user interface, obtaining terminal motion data collected by a motion sensor in the terminal;

[0010] determining a tapping operation on the terminal according to the terminal motion data, where the tapping operation is an operation of tapping a surface of the terminal;

[0011] In response to a gear shift instruction triggered by the tapping operation, at least one of raising the gear of the virtual vehicle and lowering the gear of the virtual vehicle is displayed according to the gear shift instruction.

[0012] According to another aspect of the present application, a gear shifting device for a virtual vehicle is provided, the device comprising:

[0013] A display module is configured to display a virtual environment and the virtual vehicle in a driving state in the virtual environment in a user interface, wherein the virtual vehicle corresponds to at least two gear positions;

[0014] an acquisition module, configured to acquire terminal motion data collected by a motion sensor in the terminal during the display of the user interface;

[0015] a determining module, configured to determine a tapping operation on the terminal based on the terminal motion data, wherein the tapping operation is an operation of tapping a surface of the terminal;

[0016] The display module is further configured to respond to a gear shift instruction triggered by the tapping operation and display at least one of raising the gear position of the virtual vehicle and lowering the gear position of the virtual vehicle according to the gear shift instruction.

[0017] According to another aspect of the present application, a computer device is provided, comprising a processor and a memory, wherein the memory stores at least one program, and the at least one program is loaded and executed by the processor to implement the virtual vehicle shifting method as described above.

[0018] According to another aspect of the present application, a computer-readable storage medium is provided, in which at least one program is stored. The at least one program is loaded and executed by a processor to implement the virtual vehicle shifting method as described above.

[0019] According to another aspect of the present application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the virtual vehicle shifting method provided in various optional implementations of the above aspects.

[0020] The beneficial effects of the technical solution provided by this application include at least:

[0021] By tapping on a computer device (terminal), you can trigger a gear shift on a virtual vehicle (virtual vehicle), shifting it up and / or down. This tapping operation, unlike touch controls on the terminal display, does not interfere with the user's touch controls on the display, resulting in higher precision. Therefore, users can accurately control the gear position of their virtual vehicle through tapping, achieving precise control of the virtual vehicle. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0023] FIG1 is a schematic diagram of the relationship between vehicle speed and engine speed provided by an exemplary embodiment of the present application;

[0024] FIG2 is a schematic diagram of a state of an object in a three-dimensional space provided by an exemplary embodiment of the present application;

[0025] FIG3 is a schematic structural diagram of a terminal provided by an exemplary embodiment of the present application;

[0026] FIG4 is a structural block diagram of a computer system provided by an exemplary embodiment of the present application;

[0027] FIG5 is a schematic diagram of a process of shifting gears of a virtual vehicle provided by an exemplary embodiment of the present application;

[0028] FIG6 is a flowchart of a virtual vehicle shifting method provided by an exemplary embodiment of the present application;

[0029] FIG7 is a schematic diagram of a user interface provided by an exemplary embodiment of the present application;

[0030] FIG8 is a flowchart of a virtual vehicle shifting method provided by an exemplary embodiment of the present application;

[0031] FIG9 is a schematic diagram of a user interface provided by an exemplary embodiment of the present application;

[0032] FIG10 is a schematic diagram of virtual sampling points provided by an exemplary embodiment of the present application;

[0033] FIG11 is a schematic diagram of a racing steering wheel provided by an exemplary embodiment of the present application;

[0034] FIG12 is a schematic diagram of virtual sampling points provided by an exemplary embodiment of the present application;

[0035] FIG13 is a schematic diagram of an operation process of shifting gears provided by an exemplary embodiment of the present application;

[0036] FIG14 is a schematic structural diagram of a gear shifting device of a virtual vehicle provided by an exemplary embodiment of the present application;

[0037] FIG15 is a schematic structural diagram of a terminal provided by an exemplary embodiment of the present application.

[0038] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application. DETAILED DESCRIPTION

[0039] To make the purpose, technical solutions and advantages of this application clearer, the following will further describe the implementation of this application in detail with reference to the accompanying drawings. First, the terms involved in the embodiments of this application are introduced:

[0040] A virtual environment is a virtual environment displayed (or provided) when an application is running on a terminal. This virtual environment can be a simulation of the real world, a semi-simulated and semi-imaginary environment, or a purely imaginary environment. The virtual environment can be any of two-dimensional, 2.5-dimensional, and three-dimensional virtual environments, and is not limited in this embodiment of the present application.

[0041] Virtual Vehicle: Refers to at least one movable object controlled by a user in a virtual environment. This virtual vehicle can be a simulation of a real-world vehicle, a semi-simulated, semi-fictional vehicle, or a completely fictional vehicle. This virtual vehicle includes at least one of airborne, aquatic, and land vehicles. Each virtual vehicle has its own unique shape and volume within the virtual environment and occupies a portion of the virtual environment. This application primarily uses the example of a virtual vehicle as an example.

[0042] User Interface (UI) controls: Any visual control or element visible on an application's user interface. Examples include images, input boxes, text boxes, buttons, labels, and other controls. Some UI controls respond to user actions.

[0043] Manual transmission: In the real world, manual transmission refers to a manually shifted mechanical transmission (also known as MT) used in automobiles. In manual transmission vehicles, the driver manually shifts the gear lever to change the gear meshing position within the transmission, thereby changing the transmission ratio and thus shifting the vehicle's speed. In this application, manual transmission refers to an operating mode in which the user changes the gear position of a virtual vehicle (virtual vehicle), thereby changing the transmission ratio of the virtual vehicle and adjusting the speed of the virtual vehicle's output (e.g., the speed of the virtual vehicle).

[0044] Gearbox (transmission): The function of the gearbox can be expressed by the following formula:

[0045] Where, N represents the speed and r represents the reduction ratio. wheel Indicates the wheel speed, N eng Indicates the speed of the engine crankshaft end (engine speed), r trans Indicates the variable (different gears) reduction ratio of the gearbox, r final It is the other immutable reduction ratio part in the powertrain. The higher the gear, the trans The smaller it is, the more likely it is to maintain the same N wheel Required N eng It will also be smaller.

[0046] Upshift / Downshift: If the vehicle (virtual vehicle) does not press the accelerator after downshifting, it will slow down. Pressing the accelerator after downshifting will increase the rpm more quickly, achieving acceleration. Downshifting increases torque and improves acceleration. Upshifting increases the vehicle's top speed, which is the maximum speed (engine speed) the vehicle can reach.

[0047] For example, FIG1 is a schematic diagram illustrating the relationship between vehicle speed and engine speed according to an exemplary embodiment of the present application. As shown in FIG1 , the higher the vehicle gear, the faster the vehicle speed at the same engine speed. Therefore, the primary purpose of upshifting is to increase the vehicle's top speed. Conversely, the lower the vehicle gear, the faster the engine speed at the same vehicle speed. Therefore, the primary purpose of downshifting is to improve the vehicle's acceleration capability.

[0048] Six-Dimensional (6D) Detection: Figure 2 is a schematic diagram of the state of an object in three-dimensional space, provided by an exemplary embodiment of the present application. As shown in Figure 2, an object (e.g., a mobile phone) in 3D space can be divided into six directions based on the spatial coordinate axes, as shown in Figure 2 (a)-(f). Based on this, a hardware device (e.g., a terminal) can obtain its current spatial direction information and develop related interactive operation applications, such as "tap" and "flip".

[0049] The method provided in this application can be applied to applications with virtual environments and virtual vehicles. Exemplarily, applications that support virtual environments are applications in which users can control virtual vehicles to move within the virtual environment. Exemplarily, the method provided in this application can be applied to any of the following programs: Virtual Reality (VR) applications, Augmented Reality (AR) programs, 3D map programs, Virtual Reality games, Augmented Reality games, First-Person Shooting Games (FPS), Third-Person Shooting Games (TPS), Multiplayer Online Battle Arena Games (MOBA), and Simulation Games (SLG). Exemplarily, a game in a virtual environment consists of one or more maps of the game world. The virtual environment in the game can simulate scenes in the real world. Users can control virtual characters in the game to perform actions such as walking, running, jumping, shooting, fighting, and driving in the virtual environment. They can also control virtual vehicles to travel in the virtual environment. The interactivity is strong, and multiple users can team up online to play competitive games.

[0050] In some embodiments, the above-mentioned application programs may be shooting games, racing games, car racing games, role-playing games, adventure games, sandbox games, tactical competitive games and other programs. The client may support at least one of the Windows operating system, Apple operating system, Android operating system, IOS operating system and LINUX operating system, and clients of different operating systems may be interconnected. In some embodiments, the above-mentioned client is a program suitable for use on a mobile terminal with a touch screen. For example, the virtual vehicle shifting method provided in the embodiment of the present application may be applied to an application program that supports car racing games, and players may control the virtual vehicle to conduct a virtual racing competition; for another example, the virtual vehicle shifting method provided in the embodiment of the present application may be applied to an application program that supports role-playing games, and players may control the virtual vehicle to move in the virtual scene to meet the player's roaming and sightseeing needs.

[0051] In some embodiments, the above-mentioned client is an application developed based on a three-dimensional engine, such as the three-dimensional engine is an Unreal (Unity) engine. The terminal in this application can be a desktop computer, a laptop, a mobile phone, a tablet computer, an e-book reader, an MP3 (Moving Picture Experts Group Audio Layer III, Moving Picture Experts Compression Standard Audio Layer 3) player, an MP4 (Moving Picture Experts Group Audio Layer IV, Moving Picture Experts Compression Standard Audio Layer 4) player, etc. A client that supports a virtual environment is installed and run in the terminal, such as a client that supports an application for a three-dimensional virtual environment. The application can be any one of a tactical competitive survival (Battle Royale, BR) game, a virtual reality application, an augmented reality program, a three-dimensional map program, a third-person shooter game, a first-person shooter game, a multiplayer online tactical competitive game, a racing game, and a racing game. Optionally, the application can be a stand-alone application, such as a stand-alone 3D game program, or a network-connected application.

[0052] Figure 3 is a schematic diagram of the structure of a terminal provided by an exemplary embodiment of the present application, which includes a processor 301, a touch screen 302, and a memory 303. Processor 301 can be at least one of a single-core processor, a multi-core processor, an embedded chip, and a processor with instruction execution capabilities. Touch screen 302 can include a conventional touch screen or a pressure-sensitive touch screen. Conventional touch screens can measure a press or slide operation applied to touch screen 302; pressure-sensitive touch screens can measure the intensity of the press applied to touch screen 302. Memory 303 stores executable programs for processor 301. Illustratively, memory 303 stores a virtual environment program A, application B, application C, a touch (and pressure) sensing module 38, and an operating system kernel layer 39. Virtual environment program A is an application developed based on a three-dimensional virtual environment module 37. Optionally, virtual environment program A includes, but is not limited to, at least one of a game program, a virtual reality program, a three-dimensional map program, and a three-dimensional demonstration program developed by the three-dimensional virtual environment module (also referred to as the virtual environment module) 37. For example, when the terminal's operating system uses the Android operating system, virtual environment program A is developed using the Java programming language and the C# language. For another example, when the terminal's operating system uses the iOS operating system, virtual environment program A is developed using the Objective-C programming language and the C# language. The three-dimensional virtual environment module 37 is a module that supports multiple operating system platforms. For example, the three-dimensional virtual environment module can be used for program development in various fields, such as game development, virtual reality (VR), and three-dimensional mapping. The specific type of the three-dimensional virtual environment module 37 is not limited in this embodiment of the application. The touch (and pressure) sensing module 38 is a module for receiving touch events (and pressure touch events) reported by the touch screen driver 391. Optionally, the touch sensing module may not have pressure sensing capabilities and may not receive pressure touch events. A touch event includes: the touch event type and coordinate values. Touch event types include, but are not limited to, touch start events, touch move events, and touch down events. A pressure touch event includes: the pressure value and coordinate values ​​of the pressure touch event. The coordinate values ​​are used to indicate the touch position on the display screen caused by the pressure touch operation. Illustratively, the kernel layer 39 includes a touchscreen driver 391 and other drivers 392. The touchscreen driver 391 is a module for detecting pressure touch events. Upon detecting a pressure touch event, the touchscreen driver 391 transmits the pressure touch event to the touch (and pressure) sensing module 38. Other drivers 392 may include drivers related to the processor 301, memory 303, network components, sound components, acceleration measurement components, and the like. Those skilled in the art will appreciate that the above is merely a general description of the terminal's structure.In different embodiments, the terminal may have more or fewer components. For example, the terminal may further include an acceleration sensor, a gyroscope sensor, a power supply, etc.

[0053] Figure 4 is a block diagram of a computer system provided by an exemplary embodiment of the present application. Computer system 400 includes a terminal 410 and a server cluster 420. Terminal 410 has a client 411 installed and running that supports a virtual environment. Client 411 can be an application that supports the virtual environment. When client 411 is running on the terminal, the user interface of client 411 is displayed on the screen of terminal 410. The client can be any of an FPS game, a TPS game, a MOBA game, a competitive game, a SLG game, a racing game, and a car racing game. In this embodiment, client 411 is used as an example of a car racing game. Terminal 410 is used by a first user 412. First user 412 uses terminal 410 to control the movement of a virtual vehicle in the virtual environment. First user 412's control of the virtual vehicle includes moving forward, backward, turning left, turning right, shifting up and down, accelerating, braking, and using virtual props to accelerate. The device type of the terminal 410 includes at least one of a smart phone, a tablet computer, an e-book reader, an MP3 player, an MP4 player, a laptop computer, and a desktop computer.

[0054] Figure 4 shows only one terminal, but various embodiments may include multiple other terminals 440. In some embodiments, at least one other terminal 440 is present, corresponding to the developer. A development and editing platform for the virtual environment client is installed on this other terminal 440. Developers can edit and update the client on this other terminal 440 and transmit the updated client installation package to the server cluster 420 via a wired or wireless network. Terminal 410 can then download the client installation package from the server cluster 420 to update the client. Terminal 410 and other terminals 440 are connected to the server cluster 420 via a wireless or wired network. Server cluster 420 includes at least one of a single server, multiple servers, a cloud computing platform, and a virtualization center. Server cluster 420 provides backend services for clients supporting a three-dimensional virtual environment. Optionally, server cluster 420 performs primary computing tasks, while the terminal performs secondary computing tasks; alternatively, server cluster 420 performs secondary computing tasks, while the terminal performs primary computing tasks; or, a distributed computing architecture is employed between server cluster 420 and the terminals for collaborative computing. Optionally, both the terminals and servers are computer devices. In an illustrative example, server cluster 420 includes server 421 and server 426. Server 421 includes processor 422, user account database 423, battle service module 424, and user-facing input / output interface (I / O interface) 425. Processor 422 is used to load instructions stored in server 421 and process data in user account database 423 and battle service module 424. User account database 423 is used to store user account data used by terminal 410 and other terminals 440, such as user account avatars, user account nicknames, virtual vehicles owned by user accounts, and the service areas where user accounts are located. Battle service module 424 is used to provide multiple battle rooms for users to engage in battles. User-facing I / O interface 425 is used to establish communication and exchange data with terminal 410 via a wireless network or a wired network.

[0055] In conjunction with the above introduction to the virtual environment and the description of the implementation environment, the shifting method of the virtual vehicle provided by the embodiment of the present application will be described below. Figure 5 is a schematic diagram of the process of shifting the virtual vehicle provided by an exemplary embodiment of the present application. Take the virtual vehicle as a virtual vehicle, the computer device as a terminal, and the client installed and running in the terminal as an example. As shown in Figure 5 (a), the client displays a user interface 501, which displays a virtual environment 502 and a virtual vehicle 503 in a driving state. The user interface 501 also displays the current gear position 504 of the virtual vehicle 503. For example, the virtual vehicle 503 is currently in 4th gear. As shown in Figure 5 (b), when the shift mode of the virtual vehicle 503 is in manual gear mode, the terminal responds to m consecutive first tapping operations with the tapping position located on the first side of the back of the terminal (the left side in (b)) and the tapping direction toward the inside of the terminal, and the client determines that a first shift instruction has been triggered. As shown in Figure 5 (c), the terminal responds to the first shift instruction once, and the client displays that the gear position 504 of the virtual vehicle 503 is increased by one gear. For example, the gear position 504 of the virtual vehicle 503 is increased from 4 gear to 5 gear. As shown in (b) of Figure 5 , when the gear shift mode of the virtual vehicle 503 is in manual gear mode, the terminal responds to n consecutive second tapping operations with the tapping position located on the second side of the back of the terminal (the right side in (b)) and the tapping direction toward the inside of the terminal, and the client determines that a second gear shift instruction is triggered. As shown in (d) of Figure 5 , the terminal responds to a second gear shift instruction, and the client displays that the gear position 504 of the virtual vehicle 503 is reduced by one gear. For example, the gear position 504 of the virtual vehicle 503 is reduced from 4 gear to 3 gear.

[0056] Exemplarily, the back of the terminal refers to the side of the terminal opposite to the surface where the display screen is located. Optionally, continuing to refer to (b) of Figure 5, the first side of the back of the terminal (the left side in (b)) corresponds to the right side of the surface where the display screen is located (mirror relationship), and the second side of the back of the terminal (the right side in (b)) corresponds to the left side of the surface where the display screen is located. Both m and n are 2. Optionally, when the shift mode of the virtual vehicle is in automatic mode, the terminal responds to a continuous tapping operation, and the client will display in the user interface 501 that the shift mode of the virtual vehicle is switched to manual mode. The continuous tapping operation is an operation of tapping the terminal for x consecutive times, and optionally, x is 3. By tapping the terminal, the gear switching of the virtual vehicle can be triggered, that is, the gear of the virtual vehicle is increased and / or the gear of the virtual vehicle is decreased. Because the tapping operation on the terminal in the embodiment of the present application has a corresponding tapping position, tapping direction, tapping force, etc., and the tapping operation can be continuous m times, n times, or x times, while the touch operation on the terminal display is usually a single touch or a long touch, etc., the tapping operation in the embodiment of the present application is different from the touch operation on the terminal display, and will not affect the user's touch operation on the display, and has higher operation accuracy. Therefore, the user can accurately control the gear position of the virtual vehicle through the tapping operation, achieving precise control of the virtual vehicle.

[0057] FIG6 is a flow chart of a method for shifting gears of a virtual vehicle provided by an exemplary embodiment of the present application. The method can be executed by a computer device and can be specifically used in a terminal or a client on the terminal as shown in FIG4 . As shown in FIG6 , the method includes:

[0058] Step 602: Display the virtual environment and the virtual vehicle in a driving state in the virtual environment in the user interface.

[0059] The user interface refers to any interface in the client that can provide the function of controlling the movement of a virtual vehicle. For example, the user interface is the interface displayed when a user account controls a virtual vehicle to race against a virtual vehicle controlled by another user account, or when a user account controls the movement of a virtual vehicle to complete a game mission, or when a user account controls a virtual vehicle to race against a virtual vehicle controlled by a client / server-controlled non-player character (NPC).

[0060] The virtual environment includes any one of a real-world simulation environment, a semi-simulation and semi-fictional environment, and a purely fictional environment. The virtual environment is any one of a two-dimensional virtual environment, a 2.5-dimensional virtual environment, and a three-dimensional virtual environment. The virtual environment displays areas that support the travel of virtual vehicles, and the virtual vehicles can travel within the areas. Optionally, the virtual environment also displays areas that do not support the travel of virtual vehicles. For example, there are virtual streams, virtual lakes, virtual oceans, and other areas where virtual vehicles cannot travel. Exemplarily, for virtual vehicles, areas that support the travel of virtual vehicles include virtual roads and non-virtual roads. Virtual roads are used to simulate roads in the real world, such as for simulating roads, highways, racetracks, etc. Optionally, prompt elements such as shoulders, signs, and driving direction guide lines are also displayed on the sides of the virtual roads. Non-virtual roads are areas outside virtual roads, such as virtual lawns, virtual sidewalks, virtual woods, and other areas.

[0061] A virtual vehicle refers to at least one movable object controlled by a user account in a virtual environment. The virtual vehicle can be a vehicle that simulates a vehicle in the real world, or it can be a semi-simulated and semi-fictitious vehicle, or it can be a completely fictitious vehicle. A virtual vehicle is a virtual vehicle that supports gear shifting, and the virtual vehicle corresponds to at least two gears. For example, the virtual vehicle is a virtual vehicle, and the gears corresponding to the virtual vehicle are 1st gear, 2nd gear, 3rd gear, 4th gear, 5th gear, and 6th gear, respectively. Optionally, the virtual vehicle includes at least one of a vehicle traveling (flying) in airspace, a vehicle traveling (sailing) in water, and a vehicle traveling on land. Exemplarily, in the case where the virtual vehicle is a virtual vehicle, the virtual vehicle includes a virtual car, sports car, Formula One racing car, kart, bus, electric car, motorcycle, etc.

[0062] Optionally, the user account controls the movement of the virtual vehicle by controlling the actions of the driver of the virtual vehicle. For example, the user account controls the driver of the virtual vehicle to perform actions such as steering, upshifting, downshifting, accelerator pedaling, and brake pedaling. Alternatively, the user account directly controls the movement of the virtual vehicle. Exemplarily, the user account's control of the virtual vehicle includes controlling the virtual vehicle to move forward, backward, turn left, turn right, upshift, downshift, accelerator pedaling, brake pedaling, drifting, and use virtual props (e.g., acceleration props).

[0063] For example, Figure 7 is a schematic diagram of a user interface provided by an exemplary embodiment of the present application. Assume that the virtual vehicle is a virtual car. As shown in Figure 7, a virtual car 720 is displayed in user interface 710, and virtual car 720 travels within the virtual environment displayed in user interface 710. User interface 710 includes at least one of the following controls: brake control 701, energy control 702, throttle control 703, direction control 704, handbrake control 705, and reset control 706. The functions of each control are described as follows: Brake control 701 is used to control the speed of virtual vehicle 720. In response to a trigger operation on brake control 701, the client controls the speed of virtual vehicle 720 to decrease. For example, in response to a single click on brake control 701, the terminal controls the speed of virtual vehicle 720 to decrease. Furthermore, if brake control 701 is held down, the speed of virtual vehicle 720 continues to decrease. Furthermore, the speed at which the virtual vehicle 720 decelerates can be determined by the force and / or duration of the touch on the brake control 701. For example, the greater the touch force (e.g., exceeding a force threshold), the faster the virtual vehicle 720 decelerates, while the longer the touch duration (e.g., exceeding a duration threshold), the faster the virtual vehicle 720 decelerates. The energy control 702 is used to indicate the amount of acceleration energy stored in the virtual vehicle 720. In response to a triggering operation on the energy control 702, the client can consume one unit of acceleration energy, providing the virtual vehicle 720 with an additional acceleration boost (as distinct from accelerating by pressing the accelerator). Optionally, an acceleration energy storage control 707 is displayed around the energy control 702. Storage control 707 is used to indicate the amount of acceleration energy stored in the virtual vehicle 720. For example, if the acceleration energy is nitrogen, the energy control 702 is used to indicate the amount of nitrogen available to accelerate the virtual vehicle 720. For example, the energy control 702 is used to indicate the amount of a bottle of nitrogen. Among them, the storage control 707 is used to indicate the number of nitrogen cylinders corresponding to the virtual vehicle 720. In response to the trigger operation on the energy control 702, the terminal client displays that one cylinder of nitrogen is consumed to provide acceleration for the virtual vehicle 720, and displays a prompt message of consuming one cylinder of nitrogen in the user interface 710. The throttle control 703 is used to provide a function of controlling the speed (engine speed) of the virtual vehicle 720. In response to the trigger operation on the throttle control 703, the terminal client controls the virtual vehicle 720 to accelerate. Among them, the trigger operation can be at least one of a single-click operation, a double-click operation, a touch operation, a continuous pressing operation, etc. Optionally, in response to the trigger operation on the throttle control 703, the throttle corresponding to the virtual vehicle 720 will automatically remain pressed, so that the virtual vehicle 720 maintains a continuous acceleration state. For example, if the user clicks the throttle control 703 and then releases it, the virtual vehicle 720 enters a state of continuous acceleration.

[0064] Optionally, when the virtual vehicle 720 is in a continuously accelerating state, the brake control 701 is further configured to implement at least one of stopping acceleration, decelerating, and reversing the virtual vehicle 720. Optionally, after the virtual vehicle enters the continuously accelerating state, the terminal responds to a trigger operation on the brake control 701, and the client controls the virtual vehicle 720 to stop accelerating, simulating a throttle-release state. If the trigger operation on the brake control 701 is a single click, the client controls the virtual vehicle 720 to stop accelerating and enter a natural deceleration state. The natural deceleration state refers to a state in which the virtual vehicle 720 continuously decelerates due to resistance factors, including at least one of road resistance, air resistance, and mechanical loss. If the trigger operation on the brake control 701 is a continuous press operation, the client controls the virtual vehicle 720 to stop accelerating and enter a continuously decelerating state. The continuously decelerating state refers to a state in which the virtual vehicle 720 continuously decelerates due to resistance factors and brake resistance, with the brake resistance generated based on the continuous press operation on the brake control 701. The road resistance mentioned above refers to the friction between the virtual vehicle 720's tires and the ground. Air resistance refers to the resistance experienced by the virtual vehicle 720 due to friction with the air during driving. Mechanical loss refers to the kinetic energy loss within the transmission of the virtual vehicle 720. The magnitude of the braking resistance can be set according to actual needs. It should be understood that the natural deceleration state is related to the current vehicle speed. The greater the current speed, the greater the deceleration. Compared to the natural deceleration state, the deceleration rate in the continuous deceleration state is faster. For example, taking an initial speed of 100 km / h, in the natural deceleration state, it takes 60 seconds for the virtual vehicle 720 to decelerate to 0 km / h, while in the continuous deceleration state, it only takes 2.5 seconds. Optionally, when the virtual vehicle 720 is in the continuous deceleration state, if the speed of the virtual vehicle 720 drops to 0 and the brake control 701 is still pressed, the virtual vehicle 720 is controlled to enter the reverse state. The direction control 704 is used to control the driving direction (steering) of the virtual vehicle 720. Optionally, the direction control 704 includes a left steering control and a right steering control, which are used to respectively realize the left steering and right steering of the virtual vehicle 720. The handbrake control 705 is used to provide the braking / drifting function of the virtual vehicle 720. In the level running state (non-drifting state, such as straight driving), in response to the triggering operation on the handbrake control 705, the client controls the speed of the virtual vehicle 720 to reduce. Optionally, in response to the operation of simultaneously triggering the direction control 704 and the handbrake control 705, the virtual vehicle 720 enters the drift state. For example, in a left-turn curve, the direction control 704 is controlled to turn left and the handbrake control 705 is triggered to drift through the curve, or in a right-turn curve, the direction control 704 is controlled to turn right and the handbrake control 705 is triggered to drift through the curve. The reset control 706 is used to provide the function of controlling the virtual vehicle 720 to restart.In response to the trigger operation on the reset control 706, the client controls the virtual vehicle 720 to be redisplayed on the open road around the current virtual environment to control the virtual vehicle 720 to start again. Among them, the reset control 706 is usually used in the process of the virtual vehicle 720 getting out of trouble.

[0065] It should be noted that Figure 7 above shows the human-computer interaction operation (signal) detected by the client through the display screen of the terminal to trigger the relevant functions of controlling the travel of the virtual vehicle. In addition, the client can also trigger the above-mentioned functions of controlling the travel of the virtual vehicle through the control components integrated in the terminal or the signals generated by the control devices external to the terminal. For example, the travel of the virtual vehicle is controlled by signals generated by the joystick and physical buttons integrated in the terminal, or the mouse, keyboard, game controller and other devices external to the terminal. Optionally, the terminal and the external device are connected by wire or wirelessly. The embodiment of the present application does not limit the method of controlling the travel of the virtual vehicle.

[0066] Step 604: During the process of displaying the user interface, terminal motion data collected by the motion sensor in the terminal is obtained.

[0067] The motion sensor is a sensor for detecting the motion state of the terminal. For example, the motion sensor includes at least one of an accelerometer and a gyroscope. The accelerometer is a sensor for measuring acceleration, and the gyroscope is a sensor for determining the direction of a moving object. The present embodiment does not limit the type of motion sensor.

[0068] The motion state of a terminal includes at least one of a change in the terminal's position and the terminal's movement (direction and speed). If the terminal is subjected to an external force that causes the motion state to change, the output data of the motion sensor within the terminal will also change accordingly to reflect the change in the terminal's motion state.

[0069] Step 606: Determine a tapping operation on the terminal according to the terminal motion data.

[0070] The tapping operation is an operation performed on the surface of the terminal. Optionally, the tapping operation is triggered by at least one of tapping the surface where the terminal display is located, tapping the back of the terminal, or tapping the frame surrounding the terminal. The back of the terminal refers to the side of the terminal opposite the surface where the display is located. That is, the tapping location of the tapping operation includes at least one of the surface where the display is located, the back of the terminal, and the frame surrounding the terminal. The tapping direction of the tapping operation is toward the interior of the terminal.

[0071] It should be noted that for foldable screen mobile phones, there may be multiple display screens. In this case, the surface where the above display screens are located includes the surface where the display screen currently used by the user is located, that is, the surface where the display screen displaying the above user interface is located.

[0072] The client uses the data collected by the motion sensor in the terminal to determine whether there is a tapping operation and at least one of the tapping position, tapping direction and tapping force of the tapping operation. Optionally, the client periodically obtains the data collected by the motion sensor to determine and obtain the tapping operation. For example, the user taps the terminal with the fingertip of any finger to trigger the tapping operation; or the user taps the terminal with the pad of any finger to trigger the tapping operation; or the user taps the terminal with the knuckle of any finger to trigger the tapping operation. The user can also trigger the tapping operation by tapping the terminal with other parts of the body or with the help of an instrument, which is not limited in this embodiment of the present application.

[0073] It should be noted that when the client controls the movement of the virtual vehicle via signals generated by a control device connected to the terminal, the client can also receive the above-mentioned tapping operation through the external device. For example, when a user taps a game controller, the client can detect and obtain the tapping operation through data collected by the motion sensor in the game controller.

[0074] Step 608: In response to the gear shift instruction triggered by the tapping operation, display at least one of a gear position for raising the virtual vehicle and a gear position for lowering the virtual vehicle according to the gear shift instruction.

[0075] The client displays the virtual vehicle's gear position raised and / or lowered according to the gear shift instruction. A gear shift instruction corresponds only to one of raising and lowering the virtual vehicle's gear position. Optionally, the gear shift instruction includes a first gear shift instruction and a second gear shift instruction, wherein the first gear shift instruction corresponds to indicating the virtual vehicle's gear position, and the second gear shift instruction corresponds to lowering the virtual vehicle's gear position. Each time the first gear shift instruction is triggered, the client displays the virtual vehicle's gear position raised by one gear. And / or, each time the second gear shift instruction is triggered, the client displays the virtual vehicle's gear position lowered by one gear.

[0076] The first shift instruction and the second shift instruction are triggered by different tapping operations. Optionally, the different tapping operations include tapping operations with different tapping positions, tapping operations with different tapping directions, and tapping operations with different tapping positions and tapping directions. For example, a tapping operation on the first side of the back of the terminal can trigger the first shift instruction, and a tapping operation on the second side of the back of the terminal can trigger the second shift instruction. The first side of the back of the terminal refers to the side of the back of the terminal opposite to the right side of the display screen, and the second side of the back of the terminal refers to the side of the back of the terminal opposite to the left side of the display screen. Optionally, a single tapping operation can trigger a shift instruction, or multiple consecutive tapping operations can trigger a shift instruction. In the embodiment of the present application, multiple consecutive times refers to multiple times within a preset duration, that is, when the client obtains multiple consecutive tapping operations within the preset duration, a shift instruction will be triggered. Optionally, a tapping operation can trigger a shift instruction only when the tapping force meets a condition (for example, the tapping force is greater than a force threshold). Because if the shift instruction is triggered when the tapping force is small, there may be a case of false triggering. And because the tapping operation is detected by the motion sensor, if the tapping force is large, it may be that the terminal has fallen or flipped over. The conditions for the tapping force can be set by the developer or the user based on actual usage. Optionally, the client can also trigger the shift instruction in other ways, such as triggering the shift instruction through human-computer interaction operations detected on the terminal display screen, which is not limited in this embodiment of the present application. The method provided in this embodiment can also avoid the false triggering of the shift instruction by triggering the shift instruction when the force and direction of the tapping operation meet the conditions.

[0077] Only when the shift mode of the virtual vehicle is in manual mode will the client respond to the tapping operation to trigger the shift instruction. The shift mode of the virtual vehicle also includes automatic mode. The client can switch the shift mode of the virtual vehicle between manual mode and automatic mode according to the user's operation. For example, the default is manual mode, and then it is switched to automatic mode according to the user's operation. Or it is defaulted to automatic mode, and then it is switched to manual mode according to the user's operation. Optionally, when the shift mode of the virtual vehicle is in automatic mode, the terminal responds to the continuous tapping operation on the terminal, and the client will display that the shift mode of the virtual vehicle is switched to manual mode. The continuous tapping operation is an operation of tapping the terminal continuously x times, where x is a positive integer. In one example, x can be set to 3.

[0078] In summary, the method provided in this embodiment allows for triggering the shifting of a virtual vehicle's gear by tapping the terminal, i.e., raising and / or lowering the gear of the virtual vehicle. This tapping operation, unlike touch operations on the terminal display, does not interfere with the user's touch operations on the display, resulting in high operational precision. Therefore, the user can accurately control the gear of the virtual vehicle through tapping, achieving precise control of the virtual vehicle.

[0079] FIG8 is a flow chart of a method for shifting a virtual vehicle provided by an exemplary embodiment of the present application. The method can be used in a terminal or a client on the terminal as shown in FIG4 . As shown in FIG8 , the method includes:

[0080] Step 802: Displaying a virtual environment and a virtual vehicle in a driving state in the virtual environment in a user interface.

[0081] The user interface is any interface in the client that provides the functionality for controlling the movement of a virtual vehicle. This user interface can be either a horizontal or vertical user interface. A horizontal user interface is one in which the horizontal length is greater than the vertical length, while a vertical user interface is one in which the horizontal length is less than the vertical length.

[0082] The virtual environment displays an area supporting virtual vehicle travel, within which the virtual vehicle can travel. The virtual vehicle can be a simulation of a real-world vehicle, a semi-simulation and semi-fictional vehicle, or a completely fictional vehicle. For example, the user account's control over the virtual vehicle includes controlling the virtual vehicle to move forward, backward, turn left, turn right, shift up, shift down, accelerate, brake, drift, and use virtual props (e.g., acceleration props).

[0083] Step 804: During the process of displaying the user interface, terminal motion data collected by the motion sensor in the terminal is obtained.

[0084] The motion sensor is a sensor used to detect the motion state of the terminal. For example, the motion sensor includes at least one of an accelerometer and a gyroscope. An accelerometer is a sensor used to measure acceleration, and a gyroscope is a sensor used to determine the direction of a moving object. This embodiment of the application does not limit the type of motion sensor.

[0085] The motion state of a terminal includes at least one of a change in the terminal's position and the terminal's movement (direction and speed). If the terminal is subjected to an external force that causes the motion state to change, the output data of the motion sensor within the terminal will also change accordingly to reflect the change in the terminal's motion state.

[0086] Step 806: Determine a tapping operation on the terminal according to the terminal motion data.

[0087] The tapping operation is an operation of tapping the surface of the terminal. Optionally, the tapping operation is triggered by at least one of tapping the surface where the terminal display is located, tapping the back of the terminal, and tapping the frame around the terminal. The back of the terminal refers to the side of the terminal opposite to the surface where the display is located.

[0088] The client uses the data collected by the motion sensor in the terminal to determine whether there is a tapping operation and thus receives the tapping operation. For example, when the data collected by the motion sensor changes, that is, when the posture of the terminal changes, the client receives the tapping operation. Based on the data collected by the motion sensor, the terminal can further determine at least one of the position of the tap, the direction of the tap, and the force of the tap, so as to execute subsequent steps. Exemplarily, the above-mentioned motion sensor includes at least one of an acceleration sensor and a gyroscope sensor. Optionally, the client periodically obtains the data collected by the motion sensor to determine and obtain the tapping operation.

[0089] Optionally, for a virtual vehicle in a driving state, the client will receive a tapping operation, thereby triggering the execution of the following steps of switching the gear shift mode and switching the gear position of the virtual vehicle according to the tapping operation. For a virtual vehicle in a non-driving state, the client will not judge and receive the tapping operation. Alternatively, for a virtual vehicle in a non-driving state, the client will also judge and receive the tapping operation to trigger the execution of the following steps. Exemplarily, the driving state is a state in which the virtual vehicle is not stationary.

[0090] Step 808: When the shift mode of the virtual vehicle is in the automatic mode, in response to a continuous tapping operation, the shift mode of the virtual vehicle is displayed in the user interface as being switched to the manual mode.

[0091] Automatic mode is a mode in which the client / server automatically controls the virtual vehicle's gear position based on the virtual vehicle's speed (acceleration / deceleration). Manual mode is a mode in which the client / server switches the virtual vehicle's gear position based on user input. The client can switch the virtual vehicle's gear shifting mode between manual and automatic based on user input.

[0092] The above-mentioned continuous tapping operation is an operation of tapping the terminal continuously for x times, where x is a positive integer. Continuous tapping for x times means that x taps are detected within a first preset time length. The first preset time length is set by the developer or user, and x is set by the developer or user. Exemplarily, x is 3. The tapping position of each tap in the continuous tapping operation is the same or different, and the tapping position includes at least one of the surface where the terminal display is located, the back of the terminal, and the frame of the terminal. For example, a continuous tapping operation refers to an operation of tapping the back of the terminal three times in a row. Optionally, in addition to being able to switch the automatic gear mode to the manual gear mode, the continuous tapping operation can also switch the manual gear mode back to the automatic gear mode. The method provided in this embodiment also enables the user to flexibly switch the shift mode of the virtual vehicle according to their own needs by triggering the switch to the manual gear mode through a continuous tapping operation when the virtual vehicle is in the automatic gear mode, thereby improving the user experience.

[0093] For example, FIG9 is a schematic diagram of a user interface provided by an exemplary embodiment of the present application. As an example, assuming the virtual vehicle is a virtual car, as shown in FIG9(a), the user interface 901 displayed by the client includes a virtual environment 902 and a virtual vehicle 903 in motion within the virtual environment 902. At this point, the shift mode of the virtual vehicle 903 is automatic. Optionally, the client displays information indicating the current shift mode in the user interface 901, such as "Automatic" in FIG9(a). As shown in FIG9(b), in response to receiving three consecutive taps on the back of the terminal, the client switches the shift mode of the virtual vehicle 903 to manual mode. As shown in FIG9(c), the client displays shift mode switching information 904 in the user interface 901, "Manual mode is on. Tap the back panel to shift up or down," indicating that the shift mode of the virtual vehicle 903 has changed. Optionally, the client displays information indicating the current shift mode in the user interface 901, such as "Manual" in FIG9(c). Optionally, the tapping operation is only considered valid if the client determines that the force of the tapping operation meets certain conditions, thereby triggering the virtual vehicle's shift mode to manual mode or changing the gear position of the virtual vehicle through the tapping operation. The following describes the detection of the tapping operation in detail.

[0094] It's understandable that tapping a terminal can cause changes in the data from its motion sensors (accelerometers and / or gyroscopes). To determine the terminal's tapped state, we first need to define its stable state. This determination aims to reduce misjudgments and improve the accuracy of interactive operation determinations. This determination process can be implemented using virtual sampling points.

[0095] Exemplarily, FIG. 10 is a schematic diagram of virtual sampling points provided by an exemplary embodiment of the present application. As shown in FIG. 10, for facilitating the determination of the stable state of the terminal 1001, the terminal 1001 can be understood as a plane in a 3D space (i.e., without considering the thickness of the terminal, such as the plane perpendicular to the back of the terminal). A plurality of (e.g., 100, the quantity can be configured) virtual sampling points 1002 are provided on this plane. The virtual sampling points 1002 can be regarded as being used to transmit data (such as the acceleration of a single point) to the motion sensors built in the terminal 1001, so as to obtain the output data of the motion sensors. Conversely, by determining the component of the output data of the motion sensors at the position of each virtual sampling point 1002, the data collected by the motion sensors for the position of each virtual sampling point 1002 can be obtained, such as acceleration. Assume that the above-mentioned number of virtual sampling points is max(A). When the absolute value of the acceleration of a virtual sampling point changes, it indicates that the terminal may have had an interaction. For example, when the user clicks on the screen on the front of the terminal, the terminal will also generate a weak acceleration in space. Optionally, according to the actual test results, developers can set the trigger interval a1 to b1 for confirming the tapping interaction (i.e., the tapping operation is valid) in the client. a1 and b1 are positive numbers, representing the interval of the absolute value of the acceleration of a valid tapping operation. Continuing to refer to FIG. 10, when the user holds the terminal 1001, the usual tapping interaction occurs on the Z axis (the direction perpendicular to the back of the terminal). Set the acceleration of the virtual sampling point on the Z axis as Z, and the absolute value as |Z|. For the acceleration of a certain virtual sampling point, it is divided into the following situations:

[0096] When |Z| < a1, the terminal 1001 may have had an interaction with a smaller force such as a click; when a1 ≤ |Z| ≤ b1, the terminal 1001 is in the tapping interval and may have had a valid tapping operation; when |Z| > b1, the terminal 1001 may have had an interaction such as a fall or a flip; when |Z| > 0 for a certain virtual sampling point, it can be considered that an interaction has occurred on the virtual sampling point of the terminal 1001. On the contrary, when |Z| = 0 for all virtual sampling points, it can be considered that the terminal 1001 has reached a stable state.

[0097] The client can determine the acceleration component of the Z axis direction of each virtual sampling point by determining the acceleration component of the output of the motion sensors at each virtual sampling point. When the absolute value of the acceleration component is within the trigger interval and the direction is the positive direction of the Z axis, the client determines that a valid tapping operation on the back of the terminal has been received. It should be noted that for the detection principle of the tapping operations on the front of the terminal and the terminal frame, reference can be made to the above description, and the embodiments of the present application will not be elaborated herein.

[0098] Optionally, the client can also switch the shift mode of the virtual vehicle through human-computer interaction operations on the display screen. For example, the client displays a shift mode control in the user interface, and the shift mode control displays the current shift mode of the virtual vehicle. In response to the touch operation on the shift mode control, the terminal switches the current shift mode, for example, the current automatic mode is switched to the manual mode, or the current manual mode is switched to the automatic mode. Optionally, the client displays the shift mode control under a set scenario, such as a scenario that may require the user to manually control the gear position, and the set scenario includes at least one of the distance between the virtual vehicle and the opponent's virtual vehicle in the virtual environment is less than a first distance threshold, and the distance between the virtual vehicle and the curved road section in the virtual environment is less than a second distance threshold.

[0099] Optionally, the client can also use a machine learning model to predict when to display the shift mode control. This machine learning model is trained using manually annotated data. This manually annotated data includes manually annotated game parameters for the time period when manual shift mode is required. These game parameters reflect the game's operational status, such as the current game mode (qualifying mode, regular match mode, mission completion mode, etc.), the speed of the virtual vehicle, the type of road the virtual vehicle is currently on (straight road, curve, U-turn, continuous curve), the distance between the virtual vehicle and other virtual vehicles, etc. During operation, the client periodically obtains game parameters and uses the machine learning model to predict whether manual shift mode is required given these game parameters. If the prediction indicates that manual shift mode is required, the client displays the shift mode control or directly switches to manual mode. If the prediction indicates that manual shift mode is not required and the current mode is manual, the client displays the shift mode control or directly switches to automatic mode. It should be noted that this solution can coexist with the aforementioned tap-to-switch shift mode solution.

[0100] Step 810: When the shift mode of the virtual vehicle is in the manual shift mode, in response to a shift instruction triggered by a tapping operation, at least one of raising the gear of the virtual vehicle and lowering the gear of the virtual vehicle is displayed according to the shift instruction.

[0101] Only when the shift mode of the virtual vehicle is in manual mode will the client respond to the tapping operation to trigger the shift instruction. Optionally, in response to the first shift instruction triggered by the first tapping operation, the terminal displays the gear position of the virtual vehicle. And / or, in response to the second shift instruction triggered by the second tapping operation, the terminal displays the gear position of the virtual vehicle. Wherein, at least one of the tapping position, tapping direction and tapping force of the first tapping operation and the second tapping operation is different.

[0102] In response to a first gear shift instruction triggered by m consecutive first tap operations, the terminal displays that the gear of the virtual vehicle is increased by one gear on the client. That is, if the client detects m first tap operations within the second preset time period, it will trigger a first gear shift instruction, thereby increasing the gear of the virtual vehicle by one gear. Wherein, m is a positive integer. M and the second preset time period are set by the developer or user. In response to a second gear shift instruction triggered by n consecutive second tap operations, the terminal displays that the gear of the virtual vehicle is decreased by one gear. That is, if the client detects n second tap operations within the third preset time period, it will trigger a second gear shift instruction, thereby decreasing the gear of the virtual vehicle by one gear. Wherein, n is a positive integer. N and the third preset time period are set by the developer or user. The method provided in this embodiment also triggers the increase or decrease of the gear of the virtual vehicle through different tap operations, thereby achieving precise control of the gear of the virtual vehicle.

[0103] For the case of tapping the back of the terminal:

[0104] In response to a first tapping operation, in which the tapping position is located on a first side of the rear surface of the terminal and the tapping direction is toward the interior of the terminal, the terminal determines that a first gear shift instruction has been triggered. Subsequently, in response to the first gear shift instruction, the client displays a gear position for raising the virtual vehicle. In response to a second tapping operation, in which the tapping position is located on a second side of the rear surface of the terminal and the tapping direction is toward the interior of the terminal, the client determines that a second gear shift instruction has been triggered. Subsequently, in response to the second gear shift instruction, the client displays a gear position for lowering the virtual vehicle.

[0105] Optionally, the first side of the back of the terminal refers to the side of the back of the terminal opposite to the right side of the front of the terminal (the surface where the display screen is located); the second side of the back of the terminal refers to the side of the back of the terminal opposite to the left side of the front of the terminal. Alternatively, the first side of the back of the terminal refers to the side of the back of the terminal opposite to the left side of the front of the terminal; the second side of the back of the terminal refers to the side of the back of the terminal opposite to the right side of the front of the terminal. Alternatively, the first side of the back of the terminal refers to the side of the back of the terminal opposite to the upper side of the front of the terminal; the second side of the back of the terminal refers to the side of the back of the terminal opposite to the lower side of the front of the terminal. Alternatively, the first side of the back of the terminal refers to the side of the back of the terminal opposite to the lower side of the front of the terminal; the second side of the back of the terminal refers to the side of the back of the terminal opposite to the upper side of the front of the terminal. It should be noted that the front of the terminal and the back of the terminal are in a mirror image relationship.

[0106] When upshifting is achieved by tapping the back panel (back) corresponding to the right side of the front of the terminal, and downshifting is achieved by tapping the back panel corresponding to the left side of the front of the terminal, the user can conveniently shift manually by tapping the back panel of the terminal. This experience is similar to the shifting experience of the shift paddles on a racing steering wheel. Figure 11 is a schematic diagram of a racing steering wheel provided by an exemplary embodiment of the present application. As shown in Figure 11, a right shift paddle 1101 and a left shift paddle 1102 are provided on the back of the racing steering wheel. Tapping the right shift paddle 1101 is for upshifting, and tapping the left shift paddle 1102 is for downshifting. The tapping process is from the side of the shift paddle away from the steering wheel to the direction close to the steering wheel. The above-mentioned shifting method provided by the embodiment of the present application is intuitive and allows users to operate racing games more simply and obtain a better gaming experience. Compared with automatic acceleration (automatic transmission mode), users can experience the fun of decision-making in each gear shift, making the game more playable. The above-mentioned shifting method provided in the embodiment of the present application is an interactive operation with an innovative design for manual shifting, which concisely solves the pain point of the lack of concise manual shifting interaction in current racing games and meets the various demands of users in racing games.

[0107] Similar to the description in step 806 above, optionally, the client needs to detect the received tapping operation to determine whether the tapping operation is valid (whether it can trigger a shift instruction) and whether the first shift instruction or the second shift instruction is triggered.

[0108] Optionally, a motion sensor is provided within the terminal. The client uses the motion sensor to obtain the acceleration generated by the terminal during a tapping operation and determines the acceleration component of the acceleration at each of a plurality of virtual sampling points. The direction of the acceleration component is perpendicular to the back of the terminal, and the plurality of virtual sampling points are distributed in a dot matrix on a plane parallel to the back of the terminal. For the description of the virtual sampling points, please refer to FIG. 10 .

[0109] Among the virtual sampling points located on the first side, the client determines a first virtual sampling point whose acceleration component satisfies a tapping condition. Among the virtual sampling points located on the second side, the client determines a second virtual sampling point whose acceleration component satisfies a tapping condition. The tapping condition is used to indicate that the virtual sampling point is tapped along a tapping direction, which is a direction perpendicular to the back of the terminal pointing to the inside of the terminal. Thereafter, when the first number is greater than the second number, the client determines that the tapping operation is a first tapping operation, thereby triggering a first gear shift instruction. When the first number is less than the second number, the client determines that the tapping operation is a second tapping operation, thereby triggering a second gear shift instruction. The first number is the number of the first virtual sampling points, and the second number is the number of the second virtual sampling points.

[0110] Optionally, each virtual sampling point has an identifier, and the identifiers corresponding to the virtual sampling points on the first side have the same first feature, and the identifiers corresponding to the virtual sampling points on the second side have the same second feature. Optionally, the identifier includes the number of the virtual sampling point and / or the coordinates of the virtual sampling point (coordinates on the distribution plane). For example, when the identifier is the number of the virtual sampling point, the same feature refers to one or more digits of the number being the same. For example, the units digit of the number on the first side is 1-5, and the units digit of the number on the second side is 6-10 (0). When the identifier is the coordinates of the virtual sampling point, the same feature refers to the horizontal coordinates of the virtual sampling points on the first side being greater than a certain value, and the horizontal coordinates of the virtual sampling points on the second side being less than a certain value. Alternatively, the horizontal coordinates of the virtual sampling points on the first side are less than a certain value, and the horizontal coordinates of the virtual sampling points on the second side are greater than a certain value. Alternatively, the vertical coordinates of the virtual sampling points on the first side are greater than a certain value, and the vertical coordinates of the virtual sampling points on the second side are less than a certain value. Alternatively, the vertical coordinates of the virtual sampling points on the first side are less than a certain value, and the vertical coordinates of the virtual sampling points on the second side are greater than a certain value. For example, the units digit of the numbering on the first side is 1-5, and the units digit of the numbering on the second side is 6-10 (0). For example, the horizontal coordinates on the first side are all less than 50, and the horizontal coordinates on the second side are all greater than 50.

[0111] When determining the number of first and second virtual sampling points, the client determines, from among the multiple virtual sampling points, a target virtual sampling point whose acceleration component satisfies the tapping condition. Thereafter, if the identifier corresponding to the target virtual sampling point has a first characteristic, the client determines the target virtual sampling point as the first virtual sampling point. If the identifier corresponding to the target virtual sampling point has a second characteristic, the client determines the target virtual sampling point as the second virtual sampling point.

[0112] Optionally, if the absolute value of the acceleration component of the virtual sampling point is greater than a first threshold and less than a second threshold, and the direction of the acceleration component of the virtual sampling point is the tapping direction, the virtual sampling point is determined to meet the tapping condition. For example, with the direction perpendicular to the back of the terminal pointing to the inside of the terminal as the positive direction, if the absolute value of the acceleration component is greater than the first threshold and less than the second threshold, and the acceleration component is positive, the client determines that the virtual sampling point meets the tapping condition. Exemplarily, the first threshold is a1 above, and the second threshold is b1 above.

[0113] For example, Figure 12 is a schematic diagram of virtual sampling points provided by an exemplary embodiment of the present application. As shown in Figure 12, it is assumed that the number of virtual sampling points 1202 corresponding to the terminal 1201 is max(A)=50. At this time, all virtual sampling points 1202 can be numbered. That is, the numbers from 1 to 50 in Figure 12. When a tapping interaction occurs at the terminal 1201, as shown in (a) of Figure 12, when there are more virtual sampling points 1202 with the unit digits of 1, 2, 3, 4, and 5 among the virtual sampling points 1202 that generate acceleration (meet the tapping condition), the position where the tapping operation occurs is biased to the right. On the contrary, as shown in (b) of Figure 12, when there are more virtual sampling points 1202 with the unit digits of 6, 7, 8, 9, and 10, the position where the tapping operation occurs is biased to the left. Due to the posture characteristics of the human hand holding the terminal, the probability of interaction close to the middle is low, so it can be determined that most tapping operations have obvious bias, that is, biased to the left or right.

[0114] It should be noted that the detection of the tapping operation by the client and the detection of the tapping position of the tapping operation and whether the tapping operation is valid (i.e., identifying whether it is the first tapping operation / the second tapping operation) can be implemented as two steps or combined into one step. The method provided in this embodiment also triggers the operation of raising the gear of the virtual vehicle or lowering the gear of the virtual vehicle by tapping different positions on the back of the terminal. The user can selectively switch the gear of the virtual vehicle by tapping different positions on the back of the terminal, thereby achieving precise control of the gear of the virtual vehicle. The method provided in this embodiment also determines the gear shift instruction triggered by the tapping operation by the acceleration at the virtual sampling point, and provides a solution for accurately identifying the tapping operation, thereby triggering the gear shift instruction. The method provided in this embodiment also determines whether the tapping operation is located on the first side or the second side according to the identification of the virtual sampling point, and provides a solution for conveniently determining the position of the tapping operation.

[0115] For the case of tapping the terminal border:

[0116] The terminal responds to a first tapping operation in which the tapping position is located on the frame of the third side of the terminal and the tapping direction is toward the inside of the terminal, and the client determines that a first gear shift instruction is triggered. Thereafter, in response to the first gear shift instruction, the client displays a gear position for raising the virtual vehicle.

[0117] The terminal responds to the second tapping operation in which the tapping position is located on the frame of the fourth side of the terminal and the tapping direction is toward the inside of the terminal, and the client determines that a second gear shift instruction is triggered. Then, in response to the second gear shift instruction, the gear position of the virtual vehicle is lowered.

[0118] Optionally, the third side refers to the left side, and the fourth side refers to the right side. Alternatively, the third side refers to the right side, and the fourth side refers to the left side. Alternatively, the third side refers to the upper side, and the fourth side refers to the lower side. Alternatively, the third side refers to the lower side, and the fourth side refers to the upper side. It should be noted that the client will also detect the validity of the tapping operation on the terminal frame. For the specific detection process of the tapping operation on the terminal frame, reference may be made to the aforementioned detection process of the tapping operation on the back of the terminal, and the embodiments of the present application will not be elaborated here. The method provided in this embodiment also triggers a gear shift instruction by tapping the terminal frame, providing a convenient and accurate solution for triggering a gear shift instruction.

[0119] For situations where the gear shift command is triggered by other means:

[0120] In response to a first two-finger swipe operation in a first direction in a user interface, the terminal causes the client to display a gear position for raising the virtual vehicle. And / or, in response to a second two-finger swipe operation in a second direction in the user interface, the terminal causes the client to display a gear position for lowering the virtual vehicle. The two swipe traces of the first two-finger swipe operation are located on opposite sides of the user interface, and the two swipe traces of the second two-finger swipe operation are located on opposite sides of the user interface.

[0121] Optionally, the two sliding tracks of the first two-finger sliding operation and the second two-finger sliding operation are respectively located on the left and right sides of the user interface. The first direction is opposite to the second direction, for example, the first direction is upward and the second direction is downward. Since users usually use both hands to operate on the left and right sides of the user interface respectively, when the user performs the gear switch through the above scheme, the user can use both thumbs to slide up at the same time to trigger the virtual vehicle's gear to be increased by one gear. And / or, use both thumbs to slide down at the same time to trigger the virtual vehicle's gear to be reduced by one gear. Since the gear switch is triggered by a two-finger operation, and other operations in the game are usually single-finger operations, the probability of misjudgment by the client is low, and precise control of the virtual vehicle's gear can be achieved.

[0122] Optionally, the client displays a shift control in the user interface in at least one of the following situations: the distance between the virtual vehicle and the opponent virtual vehicle in the virtual environment is less than a first distance threshold; the distance between the virtual vehicle and the curved road section in the virtual environment is less than a second distance threshold (in this case, the virtual vehicle is a virtual vehicle). The opponent virtual vehicle is a virtual vehicle controlled by other users or clients / servers. The first distance threshold and the second distance threshold are set by the client or the user. The shift control is used to trigger at least one of lowering the gear of the virtual vehicle and raising the gear of the virtual vehicle. Optionally, the shift control includes a first control and a second control, the first control being used to trigger raising the gear of the virtual vehicle by one gear, and the second control being used to trigger lowering the gear of the virtual vehicle by one gear. The user can set the position of the shift control in the user interface to facilitate user operation.

[0123] It should be noted that the above-mentioned scheme of triggering the gear shift instruction not by tapping in the embodiment of the present application can run simultaneously with the scheme of triggering the gear shift instruction by tapping. The method provided in this embodiment also triggers the gear shift instruction by two-finger sliding operations in different directions, providing an operation that is different from the conventional operation of the virtual vehicle and can trigger the gear shift instruction. That is, it avoids conflicts with conventional operations and also realizes accurate control of the gear switching of the virtual vehicle. The method provided in this embodiment also realizes precise control of the virtual vehicle by displaying the gear shift control in scenarios where manual control of the virtual vehicle gear may be required, so that the user can manually control the gear of the virtual vehicle through the gear shift control in this scenario.

[0124] The method provided by the embodiments of the present application enables users to easily and smoothly operate virtual vehicles using manual transmission on mobile devices, and the shifting process can be implemented in a manner that matches the operation of car shift paddles in the real world, making the interaction more diverse. At the same time, the introduction of the manual transmission design can make racing games more fun to operate and enhance the gaming experience. Users can achieve convenient and smooth switching between low and high gears, which also increases the upper limit of operation and enhances the fun of the game. Moreover, in games that adopt the method provided by the embodiments of the present application, the experience of controlling a virtual vehicle through a curve can increase the uncertainty of the game because the user can control the gear of the virtual vehicle, thereby enhancing the gaming experience of advanced players.

[0125] In summary, the method provided in this embodiment allows for triggering the shifting of a virtual vehicle's gear by tapping the terminal, i.e., raising and / or lowering the gear of the virtual vehicle. This tapping operation, unlike touch operations on the terminal display, does not interfere with the user's touch operations on the display, resulting in high operational precision. Therefore, the user can accurately control the gear of the virtual vehicle through tapping, achieving precise control of the virtual vehicle.

[0126] The method provided in this embodiment also uses different tapping operations to trigger raising or lowering the gear of the virtual vehicle, thereby achieving precise control of the gear of the virtual vehicle. The method provided in this embodiment also uses tapping operations at different locations on the back of the terminal to trigger raising or lowering the gear of the virtual vehicle. The user can selectively switch the gear of the virtual vehicle by tapping at different locations on the back of the terminal, achieving precise control of the gear of the virtual vehicle. The method provided in this embodiment also uses the acceleration at the virtual sampling point to determine whether the tapping operation triggers a shift instruction, providing a solution for accurately identifying the tapping operation and thus triggering the shift instruction. The method provided in this embodiment also uses the identification of the virtual sampling point to determine whether the tapping operation is on the first side or the second side, providing a solution for conveniently determining the location of the tapping operation. The method provided in this embodiment also triggers the shift instruction when the force and direction of the tapping operation meet the conditions, thereby avoiding the false triggering of the shift instruction. The method provided in this embodiment also triggers the shift instruction by multiple consecutive taps, thereby effectively avoiding the false recognition of the tapping operation. The method provided in this embodiment also triggers the gear shift instruction by tapping the terminal frame, providing a convenient and accurate solution for triggering the gear shift instruction. The method provided in this embodiment also triggers the gear shift instruction by two-finger sliding operations in different directions, providing an operation that is different from the conventional operation of the virtual vehicle and can trigger the gear shift instruction. That is, it avoids conflicts with conventional operations and also achieves accurate control of the gear switching of the virtual vehicle. The method provided in this embodiment also enables the user to manually control the gear of the virtual vehicle through the gear shift control in the scenario where the gear of the virtual vehicle may need to be manually controlled by displaying the gear shift control, thereby achieving precise control of the virtual vehicle. The method provided in this embodiment also enables the user to manually control the gear of the virtual vehicle through the gear shift control in the scenario by triggering the switch to the manual gear mode through continuous tapping operations when the virtual vehicle is in automatic gear mode, so that the user can flexibly switch the gear shift mode of the virtual vehicle according to their own needs, thereby improving the user experience.

[0127] It should be noted that, before collecting the relevant data of the user (such as motion sensor data) and during the process of collecting the relevant data of the user, the present application can display a prompt interface, a pop-up window or output a voice prompt information, and the prompt interface, pop-up window or voice prompt information is used to prompt the user that the relevant data is currently being collected, so that the present application only starts to execute the relevant steps of obtaining the relevant data of the user after obtaining the confirmation operation issued by the user on the prompt interface or pop-up window, otherwise (that is, when the confirmation operation issued by the user on the prompt interface or pop-up window is not obtained), the relevant steps of obtaining the relevant data of the user are terminated, that is, the relevant data of the user is not obtained. In other words, all user data collected by the present application are collected with the consent and authorization of the user, and the collection, use and processing of the relevant user data need to comply with the relevant laws, regulations and standards of the relevant countries and regions. The order of the method steps provided in the embodiments of the present application can be appropriately adjusted, and the steps can also be increased or decreased accordingly according to the situation. Any technician familiar with the technical field of the present application can easily think of the method of changing the method within the technical scope disclosed in the present application, which should be covered within the scope of protection of the present application, so it will not be repeated.

[0128] In a specific example, Figure 13 is a schematic diagram of the operation process of switching gears provided by an exemplary embodiment of the present application. As shown in Figure 13, in step A1, the user taps the back panel of the device (terminal) three times. In step A2, the client detects whether the device is in a stable state, that is, whether the tapping operation is valid. In step A3, if the device is in a stable state, the client does not enter the manual gear mode. In step A4, if the device is not in a stable state, the client activates the manual gear mode. In step A5, the client remains in the manual gear mode. In step A6, the user taps the back panel of the device twice. In step A7, the client detects whether the acceleration of the tap meets the set interval. In step A8, if the interval is not met, the tapping operation is determined to be invalid. In step A9, if the interval is met, the tapping operation is determined to be valid and there is a tapping interaction. In step A10, the client determines whether the right side is the majority of the virtual sampling points with interaction. In step A11, if the right side is the majority, the client determines that it is a tapping operation on the right side. In step A12, the client controls the virtual vehicle to perform an upshift. In step A13, if the right side is not the majority, the client determines whether the left side is the majority among the virtual sampling points with interaction. In step A14, if the left side is the majority, the client determines that the tapping operation is on the left side. In step A15, the client controls the virtual vehicle to perform a downshift. The above-mentioned tapping operation detection process is explained as follows:

[0129] 1. Distribution of virtual sampling points:

[0130] Virtual sampling points are not actual hardware, but rather serve as a data analysis model for the device's accelerometer. They are evenly distributed across the device's 3D plane, forming a surface. In a stable state, the acceleration at each virtual sampling point is zero. Acceleration deviations at one or more virtual sampling points indicate whether the terminal is stable.

[0131] 2. Tap recognition (whether the tap is valid):

[0132] By using the device's motion sensor combined with 3D spatial coordinates, the acceleration generated by the tapping is processed to determine whether the tapping is valid. First, the client processes the parameters of the motion sensor to obtain the absolute value of the acceleration at the virtual sampling point. If the absolute value is determined to be in an unstable state, it can be considered that the device is indeed subjected to force, and a specific determination of the tapping can be made. If the absolute value of the acceleration is in the tapping interval a1≤|Z|≤b1 defined above, it can be determined that there is a tapping interaction (tapping operation) on the device.

[0133] 3. Identify the tapping position (left or right):

[0134] In conjunction with the virtual sampling points mentioned in the first point, by numbering several virtual sampling points, the number of virtual sampling points cannot be too small to ensure recognition accuracy. As shown in Figure 12, assuming there are 50 sampling points, when a tap interaction occurs on the device, the sampling points with the units digit of 1-5 can be defined as the right sampling points representing the right side of the device based on their position in space; conversely, the sampling points with the units digit of 6-10 are the left sampling points.

[0135] Combined with Figure 10, since current mobile devices can usually be regarded as a whole rigid body, the rigid body will not undergo obvious deformation, so the device will usually undergo spatial displacement as a whole, and the displacement direction (knocking direction) can be determined by the positive and negative values ​​of the acceleration in space. When the device is in the spatial coordinates, the left sampling point generates a positive acceleration on the Z axis, then it can be considered that the left side of the device is struck, and it is determined to be a left-side strike. When the device is in the spatial coordinates, the left sampling point generates a negative acceleration on the Z axis, then it can be considered that the right side of the device is struck, and it is determined to be a right-side strike.

[0136] FIG14 is a schematic diagram of a structure of a shifting device for a virtual vehicle provided by an exemplary embodiment of the present application. As shown in FIG14 , the device includes:

[0137] The display module 1401 is used to display the virtual environment and the virtual vehicle in a driving state in the virtual environment in a user interface, and the virtual vehicle corresponds to at least two gears; the acquisition module 1402 is used to obtain terminal motion data collected by a motion sensor in the terminal during the display of the user interface; the determination module 1403 is used to determine a tapping operation on the terminal based on the terminal motion data, and the tapping operation is an operation of tapping on the surface of the terminal; the display module 1401 is also used to respond to a gear shift instruction triggered by the tapping operation, and display at least one of increasing the gear of the virtual vehicle and decreasing the gear of the virtual vehicle according to the gear shift instruction.

[0138] In an optional design, the display module 1401 is used to display the gear position of the virtual vehicle being increased in response to a first gear shifting instruction triggered by a first tapping operation; and / or to display the gear position of the virtual vehicle being decreased in response to a second gear shifting instruction triggered by a second tapping operation.

[0139] In an optional design, the determining module 1403 is configured to determine that the first gear shift instruction is triggered in response to the first tapping operation in which the tapping position is located on the first side of the back of the terminal and the tapping direction is toward the inside of the terminal; the display module 1401 is configured to display the gear position for raising the virtual vehicle in response to the first gear shift instruction;

[0140] The determination module 1403 is further used to determine the triggering of the second gear shift instruction in response to the second tapping operation in which the tapping position is located on the second side of the back of the terminal and the tapping direction is toward the inside of the terminal; the display module 1401 is further used to display the lowering of the gear of the virtual vehicle in response to the second gear shift instruction.

[0141] In an optional design, the determination module 1403 is configured to obtain, through the motion sensor, the acceleration generated by the terminal under the tapping operation; determine an acceleration component of the acceleration at each virtual sampling point among a plurality of virtual sampling points, where the direction of the acceleration component is perpendicular to the back of the terminal, and the plurality of virtual sampling points are distributed in a dot matrix on a plane parallel to the back of the terminal; determine, among the virtual sampling points located on the first side, a first virtual sampling point whose acceleration component satisfies a tapping condition; and determine, among the virtual sampling points located on the second side, a second virtual sampling point whose acceleration component satisfies the tapping condition; the tapping condition is used to indicate that the virtual sampling point is tapped along a tapping direction, where the tapping direction is a direction from the back of the terminal perpendicular to the interior of the terminal; if the first number is greater than the second number, determine the tapping operation as the first tapping operation; if the first number is less than the second number, determine the tapping operation as the second tapping operation; the first number is the number of the first virtual sampling points, and the second number is the number of the second virtual sampling points.

[0142] In an optional design, each virtual sampling point has a corresponding identifier, the identifiers corresponding to the virtual sampling points located on the first side have the same first feature, and the identifiers corresponding to the virtual sampling points located on the second side have the same second feature. The determination module 1403 is configured to determine, among the multiple virtual sampling points, a target virtual sampling point whose acceleration component satisfies the tapping condition; if the identifier corresponding to the target virtual sampling point has the first feature, determine the target virtual sampling point as the first virtual sampling point; and if the identifier corresponding to the target virtual sampling point has the second feature, determine the target virtual sampling point as the second virtual sampling point.

[0143] In an optional design, the determination module 1403 is used to determine that the virtual sampling point meets the tapping condition when the absolute value of the acceleration component of the virtual sampling point is greater than a first threshold and less than a second threshold, and the direction of the acceleration component of the virtual sampling point is the tapping direction.

[0144] In an optional design, the display module 1401 is used to display that the gear of the virtual vehicle is increased by one gear in response to the first gear shift instruction triggered by the first tapping operation for m consecutive times, where m is a positive integer; and to display that the gear of the virtual vehicle is decreased by one gear in response to the second gear shift instruction triggered by the second tapping operation for n consecutive times, where n is a positive integer.

[0145] In an optional design, the determination module 1403 is used to determine that the first gear shift instruction is triggered in response to the first tapping operation in which the tapping position is located on the border on the third side of the terminal and the tapping direction is toward the inside of the terminal; the display module 1401 is used to display the gear position of the virtual vehicle being raised in response to the first gear shift instruction; the determination module 1403 is also used to determine that the second gear shift instruction is triggered in response to the second tapping operation in which the tapping position is located on the border on the fourth side of the terminal and the tapping direction is toward the inside of the terminal; the display module 1401 is also used to display the gear position of the virtual vehicle being lowered in response to the second gear shift instruction.

[0146] In an optional design, the display module 1401 is used to display the gear position of the virtual vehicle being raised in response to a first two-finger sliding operation along a first direction in the user interface, and the two sliding tracks of the first two-finger sliding operation are respectively located on both sides of the user interface; and / or, in response to a second two-finger sliding operation along a second direction in the user interface, display the gear position of the virtual vehicle being lowered, and the two sliding tracks of the second two-finger sliding operation are respectively located on both sides of the user interface.

[0147] In an optional design, the display module 1401 is used to display a gear shift control in the user interface in at least one of the following situations: the distance between the virtual vehicle and the opponent's virtual vehicle in the virtual environment is less than a first distance threshold; the distance between the virtual vehicle and a curved road section in the virtual environment is less than a second distance threshold; wherein the gear shift control is used to trigger at least one of lowering the gear of the virtual vehicle and raising the gear of the virtual vehicle.

[0148] In an optional design, the display module 1401 is used to, when the shift mode of the virtual vehicle is in the automatic shift mode, in response to a continuous tapping operation, display in the user interface that the shift mode of the virtual vehicle is switched to the manual shift mode, and the continuous tapping operation is an operation of tapping the terminal x times in a row, where x is a positive integer; when the shift mode of the virtual vehicle is in the manual shift mode, in response to the shift instruction triggered by the tapping operation, display at least one of raising the gear of the virtual vehicle and lowering the gear of the virtual vehicle according to the shift instruction.

[0149] It should be noted that the virtual vehicle shifting device provided in the above embodiment is merely an example of the division of the aforementioned functional modules. In actual applications, the aforementioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the virtual vehicle shifting device provided in the above embodiment and the virtual vehicle shifting method embodiment are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0150] An embodiment of the present application also provides a computer device comprising: a processor and a memory, wherein the memory stores at least one program, which is loaded and executed by the processor to implement the virtual vehicle shifting method provided in each of the above-mentioned method embodiments. For example, FIG15 is a schematic diagram of the structure of a terminal provided in an exemplary embodiment of the present application. Generally, terminal 1500 comprises: a processor 1501 and a memory 1502. Processor 1501 may include one or more processing cores, such as a quad-core processor or an octal-core processor. Processor 1501 may be implemented in at least one hardware form selected from the group consisting of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). Processor 1501 may also comprise a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 1501 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content that needs to be displayed on the display screen. In some embodiments, the processor 1501 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning. The memory 1502 may include one or more computer-readable storage media, which may be non-transitory. The memory 1502 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 1502 is used to store at least one instruction, which is used to be executed by the processor 1501 to implement the virtual vehicle shifting method provided in the method embodiment of the present application.

[0151] In some embodiments, terminal 1500 may optionally include a peripheral device interface 1503 and at least one peripheral device. The processor 1501, memory 1502, and peripheral device interface 1503 may be connected via a bus or signal lines. Each peripheral device may be connected to the peripheral device interface 1503 via a bus, signal lines, or circuit board. Specifically, the peripheral device includes at least one of a radio frequency circuit 1504, a display screen 1505, a camera assembly 1506, an audio circuit 1507, and a power supply 1508. The peripheral device interface 1503 may be used to connect at least one I / O (Input / Output)-related peripheral device to the processor 1501 and memory 1502. In some embodiments, the processor 1501, memory 1502, and peripheral device interface 1503 are integrated on the same chip or circuit board. In other embodiments, any one or two of the processor 1501, memory 1502, and peripheral device interface 1503 may be implemented on separate chips or circuit boards, which is not limited in this embodiment of the present application. RF circuit 1504 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. RF circuit 1504 communicates with communication networks and other communication devices via electromagnetic signals. RF circuit 1504 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. RF circuit 1504 optionally includes an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. RF circuit 1504 can communicate with other terminals via at least one wireless communication protocol. Such wireless communication protocols include, but are not limited to, the World Wide Web, metropolitan area networks, intranets, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and / or WiFi (Wireless Fidelity) networks. In some embodiments, RF circuit 1504 may also include circuitry related to Near Field Communication (NFC), which is not limited in this application. Display screen 1505 is used to display a UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 1505 is a touch screen display, the display screen 1505 also has the ability to collect touch signals on or above the surface of the display screen 1505. The touch signals can be input as control signals to the processor 1501 for processing. In this case, the display screen 1505 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards.In some embodiments, there can be one display screen 1505, disposed on the front panel of the terminal 1500; in other embodiments, there can be at least two display screens 1505, disposed on different surfaces of the terminal 1500 or in a foldable design; in still other embodiments, the display screen 1505 can be a flexible display screen, disposed on a curved surface or a foldable surface of the terminal 1500. Furthermore, the display screen 1505 can be configured as a non-rectangular irregular shape, i.e., a special-shaped screen. The display screen 1505 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode). The camera assembly 1506 is used to capture images or videos. Optionally, the camera assembly 1506 includes a front camera and a rear camera. Typically, the front camera is disposed on the front panel of the terminal 1500, and the rear camera is disposed on the back of the terminal. In some embodiments, there are at least two rear cameras, each of which is a main camera, a depth-of-field camera, a wide-angle camera, or a telephoto camera. This allows the main camera and the depth-of-field camera to be integrated to achieve background blur, panoramic photography, VR (Virtual Reality) photography, or other integrated photography functions. In some embodiments, the camera assembly 1506 may also include a flash. The flash can be a single-color flash or a dual-color flash. A dual-color flash is a combination of a warm light flash and a cold light flash, which can be used to compensate for light at different color temperatures. The audio circuit 1507 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment and convert them into electrical signals that are input to the processor 1501 for processing, or to the RF circuit 1504 for voice communication. For stereo sound collection or noise reduction purposes, multiple microphones may be provided, located in different locations of the terminal 1500. The microphone may also be an array microphone or an omnidirectional microphone. The speaker is used to convert electrical signals from the processor 1501 or the RF circuit 1504 into sound waves. The speaker can be a traditional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert electrical signals into sound waves audible to humans, but also convert electrical signals into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio circuit 1507 may also include a headphone jack. The power supply 1508 is used to power the various components in the terminal 1500. The power supply 1508 can be alternating current, direct current, a disposable battery, or a rechargeable battery. When the power supply 1508 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery charged through a wired line, and a wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery can also be used to support fast charging technology.

[0152] In some embodiments, terminal 1500 also includes one or more sensors 1509. These one or more sensors 1509 include, but are not limited to, an accelerometer 1510, a gyroscope 1511, a pressure sensor 1512, an optical sensor 1513, and a proximity sensor 1514. Accelerometer 1510 can detect the magnitude of acceleration along the three coordinate axes of a coordinate system established by terminal 1500. For example, accelerometer 1510 can be used to detect the components of gravitational acceleration along the three coordinate axes. Processor 1501 can control touchscreen display 1505 to display a user interface in either landscape or portrait orientation based on the gravitational acceleration signal collected by accelerometer 1510. Accelerometer 1510 can also be used to collect game or user motion data. Gyroscope 1511 can detect the orientation and rotation angle of terminal 1500. Gyroscope 1511 can work collaboratively with accelerometer 1510 to collect 3D user actions on terminal 1500. Based on the data collected by the gyroscope sensor 1511, the processor 1501 can implement the following functions: motion sensing (such as changing the UI based on the user's tilt operation), image stabilization during shooting, game control, and inertial navigation. The pressure sensor 1512 can be set on the side frame of the terminal 1500 and / or the lower layer of the touch screen display 1505. When the pressure sensor 1512 is set on the side frame of the terminal 1500, it can detect the user's grip signal of the terminal 1500, and the processor 1501 performs left and right hand recognition or shortcut operations based on the grip signal collected by the pressure sensor 1512. When the pressure sensor 1512 is set on the lower layer of the touch screen display 1505, the processor 1501 controls the operable controls on the UI interface based on the user's pressure operation on the touch screen display 1505. The operable controls include at least one of button controls, scroll bar controls, icon controls, and menu controls. The optical sensor 1513 is used to collect ambient light intensity. In one embodiment, processor 1501 can control the display brightness of touchscreen display 1505 based on the ambient light intensity detected by optical sensor 1513. Specifically, when the ambient light intensity is high, the display brightness of touchscreen display 1505 is increased; when the ambient light intensity is low, the display brightness of touchscreen display 1505 is decreased. In another embodiment, processor 1501 can also dynamically adjust the shooting parameters of camera assembly 1506 based on the ambient light intensity detected by optical sensor 1513. Proximity sensor 1514, also known as a distance sensor, is typically located on the front panel of terminal 1500. Proximity sensor 1514 is used to detect the distance between the user and the front of terminal 1500.In one embodiment, when the proximity sensor 1514 detects that the distance between the user and the front of the terminal 1500 is gradually decreasing, the processor 1501 controls the touch screen display 1505 to switch from the screen-on state to the screen-off state; when the proximity sensor 1514 detects that the distance between the user and the front of the terminal 1500 is gradually increasing, the processor 1501 controls the touch screen display 1505 to switch from the screen-off state to the screen-on state.

[0153] Those skilled in the art will understand that the structure shown in FIG15 does not constitute a limitation on the terminal 1500 , and may include more or fewer components than shown in the figure, or combine certain components, or adopt a different component arrangement.

[0154] A computer-readable storage medium is also provided in an embodiment of the present application. The computer-readable storage medium stores at least one program. When the at least one program is loaded and executed by a processor of a computer device, the virtual vehicle shifting method provided by the above-mentioned method embodiments is implemented.

[0155] The present application also provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the virtual vehicle shifting methods provided in the above-described method embodiments.

[0156] Those skilled in the art will understand that all or part of the steps of implementing the above embodiments may be accomplished by hardware, or may be accomplished by a program instructing the relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned readable storage medium may be a read-only memory, a disk or an optical disk, etc.

[0157] The above description is merely an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent switches, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A virtual vehicle shifting method, characterized in that: The method is performed by a computer device, and the method comprises: Displaying a virtual environment and the virtual vehicle in a driving state in the virtual environment in a user interface, wherein the virtual vehicle corresponds to at least two gears; In the process of displaying the user interface, obtaining terminal motion data collected by a motion sensor in the terminal; Determining a tapping operation on the terminal according to the terminal motion data, where the tapping operation is an operation of tapping a surface of the terminal; In response to a gear shift instruction triggered by the tapping operation, at least one of raising the gear position of the virtual vehicle and lowering the gear position of the virtual vehicle is displayed according to the gear shift instruction.

2. The method according to claim 1, characterized in that In response to the shift instruction triggered by the tapping operation, displaying at least one of raising the gear position of the virtual vehicle and lowering the gear position of the virtual vehicle according to the shift instruction includes at least one of the following: In response to a first gear shift instruction triggered by a first tapping operation, displaying a gear position for raising the virtual vehicle; In response to a second gear shift instruction triggered by a second tapping operation, displaying a lower gear position of the virtual vehicle; There is a difference between the first tapping operation and the second tapping operation in at least one of a tapping position, a tapping direction and a tapping force.

3. The method according to claim 2, characterized in that The step of displaying a gear position of the virtual vehicle in response to the first gear shift instruction triggered by the first tapping operation comprises: In response to the first tapping operation in which the tapping position is located on the first side of the back of the terminal and the tapping direction is toward the inside of the terminal, determining that the first gear shift instruction is triggered; in response to the first gear shift instruction, displaying a gear position for raising the virtual vehicle; The step of displaying a lowering of the gear position of the virtual vehicle in response to the second gear shift instruction triggered by the second tapping operation comprises: In response to the second tapping operation in which the tapping position is located on the second side of the back of the terminal and the tapping direction is toward the inside of the terminal, determining that the second gear shift instruction is triggered; in response to the second gear shift instruction, displaying a lowering of the gear position of the virtual vehicle; Among them, the back side of the terminal refers to the side of the terminal opposite to the surface where the display screen is located, the first side of the back side of the terminal refers to the side of the back side of the terminal opposite to the right side of the display screen, and the second side of the back side of the terminal refers to the side of the back side of the terminal opposite to the left side of the display screen.

4. The method according to claim 3, characterized in that: The method further comprises: Acquiring, by the motion sensor, the acceleration of the terminal generated by the tapping operation; Determine an acceleration component of the acceleration at each virtual sampling point among a plurality of virtual sampling points, wherein the direction of the acceleration component is a direction perpendicular to the back side of the terminal, and the plurality of virtual sampling points are distributed in a dot matrix form on a plane parallel to the back side of the terminal; Among the virtual sampling points located on the first side, a first virtual sampling point whose acceleration component satisfies a knocking condition is determined; among the virtual sampling points located on the second side, a second virtual sampling point whose acceleration component satisfies the knocking condition is determined; the knocking condition is used to indicate that the virtual sampling point is struck along a knocking direction, and the knocking direction is a direction perpendicularly pointing from the back of the terminal to the inside of the terminal; When the first number is greater than the second number, the tapping operation is determined to be the first tapping operation; when the first number is less than the second number, the tapping operation is determined to be the second tapping operation; the first number is the number of the first virtual sampling points, and the second number is the number of the second virtual sampling points.

5. The method according to claim 4, characterized in that Each of the virtual sampling points has a corresponding identifier, the identifiers corresponding to the virtual sampling points located on the first side have the same first feature, and the identifiers corresponding to the virtual sampling points located on the second side have the same second feature; In the virtual sampling point located at the first side, determining the first point where the acceleration component satisfies the knocking condition Virtual sampling points; Determining, among the virtual sampling points located on the second side, a second virtual sampling point where the acceleration component satisfies the knocking condition, comprises: Determine, among the plurality of virtual sampling points, a target virtual sampling point at which the acceleration component satisfies the knocking condition; When the identifier corresponding to the target virtual sampling point has the first feature, the target virtual sampling point is determined to be the first virtual sampling point; when the identifier corresponding to the target virtual sampling point has the second feature, the target virtual sampling point is determined to be the second virtual sampling point.

6. The method according to claim 4, characterized in that The method further comprises: When the absolute value of the acceleration component of the virtual sampling point is greater than a first threshold and less than a second threshold, and the direction of the acceleration component of the virtual sampling point is the tapping direction, it is determined that the virtual sampling point meets the tapping condition.

7. The method according to claim 2, characterized in that The step of displaying a gear position of the virtual vehicle in response to the first gear shift instruction triggered by the first tapping operation comprises: In response to the first gear shift instruction triggered by the first tapping operation for m consecutive times, displaying that the gear of the virtual vehicle is increased by one gear, where m is a positive integer; The step of displaying a lowering of the gear position of the virtual vehicle in response to the second gear shift instruction triggered by the second tapping operation comprises: In response to the second gear shift instruction triggered by n consecutive second tapping operations, the gear of the virtual vehicle is displayed to be reduced by one gear, where n is a positive integer.

8. The method according to any one of claims 2 to 7, characterized in that: The step of displaying a gear position of the virtual vehicle in response to the first gear shift instruction triggered by the first tapping operation comprises: In response to the first tapping operation in which the tapping position is located at the frame of the third side of the terminal and the tapping direction is toward the inside of the terminal, determining that the first gear shift instruction is triggered; in response to the first gear shift instruction, displaying a gear position for raising the virtual vehicle; The step of displaying a lowering of the gear position of the virtual vehicle in response to the second gear shift instruction triggered by the second tapping operation comprises: In response to the second tapping operation in which the tapping position is located on the frame on the fourth side of the terminal and the tapping direction is toward the inside of the terminal, it is determined that the second gear shift instruction is triggered; in response to the second gear shift instruction, a display is provided to lower the gear position of the virtual vehicle.

9. The method according to any one of claims 1 to 7, characterized in that: The method further comprises at least one of the following: In response to a first two-finger sliding operation along a first direction in the user interface, displaying a gear position for raising the virtual vehicle, wherein two sliding tracks of the first two-finger sliding operation are respectively located on two sides of the user interface; In response to a second two-finger sliding operation along a second direction in the user interface, a display is provided for lowering the gear of the virtual vehicle, and two sliding tracks of the second two-finger sliding operation are respectively located on two sides of the user interface.

10. The method according to any one of claims 1 to 7, characterized in that: The method further comprises: In at least one of the following situations, a gear shift control is displayed in the user interface: The distance between the virtual vehicle and the opponent virtual vehicle in the virtual environment is less than a first distance threshold; The distance between the virtual vehicle and the curved road section in the virtual environment is less than a second distance threshold; Wherein, the gear shift control is used to trigger at least one of lowering the gear of the virtual vehicle and raising the gear of the virtual vehicle.

11. The method according to any one of claims 1 to 7, characterized in that: The method further comprises: When the shift mode of the virtual vehicle is in the automatic shift mode, in response to a continuous tapping operation, displaying in the user interface that the shift mode of the virtual vehicle is switched to the manual shift mode, wherein the continuous tapping operation is an operation of tapping the terminal continuously x times, where x is a positive integer; The step of responding to the shift instruction triggered by the tapping operation and displaying at least one of raising the gear position of the virtual vehicle and lowering the gear position of the virtual vehicle according to the shift instruction comprises: When the shift mode of the virtual vehicle is in the manual shift mode, in response to the shift instruction triggered by the tapping operation, the gear position of the virtual vehicle is raised and the gear position of the virtual vehicle is lowered according to the shift instruction. At least one of .

12. A gear shifting device for a virtual vehicle, characterized in that: The device comprises: A display module, used for displaying a virtual environment and the virtual vehicle in a driving state in the virtual environment in a user interface, wherein the virtual vehicle corresponds to at least two gear positions; An acquisition module, used to acquire terminal motion data collected by a motion sensor in the terminal during the process of displaying the user interface; a determination module, configured to determine a tapping operation on the terminal according to the terminal motion data, wherein the tapping operation is an operation of tapping a surface of the terminal; The display module is also used to respond to a gear shift instruction triggered by the tapping operation, and display at least one of raising the gear position of the virtual vehicle and lowering the gear position of the virtual vehicle according to the gear shift instruction.

13. A computer device, characterized in that: The computer device includes a processor and a memory, wherein the memory stores at least one program, and the at least one program is loaded and executed by the processor to implement the virtual vehicle shifting method as described in any one of claims 1 to 11.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one program, and the at least one program is loaded and executed by the processor to implement the virtual vehicle shifting method as described in any one of claims 1 to 11.

15. A computer program product, characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium. The processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the virtual vehicle shifting method as described in any one of claims 1 to 11.

Citation Information

Patent Citations

  • Virtual function button display method and device

    CN112346621A

  • Vehicle control method and device, computer equipment and storage medium

    CN113715817A

  • Virtual carrier and virtual object control method and device, equipment and medium

    CN114377395A

  • Virtual vehicle control method and device and electronic equipment

    CN115738241A

  • Improved command generation in a touch-screen device

    WO2013153338A1