Communication method and device for augmented reality equipment, equipment and storage medium

By responding to communication connection requests in the AR device, accurately determine the target communication mode and appropriately process the data, the problem of low communication efficiency of AR devices in complex network environments is solved, efficient, stable and secure data transmission is achieved, and user experience is significantly improved.

CN120201110APending Publication Date: 2025-06-24BEIJING SUPERHEXA CENTURY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510419454.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-03
Publication Date
2025-06-24

AI Technical Summary

Technical Problem

Existing AR devices have low communication efficiency in complex network environments, making it difficult to meet the rapid transmission needs of large amounts of data in AR applications, affecting the user experience.

Method used

By responding to the communication connection request, the device type and communication connection data of the second device are determined, the target communication mode is accurately determined, and the data is encapsulated based on the mode, including compression, encryption, segmentation and packaging operations.

Benefits of technology

It improves the communication stability, efficiency and security between AR devices and other devices, and adapts to diverse application scenarios. Whether it is high-speed transmission within the LAN or stable communication across the network, it can be effectively implemented, significantly enhancing the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120201110A_ABST
    Figure CN120201110A_ABST
Patent Text Reader

Abstract

The invention provides a communication method and device for augmented reality equipment, equipment and a storage medium, and belongs to the technical field of augmented reality communication, and the method comprises the steps: responding to a received communication connection request instruction, and determining the equipment type of second equipment based on the communication connection request instruction. And determining a target communication mode based on the device type of the second device and the communication connection data, and determining a first processing identifier based on the target communication mode and the to-be-transmitted first data. And performing data encapsulation processing on the first data based on the first processing identifier to obtain second data and a second processing identifier. And sending the second data and the second processing identification to the second equipment. The first processing identifier is used for indicating a data encapsulation processing mode of the first data. The second processing identifier is used for indicating a data recovery mode of the second data. According to the communication method and device for the augmented reality equipment, the equipment and the storage medium provided by the invention, the communication efficiency of the augmented reality equipment can be improved, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure belongs to the technical field of augmented reality communication, and more specifically, relates to a communication method, apparatus, device, and storage medium for augmented reality devices. Background Art

[0002] The application of Augmented Reality (AR) technology is becoming increasingly widespread in various fields, from entertainment and education to industry and healthcare. People's requirements for the functions and performance of AR devices are also getting higher and higher, expecting to obtain a smoother and more efficient interaction experience. Among various interaction devices, as an emerging augmented reality device, AR glasses are gradually becoming more important. Effective communication and application integration between devices are the keys to enhancing the user experience.

[0003] In the existing applications of AR devices, there is still a problem of low communication efficiency. Most AR devices only support simple communication methods. In a complex network environment, the stability and reliability of data transmission are affected, making it difficult to meet the rapid transmission requirements of a large amount of data in AR applications, resulting in relatively low communication transmission efficiency and affecting the user experience. Summary of the Invention

[0004] The purpose of the present disclosure is to provide a communication method, apparatus, device, and storage medium for augmented reality devices to improve the communication efficiency of augmented reality devices and enhance the user experience.

[0005] In the first aspect of the embodiments of the present disclosure, a communication method for augmented reality devices is provided, including: In response to receiving a communication connection request instruction, determining the device type of a second device based on the communication connection request instruction; the second device is a device communicating with a first device, and the first device is an augmented reality device of a first user; Determining a target communication mode based on the device type of the second device and communication connection data, and determining a first processing identifier based on the target communication mode and first data to be transmitted; Performing data encapsulation processing on the first data based on the first processing identifier to obtain second data and a second processing identifier; sending the second data and the second processing identifier to the second device; the first processing identifier is used to indicate the data encapsulation processing method of the first data; the second processing identifier is used to indicate the data restoration method of the second data.

[0006] In the second aspect of the embodiments of the present disclosure, a communication apparatus for augmented reality devices is provided, including: A connection response module, configured to, in response to receiving a communication connection request instruction, determine the device type of a second device based on the communication connection request instruction; the second device is a device communicating with a first device, and the first device is an augmented reality device of a first user. A calculation module, configured to determine a target communication mode based on the device type of the second device and communication connection data, and determine a first processing identifier based on the target communication mode and first data to be transmitted. A communication module, configured to perform data encapsulation processing on the first data based on the first processing identifier to obtain second data and a second processing identifier; and send the second data and the second processing identifier to the second device; the first processing identifier is used to indicate the data encapsulation processing method of the first data; the second processing identifier is used to indicate the data restoration method of the second data.

[0007] In a third aspect of the embodiments of the present disclosure, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and running on the processor, where when the processor executes the computer program, the steps of the above communication method for an augmented reality device are implemented.

[0008] In a fourth aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above communication method for an augmented reality device are implemented.

