Data transmission methods, apparatus, equipment, storage media and software products

By using near-field communication technology between terminal devices to achieve data synchronization in offline mode, the problem of network instability affecting virtual environment interaction is solved, and the user's gaming experience in offline mode is improved.

CN122297997APending Publication Date: 2026-06-30TENCENT TECHNOLOGY (SHENZHEN) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2024-12-30
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

In existing technologies, the smoothness of user operation and the interactive effect are affected when the network is unstable in the virtual environment. This is especially true for virtual games that are highly dependent on the network, where players cannot have a good gaming experience when the network is unstable or there is no network.

Method used

Near-field communication (NFC) technology is used to establish connections between terminal devices, enabling data synchronization in offline mode. In offline mode, terminal devices receive and send virtual scene data, including information such as character status, environmental changes, and task progress, through NFC, and use AI characters to assist in the game.

Benefits of technology

In situations where the network is unstable or unavailable, data synchronization between terminal devices is achieved, improving the user's interaction with the virtual environment and the gaming experience, and ensuring the smoothness and stability of the game.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122297997A_ABST
    Figure CN122297997A_ABST
Patent Text Reader

Abstract

This application relates to a data transmission method, apparatus, device, storage medium, and program product, and pertains to the field of Internet technology. The method, executed by a first terminal device, includes: displaying a virtual scene's operating mode options, including an option corresponding to an offline mode; establishing a near-field communication connection with at least one second terminal device in response to selecting the option corresponding to the offline mode; receiving first scene data sent by at least one second terminal device through the near-field communication connection; the first scene data including scene data of the virtual scene running on the second terminal device; and controlling the virtual scene running on the first terminal device based on the first scene data. This application expands the method of data synchronization in offline mode, improving the interaction between the user and the virtual environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of Internet technology, and in particular to a data transmission method, apparatus, device, storage medium, and program product. Background Technology

[0002] With the development of internet technology, more and more virtual environments (such as virtual games) are shifting to online mode.

[0003] In related technologies, servers and clients need to frequently exchange data packets over a network to synchronize data in the virtual environment, such as the status and location of virtual characters in virtual games.

[0004] However, the virtual environment in this technology is highly dependent on the network. When the network is unstable, problems such as screen lag or even disconnection often occur, affecting the smoothness of user operation and the interaction between the user and the virtual environment. Summary of the Invention

[0005] This application provides a data transmission method, apparatus, device, storage medium, and program product, which expands the ways to synchronize data in offline states and improves the interaction between users and the virtual environment; the technical solution is as follows:

[0006] According to one aspect of this application, a data transmission method is provided, the method comprising:

[0007] Displays the virtual scene's operating mode options, including an option corresponding to offline mode;

[0008] In response to the selection operation of the option corresponding to the offline mode, a near-field communication connection is established with at least one second terminal device;

[0009] The near-field communication connection is used to receive first scene data sent by at least one second terminal device; the first scene data includes scene data of the virtual scene running on the second terminal device side;

[0010] The virtual scene controlled by the first terminal device based on the first scene data.

[0011] According to one aspect of this application, a data transmission apparatus is provided, the apparatus comprising:

[0012] The option display module is used to display the running mode options of the virtual scene, including the option corresponding to the offline mode;

[0013] A connection establishment module is used to establish a near-field communication connection with at least one second terminal device in response to a selection operation of the option corresponding to the offline mode.

[0014] A data receiving module is configured to receive first scene data sent by at least one second terminal device via the near-field communication connection; the first scene data includes scene data of the virtual scene running on the second terminal device side;

[0015] The scene control module is used to control the virtual scene running by the first terminal device based on the first scene data.

[0016] In some embodiments, the data transmission device further includes: a data transmission module, configured to transmit second scene data to the at least one second terminal device via the near-field communication connection, wherein the second scene data is used to indicate scene data of the virtual scene running on the first terminal device side.

[0017] In some embodiments, the data sending module is configured to determine a first near-field communication connection based on a first data attribute of the second scene data;

[0018] The data transmission module is used to send the second scene data to the at least one second terminal device via a first near-field communication connection.

[0019] In some embodiments, the data transmission device further includes: a resource package receiving module, configured to establish a near-field communication connection with at least one second terminal device before the virtual scene display operation mode option is selected, provided that the application corresponding to the virtual scene in the first terminal device has not been updated; receive a first resource package sent by a first designated device through the near-field communication connection; the first designated device is a terminal device among the at least one second terminal device that has completed the application update, and the first resource package contains update data of the application; and update the application based on the first resource package.

[0020] In some embodiments, the data transmission device further includes: a resource packet sending module, configured to establish a near-field communication connection with the at least one second terminal device before the running mode option for displaying the virtual scene is selected, provided that the first terminal device has completed the application update; and to send a second resource packet to the second designated device through the near-field communication connection; the second designated device is a terminal device among the at least one second terminal device that has not completed the application update, and the second resource packet contains the application update data.

[0021] In some embodiments, the resource packet sending module is configured to determine a second near-field communication connection based on a second data attribute of the second resource packet;

[0022] The resource packet sending module is used to send the second resource packet to the second designated device via the second near-field communication connection.

[0023] According to another aspect of this application, a computer device is provided, the computer device including a processor and a memory, the memory storing at least one computer instruction, the at least one computer instruction being loaded and executed by the processor to implement the data transmission method as described above.

[0024] According to another aspect of this application, a computer-readable storage medium is provided, wherein at least one computer instruction is stored therein, the at least one computer instruction being loaded and executed by a processor to implement the data transmission method as described above.

[0025] According to another aspect of this application, a computer program product is provided, the computer program product including computer instructions stored in a computer-readable storage medium, wherein a processor reads from the computer-readable storage medium and executes the computer instructions to implement the data transmission method described above.

[0026] The technical solutions provided in this application embodiment may have the following beneficial effects:

[0027] By establishing a near-field communication connection, the terminal device can receive scene data of the virtual scene sent by other terminal devices in an offline state, so that the terminal device can control the update of the scene data in the corresponding virtual scene and realize data synchronization between the terminal device and other terminal devices. This solution expands the way of data synchronization in an offline state, so that users can also realize information interaction when the network is unstable or there is no network, and improve the interaction effect between users and the virtual environment. Attached Figure Description

[0028] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0029] Figure 1 This is a schematic diagram of the implementation environment of a solution provided in an exemplary embodiment of this application;

[0030] Figure 2 This is a flowchart of a data transmission method provided in an exemplary embodiment of this application;

[0031] Figure 3This is a flowchart of a data transmission method provided in an exemplary embodiment of this application;

[0032] Figure 4 This is a schematic diagram of the main menu of a virtual scene provided in an exemplary embodiment of this application;

[0033] Figure 5 This is a flowchart of a data transmission method provided in an exemplary embodiment of this application;

[0034] Figure 6 This is a schematic diagram illustrating an exemplary embodiment of the present application of a method for implementing offline gaming via near-field communication;

[0035] Figure 7 This is a block diagram illustrating a data transmission apparatus according to an exemplary embodiment of this application;

