Data transmission control method and related apparatus

CN115706769BActive Publication Date: 2026-09-08伟光有限公司(CN)
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110911104.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-09
Publication Date
2026-09-08
Estimated Expiration
2041-08-09

AI Technical Summary

Technical Problem

[0003]目前,以手机为例,对芯片的调试方式均是在开发阶段的一些方式,并不适合产品化之后的环境,针对前端工作状态的检测还是基于直接连接调试线进行,这就需要有专门的硬件接口,当然在产品化之后由于硬件环境的变化,更是无法抓取相关的前端模块工作信息以供开发人员进行分析,因此,如何高效抓取相关的前端模块工作信息以供开发人员进行分析的问题亟待解决

Benefits of technology

[0032]可以看出,在本申请实施例中所描述的数据传输控制方法及相关装置,用于对电子设备进行测试,设置虚拟视频设备,该虚拟视频设备配置成按第一帧率封装电子设备的前端模块的运行数据,利用虚拟视频设备按第二帧率将运行数据打包,得到目标数据包,将目标数据包发送给处理器,至少部分地基于对第一帧率和/或第二帧率的值进行调节来确定前端模块是否存在异常,由于虚拟视频设备能够对运行数据进行虚拟录像处理,使得运行数据能够按照一定的帧率和大小输出给外部设备,进而,能够高效抓住前端模块的工作信息以供开发人员进行分析。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115706769B_ABST
    Figure CN115706769B_ABST
Patent Text Reader

Abstract

The application discloses a data transmission control method and related device, which are used for testing an electronic device. The method comprises the following steps: setting a virtual video device, wherein the virtual video device is configured to encapsulate running data of a front-end module of the electronic device at a first frame rate; using the virtual video device to pack the running data at a second frame rate to obtain target data packets; sending the target data packets to a processor; and determining whether the front-end module is abnormal based at least in part on adjusting values of the first frame rate and / or the second frame rate. The embodiments of the application can efficiently capture working information of the front-end module for developers to analyze.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electronic technology, and in particular to a data transmission control method and related apparatus. Background Technology

[0002] With the widespread use of electronic devices (such as mobile phones, tablets, smartwatches, etc.), electronic devices can support more and more applications and have more and more powerful functions. Electronic devices are developing in a diversified and personalized direction, becoming indispensable electronic products in users' lives.

[0003] Currently, taking mobile phones as an example, the methods for debugging chips are all based on the development stage and are not suitable for the environment after productization. The detection of the front-end working status is still based on direct connection of debugging cables, which requires dedicated hardware interfaces. Of course, after productization, due to changes in the hardware environment, it is even more impossible to capture relevant front-end module working information for developers to analyze. Therefore, the problem of how to efficiently capture relevant front-end module working information for developers to analyze urgently needs to be solved. Summary of the Invention

[0004] This application provides a data transmission control method and related apparatus that can efficiently capture the working information of the front-end module for developers to analyze.

[0005] In a first aspect, embodiments of this application provide a data transmission control method for testing electronic devices, the method comprising:

[0006] A virtual video device is set up, wherein the virtual video device is configured to encapsulate the operating data of the front-end module of the electronic device at a first frame rate;

[0007] The running data is packaged using the virtual video device at a second frame rate to obtain a target data packet;

[0008] Send the target data packet to the processor;

[0009] The presence of anomalies in the front-end module is determined at least in part based on adjustments to the values ​​of the first frame rate and / or the second frame rate.

[0010] Secondly, embodiments of this application provide an electronic device, including a front-end module and a processor, wherein,

[0011] The front-end module is configured as follows:

[0012] Set up a virtual video device to encapsulate the operating data of the front-end module at a first frame rate;

[0013] The running data is packaged using the virtual video device at a second frame rate to obtain a target data packet; and

[0014] The target data packet is sent to the processor;

[0015] The processor is configured to:

[0016] The presence of anomalies in the front-end module is determined at least in part based on adjustments to the values ​​of the first frame rate and / or the second frame rate.

[0017] Thirdly, embodiments of this application provide a data transmission control method applied to an electronic device, the electronic device including a front-end module and a processor, the method comprising:

[0018] The front-end module sets up a virtual video device to encapsulate the operating data of the front-end module at a first frame rate;

[0019] The running data is packaged using the virtual video device at a second frame rate to obtain a target data packet; and

[0020] The target data packet is sent to the processor;

[0021] The processor is configured to:

[0022] The presence of anomalies in the front-end module is determined at least in part based on adjustments to the values ​​of the first frame rate and / or the second frame rate.

[0023] Fourthly, embodiments of this application provide a data transmission control device applied to an electronic device, the electronic device including a front-end module and a processor, the device including: a setting unit, a packetizing unit, a sending unit, and an anomaly detection unit, wherein...

[0024] The setting unit is used to set up a virtual video device, which is configured to encapsulate the operating data of the front-end module of the electronic device at a first frame rate.

[0025] The packaging unit is used to package the running data using the virtual video device at a second frame rate to obtain a target data packet.

[0026] The sending unit is used to send the target data packet to the processor;

[0027] The anomaly detection unit is used to determine whether the front-end module has an anomaly, at least in part, based on adjusting the values ​​of the first frame rate and / or the second frame rate.

[0028] Fifthly, embodiments of this application provide an electronic device, the electronic device including a front-end module, a processor, and a memory, the memory being used to store one or more programs and configured to be executed by the processor or the front-end module, the programs including instructions for performing steps in the method as described in any one of the first or third aspects.

[0029] Sixthly, embodiments of this application provide a computer-readable storage medium storing a computer program for electronic data interchange, wherein the computer program causes a computer to perform some or all of the steps described in the first or third aspects of embodiments of this application.

[0030] In a seventh aspect, embodiments of this application provide a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps described in the first or third aspects of embodiments of this application. The computer program product may be a software installation package.

[0031] Implementing the embodiments of this application has the following beneficial effects:

[0032] As can be seen, the data transmission control method and related apparatus described in the embodiments of this application are used to test electronic devices, set up a virtual video device, the virtual video device is configured to encapsulate the operating data of the front-end module of the electronic device at a first frame rate, use the virtual video device to package the operating data at a second frame rate to obtain a target data packet, and send the target data packet to the processor. The determination of whether there is an anomaly in the front-end module is based at least in part on adjusting the values ​​of the first frame rate and / or the second frame rate. Since the virtual video device can perform virtual recording processing on the operating data, the operating data can be output to external devices at a certain frame rate and size. Thus, the working information of the front-end module can be efficiently captured for developers to analyze. Attached Figure Description

[0033] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0034] Figure 1 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;

[0035] Figure 2This is a schematic diagram of the software structure of an electronic device provided in an embodiment of this application;