[0009] The beneficial effects of the communication method, device, equipment, and storage medium for an augmented reality device provided by the embodiments of the present disclosure are as follows: The embodiments of the present disclosure can accurately determine the target communication mode based on different device types and complex communication connection data, adapt to diverse application scenarios, and effectively implement both high-speed transmission within a local area network and stable communication across networks. In terms of data processing, through reasonable first and corresponding second processing identifiers, operations such as targeted compression, encryption, segmentation, and encapsulation of data are performed. While ensuring data security, the data transmission efficiency is significantly improved, guaranteeing the efficient and reliable transmission of data. Overall, the embodiments of the present disclosure enhance the stability, efficiency, and security of communication between an augmented reality device and other devices, significantly enhancing the user experience in different application scenarios, and providing reliable technical support for device interconnection and data interaction in related fields. Description of the Drawings

[0010] To more clearly illustrate the technical solutions in the embodiments of the present disclosure, the following will briefly introduce the accompanying drawings required for use in the embodiments or the description of the prior art. Obviously, the accompanying drawings in the following description are only some embodiments of the present disclosure. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can also be obtained based on these drawings.

[0011] Figure 1 Schematic flowchart of a communication method for an augmented reality device provided by an embodiment of the present disclosure; Figure 2 Block diagram of a communication device for an augmented reality device provided by an embodiment of the present disclosure; Figure 3 Schematic block diagram of an electronic device provided by an embodiment of the present disclosure. Detailed implementation manners

[0012] In the following description, for the purpose of illustration rather than limitation, specific details such as specific system structures and technologies are presented to thoroughly understand the embodiments of the present disclosure. However, those skilled in the art should understand that the present disclosure can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from interfering with the description of the present disclosure.

[0013] To make the objectives, technical solutions, and advantages of the present disclosure clearer, the following will be described through specific embodiments in conjunction with the accompanying drawings.

[0014] Please refer to Figure 1 , Figure 1 Schematic flowchart of a communication method for an augmented reality device provided by an embodiment of the present disclosure. The method may include S101 to S103.

[0015] S101: In response to receiving a communication connection request instruction, determine the device type of the second device based on the communication connection request instruction. The second device is a device that communicates with the first device, and the first device is the augmented reality device of the first user.

[0016] In this embodiment, the communication connection request instruction is a trigger message for opening a communication link sent by the second device to the first device. The communication connection request instruction may include device identification information, user information, MAC address, device model, version number, etc. of the second device. The first device is the augmented reality device used by the first user, and the first device may include AR glasses, head-mounted displays, etc. The second device is a device used to interact and communicate with the first device, and the second device may be an augmented reality device used by the second user or an Internet of Things device used by the first user.

[0017] In this embodiment, the device identification information, user information, MAC address, device model, and version number of the second device are determined based on the communication connection request instruction. The second device type is determined based on the device identification information, user information, MAC address, device model, and version number of the second device.

[0018] Exemplarily, player A (the first user) wears an AR glasses (the first device) and enters a multiplayer AR game. Player B (the second user) also joins the same game room through their AR device (the second device) and sends a communication connection request instruction to player A's AR glasses. The communication connection request instruction includes the unique device ID of player B's AR device, the list of communication protocols supported by the device, such as Bluetooth 5.0, Wi-Fi Direct, etc., and indicates the current device power and the version number of the running game client. After receiving the communication connection request instruction, player A's AR glasses recognize that it is a request from another AR device.

[0019] S102: Determine the target communication mode based on the device type of the second device and the communication connection data, and determine the first processing identifier based on the target communication mode and the first data to be transmitted.

[0020] In this embodiment, the device type of the second device may include the augmented reality device of the second user or the Internet of Things device of the first user. The communication connection data may include network type, network status parameters, connection history information between devices, geographical location information of the devices, etc. The target communication mode may include communication methods and communication protocols. The first data may be text information, image data, etc. The first processing identifier is the indication data for processing the first data, and the first processing identifier may include information such as data compression method, encryption algorithm, data segmentation, and encapsulation rules.

[0021] In this embodiment, determining the target communication mode based on the device type of the second device and the communication connection data includes: in response to the device type of the second device being the augmented reality device of the second user: Determine the local area network information of the second device based on the communication connection data, and determine the target communication method based on the local area network information of the second device.

[0022] Determine the network environment status data based on the communication connection data, and determine the target communication protocol from the first protocol set based on the network environment status data.

[0023] The second user is the user who communicates with the first user.

[0024] In response to the target communication device type being the Internet of Things terminal device of the first user: Determine the network environment status data based on the communication connection data, and determine the target communication protocol from the second protocol set based on the network environment status data.

[0025] In this embodiment, when the second device type is the AR device of the second user, the target communication method is determined according to the local area network information of the second device.

[0026] Exemplarily, for similar AR devices in the same local area network, the peer-to-peer communication method can be selected. For similar AR devices not in the same local area network, the communication method based on server relay can be selected.

[0027] In this embodiment, the target communication protocol can be determined according to the communication connection data and the data type of the first data. The network bandwidth, network latency rate, network packet loss rate, and network signal strength are determined based on the communication connection data. The communication protocol is determined based on the network bandwidth, network latency rate, network packet loss rate, network signal strength, and the data type of the first data.