[0036] Figure 8 This is a structural block diagram of a computer device provided in an exemplary embodiment of this application.

[0037] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. Detailed Implementation

[0038] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0039] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0040] The terminology used in this disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The singular forms “a,” “the,” and “the” as used in this disclosure and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.

[0041] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions. For example, the selection operations involved in this application were obtained under full authorization.

[0042] It should be understood that although the terms first, second, etc., may be used in this disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this disclosure, a first terminal device may also be referred to as a second terminal device, and similarly, a second terminal device may also be referred to as a first terminal device. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."

[0043] The following is a definition of some terms used in this application:

[0044] 1) Near Field Communication (NFC) technology: A short-range wireless communication technology that allows electronic devices to conduct contactless point-to-point rapid data communication and transmission when they are close to each other. The available transmission range needs to be determined based on the available transmission distance of the communication technology used. In this embodiment, the offline game logic stores all necessary data on the local device, allowing players to start and play at any time, and synchronize game information among multiple players through NFC technology, unaffected by network conditions.

[0045] 2) Virtual Scene: This refers to a virtual environment displayed (or provided) by an application running on a terminal. Through careful design in areas such as graphics, sound, interactive devices, physical simulation, artificial intelligence, scene design, multi-sensory systems, and social interaction, virtual scenes provide users with an immersive and highly interactive environment. Virtual scenes can be simulations of the real world, semi-simulated / semi-fictional 3D environments, or purely fictional 3D environments. Virtual scenes can be any of the following: 2D, 2.5D, or 3D virtual environments. Virtual scenes are typically generated by applications on computer devices such as terminals and displayed based on the hardware (e.g., the screen) on the terminal.

[0046] Please refer to Figure 1 This diagram illustrates an implementation environment provided by an exemplary embodiment of this application. The implementation environment may include: a terminal device 10 and a server 20.

[0047] Terminal device 10 can be an electronic device such as a mobile phone, tablet computer, e-book reader, multimedia playback device, PC (Personal Computer), intelligent robot, in-vehicle terminal, wearable device, AR (Augmented Reality) device, VR (Virtual Reality) device, MR (Mixed Reality) device, etc. The client of the target application can be installed on terminal device 10, and the target application can be such as a game application, social entertainment application, simulation learning application, simulation application, etc.

[0048] The target application can be an online application. For example, the client of the target application can be installed and run on different terminal devices 10 for use by different users. Taking a game application as an example, the game application can be installed and run on different terminal devices 10 in the form of a mobile game, a PC game, a webpage, or a mini-program. The target application can also be an offline application or a plug-and-play application; this embodiment of the application does not limit the specific type of application.

[0049] The game application can be any of the following: Massive Multiplayer Online Role-Playing Game (MMORPG), casual game, party game, sandbox game, tower defense game, action-adventure game, virtual card game, Multiplayer Online Battle Arena (MOBA), First-Person Shooter (FPS), multiplayer shooting survival game, Third-Person Shooter (TPS), or Simulation Game (SLG). This application embodiment does not limit the specific type of game application.

[0050] Server 20 provides background services for the client of the target application (such as a game application) in terminal device 10. For example, server 20 can be a background server for the target application (such as a game application). Server 20 can be a single server, a server cluster consisting of multiple servers, or a cloud computing service center.

[0051] Terminal device 10 and server 20 can communicate with each other via network 30. This network 30 can be a wired network or a wireless network.

[0052] Taking a game application as an example, in the data transmission method between different terminal devices involved in this application, each terminal device maintains a connection with the server via a network. When a player performs a game operation on terminal device A, the operation is encapsulated into a game instruction and sent to the server. After receiving the game instruction, the server processes the information in the game instruction according to specified rules and broadcasts the processed information to all terminal devices associated with the game instruction.

[0053] This demonstrates that gaming applications (especially multiplayer competitive games) are highly dependent on network connectivity. Players require a stable network connection to interact smoothly. Whether in online competition, cooperative missions, or social interactions, network fluctuations can impact the player experience. Network latency and connection jitter not only affect the smoothness of a particular player's game but can also disrupt the experience of other players, thus affecting the overall entertainment and competitive atmosphere of the game. In other words, gaming applications are highly dependent on the network, and as more and more games shift to online modes, this dependence means that some players cannot fully enjoy the game without a stable network connection, limiting player participation and experience.

[0054] Based on this, subsequent embodiments of this application provide a new data transmission method that can transmit in-game information such as game information, player status, and resource status between players via near-field communication, without relying on a network connection. This allows players to choose to return to the game anytime, anywhere, and enjoy a relatively stable and smooth gaming experience.

[0055] The data transmission method provided in this application embodiment can be executed by a terminal device, which refers to an electronic device with data computing, processing, and storage capabilities. Figure 1 For example, the data transmission method can be executed by terminal 10. The terminal device is a hardware device that supports near-field communication (NFC, Bluetooth, or other wireless communication technologies); and it integrates supporting components such as a software development kit (SDK) or functional libraries that support near-field communication, enabling offline game data synchronization and handling various abnormal situations; and it supports an offline game engine.

[0056] Optionally, the terminal device includes a system near-field communication (NFC) module. The NFC module is a module within the operating system (such as Android) of the terminal device that supports NFC functionality. It supports establishing NFC connections via loop broadcasting. The provider of this NFC module is the terminal device manufacturer (it can be an already implemented open-source and general-purpose solution, a point-to-point support solution for this NFC function, or a class library that integrates a similar SDK to the one mentioned above). When the NFC receiver does not have a game, i.e., when the NFC receiver does not have an SDK (the SDK is integrated into the game, so without a game, there is naturally no SDK), the NFC sender directly establishes a connection and communicates with the system NFC module.

[0057] Optionally, the aforementioned SDK component is integrated into the game application to support near-field communication (NFC) technology, focusing on the implementation of NFC functionality, application scenarios, interfaces and interactions, and technical effects, and is not limited by its name. In the embodiments of this application, the SDK component is responsible for implementing NFC functionality in both game update scenarios and offline game scenarios within the game application.

[0058] For example, such as Figure 2 As shown, taking data transmission between the first terminal device 210 and the second terminal device 220 as an example, the first terminal device 210 and the second terminal device 220 have established a near-field communication connection. Before the first terminal device 210 and the second terminal device 220 enter a game, assuming that the application in the first terminal device 210 has been updated but the application in the corresponding virtual scene in the second terminal device 220 has not been updated, the first terminal device 210 sends a resource packet to the second terminal device 220 through the near-field communication connection. The resource packet contains the application update data.

[0059] When the first terminal device 210 and the second terminal device 220 enter a game, the second terminal device 220 sends first scene data to the first terminal device 210 via a near-field communication (NFC) connection. The first scene data includes scene data of the virtual scene running on the second terminal device 220. Correspondingly, the first terminal device 210 receives the first scene data sent by the second terminal device 220 via the NFC connection. Then, based on the first scene data, the first terminal device 210 controls the virtual scene it runs. Furthermore, the first terminal device 210 sends second scene data to the second terminal device 220 via the NFC connection. The second scene data includes scene data of the virtual scene running on the first terminal device 210. Correspondingly, the second terminal device 220 receives the second scene data sent by the first terminal device 210 via the NFC connection. Then, based on the second scene data, the second terminal device 220 controls the virtual scene it runs.

