Data processing method and device, electronic device and computer readable storage medium

By denoising the attitude data output by the inertial measurement unit and performing L2 regularized ridge regression fitting, the problem of signal jitter and drift of the electronic equipment is solved and the stable operation of the equipment is achieved.

CN111767513BActive Publication Date: 2024-09-24BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN201910454466.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-05-28
Publication Date
2024-09-24
Estimated Expiration
2039-05-28

AI Technical Summary

Technical Problem

When directly using sensor data to calculate the attitude of an electronic device, it will cause jitter and drift problems in the signal during transmission.

Method used

By obtaining the attitude data output by the inertial measurement unit for noise reduction processing, the ridge regression cost function based on L2 regularization is used to fit the historical attitude data, and the optimized attitude data is calculated to reduce signal jitter and drift.

Benefits of technology

It optimizes the attitude data of electronic equipment, reduces signal jitter and drift during transmission, and ensures stable operation of the equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111767513B
    Figure CN111767513B
Patent Text Reader

Abstract

The present disclosure provides a data processing method, including: obtaining first posture data of an electronic device; performing noise reduction processing on the first posture data to obtain second posture data after noise reduction; and calculating third posture data according to the second posture data and target parameters, wherein the target parameters are obtained by fitting based on multiple historical posture data of the electronic device using a cost function of ridge regression based on L2 regularization. The present disclosure also provides a data processing device, an electronic device, and a computer-readable storage medium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and more specifically, to a data processing method, a data processing device, an electronic device, and a computer-readable storage medium. Background Art

[0002] An inertial measurement unit is a device that measures the three-axis attitude angle (or angular rate) and acceleration of an object. Generally, an inertial measurement unit contains three single-axis accelerometers and three single-axis gyroscopes. The accelerometer detects the acceleration signal of the object in the carrier coordinate system in three independent axes, while the gyroscope detects the angular velocity signal of the object relative to the navigation coordinate system, measures the angular velocity and acceleration of the object in three-dimensional space, and uses this to calculate the attitude of the object. With the development of mobile Internet and AR (virtual reality) / VR (augmented reality) technology, more and more applications use inertial measurement units to achieve attitude estimation.

[0003] In the process of realizing the concept of the present disclosure, the inventors found that there are at least the following problems in the related technology: directly using sensor data to calculate the posture of the electronic device to locate the position and angle of the object and render it will cause technical problems such as jitter and drift of the signal when the electronic device transmits the signal. Summary of the invention

[0004] In view of this, the present disclosure provides a data processing method, a data processing device, an electronic device, and a computer-readable storage medium.

[0005] One aspect of the present disclosure provides a data processing method, including: acquiring first posture data of an electronic device; performing noise reduction processing on the first posture data to obtain second posture data after noise reduction; and calculating third posture data based on the second posture data and target parameters, wherein the target parameters are obtained by fitting based on multiple historical posture data of the electronic device using a cost function of a ridge regression based on L2 regularization.

[0006] According to an embodiment of the present disclosure, acquiring first posture data of an electronic device includes: acquiring first posture data output by an inertial measurement unit of the electronic device.

[0007] According to an embodiment of the present disclosure, performing noise reduction processing on the first posture data to obtain the noise-reduced second posture data includes:

[0008] The first posture data is subjected to denoising according to the target formula to obtain the denoised second posture data, wherein the target formula is:

[0009] X n =X n-1 +(XXn-1 ) / factor;

[0010] Among them, factor is the predetermined smoothing factor, X n-1 is the attitude data obtained after the last noise reduction, X is the first attitude data output by the inertial measurement unit this time, and X n It is the second posture data obtained after this noise reduction.

[0011] According to an embodiment of the present disclosure, the predetermined smoothing factor is determined according to the frequency at which the inertial measurement unit outputs attitude data.

[0012] According to an embodiment of the present disclosure, the above method is applied to a virtual reality scene or an augmented reality scene, and the above method further includes:

[0013] Based on the third posture data, a display position and a display direction of the virtual object in the virtual reality scene or the augmented reality scene are determined.

[0014] Another aspect of the present disclosure provides a data processing device, comprising: an acquisition module, configured to acquire first posture data of an electronic device; a processing module, configured to perform noise reduction processing on the first posture data to obtain second posture data after noise reduction; and a calculation module, configured to calculate third posture data according to the second posture data and a target parameter.

[0015] The target parameters are obtained by fitting the multiple historical posture data of the electronic device using a cost function of ridge regression based on L2 regularization.

