WO2023207941A1 - Procédé et appareil de transmission de données, et dispositif électronique, support de stockage et produit programme - Google Patents

Procédé et appareil de transmission de données, et dispositif électronique, support de stockage et produit programme Download PDF

Info

Publication number
WO2023207941A1
WO2023207941A1 PCT/CN2023/090483 CN2023090483W WO2023207941A1 WO 2023207941 A1 WO2023207941 A1 WO 2023207941A1 CN 2023090483 W CN2023090483 W CN 2023090483W WO 2023207941 A1 WO2023207941 A1 WO 2023207941A1
Authority
WO
WIPO (PCT)
Prior art keywords
peripheral device
peripheral
data
game
communication
Prior art date
Application number
PCT/CN2023/090483
Other languages
English (en)
Chinese (zh)
Inventor
唐玺
魏雪
李�瑞
潘博渊
Original Assignee
腾讯科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Publication of WO2023207941A1 publication Critical patent/WO2023207941A1/fr

Links

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/20Input arrangements for video game devices
    • A63F13/23Input arrangements for video game devices for interfacing with the game device, e.g. specific interfaces between game controller and console
    • GPHYSICS
    • G08SIGNALLING
    • G08CTRANSMISSION SYSTEMS FOR MEASURED VALUES, CONTROL OR SIMILAR SIGNALS
    • G08C17/00Arrangements for transmitting signals characterised by the use of a wireless electrical link
    • G08C17/02Arrangements for transmitting signals characterised by the use of a wireless electrical link using a radio link
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/26Special purpose or proprietary protocols or architectures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W80/00Wireless network protocols or protocol adaptations to wireless operation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2212/00Encapsulation of packets