[0036] Figure 3A This is a schematic flowchart of a data transmission control method provided in an embodiment of this application;

[0037] Figure 3B This is a schematic diagram illustrating the data transmission between the front-end module and the application processor provided in an embodiment of this application;

[0038] Figure 3C This is a schematic diagram of the data packet structure provided in an embodiment of this application;

[0039] Figure 3D This is a schematic diagram illustrating another data transmission between the front-end module and the application processor provided in an embodiment of this application;

[0040] Figure 4 This is a flowchart illustrating another data transmission control method provided in an embodiment of this application;

[0041] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;

[0042] Figure 6 This is a block diagram of the functional units of a data transmission control device provided in an embodiment of this application. Detailed Implementation

[0043] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.

[0044] To better understand the solutions of the embodiments of this application, the relevant terms and concepts that may be involved in the embodiments of this application will be introduced below.

[0045] Electronic devices can include a variety of communication-enabled devices, such as smartphones, in-vehicle devices, wearable devices, charging devices (e.g., power banks), smartwatches, smart glasses, wireless Bluetooth headsets, computing devices or other processing devices connected to a wireless modem, as well as various forms of user equipment (UE), mobile stations (MS), virtual reality / augmented reality devices, terminal devices, etc. Electronic devices can also be base stations or servers, and can also be a test module consisting of a front-end module and a processor (e.g., an application processor).

[0046] The first part describes the software and hardware operating environment of the technical solution disclosed in this application.

[0047] As shown in the figure Figure 1A schematic diagram of the structure of electronic device 100 is shown. Electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, antenna 1, antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, a compass 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.

[0048] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0049] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processors (NPUs). Different processing units may be independent components or integrated into one or more processors. In some embodiments, electronic device 100 may also include one or more processors 110. The controller can generate operation control signals based on instruction opcodes and timing signals to control instruction fetching and execution. In other embodiments, processor 110 may also include a memory for storing instructions and data. For example, the memory in processor 110 may be a cache memory. This memory can store instructions or data that processor 110 has just used or is repeatedly used. If processor 110 needs to reuse the instruction or data, it can directly retrieve it from the memory. This avoids repeated access, reduces the waiting time of processor 110, and thus improves the efficiency of electronic device 100 in processing data or executing instructions. The processor may also include an image processor, which can be a preprocessor image signal processor (Pre-ISP), which can be understood as a simplified ISP that can also perform some image processing operations.

[0050] In some embodiments, the processor 110 may include one or more interfaces. These interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a SIM card interface, and / or a USB interface, etc. The USB interface 130 is a USB standard-compliant interface, specifically a Mini USB interface, a Micro USB interface, a USB Type-C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used for data transfer between the electronic device 100 and peripheral devices. The USB interface 130 can also be used to connect headphones for audio playback.

[0051] It is understood that the interface connection relationships between the modules illustrated in the embodiments of this application are merely illustrative and do not constitute a structural limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.

[0052] The charging management module 140 receives charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 receives charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 receives wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also supply power to the electronic device via the power management module 141.

[0053] The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, providing power to the processor 110, internal memory 121, external memory, display screen 194, camera 193, and wireless communication module 160. The power management module 141 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module 141 may be located within the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be located in the same device.

[0054] The wireless communication function of electronic device 100 can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor, and baseband processor.

[0055] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.

[0056] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G / 6G, applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.

[0057] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.

[0058] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0059] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a mini light-emitting diode (miniled), a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include one or more display screens 194.

[0060] Electronic device 100 can perform shooting functions through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0061] The ISP (Image Signal Processor) is used to process data fed back from the camera 193. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, transforming it into an image visible to the naked eye. The ISP can also perform algorithmic optimization of image noise, brightness, and skin tone. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set in the camera 193.

[0062] Camera 193 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats. In some embodiments, the electronic device 100 may include one or more cameras 193.

[0063] Digital signal processors (DSPs) are used to process digital signals. Besides digital image signals, they can also process other digital signals. For example, when electronic device 100 selects a frequency, the DSP can perform Fourier transforms on the frequency energy.

[0064] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. Thus, electronic device 100 can play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG 2, MPEG 3, MPEG 4, etc.

[0065] An NPU (Neural Processing Unit) is a computational processor for neural networks (NNs). By borrowing the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it can rapidly process input information and continuously learn on its own. NPUs enable intelligent cognitive applications in electronic devices, such as image recognition, facial recognition, speech recognition, and text understanding.

[0066] The external storage interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.

[0067] Internal memory 121 can be used to store one or more computer programs, which include instructions. Processor 110 can execute the instructions stored in internal memory 121, thereby causing electronic device 100 to perform the methods for displaying page elements provided in some embodiments of this application, as well as various applications and data processing. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system; the program storage area may also store one or more applications (such as a gallery, contacts, etc.). The data storage area may store data created during the use of electronic device 100 (such as photos, contacts, etc.). In addition, internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as one or more disk storage components, flash memory components, universal flash storage (UFS), etc. In some embodiments, processor 110 can execute instructions stored in internal memory 121 and / or instructions stored in memory disposed in processor 110, thereby causing electronic device 100 to perform the methods for displaying page elements provided in embodiments of this application, as well as other applications and data processing. Electronic device 100 can implement audio functions such as music playback and recording through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.

[0068] The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0069] The pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, the pressure sensor 180A can be disposed on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may include at least two parallel plates with conductive materials. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the pressure intensity based on the change in capacitance. When a touch operation is applied to the display screen 194, the electronic device 100 detects the touch operation intensity based on the pressure sensor 180A. The electronic device 100 can also calculate the touch position based on the detection signal from the pressure sensor 180A. In some embodiments, touch operations applied to the same touch position but with different touch operation intensities can correspond to different operation commands. For example, when a touch operation with an intensity less than a first pressure threshold is applied to the SMS application icon, a command to view an SMS message is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to the SMS application icon, a command to create a new SMS message is executed.

[0070] The gyroscope sensor 180B can be used to determine the motion attitude of the electronic device 100. In some embodiments, the gyroscope sensor 180B can determine the angular velocity of the electronic device 100 around three axes (i.e., the X, Y, and Z axes). The gyroscope sensor 180B can be used for image stabilization. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the electronic device 100's shake, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to counteract the shake of the electronic device 100 through reverse movement, thus achieving image stabilization. The gyroscope sensor 180B can also be used in navigation and motion-sensing game scenarios.

[0071] The 180E accelerometer can detect the magnitude of acceleration of electronic device 100 in various directions (typically three axes). When electronic device 100 is stationary, it can detect the magnitude and direction of gravity. It can also be used to identify the posture of electronic devices and applied to applications such as screen orientation switching and pedometers.