[0028] Exemplarily, when the second device is an Internet of Things device, and the network bandwidth obtained based on the communication connection data is high and the latency is low, and the data type of the first data is text data, then the low-bandwidth and low-power consumption MQTT protocol can be selected for communication between devices.

[0029] In this embodiment, after determining the target communication mode adopted between the first device and the second device, the first processing identifier is determined based on the data characteristics of the first data, and the first data is compressed, encrypted, encapsulated, and transmitted based on the first processing identifier.

[0030] Exemplarily, after the first device of player A receives a communication connection request instruction, it identifies that the device type sending the request is the AR device of the second user, and parses communication connection data such as the basic attributes of the network currently connected by the second device and the signal strength data from the second device. When the first device enables the communication function, it can record the available networks scanned around as part of the communication connection data. At the same time, the first device interacts with the server, and the server provides communication connection data for the first device according to the registration information, geographical location information, and previous connection records of the first device, such as the local area network information of other known devices or network environment status data.

[0031] The first device obtains the local area network information of the second device of player B through the communication connection data, and determines that the second device and its own first device are in the same local area network, then determines that the target communication method is the peer-to-peer communication mode. If the first device calculates through the communication connection data that the network environment quality evaluation index is greater than the preset environment quality threshold, then it determines that the target communication protocol is Wi-Fi Direct.

[0032] The first data to be transmitted is the character position information, attack action instructions, etc. of player A in the game. The data type is real-time coordinates and a simple instruction set. Since it is point-to-point communication and the data volume is less than the preset data volume threshold, and at the same time this data transmission scenario requires real-time performance, combined with the adopted Wi-Fi Direct protocol and data type, it is determined not to perform data compression, and the first processing identifier records this information. The data is encapsulated to obtain the second data and the second processing identifier, and is sent to the AR device of player B. The AR device of player B restores the data according to the second processing identifier, realizing real-time battle interaction between the two parties in the game.

[0033] S103: Perform data encapsulation processing on the first data based on the first processing identifier to obtain the second data and the second processing identifier. Send the second data and the second processing identifier to the second device. The first processing identifier is used to indicate the data encapsulation processing method of the first data. The second processing identifier is used to indicate the data restoration method of the second data.

[0034] In this embodiment, the second processing identifier corresponds to the first processing identifier. The second processing identifier may include a decompression algorithm, a decryption algorithm and the corresponding key, a data recombination rule, a checksum verification method, etc., and is used to guide the second device to restore the second data to the original first data.

[0035] Exemplarily, the first device determines a compression algorithm, an encryption algorithm and a data encapsulation rule based on the first processing identifier. Perform data compression on the first data based on the compression algorithm, perform data encryption on the first data based on the encryption algorithm, perform data cutting on the first data based on the data encapsulation rule, and generate header information and a checksum. Encapsulate the cut data based on the header information and the checksum to obtain the second data. After processing the data, record the data processing process and generate the second processing identifier, and the second processing identifier is used to indicate the information required for data restoration. Transmit the second data and the second processing identifier to the second device.

[0036] Exemplarily, in a smart home system, the AR glasses (the first device) worn by the first user need to send the collected video data (the first data) to the first user's mobile phone (the second device). The first processing identifier indicates that the H.264 video compression standard, the AES-128 encryption algorithm, segment every 1024 bytes, and add a CRC-32 checksum are adopted for the video data. The first device processes the video data according to the first processing identifier to generate the second data and the second processing identifier. After receiving it, the mobile phone restores the original video data according to the information in the second processing identifier, using the corresponding decompression, decryption algorithms and checksum verification method, for the user to view the real-time situation at home, ensuring the efficiency and security of data transmission.

[0037] It can be concluded from the above that this embodiment can accurately determine the target communication mode based on different device types and complex communication connection data, adapt to diverse application scenarios, and effectively achieve both high-speed transmission within a local area network and stable communication across networks. In terms of data processing, through reasonable first processing identifiers and corresponding second processing identifiers, operations such as targeted compression, encryption, segmentation, and encapsulation of data are carried out. On the premise of ensuring data security, the data transmission efficiency is greatly improved, ensuring the efficient and reliable transmission of data. Overall, this embodiment enhances the stability, efficiency, and security of communication between the augmented reality device and other devices, significantly enhances the user experience in different application scenarios, and provides reliable technical support for device interconnection and data interaction in related fields.

[0038] In one embodiment of the present disclosure, the target communication mode includes a target communication method and a target communication protocol.

[0039] Determining the target communication mode based on the device type and communication connection data of the second device includes: In response to the device type of the second device being an augmented reality device of the second user: Determine the local area network information of the second device based on the communication connection data, and determine the target communication method based on the local area network information of the second device.

[0040] Determine the network environment status data based on the communication connection data, and determine the target communication protocol from the first protocol set based on the network environment status data.

[0041] The second user is a user who communicates with the first user.

[0042] In this embodiment, determining the target communication method based on the local area network information of the second device includes: Determine whether the first device and the second device are in the same local area network based on the local area network information of the second device and the local area network information of the first device.