Definitions

  • the present application relates to the field of computer technology, specifically to the field of data transmission, and in particular to a data transmission method, a data transmission device, an electronic device, a computer-readable storage medium and a program product.
  • a peripheral device directly operated by an operating object is a peripheral device installed on a terminal and used to send data (such as game data) to control game applications running in the terminal.
  • data such as game data
  • hardware equipment Currently, data transmission between peripheral devices and game applications is forwarded through the terminal's operating system (such as Android and other operating systems).
  • the related method of forwarding data through the operating system has limitations. For example, if a new hardware structure is added to the peripheral device, and the data related to the hardware structure cannot be recognized or supported by the operating system, the operating system cannot correctly forward the data to the game application, resulting in the new hardware structure in the peripheral device. The functionality of the hardware structure cannot be utilized. It can be seen that relying on the operating system to forward data between peripheral devices and game applications will cause data transmission failures, which will also limit the gameplay of the game, limit the development of peripheral devices and game applications, and reduce the user experience of the operating objects. gaming experience.
  • Embodiments of the present application provide a data transmission method, device, electronic device, storage medium and program product, which can realize direct communication between peripheral devices and game applications, so that the data transmitted between game applications and peripheral devices is no longer required.
  • Limited by the operating system in the terminal that is, the data does not need to be forwarded by the management module of the operating system), which allows richer data to be sent between game applications and peripheral devices, and improves the efficiency and convenience of data transmission. sex.
  • embodiments of the present application provide a data transmission method, which includes:
  • the peripheral communication protocol When interactive data needs to be transmitted between the game application in the terminal and the peripheral device, the peripheral communication protocol is obtained; the terminal sends and receives data through the internal communication driver.
  • the peripheral communication protocol is in accordance with the data transmission specification of the communication driver and is for all The communication between the game application and the peripheral device is customized;
  • Interaction data is transmitted between the game application and the peripheral device using the peripheral communication protocol and through the communication driver.
  • a data transmission device which includes:
  • the acquisition unit is used to obtain the peripheral communication protocol when interactive data needs to be transmitted between the game application in the terminal and the peripheral device; the terminal sends and receives data through the internal communication driver, and the peripheral communication protocol is based on the data of the communication driver. Transmission specification, customized for communication between the game application and the peripheral device;
  • a processing unit used to transmit interactive data between the game application and the peripheral device using the peripheral communication protocol and through the communication driver.
  • an electronic device which includes:
  • a processor adapted to execute a computer program
  • a computer-readable storage medium stores a computer program.
  • the computer program is loaded by the processor and executes the following steps:
  • the peripheral communication protocol When interactive data needs to be transmitted between the game application in the terminal and the peripheral device, the peripheral communication protocol is obtained; the terminal sends and receives data through the internal communication driver.
  • the peripheral communication protocol is in accordance with the data transmission specification of the communication driver and is for all The communication between the game application and the peripheral device is customized;
  • Interaction data is transmitted between the game application and the peripheral device using the peripheral communication protocol and through the communication driver.
  • embodiments of the present application provide a computer-readable storage medium that stores a computer program.
  • the computer program is suitable for being loaded by a processor and executing the following steps:
  • the peripheral communication protocol When interactive data needs to be transmitted between the game application in the terminal and the peripheral device, the peripheral communication protocol is obtained; the terminal uses the internal communication The communication driver sends and receives data, and the peripheral communication protocol is customized for the communication between the game application and the peripheral device according to the data transmission specification of the communication driver;
  • Interaction data is transmitted between the game application and the peripheral device using the peripheral communication protocol and through the communication driver.
  • inventions of the present application provide a computer program product.
  • the computer program product includes computer instructions.
  • the computer instructions are loaded by a processor and execute the following steps:
  • the peripheral communication protocol When interactive data needs to be transmitted between the game application in the terminal and the peripheral device, the peripheral communication protocol is obtained; the terminal sends and receives data through the internal communication driver.
  • the peripheral communication protocol is in accordance with the data transmission specification of the communication driver and is for all The communication between the game application and the peripheral device is customized;
  • Interaction data is transmitted between the game application and the peripheral device using the peripheral communication protocol and through the communication driver.
  • Figure 1a shows a schematic structural diagram of a data transmission system provided by an exemplary embodiment of the present application
  • Figure 1b shows a schematic data flow diagram of a cloud game provided by an exemplary embodiment of the present application
  • Figure 1c shows a schematic structural diagram of a data transmission system provided by an exemplary embodiment of the present application
  • Figure 1d shows a schematic diagram of establishing a connection between a peripheral device and a terminal provided by an exemplary embodiment of the present application
  • Figure 1e shows a schematic diagram of an existing data transmission provided by an exemplary embodiment of the present application
  • Figure 1f shows a schematic diagram of data transmission when a game provided by an exemplary embodiment of the present application is a cloud game
  • Figure 1g shows a schematic diagram of data transmission when a game provided by an exemplary embodiment of the present application is a local game
  • Figure 2a shows a schematic flow chart of a data transmission solution provided by an exemplary embodiment of the present application
  • Figure 2b shows a schematic software structure diagram of a peripheral device supporting a peripheral communication protocol provided by an exemplary embodiment of the present application
  • Figure 3 shows a schematic diagram of downlink transmission and uplink transmission between a peripheral device and a game application provided by an exemplary embodiment of the present application
  • Figure 4 shows a schematic flowchart of a data transmission method provided by an exemplary embodiment of the present application
  • Figure 5a shows a schematic diagram of a game application querying device information of a peripheral device according to an exemplary embodiment of the present application
  • Figure 5b shows a schematic diagram of a game application querying device information of a peripheral device according to an exemplary embodiment of the present application
  • Figure 6a shows a schematic diagram of a game application controlling a peripheral device to perform game feedback provided by an exemplary embodiment of the present application
  • Figure 6b shows a schematic diagram of a peripheral device performing a vibration operation provided by an exemplary embodiment of the present application
  • Figure 6c shows a schematic diagram of a peripheral device performing a vibration operation provided by an exemplary embodiment of the present application
  • Figure 7a shows a schematic diagram of a mode switching command directly transmitted between a game application and a peripheral device provided by an exemplary embodiment of the present application
  • Figure 7b shows a schematic diagram of forwarding a mode switching command via an operating system provided by an exemplary embodiment of the present application
  • Figure 8 shows a schematic diagram of a peripheral device sending an input signal input by an operating object to a game application provided by an exemplary embodiment of the present application
  • Figure 9 shows a schematic diagram of a peripheral device actively initiating a power warning signal provided by an exemplary embodiment of the present application.
  • Figure 10 shows a schematic structural diagram of a data transmission device provided by an exemplary embodiment of the present application.
  • Figure 11 shows a schematic structural diagram of an electronic device provided by an exemplary embodiment of the present application.
  • a data transmission system which at least includes peripheral equipment and a terminal; the data transmission system can be seen in Figure 1a.
  • the embodiments of the present application do not limit the number of peripheral devices and terminals; for example, in a game scenario in which multiple people participate in the game, one terminal can be connected to two or more peripheral devices to achieve the goal of using multiple peripheral devices.
  • the various electronic devices involved in the data transmission system are described below, among which:
  • the terminal may refer to: any terminal running a game application; the game application may include: a client (or web application or applet, etc.) that provides games.
  • the terminal has certain data processing capabilities and screen display capabilities.
  • the terminal may include two or more devices.
  • the terminal may include a data processing device with a data processing function and a display device with a screen display function; in this implementation, a data processing device and a display device are required.
  • Game applications are run together, and the data processing device and the display device can be connected through wired or wireless connections, so that data generated by the data processing device (such as game screens) can be transmitted to the display device for display.
  • the data processing device is a host with data processing capabilities
  • the display device is a monitor with image display capabilities.
  • the terminal can also be an all-in-one machine, in which case the terminal has both data processing capabilities and screen display capabilities; in this implementation, the terminal not only supports data processing of game data related to game applications, but also supports game processing through the display screen.
  • the screen is displayed.
  • terminals may include but are not limited to: smartphones (such as Android phones, iOS phones, etc.), tablet computers, portable personal computers, Mobile Internet Devices (MID), smart TVs, vehicle-mounted devices, head-mounted devices, etc.
  • games provided by game applications running in the terminal can be classified according to different conditions. According to different operating conditions of the game, games can be divided into local games and online games; the so-called local games refer to games that run locally on the terminal and do not require a network; the so-called online games refer to games that rely on the network to load game data in order to run. game. Or, according to the different running modes of the game, games can be divided into: client games, web games and cloud gaming (Cloud gaming), etc.; client games can be referred to as end games, which refer to games played on a personal computer (PC). running game. Web games can be called web games or web games. They are games that are run on the game web page provided by the browser.
  • Cloud gaming also known as gaming on demand, refers to games running in cloud servers (or cloud servers).
  • game applications can send data (such as input instructions or signals) sent by peripheral devices to the cloud server, and the cloud game server is responsible for rendering the game screen based on the data and rendering the rendered game. After the screen is compressed, it is transmitted to the terminal used by the operation object through the network. At this time, the terminal only performs the operation of displaying the game screen, as shown in Figure 1b.
  • This operating mode of cloud games means that the terminal held by the player does not need to have powerful graphics computing and data processing capabilities, but only needs to have basic streaming media playback capabilities (such as the ability to display game screens), human-computer interaction capabilities (obtaining The ability to input operations on the operating object), and data transmission capabilities (such as the ability to send instructions to the cloud server) are sufficient.
  • the embodiments of the present application do not limit the specific types of games running in the terminal, which are specifically explained here.
  • the data processing system provided by the embodiment of the present application further includes at least one server, as shown in Figure 1c.
  • the server may refer to a background server corresponding to the game application running in the terminal, which is used to interact with the terminal running the game application to provide computing and application service support for the game application.
  • Servers may include, but are not limited to: data processing servers, Web servers, application servers, and other devices with complex computing capabilities; alternatively, servers may be independent physical servers, or server clusters or distributed servers composed of multiple physical servers. system.
  • games can include cloud games.
  • the above-mentioned server can also provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud Cloud servers for basic cloud computing services such as communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.
  • cloud services such as communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.
  • Peripheral devices can be called input devices, external devices, game control devices or game control devices, etc., which refer to hardware that is external to the terminal and directly operated by the operating object to control the game application running in the terminal. equipment.
  • Peripheral devices may include, but are not limited to: handheld gamepads (or gamepads for short), wearable game consoles, mice or keyboards; for ease of explanation, the following description will take a handheld gamepad as an example of a peripheral device.
  • the peripheral device and the terminal are independent hardware devices, a communication connection can be established between the peripheral device and the terminal, so that the operating object can control the game application running in the terminal by operating the peripheral device. Controls of the games provided.
  • the peripheral device can be configured with a receiver, and the receiver is connected to the physical interface (or hardware interface) provided by the terminal to establish communication between the peripheral device and the terminal through the physical interface. connect.
  • FIG 1d An exemplary schematic diagram of establishing a communication connection between a peripheral device and a terminal through a receiver and a physical interface can be seen in Figure 1d.
  • the terminal 101 includes at least one physical interface 1011, and a receiver configured by the peripheral device 102 can be inserted into the physical interface 1011 provided by the terminal 101 to establish a communication connection between the peripheral device and the terminal.
  • the receiver 102 and the peripheral device 103 shown in Figure 1d are connected wirelessly.
  • wireless communication modules can be deployed in the peripheral device 103 and the receiver 102 to facilitate wireless communication.
  • the wireless communication module (such as Bluetooth module, wifi module or radio frequency signal module, etc.) performs data transmission between the peripheral device 103 and the receiver 102.
  • the peripheral device 103 can transmit its own information (such as device model or device model) through the wireless communication module. manufacturer and other information) is sent to the receiver 102.
  • the receiver 102 and the peripheral device 103 can also be connected by wire.
  • the receiver 102 can be configured with a data transmission line, through which the peripheral device and the game application can be established. connect.
  • the peripheral device can send data to the receiver so that the terminal can scan the device information of the peripheral device from the receiver, and then the peripheral device can Implement data transmission between devices and terminals.
  • the physical interface provided by the terminal may include a USB (Universal Serial Bus, Universal Serial Bus) interface.
  • the peripheral device inserted into the USB interface may be called a USB device.
  • the USB interface refers to the interface set up in the terminal that complies with the USB standard or specification; the USB standard is an external bus standard (or called a serial bus standard) and a technical specification for an input and output interface (or called a communication interface). Used to standardize the connection and communication between terminals (such as personal computers) and peripheral devices (such as game controllers).
  • a USB interface is deployed in the terminal, if you want the peripheral device (or USB device) inserted into the USB interface to work normally, you need to install a USB driver (or USB driver for short) inside the terminal. , so that the peripheral device plugged into the USB interface can be identified in the terminal through the USB driver, and data can be sent and received through the USB driver, such as obtaining the data sent by the USB device, to achieve the desired effect of the USB device.
  • the terminal can send and receive data through the internal communication driver.
  • the so-called sending and receiving data refers to receiving data and sending data.
  • the USB driver can scan the interactive data (such as any data) sent by the peripheral device from the receiver. Specifically, it scans the peripheral device and encapsulates the interactive data. encapsulated data, and then perform corresponding feedback processing based on the interactive data obtained by decapsulating the encapsulated data. If the interactive data includes a target signal for adjusting the sound volume, then the terminal or terminal can be increased accordingly based on the target signal. Game application volume.
  • the above-mentioned encapsulation data is specifically obtained by encapsulating the interactive data according to the communication protocol.
  • the communication protocol is written in accordance with the HID (Human interface device, human-computer interaction interface) specification that the USB driver follows.
  • HID Human interface device, human-computer interaction interface
  • the USB driver scans any encapsulated data, it can use the HID specification it follows to scan any encapsulated data.
  • the data format of the packaged data is detected. Only when the data format of any packaged data is detected to meet the HID specification, the packaged data is determined to be cached, so as to filter the scanned data that does not meet the HID specification. .
  • the HID specification is a human-computer interaction specification (or standard).
  • the human-computer interaction specification can be simply understood as a computer language that defines the data format during data transmission.
  • the HID specification in the USB driver is unified and universal, that is to say, there is no difference in the HID specification followed by the USB driver deployed on different terminals; this allows the communication protocol written in accordance with the HID specification to be used by most devices. supported, thereby improving the applicability of the communication protocol to a certain extent.
  • the operating object can use the peripheral device to control the game running in the terminal.
  • the operating object can use the peripheral device to control the game.
  • the gameplay is called a large-screen game; that is, a large-screen game refers to a game that uses a separate terminal to display the game screen or game scene, and uses peripheral devices external to the terminal to control the game displayed on the terminal. Gameplay. It can be seen that in a large-screen game scenario, the terminal used to display the game screen and the peripheral device used to control the game are separated.
  • This kind of gameplay that uses peripheral devices to control the game can avoid the occlusion of the game screen when the operating object controls the display screen, help the operating object better participate in the game, and provide the operating object with a more immersive gaming experience.
  • embodiments of this application propose a data transmission scheme based on the data transmission system described above; the data transmission scheme supports Customize a set of peripheral communication protocols (also known as private protocols, customized communication protocols, HID protocols) between game applications and peripheral devices, specifically in accordance with the communication driver inside the terminal (such as the USB driver mentioned above) Following the data transmission specification (such as the HID specification mentioned above), a set of peripheral communication protocols customized according to business needs between the game application and the peripheral device; then, the peripheral device and the game application follow the peripheral communication protocol communication protocol and communicate directly through the communication driver in the terminal.
  • peripheral communication protocols also known as private protocols, customized communication protocols, HID protocols
  • the data transmission scheme provided by the embodiment of the present application has obvious advantages when transmitting data between peripheral devices and game applications.
  • the data transmission scheme provided by the embodiment of the present application is compared with the existing mainstream peripheral devices. Taking the data transmission process between the device and the game application as an example, the advantages of the embodiments of the present application are explained:
  • the default communication protocol is The developer of the operating system in the terminal writes it according to business needs, which makes the peripheral device rely on the management module (or input) of the operating system in the terminal when the peripheral device and the game application transmit data according to the default communication protocol.
  • Management module to forward data (such as the encapsulated data generated by the aforementioned peripheral devices) to the game application.
  • the management module is configured to send the received data to the game application and the receiver in the peripheral device after receiving the data from the sender in the game application and the peripheral device.
  • the operating system in the terminal receives the data sent by the peripheral device through the communication driver running in the terminal.
  • the operating system forwards the data obtained from the communication driver to the game application to facilitate the game.
  • the application performs feedback processing based on data forwarded from the operating system.
  • data transmission between peripheral devices and game applications must be forwarded by the operating system.
  • many game inputs that are not supported by the operating system cannot be forwarded by the operating system, making the game control of peripheral devices and game applications difficult.
  • the ability has high limitations. For example, these limitations can be reflected in the following two exemplary points: 1.
  • the management module in the operating system used to forward the communication data does not apply. Supporting the forwarding of this data to game applications results in the functionality of the new hardware structure being unusable, thus limiting the development of peripheral devices. 2.
  • peripheral communication protocol is customized for the communication between the game application and the peripheral device according to the data transmission specification of the communication driver, so that the data transmission between the peripheral device and the game application is independent of the operating system , is not restricted by the operating system, and can eliminate the operating system restrictions described above.
  • the data transmission process between peripheral devices and game applications in the cloud gaming scenario can be seen in Figure 1f.
  • Another example is the data transmission process between peripheral devices and game applications in the client game scenario.
  • the game application can directly scan the data sent by the peripheral device from the communication driver. , without being restricted by the operating system in the terminal.
  • the data transmission solution provided by the embodiment of the present application has the following main advantages: 1.
  • peripheral manufacturers and game application developers can expand the peripheral communication protocol , specifically, the relevant protocols about the new hardware structure are added to the peripheral communication protocol, so that according to the expanded peripheral communication protocol, the related functions of the new hardware structure in the peripheral device can be realized, thereby enriching the game play. Prompt game control ability.
  • the input characteristics or feedback characteristics (such as vibration characteristics) of the peripheral device can be fully reflected in the game through the peripheral communication protocol, so that the original hardware structure of the peripheral device can be fully reflected in the game. Functions are fully utilized. 3.
  • peripheral communication protocol is customized according to the HID specification in the communication driver, and the HID specification in the communication driver is unified on each terminal, this allows the peripheral communication protocol provided by the embodiment of this application to With cross-terminal unification, both developers of cloud game applications and peripheral manufacturers producing peripheral devices can develop only once based on this peripheral communication protocol, and the developed game applications or peripheral devices can be used across terminals.
  • a peripheral device using the peripheral communication protocol can be connected to a computer to achieve direct communication with a game application running on the computer according to the peripheral communication protocol; for another example, a peripheral device using the peripheral communication protocol It can also be connected to the TV to implement live communication with the game application running on the TV according to the peripheral communication protocol.
  • this application also supports packaging the ability to use peripheral communication protocols into a software development kit (SDK) for developers to access the peripheral communication protocol when developing reference games (such as any game) cross-terminal SDK; in this way, the reference game connected to the SDK can interact with the corresponding peripheral devices through the peripheral communication protocol without being restricted by the operating system.
  • SDK refers to a collection of development tools for building application software for a specific software package, software framework, hardware platform, operating system, etc.
  • the SDK includes an application programming interface (Application Programming Interface, API).
  • API Application Programming Interface
  • the so-called API refers to some predefined functions for data communication. APIs are used to connect different components of the system.
  • the SDK includes a protocol interface. After the reference game developed by the developer is started, it can access a set of routines in the game application (such as peripheral communication protocol) through the protocol interface provided by the game application containing the game, and There is no need to access the source code or understand the details of the inner workings.
  • the game application containing the reference game integrates the software development kit corresponding to the protocol interface of the game application containing the game, when the game containing the reference game
  • the protocol interface of the game application containing the game is called, so that the game application containing the reference game can call the peripheral communication protocol for data transmission through the protocol interface.
  • the process of direct data transmission between a peripheral device and a game application in accordance with the peripheral communication protocol may involve the following stages:
  • the receiver configured by the peripheral device can be inserted into the physical interface provided by the terminal.
  • the peripheral device can The interface declaration of one or more communication interfaces is sent to the receiver, so that the communication driver in the terminal can scan the interface declaration of each communication interface of the peripheral device from the receiver; where the communication driver can be a timer The receiver is scanned for data (such as interface declarations).
  • the interface declaration of the communication interface can be simply understood as the declaration of a set of methods supported by the communication interface; for example, if a protocol identifier is added to the interface declaration of the communication interface, then the interface declaration can be used to determine that the communication interface supports the The communication protocol corresponding to the protocol identifier performs data transmission.
  • the game application can scan the interface statement of one or more communication interfaces of the peripheral device from the communication driver in the terminal. If the game application obtains the interface statement from the communication driver, If the specified protocol identifier is scanned, the communication protocol identified by the specified protocol identifier is determined to be the peripheral communication protocol, that is, the game application confirms that the peripheral device connected to it is a peripheral device that supports the peripheral communication protocol.
  • the software input communication module of the peripheral device that supports the peripheral communication protocol needs to be implemented according to the structure shown in Figure 2b; as shown in Figure 2b, the peripheral device includes a customized communication interface customized based on the peripheral communication protocol.
  • the software input communication module includes a customized communication interface customized based on the peripheral communication protocol, such as a customized HID USB interface (UsbInterface); that is to say, the software input communication module of the peripheral device includes a customized communication interface, and the customized The communication interface supports data transmission according to the peripheral communication protocol.
  • the customized communication interface at least includes a customized input endpoint and a customized output endpoint.
  • the endpoint can be understood as a data buffer that can be used to temporarily save data; the input or output of the endpoint is determined from the data flow direction when the game application sends and receives data.
  • the data flow direction of the custom input endpoint is the data flow direction when the game application receives data; in this case, the data flows from the peripheral device to the game application, that is: the peripheral device can send data to the custom input endpoint in the custom interface.
  • the communication driver can then obtain the cached data from the custom input endpoint, and the game application scans the cached data from the communication driver to realize data flow from the peripheral device to the game application.
  • the data flow direction of the customized output endpoint is the data flow direction when the game application sends data; in this case, the data flows from the game application to the peripheral device, that is: the game application can send data to the driver application, and then the driver application
  • the program sends the data to the customized output endpoint in the customized interface for caching, and then the peripheral device obtains the cached data from the customized output endpoint to realize the data flow from the game application process to the peripheral device.
  • the embodiment of the present application supports the coexistence of the peripheral communication protocol and the original default communication protocol in the software, that is, the peripheral device includes a customized peripheral communication protocol.
  • the original default communication protocol still needs to be retained; therefore, in addition to the customized communication interface, the software input communication module of the peripheral device also includes a default communication interface based on the original default communication protocol, such as the mode USB interface .
  • the peripheral device includes customized input endpoints and customized output endpoints, it still needs to retain the original default input and output endpoints to retain the original peripheral data transmission method, so that in game applications that support peripheral communication protocols In the scenario where it is not running, it can ensure that the peripheral device can still interact with the operating system according to the originally designed default communication protocol, and in the scenario where the game application that supports the peripheral communication protocol is running, the peripheral communication protocol can be started based on customization Input endpoints and customized output endpoints perform data transmission, and the original input and output endpoints are paused.
  • Game application initialization phase Before the operating object controls the game provided by the game application by controlling the peripheral device, the embodiment of the present application also needs to initialize the game application.
  • the initialization process here may include: the game application obtains the device information of the peripheral device. process. Specifically, after the game application determines that the peripheral device is a device that supports the peripheral communication protocol, the game application can query the device information of the peripheral device so that it can subsequently detect the validity of the input and output instructions based on the device information.
  • the game application can generate an information query request according to the peripheral communication protocol, and use the information query request as interactive data; then, encapsulate the interactive data according to the peripheral communication protocol; and process the encapsulation through the communication driver to obtain
  • the encapsulated data is sent to the customized input interface, so that the peripheral device can respond to the information query request, use the peripheral communication protocol to encapsulate the device information, and report the encapsulated feedback results to the game application through the communication driver, so as to facilitate Game applications can obtain external Device information of the device.
  • the device information of the peripheral device may include but is not limited to: characteristic information, capability information and detailed information.
  • the characteristic information is used to indicate at least one device capability of the peripheral device. If the peripheral device includes a gyroscope, then the peripheral device has the device capability of uploading gyroscope data. Capability information is used to indicate that the peripheral device has the information of the device required for each device capability. If the peripheral device has the device capability of uploading gyroscope data, then the peripheral device includes a gyroscope that can generate gyroscope data. This The time capability information includes device information of the gyroscope. Detailed information is used to indicate the device details of the peripheral device, such as the device manufacturer or device model of the peripheral device, etc. After the game application obtains the detailed information of the peripheral device, it can better evaluate the quality of the game product based on the detailed information. and quality control, thereby improving the gaming experience of the operating objects.
  • the initialization process may include: changing the working mode of the peripheral device (also known as Communication mode) switches to the customized communication mode, where the customized communication mode refers to the mode that uses other communication protocols of the peripheral device; at this time, the peripheral device suspends the use of the default communication protocol for data transmission, and starts the customized peripheral communication mode for data transmission.
  • the working mode of the peripheral device also known as Communication mode
  • the customized communication mode refers to the mode that uses other communication protocols of the peripheral device
  • the peripheral device suspends the use of the default communication protocol for data transmission, and starts the customized peripheral communication mode for data transmission.
  • the operating system in the terminal supports the peripheral device and the game application to transmit any data by using the peripheral communication protocol, so that in the subsequent process of the operating object controlling the game provided by the game application based on the peripheral device , the peripheral device can send interactive data generated based on the target operation of the operation object to the game application according to the peripheral communication protocol, providing richer game control capabilities.
  • the target operation refers to any operation input by the operation object.
  • the game application determines that the peripheral device is a hardware device that supports the peripheral communication protocol, the game application can send a mode switching command to the peripheral device.
  • the mode switching command is used to instruct the working mode of the peripheral device to switch to a customized communication mode; Then the peripheral device can switch from the current communication mode to the customized communication mode in response to the mode switching command.
  • the current communication mode refers to the communication mode in which the peripheral device is in when it receives the mode switching command; in the case where the peripheral device includes a default communication mode and a customized communication mode, the current communication mode here may refer to the default communication mode.
  • the peripheral device uses the default communication protocol to interact with the game application; the relevant description of the default communication protocol can be found in the foregoing description and will not be described again here.
  • the game application can determine that the peripheral device is a hardware device that supports the peripheral communication protocol, and the game application can obtain the device information of the peripheral device; and, the peripheral device has Switch the working mode to the customized communication mode. From then on, the operating object can use the general input capabilities of the peripheral device (such as the capabilities included in the original communication protocol, such as the ability to operate the remote control stick in the peripheral device), as well as the special input included in the peripheral communication protocol. capabilities (such as the ability of peripheral devices to vibrate) to control games provided by game applications.
  • the general input capabilities of the peripheral device such as the capabilities included in the original communication protocol, such as the ability to operate the remote control stick in the peripheral device
  • capabilities such as the ability of peripheral devices to vibrate
  • the operation object can perform the operation of operating the peripheral device to control the game provided by the game application;
  • data transmission between the peripheral device and the game application can be carried out according to the peripheral communication protocol.
  • the peripheral device sends data or power warning information generated according to the target operation of the operating object to the game application according to the peripheral communication protocol.
  • a game application can enable peripheral devices to perform corresponding game feedback operations (such as vibration operations).
  • the game application can send a mode switching command to the peripheral device.
  • the mode switching command is used to instruct the peripheral device to switch back to the original communication mode from the customized communication mode. communication mode, so that the peripheral device stops using the peripheral communication protocol for data transmission and starts the original default communication mode for data transmission.
  • steps (1)-(5) provide a relatively complete technical process of the data transmission solution provided by the embodiment of the present application; however, in actual application scenarios, the implementation methods included in some steps may also change.
  • the game application is also supported to send a heartbeat command to the peripheral device to ensure that the peripheral device continues to maintain the customized communication mode after switching to the customized communication mode.
  • the embodiments of the present application are applied to specific products or technologies, such as when a game application obtains the game data of the operation object, it needs to obtain the permission or consent of the operation object; and the collection, use and processing of relevant data require Comply with relevant laws, regulations and standards of relevant countries and regions.
  • game equipment provided by game applications needs to comply with relevant laws, regulations and standards of relevant countries and regions.
  • the embodiment of the present application supports summarizing the relatively complete data transmission process described above into uplink transmission (or simply referred to as uplink) and downlink transmission (or simply referred to as downlink), as shown in Figure 3 .
  • the uplink and downlink in the data transmission process are determined by the data flow direction of the game application during data transmission; for example, the data transmission process from the game application to the peripheral device can be called downlink transmission. At this time, it can be The instructions sent by the game application to the peripheral device are called downlink transmission instructions; for another example, the data flows from the peripheral device The data transmission process to the game application can be called uplink transmission. At this time, the instructions that can be sent from the peripheral device to the game application are called uplink transmission instructions.
  • the following is a brief overview of the functions carried by peripheral devices in downlink transmission and the functions carried by peripheral devices in uplink transmission; among them:
  • the software and hardware control of the peripheral device by the game application may include: controlling the communication mode switching of the peripheral device, and controlling the peripheral device to perform game feedback (such as vibration control).
  • the game application can control the communication mode of the peripheral device to switch between the original communication mode (such as the default communication mode mentioned above) and the customized communication mode.
  • the game application finds the specified protocol identifier in the interface declaration of the peripheral device and determines that the peripheral device is a hardware device that supports the peripheral communication protocol, then the game application can send a downlink transmission command to the peripheral device.
  • the downlink The transmission command includes a mode switching command to control the communication mode of the peripheral device to switch to a customized communication mode, specifically switching from the default communication mode to the customized communication mode.
  • the game application when the game application detects that the operating object ends the game experience, such as when the game application detects that the operating object performs the game closing operation, the game application can send a downlink transmission instruction to the peripheral device.
  • the downlink transmission instruction includes mode switching back. command to control the working mode of the peripheral device to switch from the customized communication mode back to the original communication mode. Specifically, it can switch from the customized communication mode back to the default communication mode.
  • the game application can control peripheral devices to perform game feedback.
  • the game application can send a downlink transmission instruction to the peripheral device.
  • the downlink transmission instruction includes a peripheral control instruction, specifically a vibration instruction, to Cause the peripheral device to perform a vibration operation in response to the vibration instruction.
  • the game screen provided by the game can be used to describe the game scenes provided by the game.
  • the game scenes can include competition scenes, team formation scenes or settlement scenes, etc.; competition scenes can refer to: the operating object controls the game character in the game and actually participates in it.
  • the game scene; the team scene may refer to the scene where the operating object is waiting to enter the game room (such as a competition scene) in the game lobby.
  • the operating object is supported to edit the attributes of the game character, such as updating the clothing of the game character.
  • the settlement scene may refer to: the scene used to display the game results (such as points) after the game is over.
  • the vibration object in the game screen can refer to: any virtual object that needs to vibrate displayed in the game screen according to the requirements of the game scene.
  • the virtual object can be a game character or a virtual object (such as a boat, tree or car, etc.);
  • the game scene includes a scene where the operating object controls the game character to drive a vehicle.
  • the vehicle and the game character need to vibrate.
  • the vehicle and the game character can be used as part of the game scene.
  • the vibration object to be vibrated The embodiments of the present application do not limit the game scenes provided by the game and the vibration objects in the game scenes.
  • the information inquiry initiated by the game application may include but is not limited to: information inquiry about the device information of the peripheral device, and information inquiry about the device power of the peripheral device.
  • information inquiry about the device information of the peripheral device For the content included in the device information of the peripheral device, please refer to the relevant description of the content shown above, and will not be described again here.
  • the game application determines that the peripheral device is a hardware device that supports the peripheral communication protocol, it can send an information query request to the customized output endpoint so that the peripheral device can respond to the information query request and return device information; wherein, the game application obtains the external device information.
  • the specific implementation process of the device information of the device please refer to the related description of the specific implementation process shown in Figure 2a, and will not be described again here.
  • the game application can generate a power query request at regular intervals (such as every preset time period), so that the peripheral device responds to the power query request and transmits the device power (such as the peripheral device receiving the power query request).
  • the device power at the time of request) is returned to the game application, so that the game application updates and displays the power of the peripheral device on the terminal screen each time it obtains the device power of the peripheral device.
  • the preset time period can be customized by the game developer according to business needs; when the preset time period is very short, the device power of the peripheral device can be displayed in real time on the terminal screen of the game application to a certain extent. It is helpful for the operating object to intuitively and timely understand the power status of the peripheral device.
  • the manufacturer of the peripheral device needs to customize the peripheral communication protocol for the peripheral device.
  • the peripheral device receives encapsulated data from the customized endpoint (such as a customized output endpoint) in the customized communication interface, and decapsulates the encapsulated data (or parses it) according to the peripheral communication protocol. Processing, referred to as parsing), to obtain the downlink transmission instructions initiated by the game application, such as the aforementioned mode switching command or power query command; then, feedback processing is performed based on the parsing results (that is, the corresponding instructions obtained by parsing).
  • the feedback processing performed by the peripheral device is different; for example, if the peripheral device parses the encapsulated data and obtains a mode switching instruction, the feedback processing performed by the peripheral device includes: responding to the The mode switching command switches the communication mode to the customized communication mode; for another example, the peripheral device parses the encapsulated data to obtain the peripheral control command, Then the feedback processing performed by the peripheral device includes: responding to the peripheral control instruction to perform a vibration operation; for another example, the peripheral device parses the package data to obtain an information query request, then the feedback processing performed by the peripheral device includes: responding to the information query Requests that device information be returned to the game app; etc.
  • the peripheral device includes the original default communication protocol and the customized peripheral communication protocol; when the peripheral device is in the customized communication mode, the peripheral device communicates with the game application according to the peripheral communication protocol. Transmission, when the peripheral device is in the original default communication mode, the peripheral device follows the default communication protocol and forwards it through the operating system to achieve data transmission with the game application. Therefore, in order to ensure that when the game application exits (such as closing or running in the background), the peripheral device can still transmit data with the operating system according to the original communication protocol to retain the original functions of the peripheral device, the embodiment of this application supports the use of Heartbeat mechanism to adjust the communication mode of peripheral devices.
  • the peripheral device if the peripheral device receives the heartbeat command sent by the game application, the peripheral device maintains working in the customized communication mode.
  • the heartbeat command is obtained by the game application encapsulating the heartbeat packet according to the customized communication protocol; the heartbeat packet refers to a default string, which is used to notify the recipient that it is currently in a valid state, so that the recipient can be effectively connected to itself.
  • the heartbeat packet is used to keep the peripheral device in a customized working mode.
  • the peripheral device and the game application can communicate according to the peripheral communication protocol.
  • the manufacturer of the peripheral device needs to implement the following software logic when customizing the customized communication interface based on the peripheral communication protocol for the peripheral device:
  • the peripheral device starts from The heartbeat command is received from the customized endpoint (such as the customized output endpoint) in the customized communication interface, and the heartbeat command is parsed according to the peripheral communication protocol to obtain the heartbeat packet and maintain the customized communication mode; if the peripheral device does not receive the heartbeat command from the customized communication interface If a heartbeat command is received from a customized endpoint (such as a customized output endpoint), the customized communication mode will be switched back to the original communication mode so that the peripheral device can still transmit data with the operating system.
  • a customized endpoint such as a customized output endpoint
  • the peripheral device maintains working in the customized communication mode after obtaining the heartbeat command sent by the game application through the customized output endpoint.
  • the game application sends a heartbeat packet to the peripheral device every preset period (such as 10 seconds). Then when the peripheral device receives the heartbeat packet within the preset period, it is determined that the game application wants the peripheral device to still be in the customized communication mode.
  • the peripheral device continues to maintain the customized communication mode; if the peripheral device does not receive the heartbeat command within the preset period, it is determined that the game application wants the peripheral device to switch back to the original communication mode for data transmission, then the peripheral device The device switches from the customized communication mode back to the original communication mode.
  • the peripheral device can respond to the downlink transmission command.
  • the corresponding interactive data is reported to the game application as an uplink transmission command (or notification and feedback command).
  • the exemplary functions carried by the uplink transmission instructions are as follows:
  • the peripheral device can generate an uplink transmission instruction based on the device information, and perform the processing according to the peripheral communication protocol.
  • the uplink transmission instruction is encapsulated to obtain encapsulated data, and then the encapsulated data is sent to the game application, so that the game application decapsulates the encapsulated data and obtains the device information of the peripheral device.
  • the peripheral device can generate an uplink transmission instruction based on the current device power to inform the game application of the current device power; where, the current device of the peripheral device
  • the power refers to the power detected by the peripheral device when it receives the downlink transmission command (such as the power query command) sent by the game application.
  • the manufacturer of the peripheral device needs to implement the following software logic when customizing a customized communication interface based on the peripheral communication protocol for the peripheral device:
  • the peripheral device starts from The customized endpoint (such as a customized output endpoint) receives the encapsulated data sent by the game application, and decapsulates the encapsulated data to obtain the downstream transmission instructions (such as information query requests); then, the peripheral device performs the downstream transmission instructions according to the peripheral communication protocol.
  • the corresponding data (such as device information) is encapsulated, and the encapsulated data is returned to the customized endpoint (such as a customized input endpoint), so that the game application can obtain the data returned by the peripheral device from the customized endpoint.
  • the peripheral device when the peripheral device detects that the device power is less than the power threshold, it means that the remaining power of the peripheral device is low.
  • the peripheral device can actively initiate an uplink transmission instruction.
  • the uplink transmission instruction indicates that the remaining power of the peripheral device is less than power threshold, and encapsulates the uplink transmission command and sends it to the game application; so that the game application responds to the uplink transmission command obtained by the decapsulation process.
  • the battery warning information is displayed in the application interface of the game application.
  • the application interface of the game application can be any service interface provided by the game application, and the battery warning information displayed in the application interface is used to prompt that the battery of the peripheral device of the operating object is low. Replenish power for peripheral devices in a timely manner.
  • the manufacturer of the peripheral device needs to implement the following software when customizing a customized communication interface based on the peripheral communication protocol for the peripheral device.
  • Logic When the peripheral device detects that the device power is less than the power threshold and determines that the trigger condition for actively notifying the game application is met, it will encapsulate the device power according to the peripheral communication protocol, and transmit the encapsulated encapsulated data back to the customized endpoint. (such as a customized input endpoint), so that the game application can obtain the device power returned by the peripheral device from the customized endpoint.
  • the peripheral device includes the original default communication protocol and the customized peripheral communication protocol; then when the peripheral device is in the default communication mode, the peripheral device detects the target operation input by the game's operating object.
  • the input signal is generated as interactive data according to the target operation; the interactive data is encapsulated according to the peripheral communication protocol in the customized communication mode, and the encapsulated data is sent to the original default communication interface so that the game application can follow the
  • the original default communication protocol obtains encapsulated data from the default communication interface.
  • the peripheral device when the peripheral device is in the customized communication mode, when the peripheral device detects the target operation input by the game's operating object, it can generate an input signal as interactive data according to the target operation; and according to the peripheral communication protocol in the customized communication mode The interactive data is encapsulated, and the encapsulated data is sent to the customized communication interface, so that the game application can obtain the encapsulated data from the customized communication interface according to the customized communication protocol.
  • This enables the peripheral device provided by the embodiment of the present application to be compatible with target operations in both old and new communication modes. For the operating object, there is no need to learn new operating habits, thereby improving the gaming experience of the operating object.
  • the peripheral manufacturer of the peripheral device implements the following software when customizing a customized communication interface based on the peripheral communication protocol for the peripheral device.
  • Logic After the peripheral device detects that the operating object performs the target operation, it can convert the analog signal input by the operating object into the corresponding digital signal (i.e. the aforementioned input signal) according to the analog-to-digital conversion structure of the peripheral device; then , encapsulate the input signal according to the peripheral communication protocol, and send the encapsulated data to the customized communication interface, so that the game application can obtain the encapsulated data from the customized communication interface according to the customized communication protocol.
  • embodiments of the present application propose a more detailed data transmission method.
  • This data transmission method can be used by the peripheral device in the aforementioned data transmission system or the game application in the terminal. Execution; for ease of explanation, the subsequent description will take the data transmission method performed by an electronic device as an example, and unless otherwise specified, the electronic device may refer to any of a peripheral device or a terminal running a game application; when the electronic device When a terminal is used to run a game application, the described operations performed by the electronic device are specifically performed by the game application running in the terminal.
  • the data transmission method provided by the embodiment of the present application will be introduced in detail below with reference to the accompanying drawings.
  • Figure 4 shows a schematic diagram of a data transmission method provided by an exemplary embodiment of the present application; the data transmission method may include steps S401-S402:
  • the terminal sends and receives data through an internal communication driver, and the peripheral communication protocol is customized for communication between the game application and the peripheral device according to the data transmission specification of the communication driver.
  • the peripheral communication protocol supports data transmission between game applications and peripheral devices without the need for forwarding by the management module of the operating system.
  • the data transmission specification is used to represent the protocol specification of the communication interface followed by the communication driver (such as USB driver, Bluetooth driver, etc.), such as the HID (Human interface device, human-computer interaction interface) specification.
  • a communication connection can be established between the peripheral device and the terminal.
  • the receiver of the peripheral device can be inserted into the terminal.
  • the peripheral device can send the interface declaration of one or more communication interfaces it contains to the receiver, so that the communication driver deployed in the terminal can obtain the information of each communication interface of the peripheral device from the receiver.
  • Interface declaration so that the communication driver includes the interface declaration of one or more communication interfaces of the peripheral device.
  • the game application can scan the interface declarations of each communication interface of the peripheral device from the communication driver in the terminal, and find the specified protocol identifier in each scanned interface declaration, which is the customized peripheral communication protocol.
  • the identifier can be used to uniquely identify the peripheral communication protocol; if the game application finds the specified protocol identifier, then the game application confirms that the peripheral device supports peripheral communication If the hardware device trusts the protocol, the communication protocol identified by the designated protocol identifier is determined as the peripheral communication protocol, and the specific protocol content of the peripheral communication protocol identified by the designated protocol identifier can be further read to determine the peripheral communication protocol.
  • the manufacturer of the peripheral device can add a customized hardware structure, such as a six-axis gyroscope sensor or a pressure sensor, to the original peripheral device.
  • a customized hardware structure such as a six-axis gyroscope sensor or a pressure sensor
  • the management module in the operating system does not support forwarding the data. Forwarding to the game application and forwarding data related to the operation of the new hardware structure by the game application to the peripheral device is not supported, resulting in the function of the new hardware structure not being used.
  • the interactive data to be transmitted in step S401 is the interactive data related to the newly added hardware structure in the peripheral device.
  • Step S401 may be performed to obtain the peripheral communication protocol when the management module (or default communication protocol) of the operating system in the terminal does not support forwarding the data related to the newly added hardware structure and needs to forward the data related to the new hardware structure. operate.
  • the peripheral communication protocol can be used to transmit interactive data that the management module of the operating system does not support forwarding.
  • the interactive data is data related to the hardware structure that is not supported by the management module of the operating system in the terminal when the peripheral device is configured with a new hardware structure, so The hardware structure is used to perform interactive operations related to the game application.
  • the forwarding is: after the management module receives the data of the sender in the game application and the peripheral device, it forwards the data to the game application and the peripheral device.
  • the receiver sends the received data.
  • S402 use the peripheral communication protocol and the communication driver to transmit interactive data between the game application and the peripheral device.
  • one of the game application and the peripheral device is the sender, and the other is the receiver.
  • the sender uses the peripheral communication protocol to encapsulate the interactive data, it sends the encapsulated data (that is, the encapsulated interactive data) to the communication driver, so that the receiver can obtain the encapsulated data from the communication driver.
  • the sender sends the encapsulated data to the communications driver, and the communications driver sends the encapsulated data to the receiver.
  • S402 uses a peripheral communication protocol to package the interactive data, and then the communication program transmits the encapsulated interactive data between the game application and the peripheral device.
  • the game application and the peripheral device can realize the transmission of interactive data according to the peripheral communication protocol and through the communication driver.
  • the interactive data may refer to the data that the game application wants to send to the peripheral device, or the interactive data may refer to the data that the peripheral device wants to send to the game application.
  • the electronic device can obtain the peripheral communication protocol, such as from the interface declaration of the peripheral device, or write the peripheral communication protocol into the hardware of the electronic device in the form of code.
  • the electronic device When in the structure, it can be read from the hardware structure; the electronic device uses the peripheral communication protocol to encapsulate the interactive data to be transmitted, and obtains the encapsulated data; then, the electronic device sends the encapsulated data obtained by the encapsulation process to the communication device deployed in the terminal. driver so that the data receiver can obtain the encapsulated data from the communication driver.
  • the data receiver can refer to the peripheral device.
  • the encapsulated data is encapsulated and processed by the game application according to the peripheral communication protocol and sent to in the communication driver.
  • the data receiver can refer to the game application.
  • the encapsulated data is encapsulated and processed by the peripheral device according to the peripheral communication protocol and sent. to the communication driver.
  • the implementation methods of encapsulating the interactive data to be transmitted are also different, which is specifically reflected in the different information structures used to encapsulate the interactive data to be transmitted.
  • the information structure corresponding to any data type is defined by the peripheral communication protocol.
  • the embodiment of the present application does not limit the specific style of the information structure corresponding to each data type.
  • the electronic device can further determine the data type of the interactive data to be transmitted, and then query the information structure corresponding to the data type of the interactive data in the peripheral communication protocol, as Target information structure; then write the interactive data into the target information structure to obtain encapsulated data.
  • the peripheral device encapsulates the interactive data or the game application encapsulates the interactive data
  • the implementation process of the encapsulation process is related to the content described in the above implementation method.
  • a peripheral communication protocol can be customized between the game application and the peripheral device according to the data transmission specification followed by the communication driver in the terminal, because the customized peripheral communication protocol is based on the communication driver
  • the data transmission specifications followed by the communication driver are unified and universal among various terminals.
  • using this customized peripheral communication protocol can realize direct communication between game applications and peripheral devices, so that the data transmitted between game applications and peripheral devices is no longer affected by operations in the terminal. System limitations (that is, data does not need to be forwarded by the management module of the operating system), thus enabling richer data to be sent between game applications and peripheral devices, and improving the efficiency and convenience of data transmission.
  • embodiments of the present application can realize the transmission of interactive data about the new hardware structure between the peripheral device and the game application through a peripheral communication protocol.
  • Electronic equipment includes terminals running game applications.
  • the interactive data that the game application needs to transmit may include but is not limited to: information query requests, peripheral control instructions, and mode switching instructions.
  • the data transmission processes of the three exemplary interactive data given above are described in detail below.
  • the interactive data includes an information query request, which is used to query the device information of the peripheral device; wherein the game application sends an information query request to the peripheral device for querying the device information of the peripheral device, and receives the information query request from the peripheral device.
  • the specific implementation process of the feedback results of the device feedback can be seen in Figure 5a and Figure 5b, as shown in Figure 5a and Figure 5b:
  • the game application After the game application determines that the peripheral device is a hardware device that supports the peripheral communication protocol by scanning the interface statement of the peripheral device, the game application can generate an information query request and encapsulate the information query request according to the peripheral communication protocol. , obtain the encapsulated data; then, send the encapsulated data to the communication driver, so that after the peripheral device obtains the encapsulated data through the communication driver, it can decapsulate the encapsulated data according to the peripheral communication protocol and obtain the information query request. .
  • the way in which the peripheral device obtains the encapsulated data through the communication driver may include: the communication driver actively sends the encapsulated data to a customized output endpoint in the customized communication interface included in the peripheral device, and then, the peripheral device obtains the encapsulated data from the customized output endpoint. Get the encapsulated data.
  • the peripheral device uses the peripheral communication protocol to decapsulate (ie parse) the encapsulated data and obtain the information query request; then, the peripheral device pulls the device in response to the information query request information, and uses a peripheral communication protocol to encapsulate the device information to obtain encapsulated data.
  • the encapsulated data includes the feedback results obtained by the encapsulation process.
  • the specific implementation process of the peripheral device encapsulating the device information according to the peripheral communication protocol.
  • the implementation process of the encapsulation process described above is similar and can be briefly summarized as: according to the data type of the device information, from the peripheral communication protocol Obtain the information structure corresponding to the data type as the information query structure, and then fill in or write the device information into the information query structure to generate feedback results to realize the encapsulation of the device information.
  • the exemplary device information shown in Table 1 can be filled in the information query structure to generate encapsulated data.
  • the information filled in the information query structure may include detailed information of the peripheral device (such as manufacturer, device model, and device name) and characteristic information.
  • the characteristic information of the peripheral device can be used to indicate at least one device capability of the peripheral device, and the characteristic information of the peripheral device can be filled in the information query structure bit by bit; for example, if the peripheral device supports the target characteristic, the target can be The binary bit occupied by the characteristic is filled with 1 to indicate that the peripheral device supports the device capability corresponding to the target characteristic.
  • the characteristic information may include device capabilities related to new hardware structures in the peripheral device. Newly added hardware structures include vibration devices, rotor motors, or three-axis gyroscopes. Feature information that exemplary peripheral devices may support can be found in Table 2.
  • hexadecimal can be used to represent the characteristic information of the peripheral device; of course, the embodiment of the present application does not limit which hexadecimal system is used to express the characteristics of the peripheral device, which is explained here.
  • the game application can infer whether the peripheral device supports a certain feature based on the bits after obtaining the feature information; for example, assuming the dual joystick capability of the peripheral device is represented by the first digit of binary, then if the device information received by the game application includes hexadecimal 0x1, and the 0x1 is converted into binary 0001, then it is determined that the first digit of the binary is the number 1, which means Peripheral devices support dual joystick device capabilities.
  • the peripheral device can transmit the feedback result back to the customized input endpoint in the customized communication interface, so that the game application can obtain the feedback result from the customized input endpoint through the communication driver; and interpret the feedback result according to the peripheral communication protocol.
  • the specific implementation process of the game application obtaining the feedback result from the customized input endpoint through the driver may include: the communication driver may scan the customized input endpoint regularly, and when the feedback result sent by the peripheral device is scanned from the customized input endpoint, the communication driver may Realize the acquisition of the feedback result; then, the game application can also periodically scan the communication driver, so that after there is a feedback result sent by the peripheral device in the communication driver, the game application can obtain the peripheral device from the communication driver Send feedback results.
  • embodiments of the present application also support the customized input endpoint to proactively send the received feedback results to the communication driver.
  • the embodiment of the present application also supports the customized input endpoint to send a feedback instruction to the communication driver after obtaining the feedback result, so that the communication driver scans the feedback result from the customized input endpoint after receiving the feedback instruction.
  • the game application can also obtain the feedback results in the manner described above. For example, the communication driver actively sends the feedback results to the game application, or the communication driver sends the feedback results to the game application. Feedback instructions to instruct the game application to actively obtain feedback results.
  • the embodiments of this application do not limit the specific implementation of data transmission between the customized interface and the communication driver, and between the communication driver and the game application.
  • the game application can check the validity of the instruction according to the device information. Among them, if the instruction is valid, it can be understood that the instruction can be recognized or parsed by the game application, and the corresponding processing will be carried out according to the recognition result; if the instruction is invalid, it can be understood that the instruction cannot be recognized by the game application. After receiving the invalid instruction, the game application , without giving feedback or notifying the peripheral device that the command cannot be recognized.
  • the implementation process of the game application checking the validity of the instruction based on the device information of the peripheral device may include: if the game application receives the input instruction sent by the peripheral device, determining the use required by the peripheral device to generate the input instruction. The first device capability.
  • the input instruction is used to represent an instruction generated by a peripheral device. If the input instruction is an instruction to move a double joystick to the left, then it is determined that the first device capability required by the peripheral device to generate the instruction includes the dual joystick capability. Then, the first device capability is used to perform capability hit matching on at least one device capability indicated by the characteristic information to obtain a capability hit matching result.
  • capability hit matching refers to querying in at least one device capability indicated by the characteristic information. Whether first device capabilities exist.
  • the validity of the input instruction is tested according to the capability hit result; wherein, if the first device capability hits (exists in) at least one device capability, that is, the first device capability belongs to one of the device capabilities in the characteristic information, then the The input command was determined to be a valid command.
  • the interactive data includes peripheral control instructions, which are used to control peripheral devices to perform game feedback operations.
  • the game feedback operation is used to represent an operation that the game application instructs the peripheral device to perform to provide feedback to the user, such as a vibration operation.
  • the exemplary implementation process of the game application sending peripheral control instructions to the peripheral device so that the peripheral device performs game feedback operations can be seen in Figure 6a:
  • the game application if it detects that it needs to control the peripheral device to perform a game feedback operation, it can obtain the characteristic information supported by the peripheral device; wherein, the method for the game application to obtain the characteristic information supported by the peripheral device may include: obtaining from the storage space Historically cached feature information supported by the peripheral device, or, according to the aforementioned implementation shown in Figure 5a, obtain feature information supported by the peripheral device from the peripheral device side.
  • the game application searches for the target device capability in at least one device capability indicated by the characteristic information of the peripheral device.
  • the target device capability refers to the device capability used to instruct the peripheral device to perform a game feedback operation.
  • the game application determines that it needs to control the peripherals After the device performs the game feedback operation, the target device capabilities required by the peripheral device to perform the game feedback operation can be determined; then, capability hit matching is performed among at least one device capability indicated by the characteristic information. If the capability matches the target device capability, it is determined that the peripheral device has the device capability to perform game feedback operations.
  • the game application after the game application finds the target device capability from at least one device capability indicated by the characteristic information of the peripheral device, it can generate a peripheral control instruction for controlling the peripheral device to perform a game feedback operation based on the target device capability.
  • the peripheral control command generated at this time is a valid output command, that is, the command can be recognized and responded to by the peripheral device.
  • the peripheral control instructions that the peripheral device can generate can be called vibration instructions.
  • the vibration instructions can include instructions for controlling the peripheral device to perform vibration operations. Vibration data, as shown in Table 3:
  • the game application can fill the vibration data into the vibration information structure according to the peripheral communication protocol, so as to realize the encapsulation processing of the vibration instructions, and send the encapsulated data to the peripheral device, so that the peripheral device obtains the information based on the encapsulated data.
  • Vibration instructions can perform vibration operations based on the vibration data contained in the vibration instructions.
  • the game application encapsulates the peripheral control instructions according to the peripheral communication protocol to generate encapsulated data; and sends the encapsulated data to the communication driver, so that the communication driver sends the encapsulated data to the customization of the peripheral device Output endpoint, so that the peripheral device can receive the peripheral control instructions sent by the game application and perform corresponding game feedback operations in response to the peripheral control instructions.
  • the peripheral control instructions generated by the game application are used to control the peripheral device to perform vibration operations.
  • the peripheral equipment includes one or more vibration devices.
  • the vibration device may include a vibration motor (or simply referred to as a motor). Each motor is configured with corresponding parameters.
  • the parameters may include but are not limited to: vibration direction, Vibration frequency, or vibration pattern, used to control the vibration of a motor.
  • the game application when the game application is running the game, if the game application detects that there is a vibration object in the game screen, that is, there is a game character that needs to vibrate, then it can be used to control the default vibration in the peripheral device.
  • the device performs a vibration operation, which is determined as the first vibration operation; wherein the default vibration device may include any one of one or more vibration devices provided by the peripheral device.
  • the peripheral control command can be called a vibration command, and the vibration command is sent to the peripheral device, so that the peripheral device responds to the vibration command and controls the default vibration device to vibrate to simulate the real environment.
  • the vibration effect produced by the vibration of the vibrating object if the default vibration device 601 in the peripheral device is located at the center of the peripheral device, when the peripheral device controls the default vibration device to perform a vibration operation, both hands of the operating subject can feel the vibration.
  • the target vibration device when the game application is running the game, can be selected from the peripheral device based on the position of the vibration object and the position information of each vibration device in the peripheral device, and will be used to control the target
  • the operation of mechanical energy vibration of the vibration device is determined as the first vibration operation. That is to say, according to the specific position (such as coordinates) of the vibration object in the game screen, a vibration device that is close to the position of the vibration device in the game screen can be determined from the peripheral device as the target vibration device, and the peripheral device can The target vibration device is controlled to perform a vibration operation to achieve a vibration effect that simulates the vibration of a vibrating object in a real environment, creating a more realistic gaming experience.
  • the vibration device 602 on the right handle is the target vibration device; and generates peripheral control instructions according to the parameters of the target vibration device, and sends the vibration instructions to the peripheral equipment, so that the peripheral equipment responds to the vibration instructions to control the target vibration.
  • the device vibrates. At this time, the right hand of the operating subject can feel a more obvious vibration effect than the left hand, so as to provide the operating subject with a more realistic gaming experience.
  • the above is only an exemplary data transmission process when the peripheral control instruction is a vibration instruction; during the process of the game application running the game, the game application can also use the specific game scene and the characteristic information of the peripheral device to Generate other peripheral control instructions; if the characteristic information of the peripheral device includes audio feedback capability, then when the game application detects that there is an operation to control the peripheral device to perform sound effect output in the game scene, it generates an audio feedback instruction so that the peripheral device Sound effects are output in response to the audio feedback command to create a more realistic gaming experience for the operating object.
  • the interactive data includes a mode switching command, which is used to command the peripheral device to switch the communication mode to a customized communication mode, so that the peripheral device uses the peripheral communication protocol for data transmission while the game application is running the game. .
  • the operation of the game application may be restricted by the operating system. Therefore, when the game application has the need to send a mode switching command to a peripheral device, it needs to be detected first. Whether the operating system supports transmitting the mode switching command through the peripheral communication protocol and the communication driver to obtain the corresponding detection result; and then, based on the detection result, determine whether the game application directly transmits the mode switching command to the communication driver through the communication driver. Peripheral devices.
  • the game application can obtain the peripheral communication protocol and directly transmit the mode switching command to the peripheral device according to the peripheral communication protocol and communication driver; then, the peripheral After receiving the mode switching command, the device can respond to the mode switching command and switch the communication mode to the customized communication mode; when the peripheral device is in the customized communication mode, the operating system supports the peripheral device and the game application to communicate using the peripheral device
  • the protocol transmits any data.
  • a peripheral device can directly transmit data such as the target operation and/or power information of the operating object to the game application according to the peripheral communication protocol and communication driver.
  • the mode switching command can be forwarded to the peripheral device via the operating system.
  • the game application can generate a vibration sequence, and the vibration sequence can include a default string (such as the string "123") for triggering
  • the peripheral device executes the mode switching command; then, the game application sends the generated vibration sequence and interaction data (such as the mode switching command) to the management module of the operating system, so that the management module forwards the vibration sequence and interaction data through the communication driver To the peripheral device; in this way, when the peripheral device receives the vibration sequence, it can determine that mode switching is required, and further switch the communication mode to the customized communication mode according to the mode switching command.
  • the game application sends the mode switching command to the management module of the operating system, so that the management module forwards the mode switching command to the peripheral device through the communication driver; in this way, the peripheral device changes the communication mode according to the mode switching command. Switch to customized communication mode.
  • Electronic equipment includes peripheral equipment.
  • the interactive data that the peripheral device needs to transmit may include but is not limited to: input signals and power warning signals.
  • the data transmission process of the two exemplary interactive data given above will be described in detail below.
  • Interaction data includes input signals.
  • the peripheral device when the peripheral device is in the customized communication mode, if the peripheral device detects the target operation input by the operating object of the game while the game application is running the game, the peripheral device can generate an input signal according to the target operation.
  • the input signal can be used as interactive data; and the input signal is filled into the input information structure according to the peripheral communication protocol to realize the encapsulation processing of the input signal; then, the encapsulated encapsulated data is transmitted to the game through the communication driver
  • the application enables the game application to decapsulate the encapsulated data to obtain interactive data after obtaining the encapsulated data, and update the game screen of the game based on the interactive data.
  • the peripheral device when the operating object uses the peripheral device to operate the game, if the peripheral device detects the upward sliding operation input by the operating object on the game object 801, it means that the peripheral device wants the game object 801 to follow the upward sliding operation. Perform a jumping action, the peripheral device can generate an input signal based on the upward sliding operation, and transmit the input signal as interactive data directly to the game application through the communication driver; then, after the game application obtains the interactive data, it can The data determines the game screen when the game object performs the jumping action, and uses the game screen when the game object performs the jumping action to update and display the game screen before the jumping action is performed.
  • Interactive data includes power warning signals.
  • the peripheral device when the operating object uses the peripheral device to control the game, that is, during the operation of the peripheral device, the peripheral device can obtain its own device power, such as customizing the device power; if the peripheral device detects the device power is less than the power threshold, it means that the power of the peripheral device is low at this time, and the peripheral device can generate a power warning signal. At this time, the power warning signal is used as interactive data; then, the peripheral communication protocol is used to encapsulate the power warning signal.
  • the device information of the peripheral device is added to the power information structure to obtain the encapsulated data after encapsulation; then, the encapsulated data is returned to the customized input interface, so that the game application can use the communication driver to obtain the encapsulated data from the customized input interface.
  • the package data is scanned, and the power warning signal is obtained after parsing and processing the package data.
  • the game application obtains the interactive data (i.e., the power warning signal), it can generate the power warning information based on the interactive data, and display the power warning information in the application interface of the game application.
  • the power warning information is used to prompt external users.
  • Power warning information 901 is displayed on the game screen.
  • the embodiments of this application can customize a peripheral communication protocol between the game application and the peripheral device according to the data transmission specification followed by the communication driver deployed in the terminal, because the customized peripheral communication protocol is It is written based on the data transmission specifications followed by the communication driver, and the data transmission specifications followed by the communication driver are unified and universal among various terminals. This enables the customized peripheral communication protocol to support cross-terminal use and improve peripherals. Applicability of communication protocols.
  • peripheral communication protocol can realize direct communication between game applications and peripheral devices, so that the data transmitted between game applications and peripheral devices is no longer restricted by the operating system in the terminal, so that game applications Richer data can be sent to and from peripheral devices to achieve richer game control capabilities in peripheral devices, which can increase the fun of the game and thereby enhance user stickiness.
  • inventions of the present application also disclose a data transmission device.
  • the data transmission device may be a computer program (including program code) running in an electronic device.
  • the data transmission device can perform the method shown in Figure 4. Referring to Figure 10, the data transmission device can run the following units:
  • the acquisition unit 1001 is used to obtain the peripheral communication protocol when interactive data needs to be transmitted between the game application in the terminal and the peripheral device; the terminal sends and receives data through the internal communication driver, and the peripheral communication protocol is in accordance with the communication driver Data transmission specifications, customized for communication between the game application and the peripheral device;
  • the processing unit 1002 is used to transmit interactive data between the game application and the peripheral device using the peripheral communication protocol and through the communication driver.
  • the processing unit 1002 when used to transmit interactive data between a game application and a peripheral device using a peripheral communication protocol and through a communication driver, it may be specifically used to:
  • the data receiver refers to the peripheral device; if the encapsulated data is sent by the peripheral device to the communication driver, the data receiver refers to the game application.
  • the peripheral communication protocol stipulates the information structure corresponding to one or more data types; when the processing unit 1002 uses the peripheral communication protocol to encapsulate the interactive data and obtains the encapsulated data, it can specifically Used for:
  • the device is installed in a game application, and the communication driver includes interface declarations for one or more communication interfaces of peripheral devices; the processing unit 1002 can also be used to:
  • the communication protocol identified by the specified protocol identifier is determined as the peripheral communication protocol.
  • the interaction data includes an information query request for querying device information of a peripheral device, and the device information at least includes feature information supported by the peripheral device; the processing unit 1002 may also be used to:
  • the feedback result is obtained from the communication driver; the feedback result is obtained by the peripheral device responding to the information query request and using the peripheral communication protocol to encapsulate the device information. of;
  • the feedback result is decapsulated according to the peripheral communication protocol to obtain the device information of the peripheral device.
  • the characteristic information is used to indicate at least one device capability of the peripheral device; the processing unit 1002 may also be used to:
  • the first device capability is used to perform capability hit matching on at least one device capability indicated by the characteristic information to obtain a capability hit matching result.
  • the capability hit matching refers to querying in at least one device capability indicated by the characteristic information. Whether the first device capability exists;
  • the validity of the input instruction is tested according to the capability hit matching result; wherein, if the first device capability belongs to the at least one device If the input command is one of the equipment capabilities, the input command is determined to be a valid command.
  • the interaction data includes peripheral control instructions, and the processing unit 1002 can also be used to:
  • the characteristic information supported by the peripheral device is obtained, and the characteristic information is used to indicate at least one device capability of the peripheral device;
  • the target device capability refers to: the device capability used to support peripheral devices to perform game feedback operations;
  • a peripheral control instruction for controlling the peripheral device to perform a game feedback operation is generated.
  • the peripheral device includes one or more vibration devices, and the game feedback operation includes a first vibration operation; the processing unit 1002 may also be used to:
  • the operation used to control the default vibration device in the peripheral device to vibrate is determined as the first vibration operation
  • the controller According to the position of the vibration object in the game screen and the position information of each vibration device in the peripheral device, select the target vibration device from the peripheral device, and determine the operation used to control the target vibration device to vibrate. First vibration operation.
  • the game application runs on the operating system of the terminal, and the peripheral device is in a customized communication mode.
  • the operating system supports the peripheral device and the game application to transmit any data by using the peripheral communication protocol;
  • the interactive data includes a mode switching command, which is used to command the peripheral device to switch the communication mode to a customized communication mode, so that the peripheral device uses the peripheral communication protocol for data transmission during the game application running the game;
  • the processing unit 1002 may also be used to:
  • a vibration sequence is generated, which is used to trigger the peripheral device to perform mode switching; the vibration sequence and interaction data are sent to the management module of the operating system, so that the management module transmits the vibration sequence and interaction data through the communication driver forwarded to peripheral devices.
  • the device is mounted on a peripheral device, and the processing unit 1002 can also be used to:
  • the game application After the game application obtains the interaction data, it updates the game screen of the game according to the interaction data.
  • the device is mounted on a peripheral device, and the processing unit 1002 can also be used to:
  • a power warning signal is generated as interactive data
  • the game application After the game application obtains the interaction data, it generates power warning information based on the interaction data, and displays the power warning information in the application interface of the game application.
  • the peripheral device includes a customized communication interface customized based on the peripheral communication protocol, and the customized communication interface includes a customized input endpoint and a customized output endpoint;
  • the peripheral device sends data to the communication driver through the customized input endpoint; and the peripheral device obtains data from the communication driver through the customized output endpoint.
  • the interactive data is transmitted while the peripheral device is in a customized communication mode
  • the peripheral device maintains working in the customized communication mode after obtaining the heartbeat command sent by the game application through the customized output endpoint.
  • each unit in the data transmission device shown in Figure 10 can be separately or entirely combined into one or several other units to form, or some of the units (some) can be further disassembled. It is divided into multiple units with smaller functions, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application.
  • the above units are divided based on logical functions.
  • the function of one unit can also be realized by multiple units, or the functions of multiple units can be realized by one unit.
  • the data processing device may also include other units. In practical applications, these functions may also be implemented with the assistance of other units, and may be implemented by multiple units in cooperation.
  • the system can be configured by including a central processing unit (CPU), a random access storage medium (RAM),
  • a computer program (including program code) capable of executing the steps involved in the corresponding method as shown in Figure 4 is run on a general-purpose computing device such as a computer with processing elements and storage elements such as a read-only storage medium (ROM) to construct such as
  • the data transmission device shown in Figure 10 is used to implement the data transmission method according to the embodiment of the present application.
  • the computer program may be recorded on, for example, a computer-readable recording medium, loaded into the above-mentioned computing device through the computer-readable recording medium, and run therein.
  • a peripheral communication protocol can be customized between the game application and the peripheral device according to the data transmission specification followed by the communication driver in the terminal, because the customized peripheral communication protocol is based on the communication driver
  • the data transmission specifications followed by the communication driver are unified and universal among various terminals.
  • using this customized peripheral communication protocol can realize direct communication between game applications and peripheral devices, so that the data transmitted between game applications and peripheral devices is no longer restricted by the operating system in the terminal, so that game applications Richer data can be sent to and from peripheral devices, providing rich game control capabilities, thereby increasing user stickiness.
  • Figure 11 shows a schematic structural diagram of an electronic device provided by an exemplary embodiment of the present application; please refer to Figure 11.
  • the electronic device at least includes a processor 1101, a communication interface 1102 and a computer-readable storage medium 1103.
  • the electronic device includes a processor 1101, a communication interface 1102, and a computer-readable storage medium 1103.
  • the processor 1101, the communication interface 1102 and the computer-readable storage medium 1103 can be connected through a bus or other means.
  • the communication interface 1102 is used to receive and send data.
  • the computer-readable storage medium 1103 may be stored in the memory of the electronic device.
  • the computer-readable storage medium 1103 is used to store a computer program.
  • the computer program includes program instructions.
  • the processor 1101 is used to execute the program instructions stored in the computer-readable storage medium 1103.
  • the processor 1101 (or CPU (Central Processing Unit)) is the computing core and control core of the electronic device. It is suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions to achieve Corresponding method flow or corresponding function.
  • Embodiments of the present application also provide a computer-readable storage medium (Memory).
  • the computer-readable storage medium is a memory device in an electronic device and is used to store programs and data. It can be understood that the computer-readable storage medium here may include a built-in storage medium in the electronic device, and of course may also include an extended storage medium supported by the electronic device.
  • the computer-readable storage medium provides storage space that stores the processing system of the electronic device. Furthermore, one or more instructions suitable for being loaded and executed by the processor 1101 are also stored in the storage space. These instructions may be one or more computer programs (including program codes).
  • the computer-readable storage medium here can be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as at least one disk memory; optionally, it can also be at least one located remotely The computer-readable storage medium of the aforementioned processor.
  • one or more instructions are stored in the computer-readable storage medium; the processor 1101 loads and executes one or more instructions stored in the computer-readable storage medium to implement the above data transmission method embodiment.
  • the corresponding steps in; one or more instructions in the computer-readable storage medium are loaded by the processor 1101 and execute the following steps:
  • the peripheral communication protocol When interactive data needs to be transmitted between the game application in the terminal and the peripheral device, the peripheral communication protocol is obtained; the terminal sends and receives data through the internal communication driver.
  • the peripheral communication protocol is in accordance with the data transmission specification of the communication driver.
  • Interaction data is transmitted between the game application and the peripheral device using the peripheral communication protocol and through the communication driver.
  • one or more instructions in a computer-readable storage medium are loaded by the processor 1101 and executed using a peripheral communication protocol and through a communication driver to transmit interactive data between the game application and the peripheral device. , specifically perform the following steps:
  • the data receiver refers to the peripheral device; if the encapsulated data is sent by the peripheral device to the communication driver, the data receiver refers to the game application.
  • the peripheral communication protocol specifies the information structure corresponding to one or more data types; one or more instructions in the computer-readable storage medium are loaded by the processor 1101 and executed using the external device. Assume that the communication protocol encapsulates the interactive data. When the encapsulated data is obtained, the following steps are performed:
  • the device is installed in a game application, and the communication driver includes interface declarations of one or more communication interfaces of the peripheral device; one or more instructions in the computer-readable storage medium are generated by the processor 1101 Load and also perform the following steps:
  • the communication protocol identified by the specified protocol identifier is determined as the peripheral communication protocol.
  • the interaction data includes an information query request for querying device information of the peripheral device, and the device information at least includes characteristic information supported by the peripheral device;
  • one or more instructions in the computer-readable storage medium are composed of Processor 1101 loads and also performs the following steps:
  • the feedback result is obtained from the communication driver; the feedback result is obtained by the peripheral device responding to the information query request and using the peripheral communication protocol to encapsulate the device information. of;
  • the feedback result is decapsulated according to the peripheral communication protocol to obtain the device information of the peripheral device.
  • the characteristic information is used to indicate at least one device capability of the peripheral device; one or more instructions in the computer-readable storage medium are loaded by the processor 1101 and also perform the following steps:
  • the validity of the input instruction is tested according to the capability hit matching result; if the first device capability hits at least one device capability, the input instruction is determined to be a valid instruction.
  • the interactive data includes peripheral control instructions, and one or more instructions in the computer-readable storage medium are loaded by the processor 1101 and also perform the following steps:
  • the characteristic information supported by the peripheral device is obtained, and the characteristic information is used to indicate at least one device capability of the peripheral device;
  • the target device capability refers to: the device capability used to support peripheral devices to perform game feedback operations;
  • a peripheral control instruction for controlling the peripheral device to perform a game feedback operation is generated.
  • one or more vibration devices are included in the peripheral device, and the game feedback operation includes a first vibration operation; one or more instructions in the computer-readable storage medium are loaded by the processor 1101 and the following steps are also performed: :
  • the operation used to control the default vibration device in the peripheral device to vibrate is determined as the first vibration operation
  • the controller According to the position of the vibration object in the game screen and the position information of each vibration device in the peripheral device, select the target vibration device from the peripheral device, and determine the operation used to control the target vibration device to vibrate. First vibration operation.
  • the game application runs on the operating system of the terminal, and the peripheral device is in a customized communication mode.
  • the operating system supports the peripheral device and the game application to transmit any data by using the peripheral communication protocol;
  • the interactive data includes a mode switching command, which is used to command the peripheral device to switch the communication mode to a customized communication mode, so that the peripheral device uses the peripheral communication protocol for data transmission during the game application running the game;
  • One or more instructions in the computer-readable storage medium are loaded by the processor 1101 and also perform the following steps:
  • a vibration sequence is generated, which is used to trigger the peripheral device to execute a mode switching command; the vibration sequence and interaction data are sent to the management module of the operating system, so that the management module transmits the vibration sequence and interaction through the communication driver. The data is forwarded to the peripheral device.
  • the device is mounted on a peripheral device, and one or more instructions in a computer-readable storage medium are loaded by the processor 1101 and also perform the following steps:
  • the game application After the game application obtains the interaction data, it updates the game screen of the game according to the interaction data.
  • the device is mounted on a peripheral device, and one or more instructions in a computer-readable storage medium are loaded by the processor 1101 and also perform the following steps:
  • a power warning signal is generated as interactive data
  • the game application After the game application obtains the interaction data, it generates power warning information based on the interaction data, and displays the power warning information in the application interface of the game application.
  • the peripheral device includes a customized communication interface customized based on the peripheral communication protocol, and the customized communication interface includes a customized input endpoint and a customized output endpoint;
  • the peripheral device sends data to the communication driver through the customized input endpoint; and the peripheral device obtains data from the communication driver through the customized output endpoint.
  • the interactive data is transmitted while the peripheral device is in a customized communication mode
  • the peripheral device maintains working in the customized communication mode after obtaining the heartbeat command sent by the game application through the customized output endpoint.
  • Embodiments of the present application also provide a computer program product or computer program.
  • the computer program product or computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium.
  • the processor of the electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device performs the above data transmission method.
  • a computer program product includes one or more computer instructions.
  • the computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
  • Computer instructions may be stored in or transmitted over a computer-readable storage medium.
  • Computer instructions may be transmitted from one website, computer, server, or data center to another website by wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. , computer, server or data center for transmission.
  • Computer-readable storage media can be any available media that can be accessed by a computer or a data storage device such as a server, data center, or other integrated media that contains one or more available media. Available media may be magnetic media (eg, floppy disk, hard disk, magnetic tape), optical media (eg, DVD), or semiconductor media (eg, Solid State Disk (SSD)), etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Selective Calling Equipment (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

La présente invention concerne un procédé et un appareil de transmission de données, ainsi qu'un dispositif électronique, un support de stockage et un produit programme. Le procédé consiste à : lorsque des données d'interaction doivent être transmises entre une application de jeu dans un terminal et un dispositif périphérique, acquérir un protocole de communication périphérique ; et transmettre les données d'interaction entre l'application de jeu et le dispositif périphérique en utilisant le protocole de communication périphérique et au moyen d'un programme de pilotage de communication. Une communication directe entre un dispositif périphérique et une application de jeu peut être réalisée, de telle sorte que les données transmises entre l'application de jeu et le dispositif périphérique ne sont plus limitées par un système d'exploitation dans un terminal, c'est-à-dire que les données n'ont pas besoin d'être transférées par un module de gestion du système d'exploitation, de telle sorte que des données plus riches peuvent être envoyées entre l'application de jeu et le dispositif périphérique, et l'efficacité et la commodité de la transmission de données sont améliorées.
PCT/CN2023/090483 2022-04-29 2023-04-25 Procédé et appareil de transmission de données, et dispositif électronique, support de stockage et produit programme WO2023207941A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210466211.9 2022-04-29
CN202210466211.9A CN117012017A (zh) 2022-04-29 2022-04-29 一种数据传输方法、装置、设备及介质

Publications (1)

Publication Number Publication Date
WO2023207941A1 true WO2023207941A1 (fr) 2023-11-02

Family

ID=88517796

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/090483 WO2023207941A1 (fr) 2022-04-29 2023-04-25 Procédé et appareil de transmission de données, et dispositif électronique, support de stockage et produit programme

Country Status (2)

Country Link
CN (1) CN117012017A (fr)
WO (1) WO2023207941A1 (fr)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004025582A1 (fr) * 2002-09-13 2004-03-25 Igt Protocole de dispositif usb pour machine de jeu
CN1677378A (zh) * 2004-03-31 2005-10-05 微软公司 以多usb模式操作的多系统游戏控制器
WO2006039134A2 (fr) * 2004-10-01 2006-04-13 Wms Gaming Inc. Systeme et procede de conversion de communication peripherique de jeux
CN102780862A (zh) * 2011-05-12 2012-11-14 青岛海信电器股份有限公司 一种电视机的遥控数据传输方法及互动装置
CN106075902A (zh) * 2016-06-14 2016-11-09 广州小鸡快跑网络科技有限公司 游戏手柄、基于ble连接的游戏控制方法及装置
CN112090061A (zh) * 2020-09-16 2020-12-18 深圳未来游戏设备科技有限公司 针对蓝牙通讯协议上的游戏外设模式调节方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004025582A1 (fr) * 2002-09-13 2004-03-25 Igt Protocole de dispositif usb pour machine de jeu
CN1677378A (zh) * 2004-03-31 2005-10-05 微软公司 以多usb模式操作的多系统游戏控制器
WO2006039134A2 (fr) * 2004-10-01 2006-04-13 Wms Gaming Inc. Systeme et procede de conversion de communication peripherique de jeux
CN102780862A (zh) * 2011-05-12 2012-11-14 青岛海信电器股份有限公司 一种电视机的遥控数据传输方法及互动装置
CN106075902A (zh) * 2016-06-14 2016-11-09 广州小鸡快跑网络科技有限公司 游戏手柄、基于ble连接的游戏控制方法及装置
CN112090061A (zh) * 2020-09-16 2020-12-18 深圳未来游戏设备科技有限公司 针对蓝牙通讯协议上的游戏外设模式调节方法

Also Published As

Publication number Publication date
CN117012017A (zh) 2023-11-07

Similar Documents

Publication Publication Date Title
JP6312877B2 (ja) デバイスをインテリジェントに制御するための方法、装置、及びシステム、並びにプラグアンドプレイ・デバイス
US11213743B2 (en) Method, system and electronic device for achieving remote control of computer game by game controller
CN105611364B (zh) 便携数码设备与大屏幕互动的方法、装置及系统
US20190255433A1 (en) Mobile phone game interface
WO2019001347A1 (fr) Procédé de projection d'écran pour dispositif mobile, support d'informations, terminal et système de projection d'écran
WO2022188595A1 (fr) Procédé et appareil d'affichage d'image d'application, terminal, système de projection d'écran et support
CN104823180B (zh) 分布式跨平台用户界面和应用投影
TWI487362B (zh) 手持裝置的介面變更方法及相關多媒體系統
JP2006343884A (ja) 画面表示プログラム、画面表示プログラムを記憶したコンピュータ読み取り可能な記憶媒体、画面表示装置、携帯端末装置及び画面表示方法
CN112245904B (zh) 支持跨服游戏的方法、系统、存储介质及计算机设备
CN114339332B (zh) 一种移动终端、显示设备及跨网投屏方法
KR20210146919A (ko) 저전력 블루투스(ble) 모드에서 작동 가능한 게임 컨트롤러
JP5930390B2 (ja) 情報処理装置および情報処理システム
AU2013388030B2 (en) Method, apparatus, and system for intelligently controlling device, and plug-and-play device
US20150363188A1 (en) Information Processing Device and Information Processing System
CN114007143A (zh) 信息交互方法、装置、设备及计算机存储介质、程序产品
CN111880845A (zh) 控制目标应用的方法、系统及装置
WO2023207941A1 (fr) Procédé et appareil de transmission de données, et dispositif électronique, support de stockage et produit programme
WO2024082906A1 (fr) Procédé et appareil d'acquisition d'informations, dispositif bluetooth, dispositif terminal et support de stockage
JP7193181B2 (ja) 複数の端末及び複数のネットワークをサポートするAndroidオンラインゲームアプリの分散型システム
WO2024051148A1 (fr) Procédé et appareil de commande de jeu en nuage, dispositif électronique et support de stockage
WO2023001086A1 (fr) Procédé et appareil de commande de dispositif basés sur une application infonuagique, et dispositif électronique et support lisible
CN115837159A (zh) 基于安卓设备的虚拟手柄控制方法及存储介质
US11980812B2 (en) Cloud gaming by streaming video data on playback device
JP2009070412A (ja) 画面表示プログラム、画面表示プログラムを記憶したコンピュータ読み取り可能な記憶媒体、画面表示装置、携帯端末装置及び画面表示方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23795374

Country of ref document: EP

Kind code of ref document: A1