[0072] The ambient light sensor 180L is used to sense the brightness of ambient light. The electronic device 100 can adaptively adjust the brightness of the display screen 194 based on the sensed ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also work with the proximity sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.

[0073] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can utilize the characteristics of the collected fingerprints to achieve fingerprint unlocking, accessing application locks, taking photos with fingerprints, answering calls with fingerprints, etc.

[0074] Temperature sensor 180J is used to detect temperature. In some embodiments, electronic device 100 uses the temperature detected by temperature sensor 180J to execute a temperature handling strategy. For example, when the temperature reported by temperature sensor 180J exceeds a threshold, electronic device 100 performs thermal protection by reducing the performance of a processor located near temperature sensor 180J to reduce power consumption. In other embodiments, when the temperature is below another threshold, electronic device 100 heats battery 142 to prevent abnormal shutdown of electronic device 100 due to low temperature. In still other embodiments, when the temperature is below yet another threshold, electronic device 100 boosts the output voltage of battery 142 to prevent abnormal shutdown due to low temperature.

[0075] Touch sensor 180K, also known as a "touch panel," can be located on display screen 194. The touch sensor 180K and display screen 194 together form a touchscreen, also known as a "touch screen." Touch sensor 180K detects touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 194. In other embodiments, touch sensor 180K may also be located on the surface of electronic device 100, in a different position than display screen 194.

[0076] For example, Figure 2 A software architecture block diagram of the electronic device 100 is shown. The layered architecture divides the software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer. The application layer may include a series of application packages.

[0077] like Figure 2 As shown, the application layer can include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and SMS.

[0078] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.

[0079] like Figure 2 As shown, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.

[0080] The window manager is used to manage windowed applications. It can retrieve screen size, determine the presence of a status bar, lock the screen, and capture screenshots, among other things.

[0081] Content providers store and retrieve data, making that data accessible to applications. This data can include videos, images, audio, phone calls made and received, browsing history and bookmarks, phone books, and more.

[0082] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.

[0083] The phone manager is used to provide communication functions for electronic device 100. For example, it manages call status (including connection and disconnection).

[0084] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.

[0085] The notification manager allows applications to display notifications in the status bar. These notifications can be used to deliver informational messages and can disappear automatically after a short pause, requiring no user interaction. For example, the notification manager can be used to notify users of completed downloads or message alerts. The notification manager can also display notifications as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting sounds, vibrating electronic devices, and flashing indicator lights.

[0086] The Android Runtime consists of core libraries and a virtual machine. The Android Runtime is responsible for the scheduling and management of the Android system.

[0087] The core library consists of two parts: one part is the functionalities that need to be called by the Java language, and the other part is the Android core library.

[0088] The application layer and application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.

[0089] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.

[0090] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.

[0091] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.

[0092] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0093] A 2D graphics engine is a graphics engine for 2D drawing.

[0094] The kernel layer is the layer between hardware and software. The kernel layer contains at least the display driver, camera driver, audio driver, and sensor driver.

[0095] Based on the above Figure 1 or Figure 2 The described electronic device includes a front-end module and a processor, and can be used to perform the following functions:

[0096] The front-end module is configured as follows:

[0097] Set up a virtual video device to encapsulate the operating data of the front-end module at a first frame rate;

[0098] The running data is packaged using the virtual video device at a second frame rate to obtain a target data packet; and

[0099] The target data packet is sent to the processor;

[0100] The processor is configured to:

[0101] The presence of anomalies in the front-end module is determined at least in part based on adjustments to the values ​​of the first frame rate and / or the second frame rate.

[0102] As can be seen, the electronic device described in this application embodiment is used to test the electronic device and set up a virtual video device. The virtual video device is configured to encapsulate the running data of the front-end module of the electronic device at a first frame rate. The running data is packaged by the virtual video device at a second frame rate to obtain a target data packet, which is then sent to the processor. The determination of whether there is an anomaly in the front-end module is based at least in part on adjusting the values ​​of the first frame rate and / or the second frame rate. Since the virtual video device can perform virtual recording processing on the running data, the running data can be output to external devices at a certain frame rate and size. Thus, the working information of the front-end module can be efficiently captured for developers to analyze.

[0103] Optionally, the front-end module is further configured to: obtain target pipeline configuration parameters;

[0104] Specifically, in the step of using the virtual video device to package the running data at a second frame rate to obtain the target data packet, the front-end module is configured as follows:

[0105] According to the preset mapping relationship between pipeline configuration parameters and packaging processing parameters, the target packaging processing parameters corresponding to the target pipeline configuration parameters are determined, and the target packaging processing parameters include at least the second frame rate;

[0106] The virtual video device packages the running data using the target packaging processing parameters to obtain the target data packet.

[0107] Optionally, the target data packet includes at least one data packet, the data size of which is less than or equal to the size of each of a plurality of buffer registers allocated by the USB service, the buffer registers being used to hold the data packets in the at least one data packet.

[0108] Optionally, regarding the acquisition of target pipeline configuration parameters, the front-end module is specifically configured as follows:

[0109] Determine the target debugging content;

[0110] Obtain the attribute information corresponding to the target debugging content;

[0111] Based on the preset mapping relationship between the attribute information of the debugging content and the pipeline configuration parameters, the target pipeline configuration parameters corresponding to the attribute information of the target debugging content are determined.

[0112] Optionally, the processor is further configured to:

[0113] The processor receives the target data packet, unpacks the target data packet to obtain the running data, and the running data is used to perform data analysis.

[0114] Optionally, in the process of unpacking the target data packet to obtain the running data, the processor is further configured to:

[0115] The target data packet is copied frame by frame into the target buffer register allocated by the USB service;

[0116] The data in the target cache register is unpacked to obtain the running data.

[0117] Optionally, after unpacking the target data packet to obtain the running data, the processor is further configured to:

[0118] The USB service is invoked to upload the runtime data to an external device via the target cache register, so that the external device can perform data analysis on the runtime data.

[0119] Optionally, the processor is further configured to:

[0120] The target cache register is rotated so that the rotated target cache register continues to be used to hold data packets received by the processor.

[0121] Optionally, prior to setting the virtual video device, the processor is further specifically configured to:

[0122] The camera of the electronic device is activated to invoke a hardware abstraction module, wherein the hardware abstraction module is configured to perform the function of unpacking the target data packet to obtain the running data.

[0123] The second part, the data transmission control method and apparatus disclosed in the embodiments of this application, are described below.

[0124] This application provides a reference. Figure 3A , Figure 3A This is a flowchart illustrating a data transmission control method provided in an embodiment of this application, applied to an electronic device. The electronic device includes a front-end module and a processor, for example, the processor can be an application processor (AP). This data transmission control method can be used to test the electronic device. As shown in the figure, this data transmission control method includes:

[0125] 301. Set up a virtual video device, wherein the virtual video device is configured to encapsulate the operating data of the front-end module of the electronic device at a first frame rate.

[0126] The operational data can be at least one of the following: operating status data of each chip in the front-end module, image data, voice data, debug log data, video data, etc., without limitation. The operating status data of each chip in the front-end module can be at least one of the following: operating level, waveform, operating voltage, operating current, operating power, operating clock, etc., without limitation. The above operational data can be raw data or preprocessed raw data. Preprocessing can be at least one of the following: sampling, compression, filtering, etc., without limitation.

[0127] Among them, such as Figure 3B As shown in the embodiments of this application, the front-end module may include: an image signal processor (ISP), a neural network processor (NPU), a memory (DDR), a top control module (TOP), a selector (MUX), a MIPI, etc., which are not limited here. The selector is used to implement the selection operation of running data. For example, only the running data of the ISP is selected. The MIPI samples and packages the running data, and sends the packaged data to the AP through the camera serial interface (CSI). The AP then transmits the running data to external devices via USB service. The front-end module can be an image preprocessor.

[0128] Optionally, step 301 above, setting up the virtual video device, can be implemented as follows:

[0129] The virtual video device is configured via the Mobile Industry Processor Interface (MIPI) of the front-end module.

[0130] In practice, virtual video devices can be set up through MIPI. Specifically, virtual video devices can be set up through MIPI's camera serial interface (CSI), and these virtual video devices can also be called virtualized video recording devices.

[0131] Optionally, before setting up the virtual video device in step 301 above, the following steps may also be included:

[0132] A1. Obtain the target pipeline configuration parameters;

[0133] Step 301, using the virtual video device to package the running data at the second frame rate to obtain the target data packet, may include the following steps:

[0134] 31. According to the preset mapping relationship between pipeline configuration parameters and packaging processing parameters, determine the target packaging processing parameters corresponding to the target pipeline configuration parameters, wherein the target packaging processing parameters include at least the second frame rate;

[0135] 32. The running data is packaged using the target packaging processing parameters by the virtual video device to obtain the target data packet.

[0136] In this embodiment, the pipeline configuration parameters may include at least one of the following: pipeline type, pipeline number, frame rate, resolution, etc., which are not limited here. The pipeline type can be understood as a pipeline used to process data of a certain data type. For example, image data corresponds to the image data pipeline type, and voice data corresponds to the voice data pipeline type, etc. The pipeline number can be understood as the pipeline number, which can be predefined. Pipelines with different numbers have different functions. The packet processing parameters include at least the frame rate, and may also include at least one of the following: data packet size, packet header, packet trailer, etc., which are not limited here. The electronic device can pre-store the mapping relationship between preset pipeline configuration parameters and packet processing parameters, that is, different pipeline configuration parameters can correspond to different packet processing parameters.

[0137] In the specific implementation, the target pipeline configuration parameters can be pre-configured. The electronic device can obtain the target pipeline configuration parameters from the hardware abstraction module (camera HAL), and then determine the target packaging processing parameters corresponding to the target pipeline configuration parameters according to the preset mapping relationship between the pipeline configuration parameters and the packaging processing parameters. The running data is packaged by the virtual video device using the target packaging processing parameters to obtain the target data packet. The target data packet can be at least one data packet, and the target packaging processing parameters include at least the second frame rate.

[0138] For example, if the running data is packaged at fixed intervals, the amount of information generated by the front-end module within a certain period of time may be small, resulting in insufficient filling of the cache register and wasting the cache register and transmission bandwidth. Therefore, the data can also be packaged based on the principle of sending when the cache is full, and the packaged data and the next frame data can be sent to the AP for processing together. Alternatively, the packaged data can be timestamped and sent to the AP separately for processing, thereby saving transmission bandwidth.

[0139] Optionally, the target data packet includes at least one data packet, the data size of which is less than or equal to the size of each of a plurality of buffer registers allocated by the USB service, the buffer registers being used to hold the data packets in the at least one data packet.

[0140] The target data packet may include at least one data packet, and the data size of each data packet is less than or equal to the size of each of the multiple buffer registers allocated by the USB service. The buffer registers are used to hold the data packets in at least one data packet, thereby facilitating the buffer registers to hold the data packets.

[0141] Optionally, step A1 above, obtaining the target pipeline configuration parameters, may include the following steps:

[0142] A11. Determine the target debugging content corresponding to the engineering mode;

[0143] A12. Obtain the attribute information corresponding to the target debugging content;

[0144] A13. Determine the target pipeline configuration parameters corresponding to the attribute information of the target debugging content according to the preset mapping relationship between the attribute information of the debugging content and the pipeline configuration parameters.

[0145] In this embodiment of the application, the attribute information of the debugging content can be at least one of the following: data type, debugging purpose, parameter type of debugging parameters, foreground application, etc., which are not limited here. The electronic device can also pre-store the mapping relationship between the attribute information of the debugging content and the pipeline configuration parameters.

[0146] In specific implementation, the electronic device can determine the target debugging content corresponding to the engineering mode in engineering mode. The debugging content can be set by the user or determined based on the user's operation. Then, the attribute information corresponding to the target debugging content is obtained. Then, according to the preset mapping relationship between the attribute information of the debugging content and the pipeline configuration parameters, the target pipeline configuration parameters corresponding to the attribute information of the target debugging content can be determined. In this way, the corresponding pipeline configuration parameters can be determined based on the attribute information of the debugging content, thereby enabling the pipeline configuration parameters to meet the debugging requirements.

[0147] Optionally, before setting up the virtual video device in step 301, the following steps may also be included:

[0148] B1. Detect whether the electronic device is in engineering mode;

[0149] B2. When the electronic device is in the engineering mode, perform the step of setting up the virtual video device.

[0150] In specific implementation, the electronic device can detect whether it is in engineering mode. If the electronic device is in engineering mode, step 301 can be executed; otherwise, step 301 can be skipped. In this embodiment, engineering mode can also be called debug mode. Engineering mode can be set by the user, or it can be automatically entered when the electronic device malfunctions.

[0151] Optionally, before setting up the virtual video device in step 301, the following steps may also be included:

[0152] The camera of the electronic device is activated to invoke a hardware abstraction module, wherein the hardware abstraction module is configured to perform the function of unpacking the target data packet to obtain the running data.

[0153] In this embodiment, the camera function is activated, not the camera itself. After the camera function is activated, the hardware abstraction module needs to be called subsequently. Therefore, the camera function needs to be activated in order to successfully call the hardware abstraction module. The hardware abstraction module can be used to perform unpacking operations to obtain the running data.

[0154] 302. Using the virtual video device, the running data is packaged at the second frame rate to obtain the target data packet.