[0043] If the first device and the second device are in the same local area network, determine the target communication method as the peer-to-peer communication mode.

[0044] If the first device and the second device are not in the same local area network, determine the target communication method as the relay communication mode based on the server.

[0045] In this embodiment, the point-to-point communication mode means that two devices directly establish a connection for data transmission without the intervention of an intermediate server, and is applicable to the situation where the distance between devices is relatively close and the network environment is stable. The relay communication mode based on the server forwards data through an intermediate server, can cross different network regions, and is applicable to scenarios where devices are not in the same local area network or the network environment is complex. The target communication protocol can include Bluetooth, Wi-Fi Direct, MQTT, WebSocket, etc. Different communication protocols have different characteristics in terms of transmission speed, bandwidth occupancy, latency, reliability, etc. The local area network information includes the network name, IP address segment, subnet mask, gateway address, etc. of the local area network where the device is located. The network environment status data can include parameters such as network bandwidth, network latency rate, and network packet loss rate.

[0046] Exemplarily, when the first device receives a communication connection request from the second device, the first device extracts the device type information of the second device based on the communication connection request. If it is determined that the second device is an augmented reality device of the second user, the communication connection data is further analyzed. The first device determines the local area network information of the second device through the obtained communication connection data, compares the local area network parameters of the first device and the second device, and determines whether they are in the same local area network. If they are in the same local area network, the target communication mode is set to the point-to-point communication mode; if they are not in the same local area network, it is set to the relay communication mode based on the server.

[0047] The first device calculates a network environment quality assessment index based on the network environment status data, and selects a suitable target communication protocol from a pre-set first protocol set according to the network environment quality assessment index. For example, if the network bandwidth is high, the latency is low, and the packet loss rate is low, a high-speed protocol such as Wi-Fi Direct or Bluetooth can be selected; if the network environment is poor, a protocol such as MQTT that adapts to low bandwidth and high latency can be selected.

[0048] Exemplarily, in an indoor AR navigation application scenario, user A wears AR glasses (the first device) and walks in a shopping mall, while user B also uses a similar AR device (the second device) on a different floor of the same shopping mall. When user B sends a navigation information sharing request to user A, after receiving the request, user A's AR glasses obtain the device type of user B as an AR device and analyze the communication connection data. It is found that user B's device is within the same shopping mall's Wi-Fi local area network as itself, so the target communication mode is determined to be the peer-to-peer communication mode. At the same time, it is detected that the current shopping mall Wi-Fi network has sufficient bandwidth and low latency, and Wi-Fi Direct is selected from the first protocol set as the target communication protocol. In this way, user B can quickly transmit detailed navigation marker information of his own location, such as 3D annotations of surrounding stores, the best path to the target store, etc. to user A in an efficient manner, and user A's AR glasses can receive and display this information in real time, helping user A find the target location more accurately and improving the convenience and accuracy of indoor navigation.

[0049] In this embodiment, the network environment status data includes network bandwidth, network latency rate, and network packet loss rate.

[0050] Determining the target communication protocol from the first protocol set based on the network environment status data includes: Calculating a network environment quality assessment index based on the network bandwidth, network latency rate, and network packet loss rate.

[0051] If the network environment quality assessment index is greater than or equal to the first threshold, then the target communication protocol is determined to be Bluetooth or Wi-Fi Direct.

[0052] If the network environment quality assessment index is less than the first threshold, then the target communication protocol is determined to be MQTT or WebSocket.

[0053] In this embodiment, calculating the network environment quality assessment index based on the network bandwidth, network latency rate, and network packet loss rate includes: substituting the network bandwidth, network latency rate, and network packet loss rate into the network environment quality assessment function to obtain the network environment quality assessment index.

[0054] The network environment quality assessment function is:

[0055] Where Q represents the network environment quality assessment index, B represents the current network bandwidth, represents the minimum value of the network bandwidth, represents the maximum value of the network bandwidth, D represents the network latency rate, represents the minimum value of the network latency rate, represents the maximum value of the network latency rate, L represents the network packet loss rate, represents the minimum value of the network packet loss rate, represents the maximum value of the network packet loss rate, and represents the weight coefficient, .

[0056] Exemplarily, the higher the network bandwidth, the more obvious the improvement in the network environment quality; the higher the network latency rate, the worse the network quality; the higher the network packet loss rate, the worse the network quality. The value range of Q is between -1 and 1. and represent the weight coefficient, which is used to adjust the influence degree of each factor on the network environment quality evaluation index. For example, if the application scenario of the augmented reality device is sensitive to bandwidth and relatively insensitive to latency and packet loss, the value of can be appropriately increased. The first threshold can be set to 0.5. When Q is greater than or equal to 0.5, it indicates that the network environment quality is good, and the target communication protocol can be determined as Bluetooth or Wi-Fi Direct; when Q is less than 0.5, it indicates that the network environment quality is poor, and the target communication protocol can be determined as MQTT or WebSocket.