[0016] According to an embodiment of the present disclosure, the acquisition module is used to acquire the first posture data output by the inertial measurement unit of the electronic device.

[0017] According to an embodiment of the present disclosure, the processing module is used to: perform noise reduction processing on the first posture data according to a target formula to obtain the second posture data after noise reduction, wherein the target formula is:

[0018] X n =X n-1 +(XX n-1 ) / factor;

[0019] Among them, factor is the predetermined smoothing factor, X n-1 is the attitude data obtained after the last noise reduction, X is the first attitude data output by the inertial measurement unit this time, and X n It is the second posture data obtained after this noise reduction.

[0020] According to an embodiment of the present disclosure, the predetermined smoothing factor is determined according to the frequency at which the inertial measurement unit outputs attitude data.

[0021] According to an embodiment of the present disclosure, the above-mentioned device is applied to a virtual reality scene or an augmented reality scene, and the above-mentioned device also includes: a determination module, which is used to determine the display position and display direction of the virtual object in the above-mentioned virtual reality scene or the above-mentioned augmented reality scene based on the above-mentioned third posture data.

[0022] Another aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method as described above.

[0023] Another aspect of the present disclosure provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, enables the processor to implement the method described above.

[0024] Another aspect of the present disclosure provides a computer program, which includes computer executable instructions, and the instructions are used to implement the method described above when executed.

[0025] According to an embodiment of the present disclosure, the second posture data is obtained by performing noise reduction processing on the first posture data; the target parameters are obtained by fitting based on multiple historical posture data of the electronic device using the cost function of ridge regression based on L2 regularization; and the third posture data is obtained according to the target parameters and the second posture data. Since the output posture data (i.e., the first posture data) of the electronic device is processed multiple times, the posture data is optimized, so that the electronic device can use the optimized posture data to better determine the orientation of the object, and can reduce the jitter of the signal when the electronic device is transmitting the signal, prevent drift and the like, so at least partially overcome the technical problem that the electronic device may jitter and drift when the electronic device transmits the signal by directly using sensor data to calculate the posture of the electronic device, locate the orientation of the object and render it, thereby achieving the technical effect of making the electronic device operate stably. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The above and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:

[0027] Figure 1 An exemplary system architecture to which the data processing method and device according to an embodiment of the present disclosure can be applied is schematically shown;

[0028] Figure 2A flowchart schematically shows a data processing method according to an embodiment of the present disclosure;

[0029] Figure 3 A schematic diagram of a carrier coordinate system according to an embodiment of the present disclosure is schematically shown;

[0030] Figure 4 A flowchart schematically shows a data processing method according to another embodiment of the present disclosure;

[0031] Figure 5 A block diagram schematically shows a data processing device according to an embodiment of the present disclosure;

[0032] Figure 6 A block diagram schematically shows a data processing device according to another embodiment of the present disclosure; and

[0033] Figure 7 A block diagram of an electronic device suitable for implementing the method described above according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0034] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.

[0035] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.

[0036] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification, and should not be interpreted in an idealized or overly rigid manner.