[0155] In practice, the electronic device can acquire the operating data of at least one module in the front-end module, and package the operating data at a second frame rate through a virtual video device to obtain a target data packet. This allows the target data packet to be output at a certain frequency and size. The first frame rate and the second frame rate can be the same or different.

[0156] 303. Send the target data packet to the processor.

[0157] Specifically, electronic devices can virtualize runtime data using virtual video devices, enabling the transmission of runtime data at regular intervals and in fixed sizes. After the front-end module packages the received runtime data according to certain rules, it can be placed in a buffer register allocated by the back-end (provided by the driver for the front-end module to store data). The packaged data is then transmitted to the application processor (AP) (back-end) via MIPI. Multiple buffer registers can also be allocated via USB service, allowing for buffer register rotation. The number of buffer registers can be set by the user or determined by bandwidth and / or the speed at which runtime data is generated.

[0158] 304. The presence of an anomaly in the front-end module is determined at least in part based on adjustments to the values ​​of the first frame rate and / or the second frame rate.

[0159] In specific implementation, the running data can be sent to external devices for data analysis, or the electronic device can also perform data analysis on the running data to achieve anomaly detection or detection of the working status of various chips in the front-end module. The aforementioned external device can be other electronic devices, such as a host computer (PC). Data analysis can have at least one of the following functions: anomaly detection, status detection of various chips in the front-end module, debugging data analysis, etc., which are not limited here. The electronic device can also display the running data on a display screen. In the embodiments of this application, the first frame rate and / or the second frame rate can be dynamically adjusted to ensure effective encapsulation and packetized transmission of the running data.

[0160] Specifically, the presence of anomalies in the front-end module can be determined at least partially based on adjusting the value of the first frame rate, or at least partially based on adjusting the value of the second frame rate, or at least partially based on adjusting the values ​​of both the first and second frame rates. In other words, in a specific implementation, some or all of the running data can be adjusted using either the first or second frame rate to facilitate the front-end's rhythmic and efficient transmission of data and the back-end's rhythmic and rapid extraction of running data. During the adjustment process, the target data packet can be analyzed to obtain the running data of the front-end module, and this running data can be used to determine whether the front-end module has encountered anomalies.

[0161] For example, in this embodiment of the application, the electronic device can collect and package abnormal information (including runtime detection information) from different modules at a certain rhythm and size by processing the virtual video device of the abnormal information collection module in the front-end module, so as to output it to the PC side in real time. When the developers need to debug, they can analyze the received monitoring data to find out the cause of the problem.

[0162] Furthermore, to illustrate further, in an embodiment of this application, when the running data is image data, for example, the processing effect of each frame (e.g., the effect of certain areas) can be compared with a pre-stored standard effect image to obtain the processing effect judgment result of the current frame. Then, based on the judgment result, the processing parameters of the relevant algorithm can be adaptively adjusted so that the image processing of the camera system can perform image processing stably.

[0163] Optionally, after step 304, the following steps may also be included:

[0164] C1. Extract features from the running data to obtain a target feature set;

[0165] C2. Input the target feature set into a preset neural network model to obtain the target calculation result;

[0166] C3. Determine the target anomaly information based on the target calculation results.

[0167] The preset neural network model can be at least one of the following: convolutional neural network model, fully connected neural network model, recurrent neural network model, etc., without limitation.

[0168] In this embodiment, steps C1-C3 can be implemented by an electronic device, or by an external device, such as a host computer (PC). The target feature set may include at least one feature, or the target feature set may include at least one type of feature. When the running data is image data, the feature can be at least one of the following: feature points, feature vectors, color, pixels, feature textures, etc., without limitation. When the running data is sound data, the feature can be at least one of the following: frequency, amplitude, waveform, timbre, pitch, wavelength, etc., without limitation. When the running data is debugging data, the feature can be at least one of the following: level, waveform, voltage, current, power, log data, etc., without limitation.

[0169] Before performing step 301 of the embodiments of this application, a neural network model can be trained using a large amount of sample data and the corresponding labels of the samples. After the neural network model converges, a preset neural network model can be obtained.

[0170] In specific implementation, the electronic device can extract features from the running data to obtain a target feature set, and then input the target feature set into a preset neural network model to obtain the target calculation result. The calculation result can be at least one label and a corresponding probability value. Then, an anomaly analysis report is generated based on the target calculation result, and the anomaly analysis report is used as the target anomaly information. Alternatively, the electronic device can also pre-store the mapping relationship between the calculation result and the anomaly information, and then determine the target anomaly information corresponding to the target calculation result based on the mapping relationship. The anomaly information can be at least one of the following: anomaly cause, anomaly location, anomaly duration, etc., which are not limited here.

[0171] For example, in this embodiment, the system and images can be proactively detected by the front-end module. When an anomaly occurs, it can be detected in advance and relevant anomaly information can be obtained. Then, without affecting the upper layer, i.e., the user experience and the upper layer's calls to the image preprocessor, the corresponding anomaly can be quickly and adaptively processed. Furthermore, the processed results and anomaly information can be reported, so that the upper layer can make further judgments and processes based on the adaptive processing results and anomaly information in a timely manner. Thus, this embodiment can better improve the robustness of the system, reduce the impact of anomalies on the user experience, and improve the user experience.

[0172] Among them, such as Figure 3C As shown, any data packet in the target data packet may include a packet header PH, running data, and a packet trailer PF. The packet header can be used to mark the start position of a data packet, and the packet trailer can be used to indicate the end position of a data packet.

[0173] Furthermore, the packet header may include: a header flag, an index flag, and a packet data length. The header flag indicates the data type of the current data packet, the index flag indicates the independent index of the current data packet, and the packet data length indicates the data length of the current data packet. The specific structure is shown in the table below:

[0174] Headband Marking Byte3 Index Packet Tag Byte2 Packet data length Byte1 + Byte0

[0175] Furthermore, the packet tail may include: a packet tail marker, a packet count, and a frame count. The packet tail marker indicates the position of the packet tail, the packet count indicates the number of packets (which one), and the frame count indicates which frame the packet came from, as shown in the table below:

[0176] End mark Byte3 Packet count Byte2

[0177] Optionally, the following steps may also be included:

[0178] The target data packet is received by the AP, and the target data packet is unpacked to obtain the running data, which is used for data analysis.

[0179] The AP can receive target data packets and unpack them according to the first frame rate and / or the second frame rate to obtain running data. It can also perform data analysis through the running data to achieve the purpose of anomaly detection.

[0180] Optionally, step 302 above, unpacking the target data packet to obtain the running data, can be implemented in the following manner:

[0181] The target data packet is unpacked using a hardware abstraction module to obtain the runtime data.

