Disclosure of Invention
The embodiment of the invention provides a processing method for augmented reality and an augmented reality terminal, and solves the problem that the processing efficiency of augmented reality is reduced in the conventional method.
According to a first aspect of the embodiments of the present invention, there is provided a processing method for augmented reality, which is applied to an augmented reality terminal, and the method includes: acquiring original data; processing the original data and determining characteristic data for representing the characteristics of the original data; generating a characteristic data packet according to the characteristic data, wherein the characteristic data packet comprises a preset time stamp; and sending the feature data packet to an edge computing server.
Optionally, after the acquiring the raw data, the method further comprises: and sending the original data to the edge computing server.
Optionally, the raw data comprises one or more of: audio data, behavioral data, and video data; the processing the raw data and determining feature data representing features of the raw data comprises one or more of the following: analyzing the audio data to obtain a Mel frequency cepstrum coefficient MFCC of the audio data; performing Kalman filtering fusion on the behavior data to obtain a quaternion of the behavior data after Kalman filtering fusion; and carrying out image feature detection on the video data to obtain the characteristic FAST corner feature from the accelerated segmentation test.
Optionally, the preset format includes: a message header and a message body; wherein the message header includes one or more of: a flag word, the total length of the message, the feature type, the feature acquisition period and a serial number; the message body comprises: the characteristic data and the preset time stamp.
Optionally, the sending the feature data packet to an edge computing server includes: and sending the feature data packet to the edge computing server through a real-time streaming protocol RTSP, a real-time message transfer protocol RTMP or a hypertext transfer protocol HTTP.
According to a second aspect of the embodiments of the present invention, there is provided a terminal, including: the device comprises an edge calculation processing module and a communication module, wherein the edge calculation processing module is used for acquiring original data; the edge calculation processing module is further configured to process the raw data and determine feature data representing features of the raw data; the edge calculation processing module is further used for generating a feature data packet according to the feature data; and the communication module is used for sending the characteristic data packet to an edge computing server.
Optionally, the communication module is further configured to send the raw data to the edge computing server.
Optionally, the raw data comprises one or more of: audio data, behavioral data, and video data; the edge calculation processing module comprises: the MFCC unit is used for analyzing the audio data to obtain a Mel frequency cepstrum coefficient MFCC of the audio data; the Kalman filtering unit is used for carrying out Kalman filtering fusion on the behavior data to obtain a quaternion of the behavior data after the Kalman filtering fusion; and the image characteristic detection unit is used for carrying out image characteristic detection on the video data to obtain the characteristic FAST corner characteristic from the accelerated segmentation test.
Optionally, the edge calculation processing module includes: and the data processing unit is used for packaging the characteristic data according to a preset format and generating the characteristic data packet.
Optionally, the preset format includes: a message header and a message body; wherein the message header includes one or more of: a flag word, the total length of the message, the feature type, the feature acquisition period and a serial number; the message body comprises: the characteristic data and the preset time stamp.
In the embodiment of the invention, the terminal can process the acquired original data to obtain the characteristic data; and determining feature data for representing the features of the original data according to the feature data, and sending the feature data packet to the edge computing server. Compared with the prior art that the original data is directly sent to the edge computing server, the data volume sent by the terminal is smaller in the embodiment of the invention, so that the communication resource and the computing resource of the edge computing server are saved, the transmission rate and the computing efficiency of the edge computing server are improved, the processing efficiency and the response speed of the augmented reality terminal are improved, and the user experience is obviously enhanced.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 2, an embodiment of the present invention provides a processing method for augmented reality, which is applied to an augmented reality terminal, and the method includes the following specific steps:
step 201: acquiring original data;
in embodiments of the present invention, the raw data may include one or more of: audio data, behavioral data, and video data.
The raw data may be collected by existing functional modules, for example: the audio data can be collected through an audio module, a microphone and the like; video data can be collected through a camera module and the like; the behavior data may be collected by various sensors, for example, a nine-axis sensor (a sensor including a three-axis accelerometer, a three-axis gyroscope, and a three-axis magnetometer), which can reflect the behavior of the user when using the augmented reality terminal.
After the augmented reality terminal collects original data through the existing functional module, the original data are sent to the edge calculation processing module, and the edge calculation processing module processes the original data.
Step 202: processing the original data and determining characteristic data for representing the characteristics of the original data;
in the embodiment of the present invention, the original data includes audio data, behavior data, and video data as an example:
analyzing the audio data to obtain Mel-frequency cepstral Coefficients (MFCC) of the audio data;
performing Kalman filtering fusion on the behavior data to obtain a quaternion of the behavior data after Kalman filtering fusion;
image feature detection is carried out on the video data, and corner Features (FAST) from acceleration segmentation tests are obtained.
Step 203: generating a characteristic data packet according to the characteristic data;
in the embodiment of the invention, the augmented reality terminal packs the feature data according to the preset format to generate the feature data packet. Because time consistency of the feature data needs to be ensured during SLAM calculation, and the acquisition frequencies of various data are not uniform, a preset timestamp needs to be added when the feature data are packaged, and time synchronization is performed on the feature data.
Specifically, referring to fig. 3, a preset format is shown, including: a message header and a message body;
wherein the message header includes one or more of: a flag word, the total length of the message, the feature type, the feature acquisition period and a serial number; the message body comprises one or more of the following items: characteristic data and a preset time stamp.
Referring to table 1, information of each field of a header is recorded in the table, it should be noted that the content in table 1 is only an example, and this is not specifically limited in this embodiment of the present invention.
Field(s)
|
Length (byte)
|
Remarks for note
|
Sign word
|
2
|
0xAAFF
|
Total length of message
|
2
|
Total Length
|
Type of feature
|
2
|
Feature Type
|
Feature acquisition period
|
2
|
Feature Detection Period
|
Serial number
|
2
|
Sequence number |
TABLE 1
The fixed length of the message header is 10 bytes, and each field is described as follows:
(1) and (4) marking words: identifying the entire feature data packet;
(2) total length of message: the length of the whole message supports the length of 65535 bytes at most;
(3) the characteristic types are as follows: identifying the characteristic content to be transmitted by the message, for example:
mel-frequency cepstrum coefficients: 0x 01;
quaternion after Kalman filtering fusion: 0x 02;
FAST corner feature: 0x 03;
(4) and recording the characteristic acquisition period, and if transmission packet loss occurs, facilitating the processing of the edge computing server, for example:
mel-frequency cepstrum coefficients: 0x19(25 ms. audio 25ms chunked processing);
quaternion after Kalman filtering fusion: 0x02(33ms, image acquisition frame rate 30 fps);
FAST corner feature: 0x03(2ms, sensor sampling rate 500 Hz);
(5) sequence number: and identifying the data packet sequence number of the characteristic data sender for counting the data packet sequence.
For each field description in the body of the message:
(1) characteristic data: characteristic data identified in step 202 to represent characteristics of the raw data;
(2) presetting a timestamp: the feature acquisition frequency of each kind of data is different, but the data is required to have time consistency when processing, for example, the MFCC of audio is processing at an interval of 25ms and sending a frame of data, the FAST corner feature of video data is processing at an interval of 33ms and sending a frame of data, the quaternion after kalman filtering fusion of behavior data is processing at an interval of 2ms and sending a frame of data, so time synchronization is required, and a preset timestamp with a uniform format is added into a feature data stream, so that the method is helpful for an edge computing server to accurately record the time point when acquiring each packet after receiving each packet, and is helpful for performing accurate spatial positioning calculation and feature recognition calculation.
The preset time stamp is used for representing the time when the augmented reality terminal determines the feature data, optionally, the preset time stamp is "yyyy-MM-dd hh: MM: ss ms", is accurate to millisecond level, and after the feature data is determined, the time for generating the feature data is recorded in the feature data packet.
Step 204: and sending the characteristic data packet to the edge computing server.
In another embodiment of the present invention, for some special application scenarios, such as real-time monitoring, etc., there is a certain requirement for the raw data in these application scenarios, and therefore, the augmented reality terminal sends the feature data packet to the edge computing server, and optionally, the augmented reality terminal also sends the raw data to the edge computing server.
Specifically, referring to fig. 4, a process of an augmented reality terminal interacting with an edge computing server is shown.
The DESCRIBE message indicates that the augmented reality terminal initiates an application to the edge computing server, and the augmented reality terminal obtains description information of a session, including: session start time, type and format;
the SETUP message indicates that the augmented reality terminal reminds the edge computing server to establish a session and determines a transmission mode, and the edge computing server sends back information including: a session identifier of acknowledge (OK) and reply;
the PLAY message represents that the augmented reality terminal sends a video stream request, the range of the total video stream playing time is set, and the edge computing server starts response confirmation;
data stream transmission, including two parts of raw data and feature data of a time period, the time period is a feature data acquisition period, for example: the time period is 1 second, and the data includes image data of 30 frames, 500 sets of Inertial Measurement Unit (IMU) data, and the like. The raw data may be processed using standard plug flow protocols, such as: a Streaming Protocol based on a hypertext transfer Protocol (HTTP), such as a Real Time Streaming Protocol (RTSP), a Real Time Messaging Protocol (RTMP), and the like, in which the feature data is transmitted in the form of a feature data packet in the step 203;
the above-described flow of data stream transmission may be repeatedly performed a plurality of times.
The TEARDOWN message indicates that the augmented reality terminal initiates a closing request, and the edge computing server confirms to close the edge computing server in response.
In the embodiment of the invention, the terminal can process the acquired original data to obtain the characteristic data; and determining feature data for representing the features of the original data according to the feature data, and sending the feature data packet to the edge computing server. Compared with the prior art that the original data is directly sent to the edge computing server, the data volume sent by the terminal is smaller in the embodiment of the invention, so that the communication resource and the computing resource of the edge computing server are saved, the transmission rate and the computing efficiency of the edge computing server are improved, the processing efficiency and the response speed of the augmented reality terminal are improved, and the user experience is obviously enhanced.
Referring to fig. 5, an embodiment of the present invention provides an augmented reality terminal 500, including an edge computing processing module 510, a communication module 520, and a plurality of functional modules 5301 to 5313;
the edge calculation processing module 510 is configured to obtain original data, where the original data is collected by the plurality of functional modules 5301 to 5313 and sent to the edge calculation processing module 510;
the edge calculation processing module 510 is further configured to process the raw data, and determine feature data representing features of the raw data;
the edge calculation processing module 510 is further configured to generate a feature data packet according to the feature data;
the communication module 520 is configured to send the feature data packet to the edge computing server.
Optionally, the communication module 520 is further configured to send the raw data to an edge computing server.
Optionally, the raw data comprises one or more of: audio data, behavioral data, and video data;
alternatively, referring to fig. 6, a structure of an edge calculation processing module is shown.
The edge calculation processing module 510 includes:
an MFCC unit 511, configured to analyze the audio data to obtain a mel-frequency cepstrum coefficient MFCC of the audio data;
a kalman filtering unit 512, configured to perform kalman filtering fusion on the behavior data to obtain a quaternion of the behavior data after the kalman filtering fusion;
and an image feature detection unit 513, configured to perform image feature detection on the video data to obtain a feature FAST corner feature from an accelerated segmentation test.
Optionally, the edge calculation processing module 510 further includes:
the data processing unit 514 is configured to package the feature data according to a preset format, and generate the feature data packet;
optionally, the preset format includes: a message header and a message body;
the message header comprises: a flag word, the total length of the message, the feature type, the feature acquisition period and a serial number; the message body comprises: characteristic data and a preset time stamp.
The names and functions of the modules in the functional modules 5301-5313 can be referred to in table 2 as follows:
TABLE 2
It should be noted that the above functional modules are only one possible implementation, and other types of functional modules may be selected according to actual use situations. The functional modules are used for acquiring original data (such as video data and audio data) required by the augmented reality function, and the number and the functions of the functional modules are not specifically limited in the embodiment of the present invention.
In the embodiment of the invention, the terminal can process the acquired original data to obtain the characteristic data; and determining feature data for representing the features of the original data according to the feature data, and sending the feature data packet to the edge computing server. Compared with the prior art that the original data are directly sent to the edge computing server, the data volume sent by the terminal is smaller in the embodiment of the invention, and the computing resources of the edge computing server are saved, so that the augmented reality processing efficiency is improved.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.