[0037] In the case of using expressions such as "at least one of A, B, and C, etc.", it should generally be interpreted in accordance with the meaning of the expression generally understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.). In the case of using expressions such as "at least one of A, B, or C, etc.", it should generally be interpreted in accordance with the meaning of the expression generally understood by those skilled in the art (for example, "a system having at least one of A, B, or C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).

[0038] An embodiment of the present disclosure provides a data processing method, including acquiring first posture data of an electronic device; performing denoising on the first posture data to obtain second posture data after denoising; and calculating third posture data based on the second posture data and target parameters, wherein the target parameters are obtained by fitting based on multiple historical posture data of the electronic device using a cost function of a ridge regression based on L2 regularization.

[0039] Figure 1 The exemplary system architecture to which the data processing method and device according to the embodiment of the present disclosure can be applied is schematically shown. It should be noted that: Figure 1 What is shown is merely an example of a system architecture to which the embodiments of the present disclosure can be applied, in order to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.

[0040] like Figure 1 As shown, the system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired and / or wireless communication links, etc.

[0041] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients and / or social platform software, etc. (only as examples).

[0042] The terminal devices 101 , 102 , and 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.

[0043] The server 105 may be a server that provides various services, such as a background management server (only an example) that provides support for data requested by users using the terminal devices 101, 102, and 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.

[0044] It should be noted that the data processing method provided in the embodiment of the present disclosure may be executed by the terminal device 101, 102, or 103, or may be executed by other terminal devices different from the terminal devices 101, 102, or 103. Accordingly, the data processing apparatus provided in the embodiment of the present disclosure may also be provided in the terminal device 101, 102, or 103, or may be provided in other terminal devices different from the terminal devices 101, 102, or 103.

[0045] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.

[0046] Figure 2 The flowchart of the data processing method according to the embodiment of the present disclosure is schematically shown.

[0047] like Figure 2 As shown, the method includes operations S201 to S203.

[0048] In operation S201, first posture data of an electronic device is acquired.

[0049] According to the embodiments of the present disclosure, the type of electronic device is not limited, for example, it can be a mobile phone, a tablet computer, etc. The electronic device may include an inertial measurement unit, and the inertial measurement unit can output the posture data of the electronic device. The inertial measurement unit may include an accelerometer, and the accelerometer can detect the acceleration signal of the electronic device in each axis of the carrier coordinate system. The inertial measurement unit may also include a gyroscope, and the gyroscope can detect the angular velocity signal of the electronic device relative to the navigation coordinate system, thereby measuring the angular velocity of the electronic device in three-dimensional space.

[0050] Figure 3 A schematic diagram of a carrier coordinate system according to an embodiment of the present disclosure is schematically shown.

[0051] According to an embodiment of the present disclosure, one point on the electronic device may be used as the origin of the carrier coordinate system. Figure 3 As shown, the center of the electronic device is used as the origin of the carrier coordinate system, and the X-axis, Y-axis and Z-axis are established respectively.

[0052] According to an embodiment of the present disclosure, the deviceOrientation event can be monitored to obtain the rotation angles of the three axes: alpha value, beta value, and gamma value. Among them, the alpha value represents the rotation angle of the electronic device along the Z axis (abbreviated as α), and the value range can be [-180, 180); the beta value represents the rotation angle of the electronic device along the X axis (abbreviated as β), and the value range can be [-180, 180); the gamma value represents the rotation angle of the electronic device along the Y axis (abbreviated as γ), and the value range can be [-90, 90). According to an embodiment of the present disclosure, the rotation angle of the electronic device can be vectorized as V(α, β, γ).

[0053] According to an embodiment of the present disclosure, acquiring first posture data of an electronic device includes: acquiring first posture data output by an inertial measurement unit of the electronic device.

[0054] According to an embodiment of the present disclosure, an inertial measurement unit of an electronic device may output first posture data, and the first posture data output by the inertial measurement unit may be acquired by a processor of the electronic device.

[0055] In operation S202, noise reduction processing is performed on the first posture data to obtain second posture data after noise reduction.

[0056] According to an embodiment of the present disclosure, performing noise reduction processing on the first posture data to obtain the second posture data after noise reduction includes:

[0057] The first posture data is subjected to denoising according to the target formula to obtain the second posture data after denoising, wherein the target formula is:

[0058] X n =X n-1 +(XX n-1 ) / factor;

[0059] Among them, factor is the predetermined smoothing factor, X n-1 is the attitude data obtained after the last denoising, X is the first attitude data output by the inertial measurement unit this time, and X n It is the second posture data obtained after this denoising.

[0060] According to an embodiment of the present disclosure, after the rotation angle measured by the inertial measurement unit is vectorized, V(α0, β0, γ0) obtained may be the first posture data.

[0061] Taking the first posture data V(α0, β0, γ0) as an example, α0, β0 and γ0 in V(α0, β0, γ0) can be respectively input into the above target formula as X, and the corresponding denoised data can be calculated respectively.

[0062] According to an embodiment of the present disclosure, the predetermined smoothing factor may be determined according to the frequency at which the inertial measurement unit outputs attitude data.

[0063] For example, the frequency of the inertial measurement unit outputting attitude data is 50 Hz, that is, 50 attitude data can be output within 1 second, then the predetermined smoothing factor can be determined to be 50, or other values ​​close to 50.

[0064] According to the embodiments of the present disclosure, according to actual applications, the value of the predetermined smoothing factor is preferably between 50-100, which can better reduce the jitter or drift of the electronic device.

[0065] In operation S203, third posture data is calculated according to the second posture data and the target parameter, wherein the target parameter is obtained by fitting based on a plurality of historical posture data of the electronic device using a cost function of a ridge regression based on L2 regularization.

[0066] According to an embodiment of the present disclosure, the cost function of the ridge regression based on L2 regularization may be in the following form:

[0067]

[0068] Among them, θ is the target parameter; m represents the number of historical posture data; h θ (x (i) ) represents the L2 regularized output data of the i-th data in the m historical posture data; where hθ(x) = θ T X+θ0,θ T Represents the transposed vector of θ, θ0 is the initial value; the L2 regularized output data is θ T X+θ0;y (i) represents the posture data obtained after denoising the i-th data in the m historical posture data; λ is a hyperparameter that can be set empirically, for example, it can be 0.01; x represents the posture data before denoising, and n represents the dimension of x.

[0069] According to an embodiment of the present disclosure, when fitting is performed based on multiple historical posture data of an electronic device, the target parameter θ can be inferred by obtaining the minimum value of J(θ).

[0070] According to an embodiment of the present disclosure, the third posture data calculated according to the second posture data and the target parameter can be obtained according to the above hθ (x) = θ T X+θ0 is used for calculation. Among them, h θ (x) can be used as the third posture data; the second posture data is input into the above formula as X, and the target parameters are θ, θ T Represents the transposed vector of θ.

[0071] According to an embodiment of the present disclosure, the second posture data is obtained by performing noise reduction processing on the first posture data; the target parameters are obtained by fitting based on multiple historical posture data of the electronic device using the cost function of ridge regression based on L2 regularization; and the third posture data is obtained according to the target parameters and the second posture data. Since the output posture data (i.e., the first posture data) of the electronic device is processed multiple times, the posture data is optimized, so that the electronic device can use the optimized posture data to better determine the orientation of the object, and can reduce the jitter of the signal when the electronic device is transmitting the signal, prevent drift and the like, so at least partially overcome the technical problem that the electronic device may jitter and drift when the electronic device transmits the signal by directly using sensor data to calculate the posture of the electronic device, locate the orientation of the object and render it, thereby achieving the technical effect of making the electronic device operate stably.

[0072] Reference below Figure 4 , combined with specific embodiments Figure 2 The method shown is further explained.

[0073] Figure 4 The flowchart schematically shows a data processing method according to another embodiment of the present disclosure.

[0074] According to the embodiments of the present disclosure, the data processing method provided by the present disclosure can be applied to virtual reality scenes or augmented reality scenes, such as Figure 4 As shown, the method includes not only operations S201 to S203, but also operation S204. For the description of operations S201 to S203, reference can be made to the disclosure of Figure 2 For the sake of brevity, the present disclosure will not go into details here.

[0075] In operation S204, a display position and a display direction of the virtual object in the virtual reality scene or the augmented reality scene are determined based on the third posture data.

[0076] According to an embodiment of the present disclosure, in a 3D scene of a virtual reality scene or an augmented reality scene, the Model-View-Projection (MVP matrix for short) transformation can be used to achieve observation of virtual objects or real objects. For example, the display position and display direction of the virtual object in the virtual reality scene or the augmented reality scene can be determined based on the third posture data of the electronic device.

[0077] According to an embodiment of the present disclosure, the meaning of the MVP matrix is ​​as follows.

[0078] Model: Model matrix, used to define the displacement and orientation of a single object, and only changes the state of a single object.

[0079] View: View matrix, used to define the displacement and orientation of the camera, which will change the entire scene.

[0080] Projection: The projection matrix defines how the scene is projected to the viewport (which can be seen as a screen) and determines how it is displayed.

[0081] According to the embodiments of the present disclosure, by constructing a model-view-projection matrix, correct rendering of objects can be achieved, and the display position and display direction of virtual objects in a virtual reality scene or an augmented reality scene can be determined.

[0082] Figure 5 The block diagram schematically shows a data processing device according to an embodiment of the present disclosure.

[0083] like Figure 5 As shown, the data processing device 500 includes an acquisition module 510 , a processing module 520 and a calculation module 530 .

[0084] The acquisition module 510 is used to acquire first posture data of the electronic device;

[0085] The processing module 520 is used to perform noise reduction processing on the first posture data to obtain second posture data after noise reduction; and

[0086] The calculation module 530 is used to calculate the third posture data according to the second posture data and the target parameter.

[0087] The target parameters are obtained by fitting based on a plurality of historical posture data of the electronic device using a cost function of a ridge regression based on L2 regularization.

[0088] According to an embodiment of the present disclosure, the second posture data is obtained by performing noise reduction processing on the first posture data; the target parameters are obtained by fitting based on multiple historical posture data of the electronic device using the cost function of ridge regression based on L2 regularization; and the third posture data is obtained according to the target parameters and the second posture data. Since the output posture data (i.e., the first posture data) of the electronic device is processed multiple times, the posture data is optimized, so that the electronic device can use the optimized posture data to better determine the orientation of the object, and can reduce the jitter of the signal when the electronic device is transmitting the signal, prevent drift and the like, so at least partially overcome the technical problem that the electronic device may jitter and drift when the electronic device transmits the signal by directly using sensor data to calculate the posture of the electronic device, locate the orientation of the object and render it, thereby achieving the technical effect of making the electronic device operate stably.

[0089] According to an embodiment of the present disclosure, the acquisition module 510 is used to acquire first posture data output by an inertial measurement unit of the electronic device.

[0090] According to an embodiment of the present disclosure, the processing module 520 is used to:

[0091] The first posture data is subjected to denoising according to a target formula to obtain denoised second posture data, wherein the target formula is:

[0092] X n =X n-1 +(XX n-1 ) / factor;

[0093] Among them, factor is the predetermined smoothing factor, X n-1 is the posture data obtained after the last noise reduction, X is the first posture data output by the inertial measurement unit this time, and X n It is the second posture data obtained after this noise reduction.

[0094] According to an embodiment of the present disclosure, the predetermined smoothing factor is determined according to the frequency at which the inertial measurement unit outputs attitude data.

[0095] Figure 6 A block diagram of a data processing device according to another embodiment of the present disclosure is schematically shown.

[0096] The data processing device 600 can be applied to a virtual reality scene or an augmented reality scene, such as Figure 6 As shown, the data processing device 600 includes not only an acquisition module 610 , a processing module 620 and a calculation module 630 , but also a determination module 640 .

[0097] It should be noted that the description of the acquisition module 610, the processing module 620 and the calculation module 630 can refer to the above Figure 5 The description will not be repeated here.

[0098] According to an embodiment of the present disclosure, the determination module 640 is used to determine the display position and display direction of the virtual object in the virtual reality scene or the augmented reality scene based on the third posture data.

[0099] According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits, or at least part of the functions of any one of them can be implemented in one module. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be split into multiple modules for implementation. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be at least partially implemented as hardware circuits, such as field programmable gate arrays (FPGAs), programmable logic arrays (PLAs), systems on chips, systems on substrates, systems on packages, application specific integrated circuits (ASICs), or can be implemented by hardware or firmware in any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware, and firmware, or in any appropriate combination of any of them. Alternatively, according to the embodiments of the present invention, one or more of the modules, submodules, units, and subunits can be at least partially implemented as computer program modules, and when the computer program modules are run, the corresponding functions can be performed.

[0100] For example, any multiple of the acquisition module 610, the processing module 620, the calculation module 630, and the determination module 640 can be combined in one module / unit / subunit for implementation, or any one of the modules / units / subunits can be split into multiple modules / units / subunits. Alternatively, at least part of the functions of one or more of these modules / units / subunits can be combined with at least part of the functions of other modules / units / subunits and implemented in one module / unit / subunit. According to an embodiment of the present disclosure, at least one of the acquisition module 610, the processing module 620, the calculation module 630, and the determination module 640 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or by any one of the three implementation methods of software, hardware, and firmware, or by a suitable combination of any of them. Alternatively, at least one of the acquisition module 610 , the processing module 620 , the calculation module 630 , and the determination module 640 may be at least partially implemented as a computer program module, and when the computer program module is executed, a corresponding function may be performed.

[0101] It should be noted that the data processing device part in the embodiments of the present disclosure corresponds to the data processing method part in the embodiments of the present disclosure. The description of the data processing device part specifically refers to the data processing method part, which will not be repeated here.

[0102] Figure 7 A block diagram of an electronic device suitable for implementing the method described above according to an embodiment of the present disclosure is schematically shown. Figure 7 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0103] like Figure 7 As shown, the electronic device 700 according to an embodiment of the present disclosure includes a processor 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage part 708 to a random access memory (RAM) 703. The processor 701 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 701 may also include an onboard memory for caching purposes. The processor 701 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.