[0057] In this embodiment, the communication method is flexibly selected according to whether the devices are in the same local area network. In the local area network, the peer-to-peer mode can reduce data transmission latency and server load, and improve transmission efficiency; when crossing the local area network, the server is used for data transfer to ensure data reachability, enhancing the stability and adaptability of communication.

[0058] In this embodiment, the communication protocol is selected by calculating the evaluation index through comprehensive network bandwidth, latency rate and packet loss rate, which can accurately match the network environment, enable the high-speed protocol to give full play to its advantages in a high-quality network, and ensure communication with the low-speed and high-adaptability protocol in a poor network, thereby optimizing the communication performance between augmented reality devices and improving the user experience.

[0059] In an embodiment of the present disclosure, the target communication mode includes the target communication protocol.

[0060] Determining the target communication mode based on the device type and communication connection data of the second device includes: In response to the target communication device type being the Internet of Things terminal device of the first user: Determine the network environment state data based on the communication connection data, and determine the target communication protocol from the second protocol set based on the network environment state data.

[0061] In this embodiment, the Internet of Things (IoT) terminal devices may include smart mobile terminals, various sensors, smart home appliances, wearable devices, etc. The IoT terminal devices can collect environmental data or execute control instructions. The second protocol set is a preset communication protocol, which may include communication protocols such as ZigBee, LoRa, NB-IoT, etc. The communication connection data may include information such as network type, network signal strength, and the number of connected devices in the current network. The communication connection data reflects the network environment status of the first device and the second device.

[0062] Exemplarily, in a smart home system, the user's AR device (the first device) serves as a control center and communicates with the IoT terminal devices in the home. When the AR device enters the home, the smart home system senses the user and the AR device, and each smart device in the smart home system sends a communication connection request to the AR device. For example, after the AR device receives the communication connection request from the smart bulb, it analyzes the communication connection data and obtains that it is currently in a Wi-Fi network environment. By detecting the network environment status data, it finds that the network bandwidth is sufficient and the latency is low. So it selects the Wi-Fi protocol from the second protocol set as the target communication protocol. The AR device sends voice control instructions such as on / off and brightness adjustment to the smart bulb through this target communication protocol, and the smart bulb can respond quickly, realizing a convenient home control function and enhancing the user's living experience.

[0063] This embodiment can flexibly select a suitable communication protocol according to the network environment to ensure efficient communication between the IoT terminal device and the AR device. Through intelligent adaptation, fast transmission of control instructions can be achieved. It not only improves the user's operation convenience and system response speed, but also enhances the reliability of IoT device control, bringing a better usage experience to the user.

[0064] In an embodiment of the present disclosure, the target communication mode includes a target communication method and a target communication protocol.

[0065] Determining a first processing identifier based on the target communication mode and the first data to be transmitted includes: If the target communication method is a point-to-point communication mode: Determine a data compression method based on the target communication protocol and the data type of the first data.

[0066] Determine the first processing identifier based on the data compression method.

[0067] In this embodiment, the data compression method can be selected according to the network bandwidth of the target communication protocol and the first data type. For example, for text data, character encoding compression can be used under a low-bandwidth protocol, and for image data, a compression algorithm with higher quality can be selected under a high-bandwidth protocol.

[0068] Exemplarily, after determining that the target communication mode is the point-to-point communication mode, the first device analyzes the characteristics of the target communication protocol such as bandwidth and latency, as well as the type of the first data. For text data and a communication protocol with low bandwidth, a dictionary-based compression algorithm can be selected; for image data and sufficient bandwidth, a compression method that maintains a high definition can be selected. Determine the first processing identifier according to the selected data compression method, and the first processing identifier can also include some auxiliary information, such as the checksum and version number of the data. In the implementation process, through a preset algorithm library and rule engine, the appropriate compression method and processing identifier can be automatically matched and determined according to the input protocol and data type.

[0069] In this embodiment, determining the data compression method based on the target communication protocol and the data type of the first data includes: Determine the data compression method based on the target communication protocol, the data type of the first data, and the compression method matching function.

[0070] The compression method matching function is:

[0071] Where P represents the matching value, represents the weight coefficient of the d-th data type, S represents the byte size of the first data, represents the longest transmission time, and C represents the available channel capacity of the target communication protocol.

[0072] Exemplarily, when the data type of the first data is text data: is 0.15. When P < 0.1, match the LZ77 compression algorithm; when 0.1 P < 0.3, match the LZ78 compression algorithm. The LZ77 compression algorithm is based on a sliding window and compresses by outputting triples, which is suitable for locally repeated data; LZ78 uses dictionary coding, adding new phrases to the dictionary and assigning indexes, which is suitable for long repeated sequences. The LZ77 decoding is simple, and the LZ78 decoding requires maintaining a dictionary and is complex to process. The former is used for small files, and the latter is suitable for scenarios such as large files.

[0073] When the data type of the first data is image data: is 0.4. When P < 0.2, match the PNG compression algorithm; when 0.2 P < 0.5, match the JPEG compression algorithm.