[0182] Unpacking is the reverse operation of packing. The hardware abstraction module can parse the target data packet according to the flag bit or the pre-agreed rules, and then process the parsed data. For example, it can adjust the order of storage or pack abnormal information into the image data of the secondary camera when there is multiple image data (the image data of the secondary camera is smaller in size, and there is space and bandwidth to transmit debugging information), while the buffer register of the main camera only transmits image data.

[0183] For example, Figure 3DAs shown, taking debug data as an example, the internal signals of the front-end module can be forwarded from the MIPI of the front-end module to the DDR of the AP side. Upon receiving the data, the AP side triggers an interrupt. Since the front-end module processes the debug data as a virtual camera device (virtual video device), a dedicated pipeline needs to be started in the hardware abstraction module to serve this virtual video device. Furthermore, the USB service needs to allocate relevant buffer registers and provide them to the hardware abstraction module. The hardware abstraction module needs to copy the obtained debug data frame-by-frame into the buffer registers allocated by the USB service. It's important to note that the data in these buffer registers does not need to be processed by the ISP module's algorithms on the AP side. Therefore, the ISP-related algorithm modules need to be disabled to ensure that the data transmitted to the external device (PC) is the original data. The USB service can implement buffer register rotation through callback functions.

[0184] In this embodiment, for the customization of the AP's engineering mode and pipeline configuration parameters, to ensure the integrity and distinguishability of the monitoring information from the front-end modules, the AP's data processing modules need to be selectively accessed during customization. For example, modules that may affect the data content, such as noise reduction modules, cannot be accessed, thereby preventing data tampering. Furthermore, the pipeline's processing of the buffer register differs from traditional camera processing modules. When monitoring data and image data are packaged and transmitted, the data needs to be split. Therefore, the original data's buffer register is parsed and reassembled in the pipeline. The parsing and reassembly of the data can be performed according to flag bits or agreed-upon rules, and then the parsed data is processed separately.

[0185] Optionally, step 302 above, unpacking the target data packet to obtain the running data, may include the following steps:

[0186] 31. Copy the target data packet frame by frame to the target buffer register allocated by the USB service;

[0187] 32. Unpack the data in the target cache register to obtain the running data.

[0188] In practice, the electronic device can copy the target data packet frame by frame to the target buffer register allocated by the USB service through the hardware abstraction module. The hardware abstraction module can then unpack the data in the target buffer register to obtain the running data. After the target buffer register is occupied, the buffer register can be rotated to provide the next buffer register to hold the data copied by the hardware abstraction module. Of course, after the running data is uploaded to the host PC, data analysis can also be performed by the host PC.

[0189] Optionally, after unpacking the target data packet to obtain the running data in step 302 above, the following steps may also be included:

[0190] The USB service is invoked to upload the runtime data to an external device via the target cache register, so that the external device can perform data analysis on the runtime data.

[0191] Furthermore, optionally, the following steps may also be included:

[0192] The target buffer register is rotated so that the rotated target buffer register continues to be used to hold data packets received by the AP.

[0193] For example, when debugging and processing data in the front-end module, information can be divided and packaged based on the interval between frames. For instance, debugging data of the corresponding time length can be packaged and processed every 33ms or 16.6ms. This ensures that the packaged debugging data can correspond to the image data (acquisition timing) based on the packet index or timestamp, allowing the AP to distinguish them during processing. Alternatively, debugging data and camera image data can be packaged together in the same buffer register. When monitoring data and image data are packaged and transmitted, the data needs to be split; therefore, the original data buffer register is parsed and reassembled in the pipeline.

[0194] For example, in practical applications, when infringement detection is required, the working status of the camera during use can be checked to identify whether the front-end module is virtualized as a recording device. Furthermore, by judging the size and output speed (frame rate) of the data uploaded by the camera module, if the size remains consistent within a certain time and the output speed is constant, it can be basically confirmed that the implementation method proposed in this application is being used, and further confirmation can be made regarding whether infringement has occurred.

[0195] For example, in practical applications, for debugging data transmitted by the front-end module, since the data volume is large, the file can be scanned on the platform side (mobile terminal) to check if large data is being generated in real time. When large data is detected in real time, this data can be pulled through adb and the data content can be analyzed to confirm whether it is a debugging data packet transmitted by the front-end module.

[0196] As can be seen, the data transmission control method described in the embodiments of this application is used to test electronic devices. A virtual video device is set up, which is configured to encapsulate the operating data of the front-end module of the electronic device at a first frame rate. The operating data is packaged by the virtual video device at a second frame rate to obtain a target data packet, which is then sent to the processor. The method determines whether there is an anomaly in the front-end module based at least in part on adjusting the values ​​of the first frame rate and / or the second frame rate. Since the virtual video device can perform virtual recording processing on the operating data, the operating data can be output to external devices at a certain frame rate and size. Thus, the working information of the front-end module can be efficiently captured for developers to analyze.

[0197] This application provides a reference. Figure 4 , Figure 4 This is a flowchart illustrating a data transmission control method provided in an embodiment of this application, applied to an electronic device. The electronic device includes a front-end module and an application processor (AP). As shown in the figure, this data transmission control method includes:

[0198] 401. Enable the camera function to invoke the hardware abstraction module, wherein the hardware abstraction module is configured to perform unpacking operations.

[0199] 402. Obtain the target pipeline configuration parameters.

[0200] 403. Determine the target packaging processing parameters corresponding to the target pipeline configuration parameters according to the preset mapping relationship between pipeline configuration parameters and packaging processing parameters.

[0201] 404. Set up a virtual video device, wherein the virtual video device is configured to encapsulate the operating data of the front-end module of the electronic device at a first frame rate.

[0202] 405. Using the virtual video device, the running data is packaged according to the target packaging processing parameters to obtain the target data packet.

[0203] 406. Send the target data packet to the processor.

[0204] 407. Receive the target data packet through the AP, and copy the target data packet to the target buffer register allocated by the USB service in a frame-by-frame manner through the hardware abstraction module.

[0205] 408. The data in the target cache register is unpacked through the hardware abstraction module to obtain the running data.

[0206] 409. Call the USB service to upload the running data to an external device through the target cache register, so that the external device can perform data analysis on the running data.

[0207] For a detailed description of steps 401-409 above, please refer to [link to relevant documentation]. Figure 3A The details of the data transmission control method described herein will not be repeated here.

[0208] For example, in practice, the following steps can be followed:

[0209] S1. Turn on the camera;

[0210] S2. Configure the relevant customized pipeline configuration parameters and allocate resources;

[0211] S3. The front-end module also configures the packaging method according to the pipeline configuration parameters, that is, to ensure that the size of the packaged data is consistent with the cache register allocated by the AP side.