[0060] Please refer to Figure 3 The diagram illustrates a flowchart of a data transmission method provided in an exemplary embodiment of this application. The method is executed by a first terminal device, which may optionally be... Figure 1 Terminal device 10 in the system shown. For example... Figure 3 As shown, the method may include steps 310, 320, 330 and 340.

[0061] Step 310: Display the virtual scene's running mode options, which include the option corresponding to offline mode.

[0062] In this embodiment of the application, when the client of the application is running on a first terminal device or a second terminal device, it can display at least one scene interface in the virtual scene.

[0063] The first terminal device displays the virtual scene's operating mode options in the scene interface. The virtual scene interface design can provide a clear and easily accessible menu item so that users can easily find and select the operating mode option. For example, such as... Figure 4 As shown, taking the virtual scene of the game as an example, the main menu of the virtual scene displays the running mode options, including "Online Game" control and "Offline Game" control. The "Online Game" control is the option corresponding to the online mode, and the "Offline Game" control is the option corresponding to the offline mode.

[0064] In both offline and online modes, the virtual environment supports single-player, two-player, and multiplayer cooperative / battle modes. In offline mode, near-field communication (NFC) interactions between multiple players can be seen as an extension of the two-player interaction, sharing the same basic mechanisms for establishing connections and transmitting information.

[0065] Optionally, one or more players in two-player or multiplayer cooperative / competitive games can be replaced with artificial intelligence (AI) characters. The AI ​​character's behavior can be simple, paradigmatic actions, such as automatically finding a fixed landmark; or, for example, activating a skill when another enemy character enters a certain range. Alternatively, the AI ​​character's behavior can be fixed, differentiated behaviors tailored to the user's specific character behavior. Or, the AI ​​character's behavior can be characteristic-differentiated behaviors that are improved based on analysis of the user's character behavior under network conditions. Regardless of which of these three types applies, the AI ​​character will have a corresponding behavior tree that controls its behavior. This behavior tree typically has an initial form and may be optimized and improved based on player behavior.

[0066] Optionally, the AI ​​character and the player can be in a cooperative or adversarial relationship to form a complete match. The AI ​​character generation logic can be pre-set in the game application of any player participating in the game. Furthermore, players can choose to delegate the control of their game character, which they would normally manually operate, to AI, and then switch back to manual control at crucial moments in the game. For example, the virtual scene can have a switch to enable / disable the use of AI to assist player character control, allowing for switching between AI and manual control.

[0067] like Figure 4 As shown, the main menu of the virtual scene also displays controls for "Single Player," "Multiplayer," "No AI Characters Required," "AI Characters Required," and "Number of AI Characters." The multiplayer mode includes two-player games. Users can choose to click the "Online Game" or "Offline Game," "Single Player" or "Multiplayer," or "No AI Characters Required" or "AI Characters Required." When the "AI Characters Required" control is selected, the number of AI characters can be set to create a complete game match.

[0068] When players choose a two-player game where one of the participants is an AI character, and the AI ​​character's generation logic resides on the same device and within the same game application as the player character, the offline game mode degenerates into a single-player human-AI match. In this case, synchronization of offline game states between devices is not required. However, in this scenario, users can still utilize Near Field Communication (NFC) technology to obtain game update resources from other devices and complete game resource updates.

[0069] Step 320: In response to the selection operation of the option corresponding to the offline mode, establish a near-field communication connection with at least one second terminal device.

[0070] The selection of the offline mode option indicates that the virtual scene is running in offline mode. In this mode, the first terminal device disconnects from the network and the server. Taking a game's virtual scene as an example, when the user selects the offline mode option, the game runs offline.

[0071] Among them, the short-range limitation inherent in near-field communication technology can reduce the risk of being attacked remotely.

[0072] Optionally, a switch for transmitting data via near-field communication (NFC) technology is provided in the virtual scene. After the first terminal device establishes a NFC connection with at least one second terminal device, the user can cancel the NFC connection with the at least one second terminal device using this switch. For example, this switch is a network-connected switch, and when the user activates the switch, the first terminal device exits the use of NFC technology for data transmission.

[0073] The aforementioned near-field communication connection can be implemented in at least one of the following ways: Wi-Fi Direct, Bluetooth Low Energy (BLE), Near Field Communication (NFC), Bluetooth Classic, and other technologies for short-range communication, which are not limited in this application. For example, the characteristics and applicability of BLE, Wi-Fi Direct, and NFC are shown in Table 1.

[0074] Table 1

[0075]

[0076] To further ensure the security of data transmission using near-field communication (NFC) technology, authentication can be performed between the first terminal device and at least one second terminal device during the establishment of a NFC connection to prevent unauthorized access. Optionally, taking a virtual game scene as an example, the first terminal device can create an offline game room and set a password, and the second terminal device can authenticate itself by entering the offline game room password.

[0077] Step 330: Receive first scene data sent by at least one second terminal device via near-field communication connection; the first scene data includes scene data of the virtual scene running on the second terminal device side.

[0078] In this embodiment, since the first terminal device has lost its network connection, it cannot receive data transmitted by the second terminal device over the network. Therefore, the second terminal device can send the first scene data to the first terminal device via a near-field communication connection.

[0079] The aforementioned first scene data refers to all digital information related to the virtual environment generated or processed on the second terminal device. For example, the aforementioned first scene data includes at least one of the following:

[0080] Character status: This includes health, mana, equipment status, etc. Changes in this information are usually instantaneous and frequent, especially during gameplay. To ensure the real-time nature of this information, a high synchronization frequency is generally used, such as 30 times per second or higher, to ensure that all players can see the latest character status and avoid gameplay issues caused by information asynchrony.

[0081] Environmental changes, such as weather effects and terrain destruction, occur relatively infrequently but can significantly impact the game when they do happen. Therefore, while they don't need to be synchronized as frequently as character status, a certain update frequency should be maintained, such as approximately 5 times per second. This ensures that environmental changes are promptly communicated to all players without consuming excessive network bandwidth.

[0082] Task progress: This includes the completion status of task objectives, timers, etc. The update frequency of this information depends on the specific task design. For countdown-type tasks, a higher synchronization frequency may be needed to ensure consistent time display; while for long-cycle tasks, the synchronization frequency can be appropriately reduced to minimize unnecessary data transmission.

[0083] Optionally, the aforementioned first scenario data may also include other scenario data, which is not limited in this application.

[0084] It should be noted that if an AI character participates in the game, the information exchange between different players' devices will also include the game status information of that AI character. That is, in a complete game, all players (whether or not they are AI characters) have the same status on any device in which the game is played (for example, if player A is level 11 in the current game, then for other players in the same game, player A is level 11, and this level status is consistent on any device in which the game is played).