[0074] When the data type of the first data is audio data: is 0.25. When P < 0.15, match the AAC compression algorithm; when 0.15 P Match the MP3 compression algorithm at 0.3.

[0075] When the data type of the first data is video data: It is 0.6. Match the H.264 compression algorithm when P < 0.3; when 0.3 Match the H.265 compression algorithm when P.

[0076] Exemplarily, a communication system whose algorithm library contains various compression algorithms, such as LZ77, LZ78, etc. for text data, JPEG, PNG, etc. for image data, MP3, AAC, etc. for audio data, and H.264, H.265, etc. for video data. When the input target communication protocol is Bluetooth (low-bandwidth protocol) and the first data type is text, the rule engine can select the LZ77 compression algorithm from the algorithm library and generate a processing identifier containing the algorithm information to indicate subsequent LZ77 compression operations on the text data.

[0077] When the target communication protocol is Wi-Fi Direct and the data type is image, the rule engine can select the JPEG compression algorithm, generate a processing identifier containing JPEG compression information, and perform corresponding processing on the image data. For audio data, if under the low-bandwidth MQTT protocol, MP3 compression can be selected, and the processing identifier will indicate the use of MP3 compression and related parameters to ensure efficient data transmission and compliance with the protocol bandwidth limit.

[0078] Exemplarily, in a local file sharing scenario, the AR device (the first device) of user A wants to transmit a high-definition picture (the first data) to the AR device (the second device) of user B via Bluetooth (the target communication protocol). Since it is a point-to-point communication and the Bluetooth bandwidth is limited, the first device selects a lossy compression method suitable for the picture, such as the JPEG compression algorithm that appropriately reduces the picture resolution and color depth, according to the picture data type and the Bluetooth protocol characteristics.

[0079] The first device compresses the picture according to the JPEG compression algorithm, and sends the processed second data and the second identification information to the AR device of user B via Bluetooth. After receiving the data, the AR device of user B performs decompression and restoration operations according to the information in the second processing identifier, so as to obtain the picture content, achieving the purpose of efficiently transmitting the picture file under limited bandwidth.

[0080] This embodiment can achieve an automated and efficient data processing and transmission process. This embodiment can accurately select the compression method according to different communication protocols and data characteristics, effectively reduce the data transmission volume, improve the transmission efficiency, such as the lossy compression of pictures under low-bandwidth Bluetooth. The automatic matching mechanism of this embodiment simplifies the operation process, reduces human errors, and enhances the reliability of data transmission.

[0081] In one embodiment of the present disclosure, the target communication mode includes a target communication method and a target communication protocol.

[0082] Determining a first processing identifier based on the target communication mode and the first data to be transmitted includes: If the target communication method is a relay communication mode based on a server: Determine a data compression method based on the target communication protocol and the data type of the first data, and determine a data encryption method based on the target communication protocol and the security level of the first data.

[0083] Determine the first processing identifier based on the data compression method and the data encryption method.

[0084] In this embodiment, it is possible to determine which data encryption method to use according to the target communication protocol and the security level of the first data. For first-level data, high-strength encryption algorithms such as AES or RSA can be selected, and specific encryption methods can be selected in combination with the characteristics of the target communication protocol (such as whether it supports an encryption protocol, transmission delay tolerance, etc.). If the target communication protocol supports SSL / TLS and has extremely high security requirements, AES-256 can be selected; if public key encryption is required, RSA can be used.

[0085] For second-level data, DES or 3DES can be selected according to the trade-off between performance and security. In the implementation process, the first device will call the corresponding encryption library, such as the OpenSSL library, to generate a key or a key pair according to the selected encryption algorithm and perform an encryption operation on the data.

[0086] Exemplarily, in an online shopping system, a user's AR device (the first device) transmits order information (the first data) to a merchant server (the second device) through a server. If the order information contains the user's payment password, it is regarded as first-level data. When using the HTTP protocol (the target communication protocol) and adopting a relay communication mode based on the server, the user's payment password can be encrypted first using RSA to ensure its security during transmission. For the user's order details, which can be regarded as second-level data, 3DES encryption can be used, which can not only protect a certain level of data security but also not cause excessive performance overhead due to encryption, and transmit the data to the merchant server safely and efficiently through server relay.

[0087] The method of selecting an encryption method according to the security level and the target communication protocol in this embodiment helps to flexibly and reasonably protect data under different security requirements and performance requirements, preventing data leakage and tampering.

[0088] Corresponding to the communication method for an augmented reality device in the above embodiment Figure 2The block diagram of the communication device for an augmented reality device provided by an embodiment of the present disclosure. For the sake of illustration, only the parts related to the embodiments of the present disclosure are shown. Refer to Figure 2 The communication device 20 for the augmented reality device includes: a connection response module 21, a calculation module 22, and a communication module 23.

[0089] Among them, the connection response module 21 is configured to, in response to receiving a communication connection request instruction, determine the device type of the second device based on the communication connection request instruction. The second device is a device that communicates with the first device, and the first device is the augmented reality device of the first user.