[0212] S4. Start the data flow. Each sub-module in the front-end module collects and outputs its own running data. The MIPI of the front-end module packages and processes the data. Each module rotates the buffer register according to the set parameters.

[0213] S5 and AP receive data through the hardware abstraction module, parse and process the data according to the data packaging method, and copy the parsed data to the USB service in real time.

[0214] S6, USB service transmits received data to external devices;

[0215] S7. Based on the above steps, perform a rotation of the cache register to ensure that the monitoring data from the front end is packaged and transmitted to the back end for storage or to the PC side for processing in real time.

[0216] Furthermore, since MIPI can process runtime data using virtual video devices, the runtime data can be output to external devices at a certain frame rate and size. This allows for the efficient capture of front-end module work information for developers to analyze.

[0217] Consistent with the above embodiments, please refer to Figure 5 , Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. As shown in the figure, the electronic device includes a front-end module, a processor, a memory, a communication interface, and one or more programs. The one or more programs are stored in the memory and configured to be executed by the processor or the front-end module. In this embodiment, the program includes instructions for performing the following steps:

[0218] A virtual video device is set up, wherein the virtual video device is configured to encapsulate the operating data of the front-end module of the electronic device at a first frame rate;

[0219] The running data is packaged using the virtual video device at a second frame rate to obtain a target data packet;

[0220] Send the target data packet to the processor;

[0221] The presence of anomalies in the front-end module is determined at least in part based on adjustments to the values ​​of the first frame rate and / or the second frame rate.

[0222] Optionally, in setting up the virtual video device, the above procedure includes instructions for performing the following steps:

[0223] The virtual video device is configured via the Mobile Industry Processor Interface (MIPI) of the front-end module.

[0224] Optionally, before setting up the virtual video device, the above program further includes instructions for performing the following steps:

[0225] Obtain the target pipeline configuration parameters;

[0226] In terms of using the virtual video device to package the running data at a second frame rate to obtain the target data packet, the above program further includes instructions for performing the following steps:

[0227] According to the preset mapping relationship between pipeline configuration parameters and packaging processing parameters, the target packaging processing parameters corresponding to the target pipeline configuration parameters are determined, and the target packaging processing parameters include at least the second frame rate;

[0228] The virtual video device packages the running data using the target packaging processing parameters to obtain the target data packet.

[0229] Optionally, the target data packet includes at least one data packet, the data size of which is less than or equal to the size of each of a plurality of buffer registers allocated by the USB service, the buffer registers being used to hold the data packets in the at least one data packet.

[0230] Optionally, in obtaining the target pipeline configuration parameters, the above procedure includes instructions for performing the following steps:

[0231] Determine the target debugging content corresponding to the engineering mode;

[0232] Obtain the attribute information corresponding to the target debugging content;

[0233] Based on the preset mapping relationship between the attribute information of the debugging content and the pipeline configuration parameters, the target pipeline configuration parameters corresponding to the attribute information of the target debugging content are determined.

[0234] Optionally, the above procedure may also include instructions for performing the following steps:

[0235] The processor receives the target data packet, unpacks the target data packet to obtain the running data, and the running data is used to perform data analysis.

[0236] Optionally, in unpacking the target data packet to obtain the running data, the above program includes instructions for performing the following steps:

[0237] The target data packet is copied frame by frame into the target buffer register allocated by the USB service;

[0238] The data in the target cache register is unpacked to obtain the running data.

[0239] Optionally, after unpacking the target data packet to obtain the running data, the above program further includes instructions for performing the following steps:

[0240] The USB service is invoked to upload the runtime data to an external device via the target cache register, so that the external device can perform data analysis on the runtime data.

[0241] Optionally, the above procedure may also include instructions for performing the following steps:

[0242] The target cache register is rotated so that the rotated target cache register continues to be used to hold data packets received by the processor.

[0243] Optionally, before setting up the virtual video device, the above program further includes instructions for performing the following steps:

[0244] Detect whether the electronic device is in engineering mode;

[0245] When the electronic device is in the engineering mode, the step of setting up the virtual video device is performed.

[0246] Optionally, before setting up the virtual video device, the above program further includes instructions for performing the following steps:

[0247] The camera of the electronic device is activated to invoke a hardware abstraction module, wherein the hardware abstraction module is configured to perform the function of unpacking the target data packet to obtain the running data.

[0248] The above primarily describes the solutions of the embodiments of this application from the perspective of the method execution process. It is understood that, in order to achieve the above functions, the electronic device includes corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, in conjunction with the units and algorithm steps of the various examples described in the embodiments provided herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed by hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0249] This application embodiment can divide the electronic device into functional units according to the above method example. For example, each function can be divided into a separate functional unit, or two or more functions can be integrated into one processing unit. The integrated unit can be implemented in hardware or as a software functional unit. It should be noted that the unit division in this application embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.

[0250] Figure 6 This is a functional unit block diagram of the data transmission control device 600 involved in the embodiments of this application. The data transmission control device 600 is applied to an electronic device, which includes a front-end module and a processor. The device includes: a setting unit 601, a packetizing unit 602, a sending unit 603, and an anomaly detection unit 604.

[0251] The setting unit 601 is used to set a virtual video device, which is configured to encapsulate the operating data of the front-end module of the electronic device at a first frame rate.

[0252] The packaging unit 602 is used to package the running data at a second frame rate using the virtual video device to obtain a target data packet.

[0253] The sending unit 603 is used to send the target data packet to the processor;

[0254] The anomaly detection unit 604 is used to determine whether the front-end module has an anomaly, at least in part, based on adjusting the values ​​of the first frame rate and / or the second frame rate.

[0255] Optionally, in setting up the virtual video device, the setting unit 601 is specifically used for:

[0256] The virtual video device is configured via the Mobile Industry Processor Interface (MIPI) of the front-end module.

[0257] Optionally, prior to setting up the virtual video device, the device 600 is further specifically used for:

[0258] Obtain the target pipeline configuration parameters;

[0259] In the process of using the virtual video device to package the running data at a second frame rate to obtain a target data packet, the packaging unit 602 is specifically used for:

[0260] According to the preset mapping relationship between pipeline configuration parameters and packaging processing parameters, the target packaging processing parameters corresponding to the target pipeline configuration parameters are determined, and the target packaging processing parameters include at least the second frame rate;

[0261] The virtual video device packages the running data using the target packaging processing parameters to obtain the target data packet.

[0262] Optionally, the target data packet includes at least one data packet, the data size of which is less than or equal to the size of each of a plurality of buffer registers allocated by the USB service, the buffer registers being used to hold the data packets in the at least one data packet.

[0263] Optionally, in acquiring the target pipeline configuration parameters, the device 600 is specifically used for:

[0264] Determine the target debugging content;

[0265] Obtain the attribute information corresponding to the target debugging content;