[0085] Optionally, to further ensure the security of data transmission using near-field communication (NFC) technology, during the process of the second terminal device sending the first scene data to the first terminal device via NFC, the second terminal device can perform data encryption on the first scene data. Correspondingly, during the process of the first terminal device receiving the first scene data via NFC, the first terminal device can perform decryption on the first scene data to read the scene data of the virtual scene running on the second terminal device. For example, the second terminal device can use a short-term key or a dynamic key to encrypt the scene data sent each time.

[0086] Optionally, to further ensure the security of data transmission using near-field communication technology, the second terminal device can minimize data transmission to limit the amount of data transmitted, transmitting only necessary information and reducing the risk of sensitive data exposure. At the same time, the data in the first scenario can be anonymized before transmission to avoid leakage of personal information.

[0087] Step 340: Based on the first scene data, control the virtual scene running on the first terminal device.

[0088] In this embodiment of the application, the first terminal device applies the acquired first scene data to the currently running virtual scene.

[0089] When a first terminal device receives first scene data sent by at least two second terminal devices, the first terminal device can update the virtual scene running on the first terminal device according to the priority of each first scene data, in descending order of priority. For example, the aforementioned priority can be pre-set based on the device identifier of each second terminal device, or it can be set based on the timestamp carried in the first scene data.

[0090] Optionally, after the first terminal device controls the virtual scene it runs based on the first scene data, the scene interface of the first terminal device can display the current resource status synchronization information. For example, the first terminal device can display a prompt message in the current scene interface, such as "Status synchronized at xxx time", or the prompt message can be a prompt about the near-field communication connection status of the second terminal device, including normal connection, unstable connection, abnormal connection, etc.

[0091] In summary, the solution presented in this application, through the establishment of a near-field communication connection, enables the terminal device to receive scene data of a virtual scene sent by other terminal devices in an offline state. This allows the terminal device to control the update of scene data in the corresponding virtual scene, thereby achieving data synchronization between the terminal device and other terminal devices. This solution expands the method of data synchronization in an offline state, enabling users to interact with information even when the network is unstable or non-existent, thus improving the interaction effect between the user and the virtual environment.

[0092] Based on the above Figure 3 In one possible implementation of the scheme shown in the embodiment, the data transmission method further includes step 350.

[0093] Step 350: Send second scene data to at least one second terminal device via near-field communication connection. The second scene data is used to indicate the scene data of the virtual scene running on the first terminal device side.

[0094] In this embodiment, since the first terminal device has lost its network connection, it cannot transmit data to the second terminal device via the network. Therefore, the first terminal device can send second scene data to the second terminal device via a near-field communication connection.

[0095] The aforementioned second scenario data refers to all digital information related to the virtual environment generated or processed by the first terminal device in offline mode. For example, the aforementioned second scenario data includes at least one of the following: character status, environmental changes, and task progress; it may also include other scenario data, which this application does not limit.

[0096] Optionally, to further ensure the security of data transmission using near-field communication (NFC) technology, during the process of the first terminal device sending the second scene data to the second terminal device via NFC, the first terminal device can perform data encryption on the second scene data. Correspondingly, during the process of the second terminal device receiving the second scene data via NFC, the second terminal device can perform decryption on the second scene data to read the scene data of the virtual scene running on the second terminal device side. For example, the first terminal device can use a short-term key or a dynamic key to encrypt the scene data sent each time.

[0097] Optionally, to further ensure the security of data transmission using near-field communication technology, the first terminal device can minimize data processing to limit the amount of data transmitted, transmitting only necessary information and reducing the risk of sensitive data exposure; at the same time, the second scenario data can be anonymized before transmission to avoid leakage of personal information.

[0098] In this embodiment, the first terminal device sends the scene data of the virtual scene running on the first terminal device to the second terminal device through a near-field communication connection, so that the second terminal device can synchronously run the scene data of the virtual scene running on the first terminal device. That is, in the case of unstable network or no network, the terminal device can send the data running on its own side to other terminal devices through a near-field communication connection, thereby improving the interaction effect between the user and the virtual environment.

[0099] Based on the solutions shown in the above embodiments of this application, in one possible implementation, step 350 can be implemented as follows:

[0100] Based on the first data attribute of the second scene data, determine the first near-field communication connection;

[0101] Send second scene data to at least one second terminal device through a first near-field communication connection.

[0102] For example, the aforementioned first near-field communication connection may be at least one of Wi-Fi Direct, Bluetooth Low Energy (BLE), and Near Field Communication (NFC), or other short-range communication technologies, which are not limited in this application.

[0103] Optionally, the computer device may create a database table or file structure to pre-store the correspondence between the first data attributes of the second scene data and the first near-field communication connection, so as to query the first near-field communication connection from the above correspondence based on the first data attributes of the second scene data.

[0104] The aforementioned first data attribute refers to the data attribute of the second scenario data. For example, the first data attribute includes at least one of the following: data type, update frequency, and stability requirements.

[0105] The above data types include at least one of the following:

[0106] Real-time interactive data refers to the data stream that must be processed quickly to achieve immediate response to user actions, such as player action commands. Accordingly, when the data type of the second scene data is real-time interactive data, the first terminal device can send the second scene data to at least one second terminal device using Bluetooth Low Energy (BLE). Bluetooth Low Energy (BLE) features low latency and ensures the immediate transmission of the second scene data.

[0107] State synchronization data refers to consistent data between a first terminal device and at least one second terminal device, such as game progress or score. Accordingly, when the data type of the second scene data is state synchronization data, the first terminal device can send the second scene data to at least one second terminal device via Wi-Fi Direct. Wi-Fi Direct offers a high transmission rate, which helps to quickly synchronize large amounts of state information.

[0108] Text messages refer to data exchanged between virtual characters within a virtual environment. Accordingly, when the data type of the second scene is text messages, the first terminal device can send the second scene data to at least one second terminal device via NFC or Bluetooth Classic. NFC is convenient and fast, suitable for brief exchanges; Bluetooth Classic is more universal.

[0109] The above update frequencies include:

[0110] A high update frequency is achieved, such as several updates per second, within the first frequency range. Correspondingly, when the update frequency of the second scene data is high, the first terminal device can send the second scene data to at least one second terminal device via BLE. BLE is suitable for higher frequency data transmission, has low power consumption, and supports fast connection and data exchange.

[0111] A medium update frequency is required to meet the second frequency range: for example, several updates per minute. Accordingly, when the update frequency of the second scenario data is medium, the first terminal device can send the second scenario data to at least one second terminal device via Wi-Fi Direct or Bluetooth Classic. Bluetooth Classic provides a stable connection and moderate transmission speed, while Wi-Fi Direct is suitable for transmitting larger amounts of data and offers relatively flexible connectivity.

[0112] A low update frequency that meets the third frequency range is provided, such as several updates per hour. Correspondingly, when the update frequency of the second scenario data is medium, the first terminal device can send the second scenario data to at least one second terminal device via NFC or low-power Wi-Fi (such as 802.11ah). NFC is suitable for occasional data exchange, while low-power Wi-Fi is more efficient for data synchronization over long time intervals.

[0113] The above stability requirements include:

[0114] The system meets the extremely high stability requirements of the first stability range. Correspondingly, when the stability requirements for the second scenario data are extremely high, the first terminal device can send the second scenario data to at least one second terminal device via Wi-Fi Direct.

[0115] The general stability requirements of the second stability range are met. Accordingly, when the stability requirement for the second scenario data is extremely high, the first terminal device can send the second scenario data to at least one second terminal device via Bluetooth Classic or BLE.

[0116] This application embodiment illustrates the diversity of data transmission between various terminal devices via near-field communication connections. The first terminal device can select the corresponding near-field communication connection based on the data attributes of the second scenario data, such as data type, update frequency, and stability requirements, to establish a good communication path with the second terminal device and ensure the effective transmission of the second scenario data.

[0117] Based on the solutions shown in the above embodiments of this application, in one possible implementation, before step 310, the data transmission method further includes steps 301, 302 and 303.

[0118] Step 301: If the application corresponding to the virtual scene in the first terminal device is not updated, establish a near-field communication connection with at least one second terminal device.

[0119] The statement that the application corresponding to the virtual scene in the first terminal device is not updated means that the version of the application corresponding to the virtual scene in the first terminal device is not the latest version. Accordingly, in order to interact with at least one second terminal device, the first terminal device needs to update the application to the latest version.

[0120] Step 302: Receive a first resource packet sent by a first designated device via a near-field communication connection; the first designated device is a terminal device in at least one second terminal device that has completed the application update, and the first resource packet contains the application update data.

[0121] The first resource package mentioned above is a set of files and instructions for implementing application updates. The application update data refers to the content that changes in the new version of the application compared to the old version. For example, the application update data includes at least one of the following: code logic, resource files (such as images, audio, video, etc.), configuration information, database structure and content, and may also include other data, which this application does not limit.

[0122] For example, a first terminal device can send a first instruction to at least one second terminal device to obtain a version number via a near-field communication (NFC) connection. Upon receiving the first instruction, the first second terminal device can send information carrying the version number to the first terminal device via the NFC connection. Upon receiving the information carrying the version number from the at least one second terminal device, the first terminal device parses the information to obtain the version number of the application for the virtual scene corresponding to the at least one second terminal device. The second terminal device corresponding to the latest version number is the aforementioned first designated device. Subsequently, the first terminal device can send a second instruction to the first designated device via the NFC connection to obtain a resource package containing updated application data. Upon receiving the second instruction, the first designated device sends the aforementioned first resource package to the first terminal device via the NFC connection.

[0123] Optionally, the first designated device may encrypt the first resource packet, and correspondingly, the first terminal device may decrypt the encrypted first resource packet to obtain the application's update data. For example, the first designated device may use a short-term key or a dynamic key to encrypt the scene data sent each time.

[0124] Step 303: Update the application based on the first resource package.

[0125] After receiving the first resource packet sent by the first designated device, the first terminal device can update the application corresponding to the first terminal device according to the application update data contained in the first resource packet.

[0126] Optionally, after completing the application update, the first terminal device can clear the cached data left by the old version to save memory space on the first terminal device.

[0127] In this embodiment, if the application corresponding to the virtual scene in the first terminal device has not been updated, the second terminal device, which has completed the application update, can send the application update data to the first terminal device through a near-field communication connection. Accordingly, the first terminal device receives the application update data so that the first terminal device can update the application. That is to say, in the case of unstable network or no network, multiple terminal devices can realize the synchronous update of their respective applications through a near-field communication connection.

[0128] In one possible implementation, if the application corresponding to the virtual scene is not installed on the third terminal device, the third terminal device can receive a third resource package sent by the first designated device through a near-field communication connection. The first resource package contains the installation data of the application, so that the terminal device without the application corresponding to the virtual scene installed can also synchronize data with the first terminal device and at least one second terminal device in an offline state.

[0129] Based on the solutions shown in the above embodiments of this application, in one possible implementation, before step 310, the data transmission method further includes steps 304 and 305.

[0130] Step 304: If the first terminal device has completed the application update, establish a near-field communication connection with at least one second terminal device.

[0131] The statement that the first terminal device has completed the application update means that the application version corresponding to the virtual scene on the first terminal device is the latest version. In order to interact with at least one second terminal device, the application version corresponding to the virtual scene on at least one second terminal device should also be the latest version.

[0132] Step 305: Send a second resource packet to a second designated device via a near-field communication connection; the second designated device is a terminal device in at least one second terminal device that has not completed the application update, and the second resource packet contains the application update data.

[0133] The second resource package mentioned above is a set of files and instructions for implementing application updates.

[0134] For example, a first terminal device can send a third instruction to at least one second terminal device to obtain a version number via a near-field communication (NFC) connection. Upon receiving the third instruction, the first terminal device can send information carrying the version number to the first terminal device via the NFC connection. Upon receiving the information carrying the version number from the first terminal device, the first terminal device parses the information to obtain the version number of the application corresponding to the virtual scene of the first terminal device. The second terminal device whose version number does not match the version number of the application on the first terminal device is designated as the second specified device. Afterward, the first terminal device can send the second resource package to the second specified device via the NFC connection.

[0135] Optionally, the first terminal device may encrypt the second resource packet, and correspondingly, the second designated device may decrypt the encrypted second resource packet to obtain the application's update data. For example, the first terminal device may use a short-term key or a dynamic key to encrypt the scene data sent each time.

[0136] Upon receiving a second resource packet from the first terminal device, the second designated device may update the application based on the second resource packet. Optionally, after completing the application update, the second designated device may clear cached data left by the old version to save memory space on the second designated device.

[0137] In this embodiment of the application, if the application corresponding to the virtual scene in a certain second terminal device has not been updated, the first terminal device that has completed the application update can send the application update data to the second terminal device through a near-field communication connection; accordingly, the second terminal device receives the application update data so that the second terminal device can update the application. That is to say, in the case of unstable network or no network, multiple terminal devices can realize the synchronous update of their respective applications through a near-field communication connection.

[0138] Based on the solutions shown in the above embodiments of this application, in one possible implementation, step 305 can be achieved as follows:

[0139] The second near-field communication connection is determined based on the second data attribute of the second resource package.

[0140] The second resource packet is sent to the second designated device via the second near-field communication connection.

[0141] For example, the aforementioned second near-field communication connection may be at least one of Wi-Fi Direct, Bluetooth Low Energy (BLE), and Near Field Communication (NFC), or other short-range communication technologies, which are not limited in this application.

[0142] Optionally, the computer device may create a database table or file structure to pre-store the correspondence between the second data attributes of the second resource package and the second near-field communication connection, so as to query the second near-field communication connection from the above correspondence based on the second data attributes of the second resource package.

[0143] The aforementioned second data attribute refers to the data attributes of the second resource package. For example, the second data attribute includes at least one of the following: data size, update frequency, and stability requirements.

[0144] The above data size includes:

[0145] The system caters to large and medium-sized resources in the first category, such as high-quality game textures, 3D models, and animations; and medium-sized resources such as audio files and script files. Correspondingly, when the data size of the second scene data is large or medium-sized, the first terminal device can send a second resource packet to the second designated device via Bluetooth Low Energy (BLE) combined with Wi-Fi P2P. BLE enables rapid pairing and initial data exchange, followed by Wi-Fi P2P for transferring larger files. BLE consumes very little power when the device is in standby mode and can quickly discover nearby devices, facilitating the establishment of an initial connection; Wi-Fi P2P supports higher data transfer rates and a wider effective transmission range. Therefore, the combination of the two provides an efficient, flexible, and energy-saving data transmission solution that balances speed and convenience.

[0146] This satisfies the requirement for small resources, such as small configuration files. Accordingly, when the data size of the second scenario data is a small resource, the first terminal device can send a second resource packet to the second designated device via NFC or BLE. NFC and BLE are widely compatible, offer fast connections, and their short-range characteristics ensure data transmission security, making them suitable for the rapid transfer of small files.

[0147] The above update frequencies include:

[0148] The update frequency meets the requirements of the fourth frequency range. Accordingly, when the update frequency of the second scenario data is a frequent update frequency, the first terminal device can send the second resource packet to the second designated device via Wi-Fi Direct. Wi-Fi Direct provides a continuous and stable connection, suitable for real-time update requirements.

[0149] The update frequency meets the fifth frequency range. Accordingly, when the update frequency of the second scenario data is an occasional update frequency, the first terminal device can send a second resource packet to the second designated device via BLE. BLE can effectively save power when high bandwidth is not required.

[0150] The above stability requirements include:

[0151] The system meets the high stability requirements of the third stability range. Accordingly, given the high stability requirements for the second scenario data, the first terminal device can send the second resource packet to the second designated device via Wi-Fi Direct. Wi-Fi Direct offers good anti-interference capabilities and high transmission reliability.

[0152] It meets the medium stability requirements of the fourth stability range. Accordingly, given that the stability requirements for the second scenario data are medium, the first terminal device can send the second resource packet to the second designated device via Bluetooth Classic. Bluetooth Classic is mature and stable, and can be widely used between various terminal devices.

[0153] The system meets the low stability requirements of the fifth stability range. Accordingly, when the stability requirements for the second scenario data are low, the first terminal device can send a second resource packet to the second designated device via NFC. NFC can be used for short-range instantaneous communication.

[0154] This application embodiment illustrates the diversity of data transmission between various terminal devices via near-field communication connections. The first terminal device can select one of Wi-Fi Direct, BLE, or NFC as the first near-field communication connection based on the specific data size, update frequency, and stability requirements of the second resource packet, and establish a good communication path with the second designated device to ensure the effective transmission of the second resource packet.

[0155] Based on the solutions shown in the above embodiments of this application, please refer to Figure 5 The diagram illustrates a data transmission method flowchart provided in an exemplary embodiment of this application. Figure 5 As shown, the data transmission method includes the following steps:

[0156] Step 501: Determine whether the application corresponding to the virtual scene in the first terminal device has been updated.

[0157] If the application corresponding to the virtual scene in the first terminal device has been updated, proceed with steps 502 and 503; otherwise, proceed with steps 504 and 505.

[0158] Step 502: Determine the second near-field communication connection based on the second data attribute of the second resource packet.

[0159] The second resource package contains updated application data.

[0160] The second data attribute includes at least one of the following:

[0161] Data size, update frequency, and stability requirements.

[0162] The second near-field communication connection is at least one of Wi-Fi Direct, Bluetooth Low Energy (BLE), and Near Field Communication (NFC).

[0163] Step 503: Send the second resource packet to the second designated device via the second near-field communication connection.

[0164] The second designated device is a terminal device in at least one second terminal device that has not completed the application update.

[0165] Step 504: Receive the first resource packet sent by the first designated device via near-field communication connection.

[0166] The first designated device is a terminal device in at least one second terminal device that has completed the application update, and the first resource package contains the application update data.

[0167] Step 505: Update the application based on the first resource package.

[0168] Step 506: Display the virtual scene's running mode options, which include the option corresponding to offline mode.

[0169] Step 507: In response to the selection operation of the option corresponding to the offline mode, establish a near-field communication connection with at least one second terminal device.

[0170] Step 508: Receive first scene data sent by at least one second terminal device via near-field communication connection.

[0171] Step 509: Based on the first scene data, control the virtual scene running on the first terminal device.

[0172] Step 510: Determine the first near-field communication connection based on the first data attribute of the second scene data.

[0173] The second scene data is used to indicate the scene data of the virtual scene running on the first terminal device side.

[0174] The first data attribute includes at least one of the following:

[0175] Data type, update frequency, and stability requirements.

[0176] Step 511: Send second scene data to at least one second terminal device via the first near-field communication connection.

[0177] The first near-field communication connection is at least one of Wi-Fi Direct, Bluetooth Low Energy (BLE), and Near Field Communication (NFC).

[0178] The execution methods of steps 501 to 511 are the same as those of the above embodiments of this application, and will not be repeated here.

[0179] Any one or more of the above embodiments can be applied to a solution for offline gaming via near-field communication (NFC). This solution can replace network connection with NFC for synchronizing in-game data (which may be game status data, game match data, etc.), enabling real-time synchronization of game match information between players, thereby achieving offline gaming in a network-free environment.

[0180] In other words, this solution allows two players to play games without using a network, either between players or between a player and an AI character (the other player can be a pure AI or an AI with human intervention; the AI ​​character's logic can be generated in a game application on the same device as the player or on a different device; the AI ​​character can be one or more depending on the game type), so that even if a player does not update the game and has no network, they can still team up with friends to play together.

[0181] On the one hand, different users can transfer game installation packages and update resources to each other through near-field communication; on the other hand, during offline game matches, different users can transfer in-game information (such as items, coins, levels, experience, etc.) to each other.

[0182] Offline gaming refers to a game where one or more players can still use the offline portion of the game's logic without an internet connection. They can communicate via near-field communication (NFC) to synchronize their game status (including, but not limited to, player levels and resource status) and complete an offline game without network access.

[0183] Specifically, for offline games, the application scenarios of this solution include:

[0184] One application is in game updates. Utilizing near-field communication (NFC) technology, a sender user who has already downloaded the latest version of the game can quickly share and transmit the game program package or resource package to a nearby receiver user's device that has not downloaded or updated the game to the latest version. The receiver user no longer needs to download the latest version of the game through an app store or through in-game updates, nor does it require sufficient network conditions (Wi-Fi or mobile data) or wait a long time. Instead, they receive the game resources from the sender user via the fast transfer method described in this application. After merging and activating the old and new resources, they can obtain the latest version of the game client on their own terminal device.

[0185] Secondly, it's applied to offline gaming, ensuring real-time synchronization of game states among players in the same match. It replaces the network, maintaining synchronization of game states between players, such as the status of game items, in-game currency, and experience points. The rapid transmission capabilities of Near Field Communication (NFC) ensure that all players make decisions under the same game state, avoiding unfair advantages due to latency and reducing the confusion caused by desynchronization. Many game mechanics (such as collision detection and resource sharing) require real-time synchronization to maintain the accuracy of game logic. Player interactions (such as cooperation or competition) require real-time feedback; maintaining state synchronization enhances the social experience and is fundamental to achieving a fair and smooth multiplayer gaming experience.

[0186] Please refer to Figure 6 It illustrates a schematic diagram of an exemplary embodiment of this application providing a method for implementing offline games via near-field communication, such as... Figure 6 As shown, the method includes the following steps:

[0187] S1, Initialize connection:

[0188] For players' devices to play a game together, a near-field communication connection needs to be established first (in a broad sense, a connection that indicates that several players are in the same room through data information exchange, such as transmitting the same room number ID in the messages of a common information transmission protocol between several players). For example, the connection between multiple players can be established through the device discovery, device selection, and device connection process in the offline game module of the game application.

[0189] S2 defines the game state data that needs to be synchronized:

[0190] This includes information such as the player's location on the game map, player score, and item ownership / usage status. The initialization data is synchronized to all players in the room using a near-field communication protocol. All players parse this initialization data and initialize their game state (assuming that if a player's device simultaneously displays the behavior logic of both their controlled character and an AI character, then that player's device can be considered as having two players; synchronizing the player character's state requires synchronizing both players' states, and synchronizing the states of multiple AI characters requires synchronizing the states of all AI characters and the player's controlled character). Once all players have completed initialization and are confirmed ready, a game state synchronization test will be conducted between players to identify any issues such as connection instability during this synchronization process.

