AR game control method and system, electronic device and storage medium
Patent Information
- Application Number
- CN202311339800.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-13
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2043-10-13
AI Technical Summary
[0005]本申请实施例提供了一种AR游戏控制方法、系统、电子设备和存储介质,以至少解决相关技术中AR游戏控制方法通信成本高的问题
[0038]Compared to related technologies, the AR game control method provided in this application sends a first UDP packet to the target AR device at a preset time interval, receives device information returned by the target AR device based on the first UDP packet, and performs response operations on the target AR device according to game management instructions configured based on the device information. These response operations include at least one of adding an AR device, removing an AR device, starting the game, closing the game, and restarting the game. This solves the problem of high communication costs in AR game control methods, and provides lightweight, fast, and reliable control of AR game applications through UDP packet transmission, saving resources while ensuring secure transmission of command data.
Smart Images

Figure CN117379777B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of augmented reality, and in particular to AR game control methods, systems, electronic devices, and storage media. Background Technology
[0002] As AR technology becomes more and more advanced, people's demand for AR games is also increasing.
[0003] In related technologies, the AR glasses gaming experience process is as follows: A local area network (LAN) is established within the venue, and several glasses devices join the LAN. Users within the LAN simultaneously open the same game application, join corresponding rooms, and once everything is ready, the room owner starts the game. After the game ends, the game application reports the scores. This game control method has a long development cycle, cannot meet the need for rapid game verification, and the interaction with the game server during gameplay puts a heavy load on the game server, resulting in high communication costs. Furthermore, it lacks the flexibility to manage the AR devices within the venue.
[0004] Currently, no effective solution has been proposed to address the high communication costs in AR game control methods. Summary of the Invention
[0005] This application provides an AR game control method, system, electronic device, and storage medium to at least solve the problem of high communication costs in related technologies for AR game control methods.
[0006] In a first aspect, embodiments of this application provide an AR game control method, characterized in that the method includes:
[0007] Based on a preset time interval, send the first UDP packet to the target AR device;
[0008] Receive device information returned by the target AR device based on the first UDP packet;
[0009] According to the game management instructions configured based on the device information, a response operation is performed on the target AR device, wherein the response operation includes at least one of AR device addition, AR device removal, game launch, game shutdown, and game restart.
[0010] In some embodiments, before sending the first UDP packet to the target AR device based on a preset time interval, the method further includes:
[0011] Obtain a list of AR devices at the venue, determine the target AR device based on the list, and obtain the device serial number of the target AR device;
[0012] Generate a target message based on the device serial number of the target AR device;
[0013] Convert the target message into a JSON string;
[0014] The JSON string is converted to Base64 encoded form to obtain the first UDP packet.
[0015] In some embodiments, converting the JSON string to Base64 encoded form to obtain the first UDP packet includes:
[0016] The JSON string is encrypted using both the RSA asymmetric encryption algorithm and the SHA-256 signature algorithm to obtain an encrypted string.
[0017] The encrypted string is converted into the Base64 encoded form to obtain the first UDP packet.
[0018] In some embodiments, the step of responding to the target AR device according to game management instructions configured based on the device information includes:
[0019] If the game management command is an "Add Device" command, the AR device in the "Add Device" command will be added to the target game's device list; or
[0020] If the game management command is a device removal command, remove the AR device from the device list in the device removal command; or
[0021] If the game management instruction is a game launch instruction, the target AR device is instructed to open the target game; or
[0022] If the game management command is a game-closing command, instruct the target AR device to close the target game; or
[0023] If the game management command is a game restart command, the target AR device is instructed to restart the target game.
[0024] In some embodiments, when the game management instruction is a game launch instruction, instructing the target AR device to open the target game includes:
[0025] The second UDP packet is obtained based on the game launch command and the device serial number of the target AR device;
[0026] The second UDP packet is sent to the target AR device to instruct the target AR device to decrypt and verify the signature of the second UDP packet, obtain the game launch instruction information, and launch the target game according to the game launch instruction information.
[0027] In some embodiments, the step of responding to the target AR device according to game management instructions configured based on the device information includes:
[0028] When the game management instruction is a batch launch instruction, it instructs all AR devices in the target device list to open the target game;
[0029] When the game management instruction is a batch shutdown instruction, all AR devices in the target device list are instructed to shut down the target game, wherein the target device list is the list of AR devices corresponding to the target game.
[0030] In some embodiments, the device information includes device battery level, device model, and device serial number, and the method further includes:
[0031] If the device's battery level is lower than a preset battery threshold, a charging prompt message is generated based on the device model, the device's battery level, and the device serial number.
[0032] Secondly, embodiments of this application provide an AR game control system, the system comprising: a data sending module, a data receiving module, and an instruction response module.
[0033] The data sending module is used to send a first UDP packet to the target AR device based on a preset time interval;
[0034] The data receiving module is used to receive device information returned by the target AR device based on the first UDP packet;
[0035] The instruction response module is used to perform response operations on the target AR device according to the game management instructions configured based on the device information, wherein the response operations include at least one of AR device addition, AR device removal, game launch, game shutdown, and game restart.
[0036] Thirdly, embodiments of this application provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the AR game control method as described in the first aspect above.
[0037] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the AR game control method as described in the first aspect above.
[0038] Compared to related technologies, the AR game control method provided in this application sends a first UDP packet to the target AR device at a preset time interval, receives device information returned by the target AR device based on the first UDP packet, and performs response operations on the target AR device according to game management instructions configured based on the device information. These response operations include at least one of adding an AR device, removing an AR device, starting the game, closing the game, and restarting the game. This solves the problem of high communication costs in AR game control methods, and provides lightweight, fast, and reliable control of AR game applications through UDP packet transmission, saving resources while ensuring secure transmission of command data. Attached Figure Description
[0039] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0040] Figure 1 This is a schematic diagram of the application environment of the AR game control method according to an embodiment of this application;
[0041] Figure 2 This is a flowchart of an AR game control method according to an embodiment of this application;
[0042] Figure 3 This is a schematic diagram of an AR device list acquisition method according to an embodiment of this application;
[0043] Figure 4 This is a schematic diagram of an AR game launch method according to an embodiment of this application;
[0044] Figure 5 This is a structural block diagram of the AR game control system according to an embodiment of this application;
[0045] Figure 6 This is a schematic diagram of the internal structure of an electronic device according to an embodiment of this application. Detailed Implementation
[0046] To make the objectives, technical solutions, and advantages of this application clearer, the application is described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. All other embodiments obtained by those skilled in the art based on the embodiments provided in this application without inventive effort are within the scope of protection of this application.
[0047] Obviously, the accompanying drawings described below are merely some examples or embodiments of this application. Those skilled in the art can apply this application to other similar scenarios based on these drawings without any inventive effort. Furthermore, it is understood that although the efforts made in this development process may be complex and lengthy, for those skilled in the art related to the content disclosed in this application, any changes to design, manufacturing, or production based on the technical content disclosed in this application are merely conventional technical means and should not be construed as insufficient disclosure of the content of this application.
[0048] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment that is mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments without conflict.
[0049] Unless otherwise defined, the technical or scientific terms used in this application shall have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. The terms “a,” “an,” “an,” “the,” and similar words used in this application do not indicate quantity limitation and may indicate singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof used in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units not listed, or may include other steps or units inherent to these processes, methods, products, or devices. The terms “connected,” “linked,” “coupled,” and similar words used in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. “Multiple” used in this application refers to two or more. “And / or” describes the relationship between related objects, indicating that three relationships may exist; for example, “A and / or B” can represent: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following objects are in an "or" relationship. The terms "first," "second," and "third" used in this application are merely to distinguish similar objects and do not represent a specific ordering of the objects.
[0050] Figure 1 This is a schematic diagram illustrating the application environment of the AR game control method according to an embodiment of this application. The AR game control method provided in this application can be applied to, for example... Figure 1 The application environment shown. For example... Figure 1 As shown, server 101 and AR device 102 communicate via a network. Server 101 sends a first UDP packet to the target AR device at preset time intervals. The target AR device 102 returns device information to server 101 based on the first UDP packet. Server 101 then responds to the target AR device according to game management instructions configured based on the device information. The AR device can be, but is not limited to, AR glasses, AR helmets, and other portable AR devices. Server 101 can be implemented using a standalone server or a server cluster consisting of multiple servers.
[0051] This embodiment provides an AR game control method. Figure 2 This is a flowchart of an AR game control method according to an embodiment of this application, such as... Figure 2 As shown, the process includes the following steps:
[0052] Step S201: Based on a preset time interval, send the first UDP packet to the target AR device.
[0053] The game control platform broadcasts UDP packets every preset time interval (e.g., 60 seconds). A UDP packet is the basic unit of UDP protocol transmission, consisting of a header and data. The UDP packet header contains the source port number and the target AR device's port number, used to identify the sender and receiver applications.
[0054] UDP is a connectionless protocol. UDP packets are transmitted relatively quickly, and the transmission process is simple, with low latency and low resource consumption.
[0055] In some embodiments, to improve the security and reliability of UDP packet transmission, the following steps are included before step S201:
[0056] Step S301: Obtain the list of AR devices in the venue, determine the target AR device based on the list of AR devices in the venue, and obtain the device serial number of the target AR device.
[0057] The venue AR device list contains the serial numbers of all AR devices in the venue. Select the target AR device to be operated from the venue AR list. The target AR device can be any AR device playing the target game, or it can be a single or multiple specified AR devices playing the target game.
[0058] The list of AR devices at the venue can be obtained from the device information returned by the AR devices, or it can be obtained directly from the AR device management platform. Figure 3 This is a schematic diagram of an AR device list acquisition method according to an embodiment of this application, such as... Figure 3As shown, the game control platform responds to the game administrator's instruction to obtain the venue device list, retrieves the venue AR device list from the device management platform, or sends UDP packets to all AR devices (glasses) in the venue in the form of broadcast, so as to instruct the AR devices to respond to the UDP packets and return their own device information. All the returned device information is integrated to obtain the venue AR device list.
[0059] Step S302: Generate a target message based on the device serial number of the target AR device.
[0060] The target message consists of a message header containing the target AR device's serial number and an instruction data portion instructing the target AR device to return device information.
[0061] Step S303: Convert the target message into a JSON string.
[0062] JSON strings are a universal data exchange format that enables data transfer between different platforms and systems. JSON strings are generally more lightweight and readable than other formats (such as XML), and they consume relatively less network bandwidth, thus improving data transfer efficiency. Furthermore, storing data as JSON strings in databases or files simplifies the data reading and writing process.
[0063] Step S304: Convert the JSON string into Base64 encoded form to obtain the first UDP packet.
[0064] Base64 encoding converts binary data into plain text strings containing only printable ASCII characters. Therefore, Base64-encoded strings can be transmitted via text protocols without data corruption or unreadableness. Furthermore, Base64-encoded strings are no longer the original encrypted plaintext strings, making them more difficult for unauthorized personnel to recognize and understand, thus increasing data confidentiality.
[0065] In some embodiments, step S304 includes:
[0066] Step S3041: Encrypt the JSON string using the RSA asymmetric encryption algorithm and the SHA-256 signature algorithm respectively to obtain the encrypted string.
[0067] RSA is an asymmetric encryption algorithm that protects the confidentiality and integrity of data based on the intractability of the product of two large prime numbers. SHA-256 (Secure Hash Algorithm 256) is a secure algorithm for hash functions that can convert data of arbitrary length into a fixed-length 256-bit (32-byte) hash value.
[0068] The SHA-256 signature algorithm is combined with the RSA asymmetric encryption algorithm to generate and verify digital signatures. The game control platform uses its own private key to encrypt the hash value of the data, generating a digital signature, and sends the signature along with the data to the target AR device. After receiving the data, the target AR device uses the game control platform's public key to decrypt the signature, performs a hash calculation on the received data, and then compares the two hash values to verify the integrity and authenticity of the data.
[0069] Step S3042: Convert the encrypted string into Base64 encoded form to obtain the first UDP packet.
[0070] For different types of UDP packets, the AR device on the local area network can correctly parse different instructions and complete the start, stop, and restart commands from the control end. Because problems such as instruction tampering and malicious transmission are inevitable within the local area network, the commands are encrypted using RSA-based asymmetric encryption and signed using SHA-256 parameters. The AR device must decrypt and verify the signature before executing the command.
[0071] Step S202: Receive device information returned by the target AR device based on the first UDP packet.
[0072] After receiving the UDP packet, the target AR device returns its own device information, which includes, but is not limited to, battery level, model number, and serial number.
[0073] Step S203: Perform a response operation on the target AR device according to the game management instructions configured based on the device information. The response operation includes at least one of AR device addition, AR device removal, game launch, game shutdown, and game restart.
[0074] In some embodiments, step S203 specifically includes:
[0075] Step S2031: If the game management command is an "Add Device" command, add the AR device from the "Add Device" command to the target game's device list; or
[0076] Step S2032: If the game management command is a device removal command, remove the AR device from the device list in the device removal command; or
[0077] Step S2033: If the game management command is a game launch command, instruct the target AR device to open the target game; or
[0078] Step S2034: If the game management command is a "close game" command, instruct the target AR device to close the target game; or
[0079] Step S2035: If the game management command is a restart game command, instruct the target AR device to restart the target game.
[0080] Within a local area network, an AR game control platform allows for the starting, stopping, and restarting of AR games. By utilizing information such as the AR device's battery level, model, and serial number, operators can accurately manage AR devices within the venue, ensuring their continuous and healthy operation. Venue game controllers can add or remove devices, and start, stop, and restart games based on device status messages.
[0081] Figure 4 This is a schematic diagram of an AR game launch method according to an embodiment of this application, such as... Figure 4 The game control platform responds to the game launch command issued by the game administrator by broadcasting a UDP packet generated based on the game launch command to the target AR device (glasses) to instruct the glasses to launch the target game.
[0082] In some embodiments, step S2033 specifically includes:
[0083] Step S401: Obtain the second UDP packet based on the game launch command and the device serial number of the target AR device.
[0084] Step S402: Send the second UDP packet to the target AR device to instruct the target AR device to decrypt and / or verify the signature of the second UDP packet, obtain the game start instruction information, and start the target game according to the game start instruction information.
[0085] Each UDP packet must be converted from JSON to a JSON string, then encrypted with a key, and finally converted to base64 before being sent. At the same time, the receiver must also decrypt the received message after it has been converted from base64 to JSON, and then convert it to the corresponding data according to the specific message type.
[0086] In some embodiments, step S203 further includes:
[0087] Step S2036: If the game management instruction is a batch launch instruction, instruct all AR devices in the target device list to open the target game.
[0088] Step S2037: If the game management command is a batch shutdown command, instruct all AR devices in the target device list to shut down the target game, where the target device list is the list of AR devices corresponding to the target game.
[0089] This embodiment supports batch launching and closing of games. For example, if the target scenario is an AR game experience center, when the center is about to close, the game control platform can send a batch shutdown command to instruct all AR devices under its control to close the target game.
[0090] Through steps S201 to S203 above, a first UDP packet is sent to the target AR device at a preset time interval. Device information returned by the target AR device based on the first UDP packet is received. According to the game management instructions configured based on the device information, a response operation is performed on the target AR device. This response operation includes at least one of adding an AR device, removing an AR device, starting the game, closing the game, and restarting the game. This solves the problem of high communication costs in AR game control methods. The UDP packet transmission method provides lightweight, fast, and reliable control of AR game applications, saving transmission resources while ensuring secure transmission of command data. Data is encrypted using RSA encryption and SHA-256 signature algorithms to prevent information tampering and malicious transmission.
[0091] In some embodiments, the device information includes device battery level, device model, and device serial number; the AR game control method further includes:
[0092] If the device's battery level is lower than a preset threshold, a charging prompt message will be generated based on the device model, battery level, and serial number.
[0093] If the device's battery level is below a preset threshold (e.g., 15%), the game administrator will be reminded to charge the AR device to prevent the game from being forced to terminate due to the AR device running out of power, which would reduce the user experience.
[0094] In summary, the AR game control method provided in this application adopts UDP packet transmission during the control of AR game applications, which improves transmission efficiency, saves transmission resources, and ensures secure transmission of command data. Furthermore, it encrypts the data using RSA encryption and SHA-256 signature algorithms to prevent information from being tampered with or maliciously sent during transmission.
[0095] It should be noted that the steps shown in the above process or in the flowchart of the accompanying figures can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0096] This embodiment also provides an AR game control system, which is used to implement the above embodiments and preferred embodiments, and will not be repeated as described above. As used below, the terms "module," "unit," "subunit," etc., can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0097] Figure 5 This is a structural block diagram of the AR game control system according to an embodiment of this application, such as... Figure 5 As shown, the system includes: a data sending module 51, a data receiving module 52, and an instruction response module 53.
[0098] The data sending module 51 is used to send a first UDP packet to the target AR device based on a preset time interval.
[0099] In some embodiments, the data sending module 51 includes: a device determination module, a message generation module, a first format conversion module, and a second format conversion module.
[0100] The device identification module is used to obtain a list of AR devices in the venue, identify the target AR device based on the list, and obtain the device serial number of the target AR device.
[0101] The message generation module is used to generate target messages based on the target AR device's serial number;
[0102] The first format conversion module is used to convert the target message into a JSON string;
[0103] The second format conversion module is used to convert the JSON string into Base64 encoded form to obtain the first UDP packet.
[0104] In some embodiments, the second format conversion module includes an encryption module and a data conversion module.
[0105] The encryption module is used to encrypt JSON strings based on the RSA asymmetric encryption algorithm and the SHA-256 signature algorithm respectively, to obtain encrypted strings.
[0106] The data conversion module is used to convert the encrypted string into Base64 encoded form to obtain the first UDP packet.
[0107] Data receiving module 52 is used to receive device information returned by the target AR device based on the first UDP packet;
[0108] The instruction response module 53 is used to perform response operations on the target AR device according to the game management instructions configured based on device information. The response operations include at least one of AR device addition, AR device removal, game start, game shutdown, and game restart.
[0109] In some embodiments, the instruction response module 53 includes a device addition module, a device removal module, a game launch module, a game shutdown module, and a game restart module.
[0110] The device adding module is used to add AR devices to the target game's device list when the game management command is an "Add Device" command.
[0111] The device removal module is used to remove AR devices from the device list when the game management command is a device removal command.
[0112] The game launch module is used to instruct the target AR device to open the target game when the game management command is the game launch command.
[0113] The game shutdown module is used to instruct the target AR device to close the target game when the game management command is to close the game.
[0114] The game restart module is used to instruct the target AR device to restart the target game when the game management command is a restart game command.
[0115] In some embodiments, the game launch module includes a data transmission generation module and a launch command response module.
[0116] The data generation module generates a second UDP packet based on the game launch command and the device serial number of the target AR device.
[0117] The startup command response module is used to send the second UDP packet to the target AR device to instruct the target AR device to decrypt and verify the signature of the second UDP packet, obtain the game startup command information, and start the target game according to the game startup command information.
[0118] In some embodiments, the instruction response module 53 further includes a batch start module and a batch stop module.
[0119] The batch launch module is used to instruct all AR devices in the target device list to open the target game when the game management command is a batch launch command.
[0120] The batch shutdown module is used to instruct all AR devices in the target device list to shut down the target game when the game management command is a batch shutdown command. The target device list is the list of AR devices corresponding to the target game.
[0121] In this embodiment, the data sending module 51 sends a first UDP packet to the target AR device at a preset time interval. The data receiving module 52 receives the device information returned by the target AR device based on the first UDP packet. The command response module 53 responds to the target AR device according to the game management commands configured based on the device information. This solves the problem of high communication costs in AR game control methods. By using UDP packet transmission, AR game applications can be controlled lightweightly, quickly, and reliably, saving transmission resources while ensuring secure transmission of command data. Data is encrypted using RSA encryption algorithm and SHA-256 signature algorithm to prevent information from being tampered with or maliciously sent.
[0122] In some embodiments, the device information includes device battery level, device model, and device serial number, and the system also includes a charging reminder module.
[0123] The charging reminder module is used to generate charging reminder information based on the device model, device battery level, and device serial number when the device battery level is lower than a preset battery threshold.
[0124] It should be noted that the above modules can be functional modules or program modules, and can be implemented through software or hardware. For modules implemented through hardware, the above modules can reside in the same processor; or the above modules can be located in different processors in any combination.
[0125] This embodiment also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0126] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0127] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:
[0128] S1, based on a preset time interval, sends the first UDP packet to the target AR device.
[0129] S2, Receive device information returned by the target AR device based on the first UDP packet.
[0130] S3, according to the game management instructions configured based on device information, performs a response operation on the target AR device, wherein the response operation includes at least one of AR device addition, AR device removal, game start, game shutdown and game restart.
[0131] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.
[0132] In one embodiment, Figure 6 This is a schematic diagram of the internal structure of an electronic device according to an embodiment of this application, such as... Figure 6 As shown, an electronic device is provided, which can be a server, and its internal structure diagram can be as follows. Figure 6 As shown, this electronic device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database stores data. The network interface communicates with external terminals via a network connection. When the computer program is executed by the processor, it implements an AR game control method.
[0133] Those skilled in the art will understand that Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the electronic device to which the present application is applied. The specific electronic device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0134] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.
[0135] Those skilled in the art should understand that the technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments have been described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0136] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. An AR game control method, characterized in that, The method includes: Obtain a list of AR devices in the venue, determine the target AR device based on the list, and obtain the device serial number of the target AR device. In this process, UDP packets are broadcast to all AR devices in the venue to instruct the AR devices to respond to the UDP packets and return their own device information. All returned device information is integrated to obtain the list of AR devices in the venue. Generate a target message based on the device serial number of the target AR device; Convert the target message into a JSON string; The JSON string is converted to Base64 encoded form to obtain the first UDP packet. Specifically, this includes encrypting the JSON string using both the RSA asymmetric encryption algorithm and the SHA-256 signature algorithm to obtain an encrypted string. The encrypted string is converted into the Base64 encoded form to obtain the first UDP packet; Based on a preset time interval, send the first UDP packet to the target AR device; Receive device information returned by the target AR device based on the first UDP packet; According to the game management instructions configured based on the device information, a response operation is performed on the target AR device, wherein the response operation includes at least one of AR device addition, AR device removal, game launch, game shutdown, and game restart.
2. The method according to claim 1, characterized in that, The step of responding to the target AR device according to the game management instructions configured based on the device information includes: If the game management command is an "Add Device" command, the AR device in the "Add Device" command will be added to the target game's device list; or If the game management command is a device removal command, remove the AR device from the device list in the device removal command; or If the game management instruction is a game launch instruction, the target AR device is instructed to open the target game; or If the game management command is a game-closing command, instruct the target AR device to close the target game; or If the game management command is a game restart command, the target AR device is instructed to restart the target game.
3. The method according to claim 2, characterized in that, When the game management instruction is a game launch instruction, instructing the target AR device to open the target game includes: The second UDP packet is obtained based on the game launch command and the device serial number of the target AR device; The second UDP packet is sent to the target AR device to instruct the target AR device to decrypt and verify the signature of the second UDP packet, obtain the game launch instruction information, and launch the target game according to the game launch instruction information.
4. The method according to claim 1, characterized in that, The step of responding to the target AR device according to the game management instructions configured based on the device information includes: When the game management instruction is a batch launch instruction, it instructs all AR devices in the target device list to open the target game; When the game management instruction is a batch shutdown instruction, all AR devices in the target device list are instructed to shut down the target game, wherein the target device list is the list of AR devices corresponding to the target game.
5. The method according to claim 1, characterized in that, The device information includes device battery level, device model, and device serial number; the method further includes: If the device's battery level is lower than a preset battery threshold, a charging prompt message is generated based on the device model, the device's battery level, and the device serial number.
6. An AR game control system, characterized in that, The system includes: a data sending module, a data receiving module, and an instruction response module; The data sending module is used to obtain a list of AR devices in the venue, determine a target AR device based on the list of AR devices in the venue, and obtain the device serial number of the target AR device. In this way, UDP packets are sent to all AR devices in the venue in the form of broadcast to instruct the AR devices to respond to the UDP packets and return their own device information. All returned device information is integrated to obtain a list of AR devices in the venue. Generate a target message based on the device serial number of the target AR device; Convert the target message into a JSON string; The JSON string is converted to Base64 encoded form to obtain the first UDP packet. Specifically, this includes encrypting the JSON string using both the RSA asymmetric encryption algorithm and the SHA-256 signature algorithm to obtain an encrypted string. The encrypted string is converted into the Base64 encoded form to obtain the first UDP packet; Based on a preset time interval, send the first UDP packet to the target AR device; The data receiving module is used to receive device information returned by the target AR device based on the first UDP packet; The instruction response module is used to perform response operations on the target AR device according to the game management instructions configured based on the device information, wherein the response operations include at least one of AR device addition, AR device removal, game launch, game shutdown, and game restart.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the AR game control method as described in any one of claims 1 to 5.
8. A storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the AR game control method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Data encryption method and system for public network transmission
CN111818026A
Control and / or registration of smart devices, locally by assistant client device
CN112335204A