[0266] Based on the preset mapping relationship between the attribute information of the debugging content and the pipeline configuration parameters, the target pipeline configuration parameters corresponding to the attribute information of the target debugging content are determined.

[0267] Optionally, the device 600 is further specifically used for:

[0268] The processor receives the target data packet, unpacks the target data packet to obtain the running data, and the running data is used to perform data analysis.

[0269] Optionally, in the process of unpacking the target data packet to obtain the running data, the device 600 is specifically used for:

[0270] The target data packet is copied frame by frame into the target buffer register allocated by the USB service;

[0271] The data in the target cache register is unpacked to obtain the running data.

[0272] Optionally, after unpacking the target data packet to obtain the running data, the device 600 is further configured to:

[0273] The USB service is invoked to upload the runtime data to an external device via the target cache register, so that the external device can perform data analysis on the runtime data.

[0274] Optionally, the device 600 is further specifically used for:

[0275] The target cache register is rotated so that the rotated target cache register continues to be used to hold data packets received by the processor.

[0276] Optionally, prior to setting up the virtual video device, the device 600 is further specifically used for:

[0277] The camera of the electronic device is activated to invoke a hardware abstraction module, wherein the hardware abstraction module is configured to perform the function of unpacking the target data packet to obtain the running data.

[0278] It should be noted that the electronic devices described in the embodiments of this application are presented in the form of functional units. The term "unit" as used herein should be understood in the broadest possible sense, and the object used to implement the functions described in each "unit" may be, for example, an integrated circuit ASIC, a single circuit, a processor (shared, dedicated, or chipset) and memory for executing one or more software or firmware programs, combinational logic circuits, and / or other suitable components that provide the above functions.

[0279] The setting unit 601, the packaging unit 602, and the sending unit 603 can be front-end modules, and the anomaly detection unit 604 can be a processor. Based on the above unit modules, the functions or steps of any of the above methods can be implemented.

[0280] This embodiment also provides a computer-readable storage medium storing a computer program for electronic data interchange, wherein the computer program causes a computer to execute, as described in the embodiments of this application, to implement any of the methods in the above embodiments.

[0281] This embodiment also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned related steps to implement any of the methods in the above embodiments.

[0282] In addition, embodiments of this application also provide an apparatus, which may specifically be a chip, component or module. The apparatus may include a connected processor and a memory; wherein the memory is used to store computer execution instructions, and when the apparatus is running, the processor may execute the computer execution instructions stored in the memory to cause the chip to execute any of the methods in the above method embodiments.

[0283] In this embodiment, the electronic device, computer storage medium, computer program product or chip are all used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects of the corresponding method provided above, and will not be repeated here.

[0284] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0285] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another apparatus, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0286] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0287] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0288] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0289] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A data transmission control method for testing electronic equipment, characterized in that, The method includes: Detect whether the electronic device is in engineering mode; When the electronic device is in the engineering mode, a virtual video device is set up, and the virtual video device is configured to encapsulate the operating data of the front-end module of the electronic device at a first frame rate; The running data is packaged using the virtual video device at a second frame rate to obtain a target data packet; Send the target data packet to the processor; At least in part, it is based on adjusting the values ​​of the first frame rate and / or the second frame rate to achieve rhythmic and efficient transmission or extraction of runtime data; The setting of the virtual video device includes: The virtual video device is configured via the Mobile Industry Processor Interface (MIPI) of the front-end module.

2. The method according to claim 1, characterized in that, Prior to setting up the virtual video device, the method further includes: Obtain the target pipeline configuration parameters; The step of using the virtual video device to package the running data at a second frame rate to obtain the target data packet includes: According to the preset mapping relationship between pipeline configuration parameters and packaging processing parameters, the target packaging processing parameters corresponding to the target pipeline configuration parameters are determined, and the target packaging processing parameters include at least the second frame rate; The virtual video device packages the running data using the target packaging processing parameters to obtain the target data packet.

3. The method according to claim 2, characterized in that, The target data packet includes at least one data packet, the data size of which is less than or equal to the size of each of a plurality of buffer registers allocated by the USB service for accommodating the data packets in the at least one data packet.

4. The method according to claim 2 or 3, characterized in that, The process of obtaining the target pipeline configuration parameters includes: Determine the target debugging content; Obtain the attribute information of the target debugging content; Based on the preset mapping relationship between the attribute information of the debugging content and the pipeline configuration parameters, the target pipeline configuration parameters corresponding to the attribute information of the target debugging content are determined.

5. The method according to any one of claims 1-3, characterized in that, The method further includes: The processor receives the target data packet, unpacks the target data packet to obtain the running data, and the running data is used to perform data analysis.

6. The method according to any one of claims 1-3, characterized in that, The step of unpacking the target data packet to obtain the running data includes: The target data packet is copied frame by frame into the target buffer register allocated by the USB service; The data in the target cache register is unpacked to obtain the running data.

7. The method according to claim 6, characterized in that, After unpacking the target data packet to obtain the running data, the method further includes: The USB service is invoked to upload the runtime data to an external device via the target cache register, so that the external device can perform data analysis on the runtime data.

8. The method according to claim 7, characterized in that, The method further includes: The target cache register is rotated so that the rotated target cache register continues to be used to hold data packets received by the processor.

9. The method according to any one of claims 1-3, characterized in that, Prior to setting up the virtual video device, the method further includes: The camera of the electronic device is activated to invoke a hardware abstraction module, wherein the hardware abstraction module is configured to perform the function of unpacking the target data packet to obtain the running data.

10. An electronic device, comprising a front-end module and a processor, characterized in that: The front-end module is configured as follows: Detect whether the electronic device is in engineering mode; When the electronic device is in the engineering mode, a virtual video device is set up to encapsulate the operating data of the front-end module at a first frame rate; The virtual video device is configured via the Mobile Industry Processor Interface (MIPI) of the front-end module; The running data is packaged using the virtual video device at a second frame rate to obtain a target data packet; as well as Send the target data packet to the processor; The processor is configured to: At least in part, the adjustment of the values ​​of the first frame rate and / or the second frame rate is used to achieve rhythmic and efficient transmission or extraction of runtime data.

11. An electronic device, characterized in that, The electronic device includes a front-end module, a processor, and a memory, the memory being used to store one or more programs and configured to be executed by the processor or the front-end module, the programs including instructions for performing the steps of the method as described in any one of claims 1-9.

12. A computer-readable storage medium, characterized in that, A computer program for storing electronic data interchange is provided, wherein the computer program causes a computer to perform the method as described in any one of claims 1-9.

Citation Information

Patent Citations

  • Method, system and device for propelling multimedia data

    CN101938606A

  • Camera anomaly detection and method and device

    CN107705334A