[0191] The status of each piece of information in the game's head-up display (HUD) is synchronized separately, and different information synchronization frequencies are used according to the type of game information.

[0192] To ensure the accuracy and stability of offline games, this solution can resolve data synchronization inconsistencies between multiple players in the following ways:

[0193] 1) Employing a strong consistency protocol ensures that all players' data states are consistent. Players in the same offline game room are viewed as different nodes in a distributed system. Strong consistency means that at any given time, any read operation on a data item will return the latest write result. This small distributed system then possesses real-time consistency (once a node updates data, all other nodes will see this update in subsequent read operations), a global view (all users can obtain the same data view at any time, regardless of which node they request), and operation ordering (when handling concurrent operations, the system ensures that all operations are executed in a certain order, resulting in consistent and predictable results).

[0194] Optionally, some game resource information that does not affect gameplay can be allowed to maintain eventual consistency. That is, a player's game metric data may be inconsistent for a short period of time, but will synchronize after a brief delay and eventually reach consistency.

[0195] 2) Use timestamps (or version numbers and other identifiers) to mark data updates and compare them with the current system time to ensure that players receive the latest data.

[0196] 3) When the current player's key data is updated, broadcast the current player's current status to ensure that all players can see the current player's status in a timely manner.

[0197] 4) Design reasonable conflict resolution strategies, such as priority mechanisms or voting mechanisms, to handle data conflicts between different players. For example, in team battles, there may be many state changes involved, but near-field communication transmission resources are limited. In this case, key game state can be transmitted to ensure the smoothness of the game and the accuracy of the data. Another example is that when a conflict occurs, the system can require relevant players to vote on whether a certain action is accepted. Different decision-making strategies can be used here (such as majority decision: if a majority of players agree on a certain action, that action will be executed, and other actions will be ignored).

[0198] 5) Regularly verify the game status of multiple players to ensure data consistency across all players, and automatically correct any inconsistencies. "Consistency" means, for example, that player A's level and experience points are identical across all players' devices. It does not mean that the game information stored on each device for the same offline game match is identical, as such information is not always the same.

[0199] 6) Incremental Update. Only data that changes during the game is transmitted. Game state data that has not changed is not broadcast or synchronized, reducing data transmission volume and improving the efficiency of synchronizing game state among multiple players.

[0200] 7) Employ an event source mechanism. Record all player actions as events, and rebuild the data state through these events when problems occur (during the reconstruction process, specific conflict resolution strategies can be applied, such as: the last write wins - the latest write operation overwrites the previous value, timestamp sorting, etc.).

[0201] 8) Employ a locking mechanism. Lock important data to prevent multiple players from modifying it simultaneously and reduce conflicts.

[0202] S3, Synchronize game status data:

[0203] During the offline game phase, all devices maintain a certain degree of independent game logic locally. Players can play the game on their respective devices. When players interact (the state will still be synchronized even without interaction, but the synchronization frequency for some in-game information may be relatively low), efficient in-game information synchronization is performed with players in the offline room. This process can be achieved using the basic storage capacity of the mobile terminal device (different mobile terminal devices may use different local storage implementations).

[0204] In different scenarios where near-field communication (NFC) technology is used to transmit resources, such as transmitting game resource packages of different sizes and types during game updates, or transmitting different types of game information and resources during offline gameplay, different NFC technologies can be used depending on the data being transmitted (data type, data size, data update frequency, data transmission stability requirements, etc.). Provided that other resources such as the central processing unit (CPU) are sufficient, if the hardware components used for the NFC transmission technology are not entirely the same, appropriate scheduling and management strategies can be adopted to avoid conflicts (such as avoiding interference within the same frequency band), perform parallel transmission, or utilize this characteristic for optimization.

[0205] S4, Data Saving:

[0206] When the offline game ends, all players in the offline room will synchronize the final game state again through near-field communication. The final game result is also saved in the local storage of the game device (it may be uploaded to the cloud and deleted from local storage to optimize local storage space after connecting to a Wi-Fi network). After that, the connection may be disconnected or kept open depending on the situation.

[0207] It should be noted that the above-mentioned solution for offline gaming via near-field communication is applicable not only to the interaction of game application information between player devices, but also to the information exchange and communication generated when one user device uses other user devices. As long as the application integrates supporting components such as SDKs or functional libraries that support near-field communication, it can be applied in the analogous scenario.

[0208] In summary, the above-described offline gaming solution using near-field communication (NFC) offers high flexibility. Players can not only obtain game installation packages and resource updates without a network connection, but also play games offline. This solution is suitable for various environments with no network or unstable network conditions (such as areas with weak network signals on long-distance trains), providing a smoother gaming experience in such scenarios and saving users data usage in Wi-Fi-free environments.

[0209] Compared to online games, offline gaming experiences enabled by near-field communication (NFC) are more stable and do not require Wi-Fi or mobile data. This makes them suitable for offline gaming teams in leisure and entertainment venues (such as cafes), small-scale competitive gaming events, scenarios with poor network signals on long-distance trains, and airplane mode scenarios.

[0210] Please refer to Figure 7 The diagram illustrates a block diagram of a data transmission apparatus according to an exemplary embodiment of this application, which can be used to perform, for example... Figure 3In the method shown, all or part of the steps performed by the computer device are as follows: Figure 7 As shown, the device includes:

[0211] The option display module 701 is used to display the running mode options of the virtual scene, including the option corresponding to the offline mode;

[0212] The connection establishment module 702 is used to establish a near-field communication connection with at least one second terminal device in response to the selection operation of the option corresponding to the offline mode.

[0213] The data receiving module 703 is used to receive first scene data sent by at least one second terminal device via a near-field communication connection; the first scene data includes scene data of a virtual scene running on the second terminal device side;