[0104] In RAM 703, various programs and data required for the operation of electronic device 700 are stored. Processor 701, ROM 702 and RAM 703 are connected to each other via bus 704. Processor 701 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 702 and / or RAM 703. It should be noted that the program can also be stored in one or more memories other than ROM 702 and RAM 703. Processor 701 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in the one or more memories.

[0105] According to an embodiment of the present disclosure, the electronic device 700 may further include an input / output (I / O) interface 705, which is also connected to the bus 704. The electronic device 700 may further include one or more of the following components connected to the I / O interface 705: an input portion 706 including a keyboard, a mouse, etc.; an output portion 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 708 including a hard disk, etc.; and a communication portion 709 including a network interface card such as a LAN card, a modem, etc. The communication portion 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage portion 708 as needed.

[0106] According to an embodiment of the present disclosure, the method flow according to an embodiment of the present disclosure can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the processor 701, the above-mentioned functions defined in the system of the embodiment of the present disclosure are executed. According to an embodiment of the present disclosure, the system, equipment, device, module, unit, etc. described above can be implemented by a computer program module.

[0107] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.

[0108] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium. For example, it may include, but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, apparatus, or device.

[0109] For example, according to an embodiment of the present disclosure, the computer-readable storage medium may include the ROM 702 and / or the RAM 703 described above and / or one or more memories other than the ROM 702 and the RAM 703 .