[0090] The calculation module 22 is configured to determine a target communication mode based on the device type of the second device and communication connection data, and determine a first processing identifier based on the target communication mode and the first data to be transmitted.

[0091] The communication module 23 is configured to perform data encapsulation processing on the first data based on the first processing identifier to obtain second data and a second processing identifier. Send the second data and the second processing identifier to the second device. The first processing identifier is used to indicate the data encapsulation processing method of the first data. The second processing identifier is used to indicate the data restoration method of the second data.

[0092] In an embodiment of the present disclosure, the target communication mode includes a target communication method and a target communication protocol. The calculation module 22 is specifically configured to, in response to the device type of the second device being the augmented reality device of the second user: Determine the local area network information of the second device based on the communication connection data, and determine the target communication method based on the local area network information of the second device.

[0093] Determine the network environment status data based on the communication connection data, and determine the target communication protocol from the first protocol set based on the network environment status data.

[0094] The second user is a user who communicates with the first user.

[0095] In an embodiment of the present disclosure, the calculation module 22 is specifically further configured to determine whether the first device and the second device are in the same local area network based on the local area network information of the second device and the local area network information of the first device.

[0096] If the first device and the second device are in the same local area network, determine that the target communication method is the peer-to-peer communication mode.

[0097] If the first device and the second device are not in the same local area network, determine that the target communication method is the server-based relay communication mode.

[0098] In one embodiment of the present disclosure, the network environment status data includes network bandwidth, network latency rate, and network packet loss rate. The calculation module 22 is further specifically configured to calculate a network environment quality evaluation index based on the network bandwidth, network latency rate, and network packet loss rate.

[0099] If the network environment quality evaluation index is greater than or equal to the first threshold, it is determined that the target communication protocol is Bluetooth or Wi-Fi Direct.

[0100] If the network environment quality evaluation index is less than the first threshold, it is determined that the target communication protocol is MQTT or WebSocket.

[0101] In one embodiment of the present disclosure, the target communication mode includes the target communication protocol. The calculation module 22 is further specifically configured to, in response to the target communication device type being an IoT terminal device of the first user: Determine the network environment status data based on the communication connection data, and determine the target communication protocol from the second protocol set based on the network environment status data.

[0102] In one embodiment of the present disclosure, the target communication mode includes the target communication method and the target communication protocol. The communication module 23 is specifically configured to, if the target communication method is a point-to-point communication mode: Determine the data compression method based on the target communication protocol and the data type of the first data.

[0103] Determine the first processing identifier based on the data compression method.

[0104] In one embodiment of the present disclosure, the target communication mode includes the target communication method and the target communication protocol. The communication module 23 is further specifically configured to, if the target communication method is a server-based relay communication mode: Determine the data compression method based on the target communication protocol and the data type of the first data, and determine the data encryption method based on the target communication protocol and the security level of the first data.

[0105] Determine the first processing identifier based on the data compression method and the data encryption method.

[0106] See Figure 3 , Figure 3 is a schematic block diagram of an electronic device provided in an embodiment of the present disclosure. As Figure 3The electronic device 300 in the present embodiment shown may include: one or more processors 301, one or more input devices 302, one or more output devices 303, and one or more memories 304. The above-mentioned processors 301, input devices 302, output devices 303, and memories 304 communicate with each other through a communication bus 305. The memory 304 is used to store a computer program, and the computer program includes program instructions. The processor 301 is used to execute the program instructions stored in the memory 304. Among them, the processor 301 is configured to call the program instructions to execute the functions of each module in the above-mentioned device embodiments, for example Figure 2 the functions of the modules 21 to 23 shown.

[0107] It should be understood that in the embodiments of the present disclosure, the so-called processor 301 may be a central processing unit (CPU), and this processor may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or this processor may also be any conventional processor, etc.

[0108] The input device 302 may include a touchpad, a fingerprint acquisition sensor (for acquiring the fingerprint information and the direction information of the fingerprint of the user), a microphone, etc., and the output device 303 may include a display (such as an LCD), a speaker, etc.

[0109] The memory 304 may include a read-only memory and a random access memory, and provide instructions and data to the processor 301. A part of the memory 304 may also include a non-volatile random access memory. For example, the memory 304 may also store information about the device type.

[0110] In specific implementation, the processors 301, input devices 302, and output devices 303 described in the embodiments of the present disclosure may implement the implementation manners described in the first and second embodiments of the communication method for an augmented reality device provided by the embodiments of the present disclosure, and may also implement the implementation manner of the electronic device 300 described in the embodiments of the present disclosure, which will not be elaborated here.

[0111] In another embodiment of the present disclosure, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program, and the computer program includes program instructions. When the program instructions are executed by a processor, all or part of the processes in the method of the above embodiment are implemented. It can also be completed by instructing relevant hardware through the computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal, and software distribution medium, etc.