[0214] The scene control module 704 is used to control the virtual scene running by the first terminal device based on the first scene data.

[0215] In some embodiments, the data transmission apparatus further includes: a data transmission module, configured to transmit second scene data to at least one second terminal device via a near-field communication connection, the second scene data being used to indicate scene data of a virtual scene running on the first terminal device side.

[0216] In some embodiments, the data sending module is used to determine a first near-field communication connection based on a first data attribute of the second scene data;

[0217] The data transmission module is used to send second scene data to at least one second terminal device via a first near-field communication connection.

[0218] In some embodiments, the data transmission apparatus further includes: a resource package receiving module, configured to establish a near-field communication connection with at least one second terminal device before displaying the running mode option of the virtual scene, provided that the application corresponding to the virtual scene in the first terminal device has not been updated; receive a first resource package sent by a first designated device through the near-field communication connection; the first designated device is a terminal device in at least one second terminal device that has completed the application update, and the first resource package contains the application update data; and update the application based on the first resource package.

[0219] In some embodiments, the data transmission apparatus further includes: a resource packet sending module, configured to establish a near-field communication connection with at least one second terminal device before displaying the running mode option of the virtual scene, provided that the first terminal device has completed the application update; and send a second resource packet to a second designated device via the near-field communication connection; the second designated device is a terminal device among the at least one second terminal device that has not completed the application update, and the second resource packet contains the application update data.

[0220] In some embodiments, the resource packet sending module is configured to determine a second near-field communication connection based on a second data attribute of the second resource packet;

[0221] The resource packet sending module is used to send a second resource packet to a second designated device via a second near-field communication connection.

[0222] It should be noted that the device provided in the above embodiments is only illustrated by the division of the above functional modules when implementing its functions. In actual applications, the above functions can be assigned to different functional modules according to actual needs, that is, the content structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0223] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments of the relevant method; the technical effects achieved by each module performing its operation are the same as the technical effects in the embodiments of the relevant method, and will not be elaborated here.

[0224] Please refer to Figure 8 This illustrates a structural block diagram of a computer device according to an exemplary embodiment of this application. Figure 8 As shown, the computer device 800 can be a portable mobile terminal, such as a smartphone, tablet, MP3 player (Moving Picture Experts Group Audio Layer III), or MP4 player (Moving Picture Experts Group Audio Layer IV). The computer device 800 may also be referred to as a user device, portable terminal, or other names.

[0225] Typically, computer device 800 includes a processor 801 and a memory 802.

[0226] The processor 801 may include one or more processing cores, such as a 4-core processor or an 8-core processor.

[0227] The memory 802 may include one or more computer-readable storage media, which may be tangible and non-transitory. The memory 802 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 802 are used to store at least one instruction, which is executed by the processor 801 to implement the virtual character state control method provided in the embodiments of this application.

[0228] In some embodiments, the computer device 800 may also optionally include: a peripheral device interface 803 and at least one peripheral device. Specifically, the peripheral device includes at least one of: a radio frequency circuit 804, a touch display screen 805, a camera assembly 806, an audio circuit 807, and a power supply 808.

[0229] In some embodiments, the computer device 800 further includes one or more sensors 809. The one or more sensors 809 include, but are not limited to, an accelerometer 810, a gyroscope 811, a pressure sensor 812, an optical sensor 813, and a proximity sensor 814.

[0230] Those skilled in the art will understand that the structure shown above does not constitute a limitation on the computer device 800, and may include more or fewer components than shown, or combine certain components, or employ different component arrangements.

[0231] In an exemplary embodiment, a chip is also provided, the chip including programmable logic circuits and program instructions, which, when the chip is run on a computer device, are used to implement the data transmission method described above.

[0232] In an exemplary embodiment, a computer program product is also 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 to implement the data transmission method provided in the above-described method embodiments.

[0233] In an exemplary embodiment, a computer-readable storage medium is also provided, which stores computer instructions that are loaded and executed by a processor to implement the data transmission methods provided in the above-described method embodiments.

[0234] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0235] Those skilled in the art will recognize that the functions described in the embodiments of this application in one or more of the above examples can be implemented using hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any medium that facilitates the transfer of a computer program from one place to another. Storage media can be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0236] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A data transmission method, characterized in that, The method is executed by a first terminal device, and the method further includes: Displays the virtual scene's operating mode options, including an option for offline mode; In response to the selection operation of the option corresponding to the offline mode, a near-field communication connection is established with at least one second terminal device; The near-field communication connection is used to receive first scene data sent by at least one second terminal device; the first scene data includes scene data of the virtual scene running on the second terminal device side; The virtual scene controlled by the first terminal device based on the first scene data.

2. The method according to claim 1, characterized in that, The method further includes: The second scene data is sent to the at least one second terminal device via the near-field communication connection. The second scene data is used to indicate the scene data of the virtual scene running on the first terminal device side.

3. The method according to claim 2, characterized in that, Sending second scene data to the at least one second terminal device via the near-field communication connection includes: Based on the first data attribute of the second scenario data, a first near-field communication connection is determined; The second scene data is sent to the at least one second terminal device via the first near-field communication connection.

4. The method according to any one of claims 1 to 3, characterized in that, Before displaying the running mode options for the virtual scene, the method further includes: If the application corresponding to the virtual scene in the first terminal device is not updated, the near-field communication connection is established with the at least one second terminal device. The system receives a first resource packet sent by a first designated device via the near-field communication connection; the first designated device is a terminal device among the at least one second terminal device that has completed the update of the application, and the first resource packet contains the update data of the application; Update the application based on the first resource package.

5. The method according to any one of claims 1 to 4, characterized in that, Before displaying the running mode options for the virtual scene, the method further includes: If the first terminal device has completed the application update, the near-field communication connection is established with the at least one second terminal device. The second resource packet is sent to the second designated device via the near-field communication connection; the second designated device is a terminal device among the at least one second terminal device that has not completed the update of the application, and the second resource packet contains the update data of the application.

6. The method according to claim 5, characterized in that, Sending the second resource packet to the second designated device via the near-field communication connection includes: The second near-field communication connection is determined based on the second data attribute of the second resource package; The second resource packet is sent to the second designated device via the second near-field communication connection.

7. A data transmission device, characterized in that, The device includes: The option display module is used to display the running mode options of the virtual scene, including the option corresponding to the offline mode; A connection establishment module is used to establish a near-field communication connection with at least one second terminal device in response to a selection operation of the option corresponding to the offline mode. A data receiving module is configured to receive first scene data sent by at least one second terminal device via the near-field communication connection; the first scene data includes scene data of the virtual scene running on the second terminal device side; The scene control module is used to control the virtual scene running by the first terminal device based on the first scene data.

8. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing at least one computer instruction, which is loaded and executed by the processor to implement the data transmission method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one computer instruction, which is loaded and executed by a processor to implement the data transmission method as described in any one of claims 1 to 6.

10. A computer program product, characterized in that, The computer program product includes computer instructions stored in a computer-readable storage medium; the computer instructions are read and executed by a processor of a computer device to implement the data transmission method as described in any one of claims 1 to 6.