[0110] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0111] It will be appreciated by those skilled in the art that the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations and / or combinations are not explicitly described in the present disclosure. In particular, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways without departing from the spirit and teachings of the present disclosure. All of these combinations and / or combinations fall within the scope of the present disclosure.

[0112] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.

Claims

1. A data processing method, applied to a virtual reality scene or an augmented reality scene, the method comprising: Acquire first posture data of the electronic device; Performing noise reduction processing on the first posture data to obtain second posture data after noise reduction; as well as Calculating third posture data according to the product of the second posture data and the transposed vector of the target parameter, wherein the target parameter is obtained by fitting based on a plurality of historical posture data of the electronic device using a cost function of a ridge regression based on L2 regularization; The display position and display direction of the virtual object in the virtual reality scene or the augmented reality scene are determined based on the third posture data.

2. The method according to claim 1, wherein: Acquiring first posture data of the electronic device includes: acquiring first posture data output by an inertial measurement unit of the electronic device.

3. The method according to claim 2, wherein: The first posture data is subjected to noise reduction processing to obtain the second posture data after noise reduction, comprising: The first posture data is subjected to denoising according to a target formula to obtain denoised second posture data, wherein the target formula is: X n =X n-1 +(X-X n-1 ) / factor; Among them, factor is the predetermined smoothing factor, X n-1 is the posture data obtained after the last noise reduction, X is the first posture data output by the inertial measurement unit this time, and X n It is the second posture data obtained after this noise reduction.