[0112] The computer-readable storage medium can be an internal storage unit of the electronic device in any of the foregoing embodiments, such as the hard disk or memory of the electronic device. The computer-readable storage medium can also be an external storage device of the electronic device, such as a plug-in hard disk equipped on the electronic device, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. Further, the computer-readable storage medium can also include both the internal storage unit and the external storage device of the electronic device. The computer-readable storage medium is used to store the computer program and other programs and data required by the electronic device. The computer-readable storage medium can also be used to temporarily store the data that has been output or will be output.

[0113] Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the examples have been generally described according to their functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present disclosure.

[0114] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the above-described electronic devices and units can refer to the corresponding processes in the foregoing method embodiments and will not be described herein again.

[0115] In several embodiments provided by the present application, it should be understood that the disclosed electronic devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed coupling or direct coupling or communication connection between each other can be an indirect coupling or communication connection through some interfaces or units, or can also be an electrical, mechanical or other form of connection.

[0116] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiments of the present disclosure.

[0117] In addition, in each embodiment of the present disclosure, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.

[0118] The above are only the specific implementation manners of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present disclosure can easily think of various equivalent modifications or replacements, and these modifications or replacements should be covered within the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be subject to the protection scope of the claims.

Claims

1. A communication method for an augmented reality device, characterized in that: Applied to a first device, comprising: In response to receiving a communication connection request instruction, determining a device type of a second device based on the communication connection request instruction; the second device is a device that communicates with the first device, and the first device is an augmented reality device of a first user; determining a target communication mode based on a device type and communication connection data of the second device, and determining a first processing identifier based on the target communication mode and first data to be transmitted; Based on the first processing identifier, the first data is encapsulated to obtain second data and a second processing identifier; the second data and the second processing identifier are sent to a second device; the first processing identifier is used to indicate a data encapsulation processing method for the first data; and the second processing identifier is used to indicate a data restoration method for the second data.

2. The communication method for augmented reality device according to claim 1, characterized in that: The target communication mode includes a target communication method and a target communication protocol; The determining the target communication mode based on the device type and communication connection data of the second device includes: In response to the device type of the second device being an augmented reality device of a second user: Determine the local area network information of the second device based on the communication connection data, and determine the target communication mode based on the local area network information of the second device; Determine network environment status data based on the communication connection data, and determine the target communication protocol from a first protocol set based on the network environment status data; The second user is a user communicating with the first user.

3. The communication method for augmented reality device according to claim 2, characterized in that: The determining the target communication mode based on the local area network information of the second device includes: Determining whether the first device and the second device are in the same local area network based on the local area network information of the second device and the local area network information of the first device; If the first device and the second device are in the same local area network, determining that the target communication mode is a point-to-point communication mode; If the first device and the second device are not in the same local area network, the target communication mode is determined to be a server-based transit communication mode.

4. The communication method for augmented reality device according to claim 2, characterized in that: The network environment status data includes network bandwidth, network delay rate and network packet loss rate; The determining the target communication protocol from a first protocol set based on the network environment status data comprises: Calculate a network environment quality evaluation index based on the network bandwidth, the network delay rate, and the network packet loss rate; If the network environment quality evaluation index is greater than or equal to a first threshold, determining that the target communication protocol is Bluetooth or Wi-Fi Direct; If the network environment quality evaluation index is less than a first threshold, the target communication protocol is determined to be MQTT or WebSocket.

5. The communication method for augmented reality device according to claim 1, characterized in that: The target communication mode includes a target communication protocol; The determining the target communication mode based on the device type and communication connection data of the second device includes: In response to the target communication device type being an Internet of Things terminal device of the first user: Network environment status data is determined based on the communication connection data, and the target communication protocol is determined from a second protocol set based on the network environment status data.

6. The communication method for augmented reality device according to claim 1, characterized in that: The target communication mode includes a target communication method and a target communication protocol; The determining the first processing identifier based on the target communication mode and the first data to be transmitted includes: If the target communication mode is point-to-point communication mode: Determining a data compression method based on a target communication protocol and a data type of the first data; A first processing identifier is determined based on the data compression method.

7. The communication method for augmented reality device according to claim 1, characterized in that: The target communication mode includes a target communication method and a target communication protocol; The determining the first processing identifier based on the target communication mode and the first data to be transmitted includes: If the target communication mode is a server-based relay communication mode: Determine a data compression method based on the target communication protocol and the data type of the first data, and determine a data encryption method based on the target communication protocol and the security level of the first data; A first processing identifier is determined based on the data compression method and the data encryption method.

8. A communication device for augmented reality equipment, characterized in that: Applied to a first device, comprising: a connection response module, configured to, in response to receiving a communication connection request instruction, determine a device type of a second device based on the communication connection request instruction; the second device is a device for communicating with the first device, and the first device is an augmented reality device of a first user; a calculation module, configured to determine a target communication mode based on a device type and communication connection data of the second device, and determine a first processing identifier based on the target communication mode and first data to be transmitted; A communication module, used to perform data encapsulation processing on the first data based on the first processing identifier to obtain second data and a second processing identifier; send the second data and the second processing identifier to a second device; the first processing identifier is used to indicate a data encapsulation processing method for the first data; the second processing identifier is used to indicate a data restoration method for the second data.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.