4. The method according to claim 3, wherein: The predetermined smoothing factor is determined according to a frequency at which the inertial measurement unit outputs attitude data.

5. A data processing device, applied to a virtual reality scene or an augmented reality scene, comprising: An acquisition module, used to acquire first posture data of the electronic device; A processing module, used for performing noise reduction processing on the first posture data to obtain second posture data after noise reduction; as well as a calculation module, configured to calculate third posture data according to the product of the second posture data and the transposed vector of the target parameter, The target parameters are obtained by fitting the cost function of ridge regression based on L2 regularization based on multiple historical posture data of the electronic device; A determination module is used to determine a display position and a display direction of a virtual object in the virtual reality scene or the augmented reality scene based on the third posture data.

6. The device according to claim 5, wherein: The acquisition module is used to acquire first posture data output by an inertial measurement unit of the electronic device.

7. The device according to claim 6, wherein: The processing module is used for: The first posture data is subjected to denoising according to a target formula to obtain denoised second posture data, wherein the target formula is: X n =X n-1 +(X-X n-1 ) / factor; Among them, factor is the predetermined smoothing factor, X n-1 is the posture data obtained after the last noise reduction, X is the first posture data output by the inertial measurement unit this time, and X n It is the second posture data obtained after this noise reduction.

8. The device according to claim 7, wherein: The predetermined smoothing factor is determined according to a frequency at which the inertial measurement unit outputs attitude data.

9. An electronic device, comprising: one or more processors; a memory for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 4.

10. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, enables the processor to implement the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • VR helmet and method for improving display effect of VR helmet

    CN106597664A

  • Image processing method and apparatus, storage medium, and electronic equipment

    CN108520552A

  • Estimation of Panoramic Camera Orientation Relative to a Vehicle Coordinate Frame

    US20100220173A1