WO2023016059A1 - Data transmission control method and related apparatus - Google Patents

Data transmission control method and related apparatus Download PDF

Info

Publication number
WO2023016059A1
WO2023016059A1 PCT/CN2022/095793 CN2022095793W WO2023016059A1 WO 2023016059 A1 WO2023016059 A1 WO 2023016059A1 CN 2022095793 W CN2022095793 W CN 2022095793W WO 2023016059 A1 WO2023016059 A1 WO 2023016059A1
Authority
WO
WIPO (PCT)
Prior art keywords
target
data
data packet
frame rate
virtual video
Prior art date
Application number
PCT/CN2022/095793
Other languages
French (fr)
Chinese (zh)
Inventor
朱文波
Original Assignee
哲库科技(上海)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 哲库科技(上海)有限公司 filed Critical 哲库科技(上海)有限公司
Publication of WO2023016059A1 publication Critical patent/WO2023016059A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/01Conversion of standards, e.g. involving analogue television standards or digital television standards processed at pixel level
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast

Definitions

  • the present application relates to the field of electronic technology, and in particular to a data transmission control method and a related device.
  • the debugging methods of chips are all in the development stage, which is not suitable for the environment after productization.
  • the detection of the front-end working status is still based on direct connection to the debugging line, which requires a special Hardware interface, of course, due to changes in the hardware environment after productization, it is impossible to capture relevant front-end module work information for developers to analyze. Therefore, how to efficiently capture relevant front-end module work information for developers to analyze problem needs to be resolved urgently.
  • the embodiments of the present application provide a data transmission control method and a related device, which can efficiently capture the work information of the front-end module for analysis by developers.
  • the embodiment of the present application provides a data transmission control method for testing electronic equipment, the method comprising:
  • 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
  • Determining whether the front-end module is abnormal is based at least in part on adjusting values of the first frame rate and/or the second frame rate.
  • the embodiment of the present application provides an electronic device, including a front-end module and a processor, wherein,
  • the front-end module is configured to:
  • the processor is configured to:
  • Determining whether the front-end module is abnormal is based at least in part on adjusting values of the first frame rate and/or the second frame rate.
  • an embodiment of the present application provides a data transmission control method, which is applied to an electronic device, where the electronic device includes a front-end module and a processor, and the method includes:
  • the front-end module sets a virtual video device to encapsulate the operation data of the front-end module at a first frame rate
  • the processor is configured to:
  • Determining whether the front-end module is abnormal is based at least in part on adjusting values of the first frame rate and/or the second frame rate.
  • the embodiment of the present application provides a data transmission control device, which is applied to electronic equipment, where the electronic equipment includes a front-end module and a processor, and the device includes: a setting unit, a packaging unit, a sending unit, and an abnormality detection unit, in,
  • the setting unit is configured to set a virtual video device, and the virtual video device is configured to encapsulate the operation data of the front-end module of the electronic device at a first frame rate;
  • the packaging unit is configured to use the virtual video device to package the running data at a second frame rate to obtain a target data package;
  • the sending unit is configured to send the target data packet to a processor
  • the abnormality detection unit is configured to determine whether there is an abnormality in the front-end module based at least in part on adjusting the value of the first frame rate and/or the second frame rate.
  • the embodiment of the present application provides an electronic device, the electronic device includes a front-end module, a processor, and a memory, the memory is used to store one or more programs, and is configured by the processor or the The front-end module executes, and the program includes instructions for executing the steps in the method according to any one of the first aspect or the third aspect.
  • the embodiment of the present application provides a computer-readable storage medium, wherein the above-mentioned computer-readable storage medium stores a computer program for electronic data exchange, wherein the above-mentioned computer program enables the computer to execute Part or all of the steps described in the first aspect or the third aspect.
  • the embodiment of the present application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to enable the computer to execute the program as implemented in the present application.
  • the computer program product may be a software installation package.
  • FIG. 1 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
  • FIG. 2 is a schematic diagram of a software structure of an electronic device provided by an embodiment of the present application.
  • FIG. 3A is a schematic flowchart of a data transmission control method provided in an embodiment of the present application.
  • Fig. 3B is a schematic diagram illustrating the data transmission between the front-end module and the application processor provided by the embodiment of the present application;
  • FIG. 3C is a schematic structural diagram of a data packet provided by an embodiment of the present application.
  • FIG. 3D is a schematic diagram illustrating another data transmission between the front-end module and the application processor provided by the embodiment of the present application;
  • FIG. 4 is a schematic flowchart of another data transmission control method provided by an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
  • Fig. 6 is a block diagram of functional units of a device for controlling data transmission provided by an embodiment of the present application.
  • Electronic devices can include a variety of devices with communication capabilities, such as smartphones, in-vehicle devices, wearable devices, charging devices (such as power banks), smart watches, smart glasses, wireless Bluetooth headsets, computing devices, or connected to a wireless modem.
  • Other processing equipment as well as various forms of user equipment (User Equipment, UE), mobile station (Mobile Station, MS), virtual reality/augmented reality equipment, terminal equipment (terminal device), etc., electronic equipment can also be a base station or The server, and the electronic device may also be a test module composed of a front-end module and a processor (for example, an application processor).
  • FIG. 1 shows a schematic structural diagram of an electronic device 100 .
  • the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, and an antenna 2 , mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, compass 190, motor 191, indicator 192, camera 193, display screen 194 and user An identification module (subscriber identification module, SIM) card interface 195 and the like.
  • SIM subscriber identification module
  • the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100 .
  • the electronic device 100 may include more or fewer components than shown in the figure, or combine certain components, or separate certain components, or arrange different components.
  • the illustrated components can be realized in hardware, software or a combination of software and hardware.
  • the processor 110 may include one or more processing units, for example: the processor 110 may include an application processor AP, a modem processor, a graphics processor GPU, an image signal processor (image signal processor, ISP), a controller, Video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor NPU, etc. Wherein, different processing units may be independent components, or may be integrated in one or more processors.
  • the electronic device 100 may also include one or more processors 110 .
  • the controller can generate an operation control signal according to the instruction operation code and the timing signal, and complete the control of fetching and executing the instruction.
  • a memory may also be set in the processor 110 for storing instructions and data.
  • the memory in the processor 110 may be a cache memory.
  • the memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. In this way, repeated access is avoided, and the waiting time of the processor 110 is reduced, thereby improving the efficiency of the electronic device 100 in processing data or executing instructions.
  • the processor can also include an image processor, and the image processor can be an image preprocessor (preprocess image signal processor, Pre-ISP), which can be understood as a simplified ISP, and can also perform some image processing operations.
  • Pre-ISP image signal processor
  • processor 110 may include one or more interfaces.
  • the interface may include inter-integrated circuit (I2C) interface, inter-integrated circuit sound (I2S) interface, pulse code modulation (pulse code modulation, PCM) interface, universal asynchronous transceiver (universal asynchronous receiver/transmitter, UART) interface, mobile industry processor interface (mobile industry processor interface, MIPI), general-purpose input/output (general-purpose input/output, GPIO) interface, SIM card interface and/or USB interface, etc.
  • the USB interface 130 is an interface conforming to the USB standard specification, specifically, it may be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like.
  • the USB interface 130 can be used to connect a charger to charge the electronic device 100 , and can also be used to transmit data between the electronic device 100 and peripheral devices.
  • the USB interface 130 can also be used to connect earphones to play audio through the earphones.
  • the interface connection relationship between the modules shown in the embodiment of the present application is only a schematic illustration, and does not constitute a structural limitation of the electronic device 100 .
  • the electronic device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
  • the charging management module 140 is configured to receive a charging input from a charger.
  • the charger may be a wireless charger or a wired charger.
  • the charging management module 140 can receive charging input from the wired charger through the USB interface 130 .
  • the charging management module 140 may receive a wireless charging input through a wireless charging coil of the electronic device 100 . While the charging management module 140 is charging the battery 142 , it can also provide power for electronic devices through the power management module 141 .
  • the power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 .
  • the power management module 141 receives the input of the battery 142 and/or the charging management module 140, and supplies power for the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193 and the wireless communication module 160, etc.
  • the power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, and battery health status (leakage, impedance).
  • the power management module 141 may also be disposed in the processor 110 .
  • the power management module 141 and the charging management module 140 may also be set in the same device.
  • the wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in electronic device 100 may be used to cover single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas.
  • Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network.
  • the antenna may be used in conjunction with a tuning switch.
  • the mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G/6G applied on the electronic device 100 .
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA) and the like.
  • the mobile communication module 150 can receive electromagnetic waves through the antenna 1, filter and amplify the received electromagnetic waves, and send them to the modem processor for demodulation.
  • the mobile communication module 150 can also amplify the signals modulated by the modem processor, and convert them into electromagnetic waves through the antenna 1 for radiation.
  • at least part of the functional modules of the mobile communication module 150 may be set in the processor 110 .
  • at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be set in the same device.
  • the wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (wireless fidelity, Wi-Fi) network), bluetooth (blue tooth, BT), global navigation Satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions.
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency-modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110 , frequency-modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.
  • the electronic device 100 realizes the display function through the GPU, the display screen 194 , and the application processor.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
  • the display screen 194 is used to display images, videos and the like.
  • the display screen 194 includes a display panel.
  • the display panel can adopt liquid crystal display (liquid crystal display, LCD), organic light-emitting diode (organic light-emitting diode, OLED), active-matrix organic light-emitting diode or active-matrix organic light-emitting diode (active-matrix organic light emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), mini light-emitting diode (mini light-emitting diode, miniled), MicroLed, Micro-oLed, quantum dot light emitting diodes (quantum dot light emitting diodes, QLED), etc.
  • the electronic device 100 may include one or more display screens 194 .
  • the electronic device 100 can realize the shooting function through the ISP, the camera 193 , the video codec, the GPU, the display screen 194 , and the application processor.
  • the ISP is used for processing the data fed back by the camera 193 .
  • the light is transmitted to the photosensitive element of the camera through the lens, and the light signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye.
  • ISP can also perform algorithm optimization on image noise, brightness, and skin tone.
  • ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • the ISP may be located in the camera 193 .
  • Camera 193 is used to capture still images or video.
  • the object generates an optical image through the lens and projects it to the photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the light signal into an electrical signal, and then transmits the electrical signal to the ISP for conversion into a digital image signal.
  • the ISP outputs the digital image signal to the DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other image signals.
  • the electronic device 100 may include one or more cameras 193 .
  • Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point.
  • Video codecs are used to compress or decompress digital video.
  • the electronic device 100 may support one or more video codecs.
  • the electronic device 100 can play or record videos in various encoding formats, for example: moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
  • the NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • Applications such as intelligent cognition of the electronic device 100 can be realized through the NPU, such as image recognition, face recognition, speech recognition, text understanding, and the like.
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, so as to expand the storage capacity of the electronic device 100.
  • the external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. Such as saving music, video and other files in the external memory card.
  • the internal memory 121 may be used to store one or more computer programs including instructions.
  • the processor 110 may execute the above-mentioned instructions stored in the internal memory 121, so that the electronic device 100 executes the method for displaying page elements provided in some embodiments of the present application, as well as various applications and data processing.
  • the internal memory 121 may include an area for storing programs and an area for storing data.
  • the stored program area can store an operating system; the stored program area can also store one or more applications (such as a gallery, contacts, etc.) and the like.
  • the data storage area can store data (such as photos, contacts, etc.) created during the use of the electronic device 100 .
  • the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more disk storage components, flash memory components, universal flash storage (universal flash storage, UFS) and the like.
  • the processor 110 may execute the instructions stored in the internal memory 121 and/or the instructions stored in the memory provided in the processor 110, so that the electronic device 100 executes the instructions provided in the embodiments of the present application. Methods for displaying page elements, and other applications and data processing.
  • the electronic device 100 can implement audio functions through the audio module 170 , the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. Such as music playback, recording, etc.
  • the sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration 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, bone conduction sensor 180M, etc.
  • the pressure sensor 180A is used for sensing pressure signals, and can convert the pressure signals into electrical signals.
  • pressure sensor 180A may be disposed on display screen 194 .
  • pressure sensors 180A such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors.
  • a capacitive pressure sensor may be comprised of at least two parallel plates with conductive material.
  • the electronic device 100 determines the intensity of pressure according to the change in capacitance.
  • the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A.
  • the electronic device 100 may also calculate the touched position according to the detection signal of the pressure sensor 180A.
  • touch operations acting on the same touch position but with different touch operation intensities may correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view short messages is executed. When a touch operation whose intensity is greater than or equal to the first pressure threshold acts on the icon of the short message application, the instruction of creating a new short message is executed.
  • the gyro sensor 180B can be used to determine the motion posture of the electronic device 100 .
  • the angular velocity of the electronic device 100 around three axes ie, X, Y and Z axes
  • the gyro sensor 180B can be used for image stabilization.
  • the gyro sensor 180B detects the shaking angle of the electronic device 100, calculates the distance that the lens module needs to compensate according to the angle, and allows the lens to counteract the shaking of the electronic device 100 through reverse movement to achieve anti-shake.
  • the gyro sensor 180B can also be used for navigation and somatosensory game scenes.
  • the acceleration sensor 180E can detect the acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of electronic devices, and can be used in applications such as horizontal and vertical screen switching, pedometers, etc.
  • the ambient light sensor 180L is used for sensing ambient light brightness.
  • the electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived 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 cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in the pocket, so as to prevent accidental touch.
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access to application locks, take pictures with fingerprints, answer incoming calls with fingerprints, and the like.
  • the temperature sensor 180J is used to detect temperature.
  • the electronic device 100 uses the temperature detected by the temperature sensor 180J to implement a temperature treatment strategy. For example, when the temperature reported by the temperature sensor 180J exceeds the threshold, the electronic device 100 may reduce the performance of the processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection.
  • the electronic device 100 when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to prevent the electronic device 100 from being shut down abnormally due to the low temperature.
  • the electronic device 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
  • Touch sensor 180K also known as "touch panel”.
  • the touch sensor 180K can be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a “touch screen”.
  • the touch sensor 180K is used to detect a touch operation on or near it.
  • the touch sensor can pass 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 the display screen 194 .
  • the touch sensor 180K may also be disposed on the surface of the electronic device 100 , which is different from the position of the display screen 194 .
  • FIG. 2 shows a software structural block diagram of the electronic device 100 .
  • the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate through software interfaces.
  • the Android system is divided into four layers, which are respectively the application program layer, the application program framework layer, the Android runtime (Android runtime) and the system library, and the kernel layer from top to bottom.
  • the application layer can consist of a series of application packages.
  • the application layer may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and short message.
  • the application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer.
  • the application framework layer includes some predefined functions.
  • the application framework layer can include window managers, content providers, view systems, phone managers, resource managers, notification managers, and so on.
  • a window manager is used to manage window programs.
  • the window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, capture the screen, etc.
  • Content providers are used to store and retrieve data and make it accessible to applications.
  • Data can include videos, images, audio, calls made and received, browsing history and bookmarks, phonebook, etc.
  • the view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on.
  • the view system can be used to build applications.
  • a display interface can consist of one or more views.
  • a display interface including a text message notification icon may include a view for displaying text and a view for displaying pictures.
  • the phone manager is used to provide communication functions of the electronic device 100 . For example, the management of call status (including connected, hung up, etc.).
  • the resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and so on.
  • the notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages, and can automatically disappear after a short stay without user interaction.
  • the notification manager is used to notify download completion, message reminders, etc.
  • the notification manager can also be a notification that appears on the top status bar of the system in the form of a chart or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window.
  • prompting text information in the status bar issuing a prompt sound, vibrating the electronic device, and flashing the indicator light, etc.
  • Android Runtime includes core library and virtual machine. Android Runtime is responsible for the scheduling and management of the Android system.
  • the core library consists of two parts: one part is the function function that the java language needs to call, and the other part is the core library of Android.
  • the application layer and the application framework layer run in virtual machines.
  • the virtual machine executes the java files of the application program layer and the application program framework layer as binary files.
  • the virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
  • a system library can include multiple function modules. For example: surface manager (surface manager), media library (media libraries), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc.
  • the surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.
  • the media library supports playback and recording of various commonly used audio and video formats, as well as still image files, etc.
  • the media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
  • the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing, etc.
  • 2D graphics engine is a drawing engine for 2D drawing.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer includes at least a display driver, a camera driver, an audio driver, and a sensor driver.
  • the electronic device includes a front-end module and a processor, which can be used to implement the following functions:
  • the front-end module is configured to:
  • the processor is configured to:
  • Determining whether the front-end module is abnormal is based at least in part on adjusting values of the first frame rate and/or the second frame rate.
  • the electronic device described in the embodiment of the present application is used to test the electronic device and set up a virtual video device, and the virtual video device is configured to encapsulate the operating data of the front-end module of the electronic device at the first frame rate , use the virtual video device to pack the running data according to the second frame rate to obtain the target data packet, and send the target data packet to the processor, at least partly based on adjusting the value of the first frame rate and/or the second frame rate Determine whether there is an abnormality in the front-end module. Since the virtual video device can perform virtual video recording processing on the running data, the running data can be output to the external device according to a certain frame rate and size, and then the working information of the front-end module can be efficiently captured for development. personnel to analyze.
  • the front-end module is further configured to: acquire target pipeline configuration parameters;
  • the front-end module is specifically configured as:
  • the target packaging processing parameters include at least the second frame rate
  • the virtual video device packs the running data by using the target packing processing parameters to obtain the target data package.
  • the target data packet includes at least one data packet, and the data size of each data packet is less than or equal to the size of each cache register in a plurality of cache registers allocated by the USB service, and the cache register is used for A data packet of the at least one data packet is accommodated.
  • the front-end module is specifically configured as:
  • the target pipeline configuration parameters corresponding to the attribute information of the target debugging content are determined according to the preset mapping relationship between the attribute information of the debugging content and the pipeline configuration parameters.
  • the processor is also specifically configured to:
  • the processor receives the target data packet, unpacks the target data packet to obtain the operation data, and the operation data is used for data analysis.
  • the processor is further specifically configured to:
  • the processor is further specifically configured to:
  • the processor is also specifically configured to:
  • a rotation operation is performed on the target cache register, so that the target cache register after rotation continues to be used for accommodating data packets received by the processor.
  • the processor is further specifically configured to:
  • Enabling the camera of the electronic device to call 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.
  • FIG. 3A is a schematic flowchart of a data transmission control method provided by an embodiment of this application, which is applied to an electronic device, and the electronic device includes a front-end module and a processor.
  • the processor can be Application processor AP
  • the data transmission control method can be used to test electronic equipment, as shown in the figure
  • the data transmission control method includes:
  • the running data may be at least one of the following: working status data, image data, voice data, debugging log data, video data, etc. of each chip in the front-end module, which is not limited herein.
  • the working status data of each chip in the front-end module can be at least one of the following: working level, waveform, working voltage, working current, working power, working clock, etc., which are not limited here, and the above-mentioned running data can be raw data or
  • the preprocessing can be at least one of the following: sampling, compression, screening, etc., which is not limited here.
  • the front-end module may include: an image signal processor (ISP), a neural network processor (NPU), a memory (DDR), a master control module (TOP), a selector (MUX), MIPI, etc., are not limited here.
  • the selector is used to realize the selection operation of the running data. For example, only the running data of the ISP is selected. MIPI samples and packs the running data, and sends the packed data to the AP through the camera serial interface (CSI). The AP transmits the running data to the external device through the USB service.
  • the front-end module can be an image preprocessor.
  • step 301 setting up a virtual video device, can be implemented in the following manner:
  • the virtual video device is set through the MIPI of the front-end module.
  • a virtual video device can be set through MIPI, specifically, a virtual video device can be set through a camera serial interface (CSI) of MIPI, and the above-mentioned virtual video device can be called a virtualized video recording (video) equipment.
  • MIPI camera serial interface
  • video virtualized video recording
  • step 301 before setting the virtual video device, the following steps may also be included:
  • step 301 using the virtual video device to pack the running data according to the second frame rate to obtain the target data package may include the following steps:
  • the target packaging processing parameters include at least the second frame rate
  • the pipeline configuration parameters may include at least one of the following: pipeline type, pipeline serial number, frame rate, resolution, etc., which are not limited here, and the pipeline type can be understood as used to process data of a certain data type
  • the image data corresponds to the image data pipeline type
  • the voice data corresponds to the voice data pipeline type, etc.
  • the pipeline serial number can be understood as the serial number of the pipeline, and the pipeline serial number can be pre-defined, and the functions of the pipelines with different serial numbers are different.
  • the packaging processing parameters include at least the frame rate, and the packaging processing parameters 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 may pre-store a mapping relationship between preset pipeline configuration parameters and packaging processing parameters, that is, different pipeline configuration parameters may correspond to different packaging processing parameters.
  • the target pipeline configuration parameters can be pre-configured, and the electronic device can obtain the target pipeline configuration parameters from the hardware abstraction module (camera hal), and then determine the target pipeline according to the mapping relationship between the preset pipeline configuration parameters and the packaging processing parameters Configure the target packaging processing parameters corresponding to the parameters, and use the target packaging processing parameters to pack the running data through the virtual video device to obtain a 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.
  • the amount of information generated by the front-end module may be small within a certain period of time, resulting in insufficient filling of the cache registers, resulting in waste of cache registers and transmission bandwidth.
  • Data can be packaged based on the principle of sending when it is full, and the packaged data and the next frame of data can be sent to the AP for processing, or the packaged data can be stamped with a time stamp and sent to the AP for processing separately. This saves transmission bandwidth.
  • the target data packet includes at least one data packet, and the data size of each data packet is less than or equal to the size of each cache register in a plurality of cache registers allocated by the USB service, and the cache register is used for A data packet of the at least one data packet is accommodated.
  • 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 cache register in a plurality of buffer registers allocated by the USB service, and the cache register is used to accommodate at least one data packet The data packet in, thus, facilitates the cache register to be able to hold the data packet.
  • step A1 obtaining target pipeline configuration parameters, may include the following steps:
  • A13 Determine the target pipeline configuration parameter 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 parameter.
  • the attribute information of the debugging content may be at least one of the following: data type, debugging purpose, parameter type of debugging parameters, foreground application, etc., which are not limited here, and pre-stored The mapping relationship between the attribute information of the debugging content and the pipeline configuration parameters.
  • the electronic device can determine the target debugging content corresponding to the engineering mode in the engineering mode, and the debugging content can be set by the user, or the debugging content can be determined based on the user's operation, and then the attributes corresponding to the target debugging content can be obtained information, furthermore, 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, so that the corresponding Pipeline configuration parameters, in turn, can make the depth of pipeline configuration parameters meet the debugging requirements.
  • step 301 before setting the virtual video device, the following steps may also be included:
  • the electronic device can detect whether it is in the engineering mode.
  • step 301 can be executed; otherwise, step 301 may not be executed.
  • the engineering mode can also be called the debugging mode (debug mode).
  • the engineering mode can be set by the user, or automatically enter the engineering mode when an abnormality occurs in the electronic device.
  • step 301 before setting the virtual video device, the following steps may also be included:
  • Enabling the camera of the electronic device to call 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.
  • the evacuation module can be used to implement unpacking operations to obtain operating data.
  • the electronic device can obtain the operating data of at least one module in the front-end module, and pack the operating data at the second frame rate through the virtual video device to obtain the target data packet, that is, the target data packet can be obtained according to a certain frequency. and size output the run data.
  • the first frame rate and the second frame rate may be the same or different.
  • the electronic device can virtualize the operating data through the virtual video device, so that it can transmit the operating data at a certain interval and size.
  • the front-end module packs and processes the obtained operating data according to certain rules, that is It can be placed in the cache register allocated by the backend (for the driver to store data in the front-end module), and further transmit the packaged data to the application processor AP (backend) through MIPI, and can also allocate multiple The buffer register (buffer register), and then, realizes the buffer register rotation operation.
  • the number of cache registers can be set by the user, or determined by the bandwidth and/or the speed at which the running data is generated.
  • the operating data can be sent to an external device for data analysis, or the electronic device can also perform data analysis on the operating data to realize anomaly detection or detection of the working status of each chip in the front-end module.
  • the above-mentioned external device can be Other electronic equipment, such as a host computer (PC).
  • the data analysis may be at least one of the following functions: abnormality detection, status detection of each chip in the front-end module, debugging data analysis, etc., which are not limited herein.
  • Electronic equipment can also display operating data through the display screen.
  • the first frame rate and/or the second frame rate may be dynamically adjusted, thereby ensuring effective packaging and packet transmission of the running data.
  • it may be at least partly based on adjusting the value of the first frame rate to determine whether there is an abnormality in the front-end module, or at least partly based on adjusting the value of the second frame rate to determine whether there is an abnormality in the front-end module, or, Determine whether there is an abnormality in the front-end module based at least in part on adjusting the values of the first frame rate and the second frame rate.
  • Adjustment is convenient for the front-end to transmit transportation data in a rhythmic and efficient manner, and to facilitate the back-end to quickly extract operating data in a rhythmic manner.
  • the target data packet can be analyzed to obtain the operating data of the front-end module. Through the operating data to Determine if the front-end module is abnormal.
  • the electronic device processes the virtual video device of the abnormal information collection module in the front-end module so that the abnormal information (including the detection information at runtime) of different modules can be processed in a certain rhythm and size at the front end. Collect and package for real-time output to the PC side. When developers need to debug, they can get the cause of the problem by analyzing the received monitoring data.
  • the running data is image data
  • the processing effect of each frame for example, the effect of certain areas
  • the pre-stored standard rendering it can be obtained The judgment result of the processing effect of the current frame, and then adaptively adjust the processing parameters of the relevant algorithm according to the judgment result so that the image processing of the camera system can perform image processing stably.
  • step 304 the following steps may also be included:
  • the preset neural network model may be at least one of the following: a convolutional neural network model, a fully connected neural network model, a recurrent neural network model, etc., which are not limited herein.
  • steps C1-C3 may be implemented by an electronic device, or may also be implemented by an external device, for example, 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.
  • the features may be at least one of the following: feature points, feature vectors, colors, pixels, feature lines, etc., which are not limited here.
  • the feature may be at least one of the following: frequency, amplitude, waveform, timbre, pitch, wavelength, etc., which is not limited here.
  • the running data is debugging data
  • the feature may be at least one of the following: level, waveform, voltage, current, power, log data, etc., which is not limited here.
  • the neural network model Before executing step 301 in the embodiment of the present application, the neural network model can be trained through a large amount of sample data and labels corresponding to the samples, and after the neural network model converges, a preset neural network model can be obtained.
  • the electronic device can perform feature extraction on the operating data to obtain the target feature set, and then input the target feature set into the preset neural network model to obtain the target calculation result, which can be at least one label and the corresponding probability value , and then generate an abnormality analysis report according to the target calculation result, and use the abnormality analysis report as the target abnormality information, or the electronic device can also pre-store the mapping relationship between the calculation result and the abnormality information, and then determine the target calculation according to the mapping relationship
  • the target abnormality information corresponding to the result, the abnormality information may be at least one of the following: abnormality cause, abnormality location, abnormality duration, etc., which are not limited here.
  • the front-end module can actively initiate anomaly detection on the system and images.
  • an anomaly occurs, it can detect the anomaly in advance and obtain relevant anomaly information, and then can without affecting the upper layer, that is,
  • the adaptive processing corresponding to the abnormality can be quickly performed, and the processed result and abnormal information can be reported, so that the upper layer can timely respond to the adaptive processing result and abnormality
  • the information is further judged and processed, so that the embodiment of the present application can better improve the robustness of the system, and at the same time reduce the impact of abnormalities on the user experience and improve the user experience.
  • any data packet in the target data packet can include packet header PH, running data and packet tail PF, and packet header can be used to mark the start position of a data packet, and packet tail can be used to represent the data packet end position.
  • the packet header may include: packet header mark, index packet mark and packet data length
  • the packet header mark is used to represent the data type of the current data packet
  • the index packet mark is used to represent the independent index of the current data packet
  • the packet data length is used to represent The data length of the current data packet
  • Baotou structure byte length Baotou mark Byte3 index pack tag Byte2 packet data length Byte1+Byte0
  • the packet tail can include: packet tail mark, data packet count and frame count, the packet tail mark is used to represent the position of the packet tail, the data packet count is used to represent the count (number) of data packets, and the frame count represents the Which frame the packet comes from, as shown in the following table:
  • the target data packet is received by the AP, and the target data packet is unpacked to obtain the operation data, and the operation data is used for data analysis.
  • the AP can receive the target data packet, and unpack the target data packet according to the first frame rate and/or the second frame rate to obtain the operation data, and can also implement data analysis through the operation data to achieve the purpose of abnormal detection .
  • step 302 unpacking the target data packet to obtain the operation data, may be implemented in the following manner:
  • the target data packet is unpacked by a hardware abstraction module to obtain the running data.
  • unpacking is the reverse operation of packing action.
  • the hardware abstraction module can analyze the target data packet according to the flag bits or pre-agreed rules, and then process the parsed data. For example, the order of storage can be changed. adjustment or pack the abnormal information into the image data of the sub-camera when there are multiple channels of image data (the size of the image data of the sub-camera is small, and there is space and bandwidth to transmit debugging information), while the cache register of the main camera is Only image data is transferred.
  • the internal signal of the front-end module can be forwarded from the MIPI of the front-end module to the DDR on the AP side, and the AP side triggers an interrupt after receiving the data.
  • the front-end module packs the debugging data as a virtual camera device (virtual video device), it is necessary to start a special pipeline (pipeline) in the hardware abstraction module to serve the virtual video device.
  • the USB service needs to allocate relevant cache registers and give the cache registers to the hardware abstraction module.
  • the hardware abstraction module needs to copy the obtained debugging data to the cache registers allocated by the USB service in a frame-by-frame manner.
  • the data in the cache register does not need to be processed by the relevant algorithm of the ISP module on the AP side. Therefore, the ISP-related algorithm module needs to be closed, so as to ensure that the data transmitted to the external device (PC) is original data.
  • the USB service side can implement the rotation of the buffer registers by means of a callback function (callback).
  • the processing of the buffer register by the pipeline is different from the traditional camera processing module.
  • the monitoring data and image data are packaged and transmitted, the data needs to be split and processed. Therefore, the buffer register of the original data will be parsed in the pipeline. Reorganization, data analysis and reorganization can be analyzed according to flag bits or agreed rules, and then the analyzed data can be processed separately.
  • step, 302, unpacking the target data packet to obtain the operation data may include the following steps:
  • the electronic device can copy the target data packet frame by frame to the target cache register allocated by the USB service through the hardware abstraction module, unpack the data in the target cache register through the hardware abstraction module, and obtain the running data. After the target cache register is occupied, the cache register rotation can be performed so as to provide the next cache register for storing the data copied by the hardware abstraction module.
  • the host computer can also Implement data analysis.
  • the above-mentioned step 302 after unpacking the target data packet and obtaining the operating data, may also include the following steps:
  • a rotation operation is performed on the target cache register, so that the target cache register after rotation continues to be used for accommodating data packets received by the AP.
  • the front-end module when the front-end module performs debugging data and processing, information can be divided and packaged based on the interval between frames. For example, each 33ms or 16.6ms is used to package and process the forward debugging data corresponding to the length of time. It can be guaranteed that the packaged debugging data can correspond to the image data (acquisition timing) according to the index or time stamp of the data packet, and the AP can distinguish based on this when processing. It is also possible to pack the debug data and the image data of the camera into the same buffer register. When the monitoring data and image data are packaged and transmitted, the data needs to be split and processed, so the cache registers of the original data will be parsed and reorganized in the pipeline.
  • infringement detection it is possible to identify whether the front-end module is virtualized into a video recording device by checking the working status of the camera during use. Furthermore, by judging the size and output speed (frame rate) of the data uploaded by the camera module, if the size is consistent within a certain period of time, and the output speed is output at a fixed speed, it can be basically confirmed that the data provided by the embodiment of the present application is used. The implementation method can also be further confirmed whether it constitutes an infringement.
  • the file can be scanned on the platform side (mobile phone terminal) to check whether there is any large-sized data generated in real time. After the larger data is real-time, the data can be pulled through adb, and then the data content is analyzed to confirm whether it is the debugging data packet transmitted by the front-end module.
  • the data transmission control method described in the embodiment of the present application is used for testing electronic equipment and setting a virtual video equipment, and the virtual video equipment is configured to encapsulate the operation of the front-end module of the electronic equipment at the first frame rate.
  • data using the virtual video device to pack the running data according to the second frame rate to obtain the target data packet, and sending the target data packet to the processor, at least partially based on the value of the first frame rate and/or the second frame rate.
  • the virtual video device can perform virtual video recording processing on the running data, so that the running data can be output to the external device according to a certain frame rate and size, and then, it can efficiently capture the working information of the front-end module for Developers analyze.
  • Figure 4 is a schematic flowchart of a data transmission control method provided by an embodiment of this application, which is applied to an electronic device, and the electronic device includes a front-end module and an application processor AP, as shown in the figure , the data transmission control method includes:
  • step 401-step 409 reference may be made to the relevant description of the data transmission control method described in FIG. 3A , which will not be repeated here.
  • the front-end module also configures the packaging method according to the pipeline configuration parameters, that is, to ensure that the data size after packaging is consistent with the cache register allocated by the AP side;
  • each sub-module in the front-end module performs data acquisition and output of the module operation, the MIPI of the front-end module performs data packaging processing, and each module performs cache register rotation according to the set parameters;
  • the AP receives the data through the hardware abstraction module, and performs data analysis and processing according to the data packaging method, and performs a copy operation on the analyzed data, and copies it to the USB service in real time;
  • the USB service transmits the received data to the external device
  • the cache registers are rotated to ensure that the front-end monitoring data is packaged and transmitted to the back-end in real time for storage or transmission to the PC side.
  • MIPI can process the operating data with a virtual video device
  • the operating data can be output to external devices at a certain frame rate and size, and then, the working information of the front-end module can be efficiently captured for developers to analyze.
  • FIG. 5 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • the electronic device includes a front-end module, a processor, a memory, a communication interface, and One or more programs, wherein the above one or more programs are stored in the above memory and configured to be executed by the above processor or front-end module.
  • the above program includes instructions for performing the following steps:
  • 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
  • Determining whether the front-end module is abnormal is based at least in part on adjusting values of the first frame rate and/or the second frame rate.
  • the above program includes instructions for performing the following steps:
  • the virtual video device is set through the MIPI of the front-end module.
  • the above program also includes an instruction for performing the following steps:
  • the above program also includes instructions for performing the following steps:
  • the target packaging processing parameters include at least the second frame rate
  • the virtual video device packs the running data by using the target packing processing parameters to obtain the target data package.
  • the target data packet includes at least one data packet, and the data size of each data packet is less than or equal to the size of each cache register in a plurality of cache registers allocated by the USB service, and the cache register is used for A data packet of the at least one data packet is accommodated.
  • the above program includes instructions for performing the following steps:
  • the target pipeline configuration parameters corresponding to the attribute information of the target debugging content are determined according to the preset mapping relationship between the attribute information of the debugging content and the pipeline configuration parameters.
  • the above program also includes instructions for performing the following steps:
  • the processor receives the target data packet, unpacks the target data packet to obtain the operation data, and the operation data is used for data analysis.
  • the above program includes instructions for performing the following steps:
  • the above program further includes instructions for performing the following steps:
  • the above program also includes instructions for performing the following steps:
  • a rotation operation is performed on the target cache register, so that the target cache register after rotation continues to be used for accommodating data packets received by the processor.
  • the above program also includes an instruction for performing the following steps:
  • the step of setting a virtual video device is performed.
  • the above program also includes an instruction for performing the following steps:
  • Enabling the camera of the electronic device to call a hardware abstraction module wherein the hardware abstraction module is configured to: perform the function of unpacking the target data packet to obtain the operation data.
  • the electronic device includes hardware structures and/or software modules corresponding to each function.
  • the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed by hardware or computer software drives hardware depends on the specific application and design constraints of the technical solution. Skilled artisans may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present application.
  • the embodiment of the present application may divide the electronic device into functional units according to the above method example, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit.
  • the above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units. It should be noted that the division of units in the embodiment of the present application is schematic, and is only a logical function division, and there may be another division manner in actual implementation.
  • FIG. 6 is a block diagram of functional units of a data transmission control device 600 involved in the embodiment of the present application.
  • the data transmission control device 600 is applied to an electronic device, the electronic device includes a front-end module and a processor, and the device includes: a setting unit 601, a packaging unit 602, a sending unit 603 and an abnormality detection unit 604, wherein,
  • the setting unit 601 is configured to set a virtual video device, the virtual video device is configured to encapsulate the operation data of the front-end module of the electronic device at a first frame rate;
  • the packaging unit 602 is configured to use the virtual video device to package the running data at a second frame rate to obtain a target data package;
  • the sending unit 603 is configured to send the target data packet to a processor
  • the abnormality detection unit 604 is configured to determine whether there is an abnormality in the front-end module based at least in part on adjusting the value of the first frame rate and/or the second frame rate.
  • the setting unit 601 is specifically configured to:
  • the virtual video device is set through the MIPI of the front-end module.
  • the apparatus 600 is further specifically configured to:
  • the packing unit 602 is specifically used for:
  • the target packaging processing parameters include at least the second frame rate
  • the virtual video device packs the running data by using the target packing processing parameters to obtain the target data package.
  • the target data packet includes at least one data packet, and the data size of each data packet is less than or equal to the size of each cache register in a plurality of cache registers allocated by the USB service, and the cache register is used for A data packet of the at least one data packet is accommodated.
  • the device 600 is specifically used to:
  • the target pipeline configuration parameters corresponding to the attribute information of the target debugging content are determined according to the preset mapping relationship between the attribute information of the debugging content and the pipeline configuration parameters.
  • the device 600 is also specifically used for:
  • the processor receives the target data packet, unpacks the target data packet to obtain the operation data, and the operation data is used for data analysis.
  • the device 600 is specifically used for:
  • the device 600 is further specifically configured to:
  • the device 600 is also specifically used for:
  • a rotation operation is performed on the target cache register, so that the target cache register after rotation continues to be used for accommodating data packets received by the processor.
  • the apparatus 600 is further specifically configured to:
  • Enabling the camera of the electronic device to call a hardware abstraction module wherein the hardware abstraction module is configured to: perform the function of unpacking the target data packet to obtain the operation data.
  • each "unit” can be, for example, an integrated circuit ASIC, a single circuit, used to execute one or more software or firmware Processors (shared, dedicated, or chipsets) and memories of programs, combinational logic circuits, and/or other suitable components that provide the functions described above.
  • the setting unit 601, the packaging unit 602, and the sending unit 603 may be front-end modules, and the abnormality detection unit 604 may be a processor, based on the above-mentioned unit modules, the functions or steps of any of the above-mentioned methods can be realized.
  • This embodiment also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for electronic data exchange, wherein the above-mentioned computer program enables the computer to execute the embodiment of the present application to implement Any method in the above embodiments.
  • This embodiment also provides a computer program product, which, when running on a computer, causes the computer to execute the above-mentioned related steps, so as to implement any method in the above-mentioned embodiments.
  • an embodiment of the present application also provides a device, which may specifically be a chip, a component or a module, and the device may include a connected processor and a memory; wherein the memory is used to store computer-executable instructions, and when the device is running, The processor can execute the computer-executable instructions stored in the memory, so that the chip executes any method in the above method embodiments.
  • the electronic device, computer storage medium, computer program product or chip provided in this embodiment is all used to execute the corresponding method provided above, therefore, the beneficial effects it can achieve can refer to the corresponding method provided above The beneficial effects in the method will not be repeated here.
  • the disclosed devices and methods may be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of modules or units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components can be combined or It may be integrated into another device, or some features may be omitted, or not implemented.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
  • a unit described as a separate component may or may not be physically separated, and a component shown as a unit may be one physical unit or multiple physical units, which may be located in one place or distributed to multiple different places. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
  • an integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a readable storage medium.
  • the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the software product is stored in a storage medium Among them, several instructions are included to make a device (which may be a single-chip microcomputer, a chip, etc.) or a processor (processor) execute all or part of the steps of the methods in various embodiments of the present application.
  • the aforementioned storage medium includes: various media that can store program codes such as U disk, mobile hard disk, read only memory (ROM), random access memory (random access memory, RAM), magnetic disk or optical disk.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

Disclosed in the present application are a data transmission control method and a related apparatus, which are used for testing an electronic device. The method comprises: setting a virtual video device, wherein the virtual video device is configured to encapsulate operation data of a front-end module of an electronic device at a first frame rate; packing the operation data at a second frame rate by using the virtual video device, so as to obtain a target data packet; sending the target data packet to a processor; and at least partially on the basis of adjusting the value of the first frame rate and/or the second frame rate, determining whether the front-end module is abnormal. By means of the embodiments of the present application, operation information of a front-end module can be efficiently captured for a developer to analyze.

Description

数据传输控制方法及相关装置Data transmission control method and related device 技术领域technical field
本申请涉及电子技术领域,尤其涉及一种数据传输控制方法及相关装置。The present application relates to the field of electronic technology, and in particular to a data transmission control method and a related device.
背景技术Background technique
随着电子设备(如手机、平板电脑、智能手表等等)的大量普及应用,电子设备能够支持的应用越来越多,功能越来越强大,电子设备向着多样化、个性化的方向发展,成为用户生活中不可缺少的电子用品。With the popularization and application of electronic devices (such as mobile phones, tablet computers, smart watches, etc.), electronic devices can support more and more applications, and their functions are becoming more and more powerful. Electronic devices are developing in a diversified and personalized direction. Become an indispensable electronic product in the life of users.
目前,以手机为例,对芯片的调试方式均是在开发阶段的一些方式,并不适合产品化之后的环境,针对前端工作状态的检测还是基于直接连接调试线进行,这就需要有专门的硬件接口,当然在产品化之后由于硬件环境的变化,更是无法抓取相关的前端模块工作信息以供开发人员进行分析,因此,如何高效抓取相关的前端模块工作信息以供开发人员进行分析的问题亟待解决。At present, taking mobile phones as an example, the debugging methods of chips are all in the development stage, which is not suitable for the environment after productization. The detection of the front-end working status is still based on direct connection to the debugging line, which requires a special Hardware interface, of course, due to changes in the hardware environment after productization, it is impossible to capture relevant front-end module work information for developers to analyze. Therefore, how to efficiently capture relevant front-end module work information for developers to analyze problem needs to be resolved urgently.
发明内容Contents of the invention
本申请实施例提供一种数据传输控制方法及相关装置,能够高效抓住前端模块的工作信息以供开发人员进行分析。The embodiments of the present application provide a data transmission control method and a related device, which can efficiently capture the work information of the front-end module for analysis by developers.
第一方面,本申请实施例提供一种数据传输控制方法,用于对电子设备进行测试,所述方法包括:In the first aspect, the embodiment of the present application provides a data transmission control method for testing electronic equipment, the method comprising:
设置虚拟视频设备,所述虚拟视频设备配置成按第一帧率封装所述电子设备的前端模块的运行数据;Setting 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;
利用所述虚拟视频设备按第二帧率将所述运行数据打包,得到目标数据包;Using the virtual video device to pack the running data at a second frame rate to obtain a target data packet;
将所述目标数据包发送给处理器;sending the target data packet to a processor;
至少部分地基于对所述第一帧率和/或所述第二帧率的值进行调节来确定所述前端模块是否存在异常。Determining whether the front-end module is abnormal is based at least in part on adjusting values of the first frame rate and/or the second frame rate.
第二方面,本申请实施例提供一种电子设备,包括前端模块和处理器,其中,In the second aspect, the embodiment of the present application provides an electronic device, including a front-end module and a processor, wherein,
所述前端模块配置成:The front-end module is configured to:
设置一虚拟视频设备以按第一帧率封装所述前端模块的运行数据;Setting a virtual video device to encapsulate the operation data of the front-end module at a first frame rate;
利用所述虚拟视频设备按第二帧率将所述运行数据打包,得到目标数据包;以及Packing the running data at a second frame rate by using the virtual video device to obtain a target data packet; and
将所述目标数据包发送给所述处理器;sending the target data packet to the processor;
所述处理器配置成:The processor is configured to:
至少部分地基于对所述第一帧率和/或所述第二帧率的值进行调节来确定所述前端模块是否存在异常。Determining whether the front-end module is abnormal is based at least in part on adjusting values of the first frame rate and/or the second frame rate.
第三方面,本申请实施例提供一种数据传输控制方法,应用于电子设备,所述电子设备包括前端模块和处理器,所述方法包括:In a third aspect, an embodiment of the present application provides a data transmission control method, which is applied to an electronic device, where the electronic device includes a front-end module and a processor, and the method includes:
所述前端模块设置一虚拟视频设备以按第一帧率封装所述前端模块的运行数据;The front-end module sets a virtual video device to encapsulate the operation data of the front-end module at a first frame rate;
利用所述虚拟视频设备按第二帧率将所述运行数据打包,得到目标数据包;以及Packing the running data at a second frame rate by using the virtual video device to obtain a target data packet; and
将所述目标数据包发送给所述处理器;sending the target data packet to the processor;
所述处理器配置成:The processor is configured to:
至少部分地基于对所述第一帧率和/或所述第二帧率的值进行调节来确定所述前端模块是否存在异常。Determining whether the front-end module is abnormal is based at least in part on adjusting values of the first frame rate and/or the second frame rate.
第四方面,本申请实施例提供一种数据传输控制装置,应用于电子设备,所述电子设备包括前端模块和处理器,所述装置包括:设置单元、打包单元、发送单元和异常检测单 元,其中,In a fourth aspect, the embodiment of the present application provides a data transmission control device, which is applied to electronic equipment, where the electronic equipment includes a front-end module and a processor, and the device includes: a setting unit, a packaging unit, a sending unit, and an abnormality detection unit, in,
所述设置单元,用于设置虚拟视频设备,所述虚拟视频设备配置成按第一帧率封装所述电子设备的前端模块的运行数据;The setting unit is configured to set a virtual video device, and the virtual video device is configured to encapsulate the operation data of the front-end module of the electronic device at a first frame rate;
所述打包单元,用于利用所述虚拟视频设备按第二帧率将所述运行数据打包,得到目标数据包;The packaging unit is configured to use the virtual video device to package the running data at a second frame rate to obtain a target data package;
所述发送单元,用于将所述目标数据包发送给处理器;The sending unit is configured to send the target data packet to a processor;
所述异常检测单元,用于至少部分地基于对所述第一帧率和/或所述第二帧率的值进行调节来确定所述前端模块是否存在异常。The abnormality detection unit is configured to determine whether there is an abnormality in the front-end module based at least in part on adjusting the value of the first frame rate and/or the second frame rate.
第五方面,本申请实施例提供一种电子设备,所述电子设备包括前端模块、处理器、存储器,所述存储器用于存储一个或多个程序,并且被配置由所述处理器或者所述前端模块执行,所述程序包括用于执行如第一方面或第三方面任一项所述的方法中的步骤的指令。In the fifth aspect, the embodiment of the present application provides an electronic device, the electronic device includes a front-end module, a processor, and a memory, the memory is used to store one or more programs, and is configured by the processor or the The front-end module executes, and the program includes instructions for executing the steps in the method according to any one of the first aspect or the third aspect.
第六方面,本申请实施例提供了一种计算机可读存储介质,其中,上述计算机可读存储介质存储用于电子数据交换的计算机程序,其中,上述计算机程序使得计算机执行如本申请实施例第一方面或第三方面中所描述的部分或全部步骤。In a sixth aspect, the embodiment of the present application provides a computer-readable storage medium, wherein the above-mentioned computer-readable storage medium stores a computer program for electronic data exchange, wherein the above-mentioned computer program enables the computer to execute Part or all of the steps described in the first aspect or the third aspect.
第七方面,本申请实施例提供了一种计算机程序产品,其中,上述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,上述计算机程序可操作来使计算机执行如本申请实施例第一方面或第三方面中所描述的部分或全部步骤。该计算机程序产品可以为一个软件安装包。In a seventh aspect, the embodiment of the present application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to enable the computer to execute the program as implemented in the present application. For example, part or all of the steps described in the first aspect or the third aspect. The computer program product may be a software installation package.
附图说明Description of drawings
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present application. Those skilled in the art can also obtain other drawings based on these drawings without creative work.
图1是本申请实施例提供的一种电子设备的结构示意图;FIG. 1 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
图2是本申请实施例提供的一种电子设备的软件结构示意图;FIG. 2 is a schematic diagram of a software structure of an electronic device provided by an embodiment of the present application;
图3A是本申请实施例提供的一种数据传输控制方法的流程示意图;FIG. 3A is a schematic flowchart of a data transmission control method provided in an embodiment of the present application;
图3B是本申请实施例提供的前端模块与应用处理器之间数据传输的演示示意图;Fig. 3B is a schematic diagram illustrating the data transmission between the front-end module and the application processor provided by the embodiment of the present application;
图3C是本申请实施例提供的数据包的结构示意图;FIG. 3C is a schematic structural diagram of a data packet provided by an embodiment of the present application;
图3D是本申请实施例提供的前端模块与应用处理器之间另一数据传输的演示示意图;FIG. 3D is a schematic diagram illustrating another data transmission between the front-end module and the application processor provided by the embodiment of the present application;
图4是本申请实施例提供的另一种数据传输控制方法的流程示意图;FIG. 4 is a schematic flowchart of another data transmission control method provided by an embodiment of the present application;
图5是本申请实施例提供的一种电子设备的结构示意图;FIG. 5 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
图6是本申请实施例提供的一种数据传输控制装置的功能单元组成框图。Fig. 6 is a block diagram of functional units of a device for controlling data transmission provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合附图,对本申请实施例中的技术方案进行描述。The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings.
为了更好地理解本申请实施例的方案,下面先对本申请实施例可能涉及的相关术语和概念进行介绍。In order to better understand the solutions of the embodiments of the present application, the following first introduces related terms and concepts that may be involved in the embodiments of the present application.
电子设备可以包括各种具备通信功能的设备,例如,智能手机、车载设备、可穿戴设备、充电装置(如充电宝)、智能手表、智能眼镜、无线蓝牙耳机、计算设备或连接到无线调制解调器的其他处理设备,以及各种形式的用户设备(User Equipment,UE),移动台(Mobile Station,MS),虚拟现实/增强现实设备,终端设备(terminal device)等等,电子设备还可以为基站或者服务器,电子设备还可以为由前端模块和处理器(例如,应用处理器)组成的一个测试模块。Electronic devices can include a variety of devices with communication capabilities, such as smartphones, in-vehicle devices, wearable devices, charging devices (such as power banks), smart watches, smart glasses, wireless Bluetooth headsets, computing devices, or connected to a wireless modem. Other processing equipment, as well as various forms of user equipment (User Equipment, UE), mobile station (Mobile Station, MS), virtual reality/augmented reality equipment, terminal equipment (terminal device), etc., electronic equipment can also be a base station or The server, and the electronic device may also be a test module composed of a front-end module and a processor (for example, an application processor).
第一部分,本申请所公开的技术方案的软硬件运行环境介绍如下。The first part, the software and hardware operating environment of the technical solution disclosed in this application is introduced as follows.
如图所示,图1示出了电子设备100的结构示意图。电子设备100可以包括处理器110、外部存储器接口120、内部存储器121、通用串行总线(universal serial bus,USB)接口130、充电管理模块140、电源管理模块141、电池142、天线1、天线2、移动通信模块150、无线通信模块160、音频模块170、扬声器170A、受话器170B、麦克风170C、耳机接口170D、传感器模块180、指南针190、马达191、指示器192、摄像头193、显示屏194以及用户标识模块(subscriber identification module,SIM)卡接口195等。As shown in the figure, FIG. 1 shows a schematic structural diagram of an electronic device 100 . The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, and an antenna 2 , mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, compass 190, motor 191, indicator 192, camera 193, display screen 194 and user An identification module (subscriber identification module, SIM) card interface 195 and the like.
可以理解的是,本申请实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that, the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100 . In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine certain components, or separate certain components, or arrange different components. The illustrated components can be realized in hardware, software or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器AP,调制解调处理器,图形处理器GPU,图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器NPU等。其中,不同的处理单元可以是独立的部件,也可以集成在一个或多个处理器中。在一些实施例中,电子设备100也可以包括一个或多个处理器110。其中,控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。在其他一些实施例中,处理器110中还可以设置存储器,用于存储指令和数据。示例性地,处理器110中的存储器可以为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从存储器中直接调用。这样就避免了重复存取,减少了处理器110的等待时间,因而提高了电子设备100处理数据或执行指令的效率。处理器还可以包括图像处理器,图像处理器可以为图像预处理器(preprocess image signal processor,Pre-ISP),其可以理解为一个简化的ISP,其也可以进行一些图像处理操作。The processor 110 may include one or more processing units, for example: the processor 110 may include an application processor AP, a modem processor, a graphics processor GPU, an image signal processor (image signal processor, ISP), a controller, Video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor NPU, etc. Wherein, different processing units may be independent components, or may be integrated in one or more processors. In some embodiments, the electronic device 100 may also include one or more processors 110 . Wherein, the controller can generate an operation control signal according to the instruction operation code and the timing signal, and complete the control of fetching and executing the instruction. In some other embodiments, a memory may also be set in the processor 110 for storing instructions and data. Exemplarily, the memory in the processor 110 may be a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. In this way, repeated access is avoided, and the waiting time of the processor 110 is reduced, thereby improving the efficiency of the electronic device 100 in processing data or executing instructions. The processor can also include an image processor, and the image processor can be an image preprocessor (preprocess image signal processor, Pre-ISP), which can be understood as a simplified ISP, and can also perform some image processing operations.
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路间(inter-integrated circuit,I2C)接口、集成电路间音频(inter-integrated circuit sound,I2S)接口、脉冲编码调制(pulse code modulation,PCM)接口、通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口、移动产业处理器接口(mobile industry processor interface,MIPI)、用输入输出(general-purpose input/output,GPIO)接口、SIM卡接口和/或USB接口等。其中,USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口、Micro USB接口、USB Type C接口等。USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。该USB接口130也可以用于连接耳机,通过耳机播放音频。In some embodiments, processor 110 may include one or more interfaces. The interface may include inter-integrated circuit (I2C) interface, inter-integrated circuit sound (I2S) interface, pulse code modulation (pulse code modulation, PCM) interface, universal asynchronous transceiver (universal asynchronous receiver/transmitter, UART) interface, mobile industry processor interface (mobile industry processor interface, MIPI), general-purpose input/output (general-purpose input/output, GPIO) interface, SIM card interface and/or USB interface, etc. Wherein, the USB interface 130 is an interface conforming to the USB standard specification, specifically, it may be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like. The USB interface 130 can be used to connect a charger to charge the electronic device 100 , and can also be used to transmit data between the electronic device 100 and peripheral devices. The USB interface 130 can also be used to connect earphones to play audio through the earphones.
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationship between the modules shown in the embodiment of the present application is only a schematic illustration, and does not constitute a structural limitation of the electronic device 100 . In other embodiments of the present application, the electronic device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。The charging management module 140 is configured to receive a charging input from a charger. Wherein, the charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger through the USB interface 130 . In some wireless charging embodiments, the charging management module 140 may receive a wireless charging input through a wireless charging coil of the electronic device 100 . While the charging management module 140 is charging the battery 142 , it can also provide power for electronic devices through the power management module 141 .
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110、内部存储器121、外部存 储器、显示屏194、摄像头193和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量、电池循环次数、电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。The power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 . The power management module 141 receives the input of the battery 142 and/or the charging management module 140, and supplies power for the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193 and the wireless communication module 160, etc. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, and battery health status (leakage, impedance). In some other embodiments, the power management module 141 may also be disposed in the processor 110 . In some other embodiments, the power management module 141 and the charging management module 140 may also be set in the same device.
电子设备100的无线通信功能可以通过天线1、天线2、移动通信模块150、无线通信模块160、调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 may be used to cover single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G/6G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。The mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G/6G applied on the electronic device 100 . The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA) and the like. The mobile communication module 150 can receive electromagnetic waves through the antenna 1, filter and amplify the received electromagnetic waves, and send them to the modem processor for demodulation. The mobile communication module 150 can also amplify the signals modulated by the modem processor, and convert them into electromagnetic waves through the antenna 1 for radiation. In some embodiments, at least part of the functional modules of the mobile communication module 150 may be set in the processor 110 . In some embodiments, at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be set in the same device.
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络)、蓝牙(blue tooth,BT),全球导航卫星系统(global navigation satellite system,GNSS)、调频(frequency modulation,FM)、近距离无线通信技术(near field communication,NFC)、红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (wireless fidelity, Wi-Fi) network), bluetooth (blue tooth, BT), global navigation Satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency-modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 . The wireless communication module 160 can also receive the signal to be sent from the processor 110 , frequency-modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 100 realizes the display function through the GPU, the display screen 194 , and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
显示屏194用于显示图像、视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD)、有机发光二极管(organic light-emitting diode,OLED)、有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED)、柔性发光二极管(flex light-emitting diode,FLED)、迷你发光二极管(mini light-emitting diode,miniled)、MicroLed、Micro-oLed、量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或多个显示屏194。The display screen 194 is used to display images, videos and the like. The display screen 194 includes a display panel. The display panel can adopt liquid crystal display (liquid crystal display, LCD), organic light-emitting diode (organic light-emitting diode, OLED), active-matrix organic light-emitting diode or active-matrix organic light-emitting diode (active-matrix organic light emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), mini light-emitting diode (mini light-emitting diode, miniled), MicroLed, Micro-oLed, quantum dot light emitting diodes (quantum dot light emitting diodes, QLED), etc. In some embodiments, the electronic device 100 may include one or more display screens 194 .
电子设备100可以通过ISP、摄像头193、视频编解码器、GPU、显示屏194以及应用处理器等实现拍摄功能。The electronic device 100 can realize the shooting function through the ISP, the camera 193 , the video codec, the GPU, the display screen 194 , and the application processor.
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点、亮度、肤色进行算法优化。ISP还可以对拍摄场景的曝光、色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。The ISP is used for processing the data fed back by the camera 193 . For example, when taking a picture, open the shutter, the light is transmitted to the photosensitive element of the camera through the lens, and the light signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on image noise, brightness, and skin tone. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP may be located in the camera 193 .
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换 成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备100可以包括1个或多个摄像头193。Camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects it to the photosensitive element. The photosensitive element may 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, and then transmits the electrical signal to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. DSP converts digital image signals into standard RGB, YUV and other image signals. In some embodiments, the electronic device 100 may include one or more cameras 193 .
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point.
视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1、MPEG2、MPEG3、MPEG4等。Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 can play or record videos in various encoding formats, for example: moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用,例如:图像识别、人脸识别、语音识别、文本理解等。The NPU is a neural-network (NN) computing processor. By referring to the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and continuously learn by itself. Applications such as intelligent cognition of the electronic device 100 can be realized through the NPU, such as image recognition, face recognition, speech recognition, text understanding, and the like.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, so as to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. Such as saving music, video and other files in the external memory card.
内部存储器121可以用于存储一个或多个计算机程序,该一个或多个计算机程序包括指令。处理器110可以通过运行存储在内部存储器121的上述指令,从而使得电子设备100执行本申请一些实施例中所提供的显示页面元素的方法,以及各种应用以及数据处理等。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统;该存储程序区还可以存储一个或多个应用(比如图库、联系人等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如照片,联系人等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如一个或多个磁盘存储部件,闪存部件,通用闪存存储器(universal flash storage,UFS)等。在一些实施例中,处理器110可以通过运行存储在内部存储器121的指令,和/或存储在设置于处理器110中的存储器的指令,来使得电子设备100执行本申请实施例中所提供的显示页面元素的方法,以及其他应用及数据处理。电子设备100可以通过音频模块170、扬声器170A、受话器170B、麦克风170C、耳机接口170D、以及应用处理器等实现音频功能。例如音乐播放、录音等。The internal memory 121 may be used to store one or more computer programs including instructions. The processor 110 may execute the above-mentioned instructions stored in the internal memory 121, so that the electronic device 100 executes the method for displaying page elements provided in some embodiments of the present application, as well as various applications and data processing. The internal memory 121 may include an area for storing programs and an area for storing data. Wherein, the stored program area can store an operating system; the stored program area can also store one or more applications (such as a gallery, contacts, etc.) and the like. The data storage area can store data (such as photos, contacts, etc.) created during the use of the electronic device 100 . In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more disk storage components, flash memory components, universal flash storage (universal flash storage, UFS) and the like. In some embodiments, the processor 110 may execute the instructions stored in the internal memory 121 and/or the instructions stored in the memory provided in the processor 110, so that the electronic device 100 executes the instructions provided in the embodiments of the present application. Methods for displaying page elements, and other applications and data processing. The electronic device 100 can implement audio functions through the audio module 170 , the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. Such as music playback, recording, etc.
传感器模块180可以包括压力传感器180A、陀螺仪传感器180B、气压传感器180C、磁传感器180D、加速度传感器180E、距离传感器180F、接近光传感器180G、指纹传感器180H、温度传感器180J、触摸传感器180K、环境光传感器180L、骨传导传感器180M等。The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration 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, bone conduction sensor 180M, etc.
其中,压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。电子设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,电子设备100根据压力传感器180A检测触摸操作强度。电子设备100也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。Wherein, the pressure sensor 180A is used for sensing pressure signals, and can convert the pressure signals into electrical signals. In some embodiments, pressure sensor 180A may be disposed on 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 be comprised of at least two parallel plates with conductive material. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic device 100 may also calculate the touched position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities may correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view short messages is executed. When a touch operation whose intensity is greater than or equal to the first pressure threshold acts on the icon of the short message application, the instruction of creating a new short message is executed.
陀螺仪传感器180B可以用于确定电子设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定电子设备100围绕三个轴(即X、Y和Z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测电子 设备100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消电子设备100的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。The gyro sensor 180B can be used to determine the motion posture of the electronic device 100 . In some embodiments, the angular velocity of the electronic device 100 around three axes (ie, X, Y and Z axes) can be determined by the gyro sensor 180B. The gyro sensor 180B can be used for image stabilization. Exemplarily, when the shutter is pressed, the gyro sensor 180B detects the shaking angle of the electronic device 100, calculates the distance that the lens module needs to compensate according to the angle, and allows the lens to counteract the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenes.
加速度传感器180E可检测电子设备100在各个方向上(一般为三轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。The acceleration sensor 180E can detect the acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of electronic devices, and can be used in applications such as horizontal and vertical screen switching, pedometers, etc.
环境光传感器180L用于感知环境光亮度。电子设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测电子设备100是否在口袋里,以防误触。The ambient light sensor 180L is used for sensing ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived 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 cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in the pocket, so as to prevent accidental touch.
指纹传感器180H用于采集指纹。电子设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access to application locks, take pictures with fingerprints, answer incoming calls with fingerprints, and the like.
温度传感器180J用于检测温度。在一些实施例中,电子设备100利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,电子设备100执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,电子设备100对电池142加热,以避免低温导致电子设备100异常关机。在其他一些实施例中,当温度低于又一阈值时,电子设备100对电池142的输出电压执行升压,以避免低温导致的异常关机。The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to implement a temperature treatment strategy. For example, when the temperature reported by the temperature sensor 180J exceeds the threshold, the electronic device 100 may reduce the performance of the processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to prevent the electronic device 100 from being shut down abnormally due to the low temperature. In some other embodiments, when the temperature is lower than another threshold, the electronic device 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
触摸传感器180K,也称“触控面板”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。Touch sensor 180K, also known as "touch panel". The touch sensor 180K can be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a “touch screen”. The touch sensor 180K is used to detect a touch operation on or near it. The touch sensor can pass 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 the display screen 194 . In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 100 , which is different from the position of the display screen 194 .
示例性的,图2示出了电子设备100的软件结构框图。分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。应用程序层可以包括一系列应用程序包。Exemplarily, FIG. 2 shows a software structural block diagram of the electronic device 100 . The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate through software interfaces. In some embodiments, the Android system is divided into four layers, which are respectively the application program layer, the application program framework layer, the Android runtime (Android runtime) and the system library, and the kernel layer from top to bottom. The application layer can consist of a series of application packages.
如图2所示,应用程序层可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用程序。As shown in Figure 2, the application layer may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and short message.
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。The application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.
如图2所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。As shown in Figure 2, the application framework layer can include window managers, content providers, view systems, phone managers, resource managers, notification managers, and so on.
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。A window manager is used to manage window programs. The window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, capture the screen, etc.
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。Content providers are used to store and retrieve data and make it accessible to applications. Data can include videos, images, audio, calls made and received, browsing history and bookmarks, phonebook, etc.
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on. The view system can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text message notification icon may include a view for displaying text and a view for displaying pictures.
电话管理器用于提供电子设备100的通信功能。例如通话状态的管理(包括接通,挂断等)。The phone manager is used to provide communication functions of the electronic device 100 . For example, the management of call status (including connected, hung up, etc.).
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and so on.
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提 醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。The notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages, and can automatically disappear after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears on the top status bar of the system in the form of a chart or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window. For example, prompting text information in the status bar, issuing a prompt sound, vibrating the electronic device, and flashing the indicator light, etc.
Android Runtime包括核心库和虚拟机。Android Runtime负责安卓系统的调度和管理。Android Runtime includes core library and virtual machine. Android Runtime is responsible for the scheduling and management of the Android system.
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。The core library consists of two parts: one part is the function function that the java language needs to call, and the other part is the core library of Android.
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。The application layer and the application framework layer run in virtual machines. The virtual machine executes the java files of the application program layer and the application program framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(media libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。A system library can include multiple function modules. For example: surface manager (surface manager), media library (media libraries), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc.
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。The surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。The media library supports playback and recording of various commonly used audio and video formats, as well as still image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing, etc.
2D图形引擎是2D绘图的绘图引擎。2D graphics engine is a drawing engine for 2D drawing.
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。The kernel layer is the layer between hardware and software. The kernel layer includes at least a display driver, a camera driver, an audio driver, and a sensor driver.
基于上述图1或者图2所描述的电子设备,所述电子设备包括前端模块和处理器,可以用于实现如下功能:Based on the electronic device described in FIG. 1 or FIG. 2 above, the electronic device includes a front-end module and a processor, which can be used to implement the following functions:
所述前端模块配置成:The front-end module is configured to:
设置一虚拟视频设备以按第一帧率封装所述前端模块的运行数据;Setting a virtual video device to encapsulate the operation data of the front-end module at a first frame rate;
利用所述虚拟视频设备按第二帧率将所述运行数据打包,得到目标数据包;以及Packing the running data at a second frame rate by using the virtual video device to obtain a target data packet; and
将所述目标数据包发送给所述处理器;sending the target data packet to the processor;
所述处理器配置成:The processor is configured to:
至少部分地基于对所述第一帧率和/或所述第二帧率的值进行调节来确定所述前端模块是否存在异常。Determining whether the front-end module is abnormal is based at least in part on adjusting values of the first frame rate and/or the second frame rate.
可以看出,在本申请实施例中所描述的电子设备,用于对该电子设备进行测试,设置虚拟视频设备,该虚拟视频设备配置成按第一帧率封装电子设备的前端模块的运行数据,利用虚拟视频设备按第二帧率将运行数据打包,得到目标数据包,将目标数据包发送给处理器,至少部分地基于对第一帧率和/或第二帧率的值进行调节来确定前端模块是否存在异常,由于虚拟视频设备能够对运行数据进行虚拟录像处理,使得运行数据能够按照一定的帧率和大小输出给外部设备,进而,能够高效抓住前端模块的工作信息以供开发人员进行分析。It can be seen that the electronic device described in the embodiment of the present application is used to test the electronic device and set up a virtual video device, and the virtual video device is configured to encapsulate the operating data of the front-end module of the electronic device at the first frame rate , use the virtual video device to pack the running data according to the second frame rate to obtain the target data packet, and send the target data packet to the processor, at least partly based on adjusting the value of the first frame rate and/or the second frame rate Determine whether there is an abnormality in the front-end module. Since the virtual video device can perform virtual video recording processing on the running data, the running data can be output to the external device according to a certain frame rate and size, and then the working information of the front-end module can be efficiently captured for development. personnel to analyze.
可选的,所述前端模块,还被配置成:获取目标管道配置参数;Optionally, the front-end module is further configured to: acquire target pipeline configuration parameters;
其中,在所述利用所述虚拟视频设备按第二帧率将所述运行数据打包,得到目标数据包方面,所述前端模块具体被配置成:Wherein, in terms of using the virtual video device to pack the running data according to the second frame rate to obtain the target data packet, the front-end module is specifically configured as:
按照预设的管道配置参数与打包处理参数之间的映射关系,确定所述目标管道配置参数对应的目标打包处理参数,所述目标打包处理参数至少包括所述第二帧率;According to the preset mapping relationship between the pipeline configuration parameters and the packaging processing parameters, determine the target packaging processing parameters corresponding to the target pipeline configuration parameters, and the target packaging processing parameters include at least the second frame rate;
通过所述虚拟视频设备采用所述目标打包处理参数将所述运行数据打包,得到所述目标数据包。The virtual video device packs the running data by using the target packing processing parameters to obtain the target data package.
可选的,所述目标数据包包括至少一个数据包,每一数据包的数据大小均小于或等于由USB服务分配的多个缓存寄存器中的每一缓存寄存器的大小,所述缓存寄存器用于容纳 所述至少一个数据包中的数据包。Optionally, the target data packet includes at least one data packet, and the data size of each data packet is less than or equal to the size of each cache register in a plurality of cache registers allocated by the USB service, and the cache register is used for A data packet of the at least one data packet is accommodated.
可选的,在所述获取目标管道配置参数方面,所述前端模块具体被配置成:Optionally, in terms of obtaining target pipeline configuration parameters, the front-end module is specifically configured as:
确定目标调试内容;Determine the target debugging content;
获取所述目标调试内容对应的属性信息;Obtain attribute information corresponding to the target debugging content;
按照预设的调试内容的属性信息与管道配置参数之间的映射关系,确定所述目标调试内容的属性信息对应的所述目标管道配置参数。The target pipeline configuration parameters corresponding to the attribute information of the target debugging content are determined according to the preset mapping relationship between the attribute information of the debugging content and the pipeline configuration parameters.
可选的,所述处理器还具体被配置成:Optionally, the processor is also specifically configured to:
通过所述处理器接收所述目标数据包,对所述目标数据包进行解包,得到所述运行数据,所述运行数据用于实现数据分析。The processor receives the target data packet, unpacks the target data packet to obtain the operation data, and the operation data is used for data analysis.
可选的,在所述对所述目标数据包进行解包,得到所述运行数据方面,所述处理器还具体被配置成:Optionally, in terms of unpacking the target data packet to obtain the running data, the processor is further specifically configured to:
将所述目标数据包以逐帧形式复制到由USB服务分配的目标缓存寄存器中;Copying the target data packet frame by frame into the target buffer register allocated by the USB service;
对所述目标缓存寄存器中的数据进行解包,得到所述运行数据。Unpacking the data in the target cache register to obtain the running data.
可选的,在所述对所述目标数据包进行解包,得到所述运行数据之后,所述处理器还具体被配置成:Optionally, after the target data packet is unpacked to obtain the running data, the processor is further specifically configured to:
调用所述USB服务通过所述目标缓存寄存器将所述运行数据上传到外部设备,以供所述外部设备对所述运行数据进行数据分析。calling the USB service to upload the running data to the external device through the target buffer register, so that the external device can analyze the running data.
可选的,所述处理器还具体被配置成:Optionally, the processor is also specifically configured to:
对所述目标缓存寄存器进行轮转操作,使得轮转之后的所述目标缓存寄存器继续用于容纳所述处理器接收到的数据包。A rotation operation is performed on the target cache register, so that the target cache register after rotation continues to be used for accommodating data packets received by the processor.
可选的,在所述设置虚拟视频设备之前,所述处理器还具体用于:Optionally, before the setting of the virtual video device, the processor is further specifically configured to:
启用所述电子设备的相机,以调用硬件抽象模块,其中所述硬件抽象模块配置成:用于执行所述对所述目标数据包进行解包,得到所述运行数据的功能。Enabling the camera of the electronic device to call 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.
第二部分,本申请实施例所公开的数据传输控制方法及装置介绍如下。In the second part, the data transmission control method and device disclosed in the embodiments of the present application are introduced as follows.
本申请提供了请参阅图3A,图3A是本申请实施例提供的一种数据传输控制方法的流程示意图,应用于电子设备,所述电子设备包括前端模块和处理器,例如,处理器可以为应用处理器AP,该数据传输控制方法可以用于对电子设备进行测试,如图所示,本数据传输控制方法包括:This application provides please refer to FIG. 3A. FIG. 3A is a schematic flowchart of a data transmission control method provided by an embodiment of this application, which is applied to an electronic device, and the electronic device includes a front-end module and a processor. For example, the processor can be Application processor AP, the data transmission control method can be used to test electronic equipment, as shown in the figure, the data transmission control method includes:
301、设置虚拟视频设备,所述虚拟视频设备配置成按第一帧率封装所述电子设备的前端模块的运行数据。301. Set a virtual video device, where the virtual video device is configured to encapsulate running data of a front-end module of the electronic device at a first frame rate.
其中,运行数据可以为以下至少一种:前端模块中的各个芯片的工作状态数据、图像数据、语音数据、调试日志数据、视频数据等等,在此不作限定。前端模块中的各个芯片的工作状态数据可以为以下至少一种:工作电平、波形、工作电压、工作电流、工作功率、工作时钟等等,在此不作限定,上述运行数据可以为原始数据或者预处理后的原始数据,预处理可以为以下至少一种:采样、压缩、筛选等等,在此不作限定。Wherein, the running data may be at least one of the following: working status data, image data, voice data, debugging log data, video data, etc. of each chip in the front-end module, which is not limited herein. The working status data of each chip in the front-end module can be at least one of the following: working level, waveform, working voltage, working current, working power, working clock, etc., which are not limited here, and the above-mentioned running data can be raw data or For the preprocessed raw data, the preprocessing can be at least one of the following: sampling, compression, screening, etc., which is not limited here.
其中,如图3B所示,本申请实施例中,前端模块可以包括:图像信号处理器(ISP)、神经网络处理器(NPU)、存储器(DDR)、总控模块(TOP)、选择器(MUX)、MIPI等等,在此不作限定。选择器用于实现运行数据的选取操作,例如,仅仅选取ISP的运行数据,MIPI通过对运行数据进行采样和打包,将打包后的数据通过相机串行接口(camera serial interface,CSI)发送给AP,由AP通过USB服务将运行数据传输给外部设备。前端模块可以为图像预处理器。Wherein, as shown in FIG. 3B, in the embodiment of the present application, the front-end module may include: an image signal processor (ISP), a neural network processor (NPU), a memory (DDR), a master control module (TOP), a selector ( MUX), MIPI, etc., are not limited here. The selector is used to realize the selection operation of the running data. For example, only the running data of the ISP is selected. MIPI samples and packs the running data, and sends the packed data to the AP through the camera serial interface (CSI). The AP transmits the running data to the external device through the USB service. The front-end module can be an image preprocessor.
可选的,上述步骤301,设置虚拟视频设备,可以按照如下方式实施:Optionally, the above step 301, setting up a virtual video device, can be implemented in the following manner:
通过所述前端模块的移动产业处理器接口MIPI设置所述虚拟视频设备。The virtual video device is set through the MIPI of the front-end module.
具体实现中,可以通过MIPI可以设置虚拟视频设备,具体的,可以通过MIPI的相机串行接口(camera serial interface,CSI)设置虚拟视频设备,上述虚拟视频设备又可以称为虚拟化录像(video)设备。In the specific implementation, a virtual video device can be set through MIPI, specifically, a virtual video device can be set through a camera serial interface (CSI) of MIPI, and the above-mentioned virtual video device can be called a virtualized video recording (video) equipment.
可选的,在上述步骤301,设置虚拟视频设备之前,还可以包括如下步骤:Optionally, before the above step 301, before setting the virtual video device, the following steps may also be included:
A1、获取目标管道配置参数;A1. Obtain target pipeline configuration parameters;
在步骤301,利用所述虚拟视频设备按第二帧率将所述运行数据打包,得到目标数据包,可以包括如下步骤:In step 301, using the virtual video device to pack the running data according to the second frame rate to obtain the target data package may include the following steps:
31、按照预设的管道配置参数与打包处理参数之间的映射关系,确定所述目标管道配置参数对应的目标打包处理参数,所述目标打包处理参数至少包括所述第二帧率;31. According to the preset mapping relationship between the pipeline configuration parameters and the packaging processing parameters, determine the target packaging processing parameters corresponding to the target pipeline configuration parameters, and the target packaging processing parameters include at least the second frame rate;
32、通过所述虚拟视频设备采用所述目标打包处理参数将所述运行数据打包,得到所述目标数据包。32. Pack the running data through the virtual video device using the target packing processing parameters to obtain the target data package.
其中,本申请实施例中,管道配置参数可以包括以下至少一种:管道类型、管道序号、帧率、分辨率等,在此不作限定,管道类型可以理解为用于处理某一数据类型的数据的管道,例如,图像数据对应图像数据管道类型,又例如,语音数据对应语音数据管道类型等等,管道序号可以理解为管道的序号,管道序号可以预先定义,不同序号的管道其功能不一样。打包处理参数至少包括帧率,打包处理参数还可以包括以下至少一种:数据包大小、包头、包尾等等,在此不作限定。电子设备中可以预先存储预设的管道配置参数与打包处理参数之间的映射关系,即不同的管道配置参数可以对应不同的打包处理参数。Among them, in the embodiment of the present application, the pipeline configuration parameters may include at least one of the following: pipeline type, pipeline serial number, frame rate, resolution, etc., which are not limited here, and the pipeline type can be understood as used to process data of a certain data type For example, the image data corresponds to the image data pipeline type, and for example, the voice data corresponds to the voice data pipeline type, etc. The pipeline serial number can be understood as the serial number of the pipeline, and the pipeline serial number can be pre-defined, and the functions of the pipelines with different serial numbers are different. The packaging processing parameters include at least the frame rate, and the packaging processing parameters 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 may pre-store a mapping relationship between preset pipeline configuration parameters and packaging processing parameters, that is, different pipeline configuration parameters may correspond to different packaging processing parameters.
具体实现中,目标管道配置参数可以预先配置,电子设备可以从硬件抽象模块(camera hal)获取目标管道配置参数,再按照预设的管道配置参数与打包处理参数之间的映射关系,确定目标管道配置参数对应的目标打包处理参数,并通过虚拟视频设备采用目标打包处理参数将运行数据打包,得到目标数据包,目标数据包可以为至少一个数据包,目标打包处理参数至少包括第二帧率。In the specific implementation, the target pipeline configuration parameters can be pre-configured, and the electronic device can obtain the target pipeline configuration parameters from the hardware abstraction module (camera hal), and then determine the target pipeline according to the mapping relationship between the preset pipeline configuration parameters and the packaging processing parameters Configure the target packaging processing parameters corresponding to the parameters, and use the target packaging processing parameters to pack the running data through the virtual video device to obtain a 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.
举例说明下,由于倘若隔固定的时间进行运行数据的打包可能会由于前端模块在一定时间内产生的信息量较少,导致缓存寄存器填充不足,造成缓存寄存器和传输带宽的浪费,因此,同样也可以基于存满即送的原则进行数据打包,并将打包好的数据和下一帧数据一起传送给AP进行处理,或者,也可以将打包好的数据打上时间戳单独发送给AP进行处理,以此来节省传输的带宽。As an example, if the running data is packaged at fixed intervals, the amount of information generated by the front-end module may be small within a certain period of time, resulting in insufficient filling of the cache registers, resulting in waste of cache registers and transmission bandwidth. Data can be packaged based on the principle of sending when it is full, and the packaged data and the next frame of data can be sent to the AP for processing, or the packaged data can be stamped with a time stamp and sent to the AP for processing separately. This saves transmission bandwidth.
可选的,所述目标数据包包括至少一个数据包,每一数据包的数据大小均小于或等于由USB服务分配的多个缓存寄存器中的每一缓存寄存器的大小,所述缓存寄存器用于容纳所述至少一个数据包中的数据包。Optionally, the target data packet includes at least one data packet, and the data size of each data packet is less than or equal to the size of each cache register in a plurality of cache registers allocated by the USB service, and the cache register is used for A data packet of the at least one data packet is accommodated.
其中,目标数据包可以包括至少一个数据包,每一数据包的数据大小均小于或等于由USB服务分配的多个缓存寄存器中的每一缓存寄存器的大小,缓存寄存器用于容纳至少一个数据包中的数据包,从而,方便缓存寄存器能够容纳数据包。Wherein, 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 cache register in a plurality of buffer registers allocated by the USB service, and the cache register is used to accommodate at least one data packet The data packet in, thus, facilitates the cache register to be able to hold the data packet.
可选的,上述步骤A1,获取目标管道配置参数,可以包括如下步骤:Optionally, the above step A1, obtaining target pipeline configuration parameters, may include the following steps:
A11、确定所述工程模式对应的目标调试内容;A11. Determine the target debugging content corresponding to the engineering mode;
A12、获取所述目标调试内容对应的属性信息;A12. Obtain attribute information corresponding to the target debugging content;
A13、按照预设的调试内容的属性信息与管道配置参数之间的映射关系,确定所述目标调试内容的属性信息对应的所述目标管道配置参数。A13. Determine the target pipeline configuration parameter 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 parameter.
其中,本申请实施例中,调试内容的属性信息可以为以下至少一种:数据类型、调试目的、调试参数的参数类型、前台应用等等,在此不作限定,电子设备中还可以预先存储预设的调试内容的属性信息与管道配置参数之间的映射关系。Among them, in the embodiment of the present application, the attribute information of the debugging content may be at least one of the following: data type, debugging purpose, parameter type of debugging parameters, foreground application, etc., which are not limited here, and pre-stored The mapping relationship between the attribute information of the debugging content and the pipeline configuration parameters.
具体实现中,电子设备可以在工程模式下,确定该工程模式对应的目标调试内容,调试内容可以由用户自行设置,或者,也可以基于用户的操作确定调试内容,再获取目标调 试内容对应的属性信息,进而,可以按照预设的调试内容的属性信息与管道配置参数之间的映射关系,确定目标调试内容的属性信息对应的目标管道配置参数,如此,可以依据调试内容的属性信息确定相应的管道配置参数,进而,能够使得管道配置参数深度满足调试需求。In specific implementation, the electronic device can determine the target debugging content corresponding to the engineering mode in the engineering mode, and the debugging content can be set by the user, or the debugging content can be determined based on the user's operation, and then the attributes corresponding to the target debugging content can be obtained information, furthermore, 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, so that the corresponding Pipeline configuration parameters, in turn, can make the depth of pipeline configuration parameters meet the debugging requirements.
可选的,在步骤301,设置虚拟视频设备之前,还可以包括如下步骤:Optionally, in step 301, before setting the virtual video device, the following steps may also be included:
B1、检测所述电子设备是否处于工程模式;B1. Detecting whether the electronic device is in engineering mode;
B2、在所述电子设备处于所述工程模式时,执行所述设置虚拟视频设备的步骤。B2. When the electronic device is in the engineering mode, perform the step of setting a virtual video device.
具体实现中,电子设备可以检测其是否处于工程模式,在电子设备处于工程模式,可以执行步骤301,否则,则可以不执行步骤301,本申请实施例中,工程模式又可以称之为调试模式(debug模式)。工程模式可以由用户自行设置,或者,在电子设备出现异常时,自动进入工程模式。In a specific implementation, the electronic device can detect whether it is in the engineering mode. When the electronic device is in the engineering mode, step 301 can be executed; otherwise, step 301 may not be executed. In the embodiment of the present application, the engineering mode can also be called the debugging mode (debug mode). The engineering mode can be set by the user, or automatically enter the engineering mode when an abnormality occurs in the electronic device.
可选的,在步骤301,设置虚拟视频设备之前,还可以包括如下步骤:Optionally, in step 301, before setting the virtual video device, the following steps may also be included:
启用所述电子设备的相机,以调用硬件抽象模块,其中所述硬件抽象模块配置成:用于执行所述对所述目标数据包进行解包,得到所述运行数据的功能。Enabling the camera of the electronic device to call 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.
其中,本申请实施例中,仅仅为启动相机功能,并非是启动摄像头,在相机功能打开之后,由于后续需要调用硬件抽象模块,因此,需要开启相机功能,以便于顺利调用硬件抽象模块,该硬件抽空模块可以用于实现解包操作,以得到运行数据。Among them, in the embodiment of this application, it is only to start the camera function, not to start the camera. After the camera function is turned on, because the hardware abstraction module needs to be called later, it is necessary to turn on the camera function so as to smoothly call the hardware abstraction module. The evacuation module can be used to implement unpacking operations to obtain operating data.
302、利用所述虚拟视频设备按第二帧率将所述运行数据打包,得到目标数据包。302. Use the virtual video device to package the running data at a second frame rate to obtain a target data package.
具体实现中,电子设备可以获取前端模块中至少一个模块的运行数据,通过虚拟视频设备将运行数据以第二帧率进行打包,得到目标数据包,即可以使得该目标数据包能够按照一定的频率和大小输出该运行数据。其中,第一帧率与第二帧率可以相同或者不同。In a specific implementation, the electronic device can obtain the operating data of at least one module in the front-end module, and pack the operating data at the second frame rate through the virtual video device to obtain the target data packet, that is, the target data packet can be obtained according to a certain frequency. and size output the run data. Wherein, the first frame rate and the second frame rate may be the same or different.
303、将所述目标数据包发送给处理器。303. Send the target data packet to a processor.
具体的,电子设备可以通过虚拟视频设备对运行数据进行虚拟化处理,使其能够按一定间隔和大小进行运行数据的传输,在前端模块对所得到的运行数据依据一定的规则打包处理之后,即可以放在后端所分配的缓存寄存器(给驱动供前端模块存放数据使用)中,进一步将打包好的数据通过MIPI传送给应用处理器AP(后端),还可以通过USB服务可以分配多个缓存寄存器(buffer register),进而,实现缓存寄存器轮转操作。缓存寄存器的数量可以由用户自行设置,或者,由带宽和/或者运行数据产生的速度决定。Specifically, the electronic device can virtualize the operating data through the virtual video device, so that it can transmit the operating data at a certain interval and size. After the front-end module packs and processes the obtained operating data according to certain rules, that is It can be placed in the cache register allocated by the backend (for the driver to store data in the front-end module), and further transmit the packaged data to the application processor AP (backend) through MIPI, and can also allocate multiple The buffer register (buffer register), and then, realizes the buffer register rotation operation. The number of cache registers can be set by the user, or determined by the bandwidth and/or the speed at which the running data is generated.
304、至少部分地基于对所述第一帧率和/或所述第二帧率的值进行调节来确定所述前端模块是否存在异常。304. Determine whether there is an abnormality in the front-end module based at least in part on adjusting the value of the first frame rate and/or the second frame rate.
具体实现中,运行数据则可以发送给外部设备进行数据分析,或者,电子设备也可以对运行数据进行数据分析,以实现异常检测或者前端模块中的各个芯片的工作状态检测,上述外部设备可以为其他电子设备,例如,上位机(PC)。数据分析可以为以下至少一种功能:异常检测、前端模块中的各个芯片的状态检测、调试数据分析等等,在此不作限定。电子设备也可以通过显示屏显示运行数据。本申请实施例中,可以动态调节第一帧率和/或第二帧率,从而,保证运行数据有效封装以及打包传输。In a specific implementation, the operating data can be sent to an external device for data analysis, or the electronic device can also perform data analysis on the operating data to realize anomaly detection or detection of the working status of each chip in the front-end module. The above-mentioned external device can be Other electronic equipment, such as a host computer (PC). The data analysis may be at least one of the following functions: abnormality detection, status detection of each chip in the front-end module, debugging data analysis, etc., which are not limited herein. Electronic equipment can also display operating data through the display screen. In the embodiment of the present application, the first frame rate and/or the second frame rate may be dynamically adjusted, thereby ensuring effective packaging and packet transmission of the running data.
具体的,可以至少部分地基于对第一帧率的值进行调节来确定前端模块是否存在异常,或者,至少部分地基于对第二帧率的值进行调节来确定前端模块是否存在异常,或者,至少部分地基于对第一帧率和第二帧率的值进行调节来确定前端模块是否存在异常,即具体实现中,可以通过部分或者全部的运行数据均以第一帧率或者第二帧率进行调节,便于前端有节奏地高效传输运输数据,以及便于后端也有节奏地快速提取运行数据,在调节过程中,可以对目标数据包进行分析,得到前端模块的运行数据,通过该运行数据来确定前端模块是否出现异常。Specifically, it may be at least partly based on adjusting the value of the first frame rate to determine whether there is an abnormality in the front-end module, or at least partly based on adjusting the value of the second frame rate to determine whether there is an abnormality in the front-end module, or, Determine whether there is an abnormality in the front-end module based at least in part on adjusting the values of the first frame rate and the second frame rate. Adjustment is convenient for the front-end to transmit transportation data in a rhythmic and efficient manner, and to facilitate the back-end to quickly extract operating data in a rhythmic manner. During the adjustment process, the target data packet can be analyzed to obtain the operating data of the front-end module. Through the operating data to Determine if the front-end module is abnormal.
举例说明下,本申请实施例中,电子设备通过对前端模块中异常信息收集模块的虚拟 视频设备处理使得可以在前端将不同模块的异常信息(包括运行时的检测信息)按一定的节奏和大小进行收集打包,以供实时的向PC侧进行输出,当开发人员需要进行调试时则可以通过分析收到的监测数据得到问题发生的原因。As an example, in the embodiment of this application, the electronic device processes the virtual video device of the abnormal information collection module in the front-end module so that the abnormal information (including the detection information at runtime) of different modules can be processed in a certain rhythm and size at the front end. Collect and package for real-time output to the PC side. When developers need to debug, they can get the cause of the problem by analyzing the received monitoring data.
进一步的,举例说明下,本申请实施例,在运行数据为图像数据时,例如,可以通过将每一帧的处理效果(例如某些区域的效果)和预先存储的标准效果图进行对比,得到当前帧的处理效果判断结果,进而,根据判断结果自适应调整相关算法的处理参数使得相机系统的图像处理能够稳定地进行图像处理。Further, as an example, in the embodiment of the present application, when the running data is image data, for example, by comparing the processing effect of each frame (for example, the effect of certain areas) with the pre-stored standard rendering, it can be obtained The judgment result of the processing effect of the current frame, and then adaptively adjust the processing parameters of the relevant algorithm according to the judgment result so that the image processing of the camera system can perform image processing stably.
可选的,在步骤304之后,还可以包括如下步骤:Optionally, after step 304, the following steps may also be included:
C1、对所述运行数据进行特征提取,得到目标特征集;C1. Perform feature extraction on the operating data to obtain a target feature set;
C2、将所述目标特征集输入到预设神经网络模型,得到目标运算结果;C2. Input the target feature set into the preset neural network model to obtain the target operation result;
C3、依据所述目标运算结果确定目标异常信息。C3. Determine target abnormality information according to the target calculation result.
其中,预设神经网络模型可以为以下至少一种:卷积神经网络模型、全连接神经网络模型、循环神经网络模型等等,在此不做限定。Wherein, the preset neural network model may be at least one of the following: a convolutional neural network model, a fully connected neural network model, a recurrent neural network model, etc., which are not limited herein.
本申请实施例中,步骤C1-C3可以由电子设备实现,或者,也可以由外部设备,例如,上位机PC实现。目标特征集可以包括至少一个特征,或者,目标特征集可以包括至少一类特征。在运行数据为图像数据时,特征可以为以下至少一种:特征点、特征向量、颜色、像素、特征纹路等等,在此不做限定。在运行数据为声音数据时,特征可以为以下至少一种:频率、幅度、波形、音色、音调、波长等等,在此不做限定。在运行数据为调试数据时,特征可以为以下至少一种:电平、波形、电压、电流、功率、日志数据等等,在此不做限定。In the embodiment of the present application, steps C1-C3 may be implemented by an electronic device, or may also be implemented by an external device, for example, 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 features may be at least one of the following: feature points, feature vectors, colors, pixels, feature lines, etc., which are not limited here. When the running data is sound data, the feature may be at least one of the following: frequency, amplitude, waveform, timbre, pitch, wavelength, etc., which is not limited here. When the running data is debugging data, the feature may be at least one of the following: level, waveform, voltage, current, power, log data, etc., which is not limited here.
在执行本申请实施例步骤301之前,可以通过大量样本数据,以及样本对应的标签,对神经网络模型进行训练,在该神经网络模型收敛后,则可以得到预设神经网络模型。Before executing step 301 in the embodiment of the present application, the neural network model can be trained through a large amount of sample data and labels corresponding to the samples, and after the neural network model converges, a preset neural network model can be obtained.
具体实现中,电子设备可以对运行数据进行特征提取,得到目标特征集,再将目标特征集输入到预设神经网络模型,得到目标运算结果,运算结果可以为至少一个标签,以及对应的概率值,再依据目标运算结果生成异常分析报告,将该异常分析报告作为目标异常信息,或者,电子设备中也可以预先存储运算结果与异常信息之间的映射关系,进而,依据该映射关系确定目标运算结果对应的目标异常信息,异常信息可以为以下至少一种:异常原因、异常位置、异常持续时间长度等等,在此不作限定。In the specific implementation, the electronic device can perform feature extraction on the operating data to obtain the target feature set, and then input the target feature set into the preset neural network model to obtain the target calculation result, which can be at least one label and the corresponding probability value , and then generate an abnormality analysis report according to the target calculation result, and use the abnormality analysis report as the target abnormality information, or the electronic device can also pre-store the mapping relationship between the calculation result and the abnormality information, and then determine the target calculation according to the mapping relationship The target abnormality information corresponding to the result, the abnormality information may be at least one of the following: abnormality cause, abnormality location, abnormality duration, etc., which are not limited here.
举例说明下,本申请实施例,可以通过在前端模块对系统和图像主动发起异常检测,当异常出现时,可以提前检测到异常并获取相关异常信息,进而可以在不影响上层的情况下,即用户使用体验以及上层对图像预处理器的调用的情况下,快速进行对应异常的自适应处理,进一步还可以将处理后的结果以及异常信息进行上报,使得上层能够及时根据自适应处理结果以及异常信息做进一步判断和处理,从而本申请实施例可以更好的提升系统的鲁棒性,同时减少异常对用户使用体验的影响,提高用户体验。As an example, in the embodiment of this application, the front-end module can actively initiate anomaly detection on the system and images. When an anomaly occurs, it can detect the anomaly in advance and obtain relevant anomaly information, and then can without affecting the upper layer, that is, In the case of user experience and the call of the image preprocessor by the upper layer, the adaptive processing corresponding to the abnormality can be quickly performed, and the processed result and abnormal information can be reported, so that the upper layer can timely respond to the adaptive processing result and abnormality The information is further judged and processed, so that the embodiment of the present application can better improve the robustness of the system, and at the same time reduce the impact of abnormalities on the user experience and improve the user experience.
其中,如图3C所示,目标数据包中的任一数据包可以包括包头PH、运行数据以及包尾PF,包头可以用于标记一个数据包的开始位置,包尾可以用于表示数据包的结束位置。Wherein, as shown in Figure 3C, any data packet in the target data packet can include packet header PH, running data and packet tail PF, and packet header can be used to mark the start position of a data packet, and packet tail can be used to represent the data packet end position.
进一步的,包头可以包括:包头标记、索引包标记和包数据长度,包头标记用于表示当前数据包的数据类型,索引包标记用于表示当前数据包的独立的索引,包数据长度用于表示当前数据包的数据长度,具体结构如下表所示:Further, the packet header may include: packet header mark, index packet mark and packet data length, the packet header mark is used to represent the data type of the current data packet, the index packet mark is used to represent the independent index of the current data packet, and the packet data length is used to represent The data length of the current data packet, the specific structure is shown in the following table:
包头结构Baotou structure 字节长度byte length
包头标记Baotou mark Byte3Byte3
索引包标记index pack tag Byte2Byte2
包数据长度packet data length Byte1+Byte0Byte1+Byte0
进一步的,包尾可以包括:包尾标记、数据包计数和帧计数,包尾标记用于表示包尾位置,数据包计数用于表示对数据包的计数(第几个),帧计数表示该数据包来自哪一帧,具体如下表所示:Further, the packet tail can include: packet tail mark, data packet count and frame count, the packet tail mark is used to represent the position of the packet tail, the data packet count is used to represent the count (number) of data packets, and the frame count represents the Which frame the packet comes from, as shown in the following table:
包尾结构Packet structure 字节长度byte length
包尾标记end-of-packet marker Byte3Byte3
数据包计数packet count Byte2Byte2
可选的,还可以包括如下步骤:Optionally, the following steps may also be included:
通过所述AP接收所述目标数据包,对所述目标数据包进行解包,得到所述运行数据,所述运行数据用于实现数据分析。The target data packet is received by the AP, and the target data packet is unpacked to obtain the operation data, and the operation data is used for data analysis.
其中,AP可以接收目标数据包,并对目标数据包按照第一帧率和/或第二帧率进行解包,得到运行数据,还可以通过该运行数据实现数据分析,以达到异常检测的目的。Among them, the AP can receive the target data packet, and unpack the target data packet according to the first frame rate and/or the second frame rate to obtain the operation data, and can also implement data analysis through the operation data to achieve the purpose of abnormal detection .
可选的,上述步骤302,对所述目标数据包进行解包,得到所述运行数据,可以按照如下方式实施:Optionally, the above step 302, unpacking the target data packet to obtain the operation data, may be implemented in the following manner:
通过硬件抽象模块对所述目标数据包进行解包,得到所述运行数据。The target data packet is unpacked by a hardware abstraction module to obtain the running data.
其中,解包为打包动作的反向操作,硬件抽象模块可以按照标志位或预先约定的规则对目标数据包进行解析,进而,再对解析后的数据进行处理,例如,可以对存放的先后顺序的调整或在有多路图像数据时将异常信息打包进副摄的图像数据中(副摄的图像数据大小较小,可以有空间和带宽用来传输调试信息),而主摄的缓存寄存器则只传输图像数据。Among them, unpacking is the reverse operation of packing action. The hardware abstraction module can analyze the target data packet according to the flag bits or pre-agreed rules, and then process the parsed data. For example, the order of storage can be changed. adjustment or pack the abnormal information into the image data of the sub-camera when there are multiple channels of image data (the size of the image data of the sub-camera is small, and there is space and bandwidth to transmit debugging information), while the cache register of the main camera is Only image data is transferred.
举例说明下,如图3D所示,以调试数据为例,前端模块的内部信号可以从前端模块的MIPI转发到AP侧DDR中,AP侧收到数据后触发中断。由于前端模块对调试数据的打包处理是作为一个虚拟的相机设备(虚拟视频设备)进行的,因此,需要在硬件抽象模块中启动一个专门的管道(pipeline)服务于该虚拟视频设备。而且USB服务需要分配相关的缓存寄存器,并将缓存寄存器给硬件抽象模块,硬件抽象模块需要将所得到的调试数据以逐帧的方式复制到USB服务所分配的缓存寄存器中,需要注意的是,该缓存寄存器的数据不需要经过AP侧的ISP模块的相关算法的处理,因此,需要将ISP相关算法的模块进行关闭,这样能够保证传输给外部设备(PC)的数据为原始数据。对于缓存寄存器的轮转,USB服务侧可以以通过回调函数(callback)的方式实现缓存寄存器的轮转。For example, as shown in Figure 3D, taking debugging data as an example, the internal signal of the front-end module can be forwarded from the MIPI of the front-end module to the DDR on the AP side, and the AP side triggers an interrupt after receiving the data. Since the front-end module packs the debugging data as a virtual camera device (virtual video device), it is necessary to start a special pipeline (pipeline) in the hardware abstraction module to serve the virtual video device. Moreover, the USB service needs to allocate relevant cache registers and give the cache registers to the hardware abstraction module. The hardware abstraction module needs to copy the obtained debugging data to the cache registers allocated by the USB service in a frame-by-frame manner. It should be noted that, The data in the cache register does not need to be processed by the relevant algorithm of the ISP module on the AP side. Therefore, the ISP-related algorithm module needs to be closed, so as to ensure that the data transmitted to the external device (PC) is original data. For the rotation of the buffer registers, the USB service side can implement the rotation of the buffer registers by means of a callback function (callback).
本申请实施例中,对于AP对工程模式和管道配置参数的定制,由于需要保证前端模块监测信息的完整性以及可区分性,因此,在定制时需要对AP的数据处理模块进行选择性接入,例如,一些会对数据内容造成影响的模块不可以接入,例如降噪功能模块等,从而避免对数据的篡改。进一步,在管道对缓存寄存器的处理上区分于传统的相机处理模块,当监测数据和图像数据打包传输时需要对数据进行拆分处理,因此,在管道中会对原始的数据的缓存寄存器进行解析重组,数据的解析重组可以根据标志位或约定的规则进行解析,进而再对解析后的数据分别进行处理。In the embodiment of this application, for the customization of the engineering mode and pipeline configuration parameters of the AP, since it is necessary to ensure the integrity and distinguishability of the monitoring information of the front-end module, it is necessary to selectively access the data processing module of the AP during customization For example, some modules that will affect the data content cannot be accessed, such as the noise reduction function module, etc., so as to avoid tampering with the data. Furthermore, the processing of the buffer register by the pipeline is different from the traditional camera processing module. When the monitoring data and image data are packaged and transmitted, the data needs to be split and processed. Therefore, the buffer register of the original data will be parsed in the pipeline. Reorganization, data analysis and reorganization can be analyzed according to flag bits or agreed rules, and then the analyzed data can be processed separately.
可选的,上述步骤,302,对所述目标数据包进行解包,得到所述运行数据,可以包括如下步骤:Optionally, the above step, 302, unpacking the target data packet to obtain the operation data may include the following steps:
31、将所述目标数据包以逐帧形式复制到由USB服务分配的目标缓存寄存器中;31. Copy the target data packet frame by frame into the target buffer register allocated by the USB service;
32、对所述目标缓存寄存器中的数据进行解包,得到所述运行数据。32. Unpack the data in the target cache register to obtain the running data.
具体实现中,电子设备可以通过硬件抽象模块将目标数据包以逐帧形式复制到由USB服务分配的目标缓存寄存器中,通过硬件抽象模块对目标缓存寄存器中的数据进行解包,得到运行数据,在该目标缓存寄存器被占用之后,则可以进行缓存寄存器轮转,以便于提供下一个缓存寄存器用于容纳硬件抽象模块复制的数据,当然,在运行数据上传到上位机PC之后,还可以通过上位机实现数据分析。In the specific implementation, the electronic device can copy the target data packet frame by frame to the target cache register allocated by the USB service through the hardware abstraction module, unpack the data in the target cache register through the hardware abstraction module, and obtain the running data. After the target cache register is occupied, the cache register rotation can be performed so as to provide the next cache register for storing the data copied by the hardware abstraction module. Of course, after the running data is uploaded to the host computer PC, the host computer can also Implement data analysis.
可选的,上述步骤302,对所述目标数据包进行解包,得到所述运行数据之后,还可 以包括如下步骤:Optionally, the above-mentioned step 302, after unpacking the target data packet and obtaining the operating data, may also include the following steps:
调用USB服务通过所述目标缓存寄存器将所述运行数据上传到外部设备,以供所述外部设备对所述运行数据进行数据分析。calling the USB service to upload the running data to the external device through the target cache register, so that the external device can analyze the running data.
进一步的,可选的,还可以包括如下步骤:Further, optionally, the following steps may also be included:
对所述目标缓存寄存器进行轮转操作,使得轮转之后的所述目标缓存寄存器继续用于容纳所述AP接收到的数据包。A rotation operation is performed on the target cache register, so that the target cache register after rotation continues to be used for accommodating data packets received by the AP.
举例说明下,在前端模块进行调试数据以及处理时可以基于帧与帧之间的间隔进行信息划分和打包,例如,每个隔33ms或16.6ms对前向对应时间长度的调试数据打包处理,这样可以保证打包后的调试数据可以根据数据包的索引或时间戳和图像数据(采集时机进行对应),AP在进行处理时可以据此进行区分。也可以将调试数据和摄像头的图像数据一起打包为同一块缓存寄存器。当监测数据和图像数据打包传输时需要对数据进行拆分处理,因此在管道中会对原始的数据的缓存寄存器进行解析重组。As an example, when the front-end module performs debugging data and processing, information can be divided and packaged based on the interval between frames. For example, each 33ms or 16.6ms is used to package and process the forward debugging data corresponding to the length of time. It can be guaranteed that the packaged debugging data can correspond to the image data (acquisition timing) according to the index or time stamp of the data packet, and the AP can distinguish based on this when processing. It is also possible to pack the debug data and the image data of the camera into the same buffer register. When the monitoring data and image data are packaged and transmitted, the data needs to be split and processed, so the cache registers of the original data will be parsed and reorganized in the pipeline.
举例说明下,实际应用中,当需要进行侵权检测时,可以通过在使用时检查相机的工作状态来识别是否是将前端模块虚拟化成一个录像设备。进而,通过对相机模块上传的数据大小和输出速度(帧率)进行判断,如果大小在一定时间内一致,且输出速度以固定的速度进行输出,则可以基本确认使用了本申请实施例所提出的实现方法,还可以再进一步进行确认是否构成侵权。As an example, in practical applications, when infringement detection is required, it is possible to identify whether the front-end module is virtualized into a video recording device by checking the working status of the camera during use. Furthermore, by judging the size and output speed (frame rate) of the data uploaded by the camera module, if the size is consistent within a certain period of time, and the output speed is output at a fixed speed, it can be basically confirmed that the data provided by the embodiment of the present application is used. The implementation method can also be further confirmed whether it constitutes an infringement.
举例说明下,实际应用中,对于前端模块传输的调试数据,由于数据量较大,可以在平台侧(手机端)对文件进行扫描,检查是否有大小较大的数据在实时产生,当检测到较大的数据在实时之后,可以对这些数据通过adb的方式进行拉取,再进行数据内容的分析,以此来确认是否为前端模块传输的调试数据包。As an example, in practical applications, for the debugging data transmitted by the front-end module, due to the large amount of data, the file can be scanned on the platform side (mobile phone terminal) to check whether there is any large-sized data generated in real time. After the larger data is real-time, the data can be pulled through adb, and then the data content is analyzed to confirm whether it is the debugging data packet transmitted by the front-end module.
可以看出,在本申请实施例中所描述的数据传输控制方法,用于对电子设备进行测试,设置虚拟视频设备,该虚拟视频设备配置成按第一帧率封装电子设备的前端模块的运行数据,利用虚拟视频设备按第二帧率将运行数据打包,得到目标数据包,将目标数据包发送给处理器,至少部分地基于对第一帧率和/或第二帧率的值进行调节来确定前端模块是否存在异常,由于虚拟视频设备能够对运行数据进行虚拟录像处理,使得运行数据能够按照一定的帧率和大小输出给外部设备,进而,能够高效抓住前端模块的工作信息以供开发人员进行分析。It can be seen that the data transmission control method described in the embodiment of the present application is used for testing electronic equipment and setting a virtual video equipment, and the virtual video equipment is configured to encapsulate the operation of the front-end module of the electronic equipment at the first frame rate. data, using the virtual video device to pack the running data according to the second frame rate to obtain the target data packet, and sending the target data packet to the processor, at least partially based on the value of the first frame rate and/or the second frame rate. To determine whether there is an abnormality in the front-end module, because the virtual video device can perform virtual video recording processing on the running data, so that the running data can be output to the external device according to a certain frame rate and size, and then, it can efficiently capture the working information of the front-end module for Developers analyze.
本申请提供了请参阅图4,图4是本申请实施例提供的一种数据传输控制方法的流程示意图,应用于电子设备,所述电子设备包括前端模块和应用处理器AP,如图所示,本数据传输控制方法包括:This application provides please refer to Figure 4, Figure 4 is a schematic flowchart of a data transmission control method provided by an embodiment of this application, which is applied to an electronic device, and the electronic device includes a front-end module and an application processor AP, as shown in the figure , the data transmission control method includes:
401、打开相机功能,以调用硬件抽象模块,其中所述硬件抽象模块配置成:用于执行解包操作。401. Open a camera function to call a hardware abstraction module, where the hardware abstraction module is configured to: perform an unpacking operation.
402、获取目标管道配置参数。402. Obtain target pipeline configuration parameters.
403、按照预设的管道配置参数与打包处理参数之间的映射关系,确定所述目标管道配置参数对应的目标打包处理参数。403. According to the preset mapping relationship between the pipeline configuration parameters and the packaging processing parameters, determine the target packaging processing parameters corresponding to the target pipeline configuration parameters.
404、设置虚拟视频设备,所述虚拟视频设备配置成按第一帧率封装所述电子设备的前端模块的运行数据。404. Set a virtual video device, where 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.
405、利用所述虚拟视频设备按所述目标打包处理参数将所述运行数据打包,得到目标数据包。405. Use the virtual video device to pack the running data according to the target packing processing parameters to obtain a target data package.
406、将所述目标数据包发送给处理器。406. Send the target data packet to a processor.
407、通过所述AP接收所述目标数据包,通过所述硬件抽象模块将所述目标数据包以逐帧形式复制到由USB服务分配的目标缓存寄存器中。407. Use the AP to receive the target data packet, and use the hardware abstraction module to copy the target data packet frame by frame to a target buffer register allocated by the USB service.
408、通过所述硬件抽象模块对所述目标缓存寄存器中的数据进行解包,得到所述运行数据。408. Use the hardware abstraction module to unpack the data in the target cache register to obtain the running data.
409、调用USB服务通过所述目标缓存寄存器将所述运行数据上传到外部设备,以供所述外部设备对所述运行数据进行数据分析。409. Call the USB service to upload the running data to the external device through the target cache register, so that the external device can perform data analysis on the running data.
其中,上述步骤401-步骤409的具体描述可以参见图3A所描述的数据传输控制方法的相关描述,在此不再赘述。Wherein, for the specific description of the above step 401-step 409, reference may be made to the relevant description of the data transmission control method described in FIG. 3A , which will not be repeated here.
举例说明下,具体实现中,可以按照执行如下步骤:For example, in the specific implementation, the following steps can be performed:
S1、打开相机;S1. Turn on the camera;
S2、配置相关定制的管道配置参数,并进行资源分配;S2. Configure relevant customized pipeline configuration parameters, and perform resource allocation;
S3、前端模块同样根据管道配置参数配置打包方式,即确保打包之后的数据大小和AP侧分配的缓存寄存器一致;S3. The front-end module also configures the packaging method according to the pipeline configuration parameters, that is, to ensure that the data size after packaging is consistent with the cache register allocated by the AP side;
S4、启动数据流,前端模块中的各个子模块进行本模块运行数据采集输出,前端模块的MIPI进行数据打包处理,各模块根据设置好的参数进行缓存寄存器轮转;S4, start the data flow, each sub-module in the front-end module performs data acquisition and output of the module operation, the MIPI of the front-end module performs data packaging processing, and each module performs cache register rotation according to the set parameters;
S5、AP通过硬件抽象模块接收到数据,并根据数据的打包方式进行数据解析处理,并对解析后的数据进行复制操作,将其实时复制到USB服务中;S5. The AP receives the data through the hardware abstraction module, and performs data analysis and processing according to the data packaging method, and performs a copy operation on the analyzed data, and copies it to the USB service in real time;
S6、USB服务对收到的数据进行向外部设备传输数据;S6, the USB service transmits the received data to the external device;
S7、基于以上步骤进行缓存寄存器的轮转,保证前端的监测数据实时打包传输给后端进行存储或向PC侧的传输处理。S7. Based on the above steps, the cache registers are rotated to ensure that the front-end monitoring data is packaged and transmitted to the back-end in real time for storage or transmission to the PC side.
进而,由于MIPI能够对运行数据进行虚拟视频设备处理,使得运行数据能够按照一定的帧率和大小输出给外部设备,进而,能够高效抓住前端模块的工作信息以供开发人员进行分析。Furthermore, because MIPI can process the operating data with a virtual video device, the operating data can be output to external devices at a certain frame rate and size, and then, the working information of the front-end module can be efficiently captured for developers to analyze.
与上述实施例一致地,请参阅图5,图5是本申请实施例提供的一种电子设备的结构示意图,如图所示,该电子设备包括前端模块、处理器、存储器、通信接口、以及一个或多个程序,其中,上述一个或多个程序被存储在上述存储器中,并且被配置由上述处理器或者前端模块执行,本申请实施例中,上述程序包括用于执行以下步骤的指令:Consistent with the above embodiment, please refer to FIG. 5. FIG. 5 is a schematic structural diagram of an electronic device provided by an embodiment of the present 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, wherein the above one or more programs are stored in the above memory and configured to be executed by the above processor or front-end module. In the embodiment of the present application, the above program includes instructions for performing the following steps:
设置虚拟视频设备,所述虚拟视频设备配置成按第一帧率封装所述电子设备的前端模块的运行数据;Setting 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;
利用所述虚拟视频设备按第二帧率将所述运行数据打包,得到目标数据包;Using the virtual video device to pack the running data at a second frame rate to obtain a target data packet;
将所述目标数据包发送给处理器;sending the target data packet to a processor;
至少部分地基于对所述第一帧率和/或所述第二帧率的值进行调节来确定所述前端模块是否存在异常。Determining whether the front-end module is abnormal is based at least in part on adjusting values of the first frame rate and/or the second frame rate.
可选的,在所述设置虚拟视频设备方面,上述程序包括用于执行以下步骤的指令:Optionally, in terms of setting the virtual video device, the above program includes instructions for performing the following steps:
通过所述前端模块的移动产业处理器接口MIPI设置所述虚拟视频设备。The virtual video device is set through the MIPI of the front-end module.
可选的,在所述设置虚拟视频设备之前,上述程序还包括用于执行以下步骤的指令:Optionally, before the virtual video device is set, the above program also includes an instruction for performing the following steps:
获取目标管道配置参数;Get target pipeline configuration parameters;
在所述利用所述虚拟视频设备按第二帧率将所述运行数据打包,得到目标数据包方面,上述程序还包括用于执行以下步骤的指令:In terms of using the virtual video device to pack the running data at the second frame rate to obtain the target data package, the above program also includes instructions for performing the following steps:
按照预设的管道配置参数与打包处理参数之间的映射关系,确定所述目标管道配置参数对应的目标打包处理参数,所述目标打包处理参数至少包括所述第二帧率;According to the preset mapping relationship between the pipeline configuration parameters and the packaging processing parameters, determine the target packaging processing parameters corresponding to the target pipeline configuration parameters, and the target packaging processing parameters include at least the second frame rate;
通过所述虚拟视频设备采用所述目标打包处理参数将所述运行数据打包,得到所述目标数据包。The virtual video device packs the running data by using the target packing processing parameters to obtain the target data package.
可选的,所述目标数据包包括至少一个数据包,每一数据包的数据大小均小于或等于由USB服务分配的多个缓存寄存器中的每一缓存寄存器的大小,所述缓存寄存器用于容纳 所述至少一个数据包中的数据包。Optionally, the target data packet includes at least one data packet, and the data size of each data packet is less than or equal to the size of each cache register in a plurality of cache registers allocated by the USB service, and the cache register is used for A data packet of the at least one data packet is accommodated.
可选的,在所述获取目标管道配置参数方面,上述程序包括用于执行以下步骤的指令:Optionally, in terms of acquiring target pipeline configuration parameters, the above program includes instructions for performing the following steps:
确定所述工程模式对应的目标调试内容;Determine the target debugging content corresponding to the engineering mode;
获取所述目标调试内容对应的属性信息;Obtain attribute information corresponding to the target debugging content;
按照预设的调试内容的属性信息与管道配置参数之间的映射关系,确定所述目标调试内容的属性信息对应的所述目标管道配置参数。The target pipeline configuration parameters corresponding to the attribute information of the target debugging content are determined according to the preset mapping relationship between the attribute information of the debugging content and the pipeline configuration parameters.
可选的,上述程序还包括用于执行以下步骤的指令:Optionally, the above program also includes instructions for performing the following steps:
通过所述处理器接收所述目标数据包,对所述目标数据包进行解包,得到所述运行数据,所述运行数据用于实现数据分析。The processor receives the target data packet, unpacks the target data packet to obtain the operation data, and the operation data is used for data analysis.
可选的,在所述对所述目标数据包进行解包,得到所述运行数据方面,上述程序包括用于执行以下步骤的指令:Optionally, in terms of unpacking the target data packet to obtain the operating data, the above program includes instructions for performing the following steps:
将所述目标数据包以逐帧形式复制到由USB服务分配的目标缓存寄存器中;Copying the target data packet frame by frame into the target buffer register allocated by the USB service;
对所述目标缓存寄存器中的数据进行解包,得到所述运行数据。Unpacking the data in the target cache register to obtain the running data.
可选的,在所述对所述目标数据包进行解包,得到所述运行数据之后,上述程序还包括用于执行以下步骤的指令:Optionally, after the target data packet is unpacked to obtain the running data, the above program further includes instructions for performing the following steps:
调用USB服务通过所述目标缓存寄存器将所述运行数据上传到外部设备,以供所述外部设备对所述运行数据进行数据分析。calling the USB service to upload the running data to the external device through the target cache register, so that the external device can analyze the running data.
可选的,上述程序还包括用于执行以下步骤的指令:Optionally, the above program also includes instructions for performing the following steps:
对所述目标缓存寄存器进行轮转操作,使得轮转之后的所述目标缓存寄存器继续用于容纳所述处理器接收到的数据包。A rotation operation is performed on the target cache register, so that the target cache register after rotation continues to be used for accommodating data packets received by the processor.
可选的,在所述设置虚拟视频设备之前,上述程序还包括用于执行以下步骤的指令:Optionally, before the virtual video device is set, the above program also includes an instruction for performing the following steps:
检测所述电子设备是否处于工程模式;Detecting whether the electronic device is in engineering mode;
在所述电子设备处于所述工程模式时,执行所述设置虚拟视频设备的步骤。When the electronic device is in the engineering mode, the step of setting a virtual video device is performed.
可选的,在所述设置虚拟视频设备之前,上述程序还包括用于执行以下步骤的指令:Optionally, before the virtual video device is set, the above program also includes an instruction for performing the following steps:
启用所述电子设备的相机,以调用硬件抽象模块,其中所述硬件抽象模块配置成:用于执行所述对所述目标数据包进行解包,得到所述运行数据的功能。Enabling the camera of the electronic device to call a hardware abstraction module, wherein the hardware abstraction module is configured to: perform the function of unpacking the target data packet to obtain the operation data.
上述主要从方法侧执行过程的角度对本申请实施例的方案进行了介绍。可以理解的是,电子设备为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所提供的实施例描述的各示例的单元及算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。The foregoing mainly introduces the solutions of the embodiments of the present application from the perspective of executing the process on the method side. It can be understood that, in order to realize the above functions, the electronic device includes hardware structures and/or software modules corresponding to each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of the examples described in the embodiments provided herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed by hardware or computer software drives hardware depends on the specific application and design constraints of the technical solution. Skilled artisans may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present application.
本申请实施例可以根据上述方法示例对电子设备进行功能单元的划分,例如,可以对应各个功能划分各个功能单元,也可以将两个或两个以上的功能集成在一个处理单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。需要说明的是,本申请实施例中对单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。The embodiment of the present application may divide the electronic device into functional units according to the above method example, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units. It should be noted that the division of units in the embodiment of the present application is schematic, and is only a logical function division, and there may be another division manner in actual implementation.
图6是本申请实施例中所涉及的数据传输控制装置600的功能单元组成框图。该数据传输控制装置600应用于电子设备,所述电子设备包括前端模块和处理器,所述装置包括:设置单元601、打包单元602、发送单元603和异常检测单元604,其中,FIG. 6 is a block diagram of functional units of a data transmission control device 600 involved in the embodiment of the present application. The data transmission control device 600 is applied to an electronic device, the electronic device includes a front-end module and a processor, and the device includes: a setting unit 601, a packaging unit 602, a sending unit 603 and an abnormality detection unit 604, wherein,
所述设置单元601,用于设置虚拟视频设备,所述虚拟视频设备配置成按第一帧率封装所述电子设备的前端模块的运行数据;The setting unit 601 is configured to set a virtual video device, the virtual video device is configured to encapsulate the operation data of the front-end module of the electronic device at a first frame rate;
所述打包单元602,用于利用所述虚拟视频设备按第二帧率将所述运行数据打包,得到目标数据包;The packaging unit 602 is configured to use the virtual video device to package the running data at a second frame rate to obtain a target data package;
所述发送单元603,用于将所述目标数据包发送给处理器;The sending unit 603 is configured to send the target data packet to a processor;
所述异常检测单元604,用于至少部分地基于对所述第一帧率和/或所述第二帧率的值进行调节来确定所述前端模块是否存在异常。The abnormality detection unit 604 is configured to determine whether there is an abnormality in the front-end module based at least in part on adjusting the value of the first frame rate and/or the second frame rate.
可选的,在所述设置虚拟视频设备方面,所述设置单元601具体用于:Optionally, in terms of setting the virtual video device, the setting unit 601 is specifically configured to:
通过所述前端模块的移动产业处理器接口MIPI设置所述虚拟视频设备。The virtual video device is set through the MIPI of the front-end module.
可选的,在所述设置虚拟视频设备之前,所述装置600还具体用于:Optionally, before the setting of the virtual video device, the apparatus 600 is further specifically configured to:
获取目标管道配置参数;Get target pipeline configuration parameters;
在所述利用所述虚拟视频设备按第二帧率将所述运行数据打包,得到目标数据包方面,所述打包单元602具体用于:In terms of using the virtual video device to pack the running data at a second frame rate to obtain a target data packet, the packing unit 602 is specifically used for:
按照预设的管道配置参数与打包处理参数之间的映射关系,确定所述目标管道配置参数对应的目标打包处理参数,所述目标打包处理参数至少包括所述第二帧率;According to the preset mapping relationship between the pipeline configuration parameters and the packaging processing parameters, determine the target packaging processing parameters corresponding to the target pipeline configuration parameters, and the target packaging processing parameters include at least the second frame rate;
通过所述虚拟视频设备采用所述目标打包处理参数将所述运行数据打包,得到所述目标数据包。The virtual video device packs the running data by using the target packing processing parameters to obtain the target data package.
可选的,所述目标数据包包括至少一个数据包,每一数据包的数据大小均小于或等于由USB服务分配的多个缓存寄存器中的每一缓存寄存器的大小,所述缓存寄存器用于容纳所述至少一个数据包中的数据包。Optionally, the target data packet includes at least one data packet, and the data size of each data packet is less than or equal to the size of each cache register in a plurality of cache registers allocated by the USB service, and the cache register is used for A data packet of the at least one data packet is accommodated.
可选的,在所述获取目标管道配置参数方面,所述装置600具体用于:Optionally, in terms of acquiring target pipeline configuration parameters, the device 600 is specifically used to:
确定目标调试内容;Determine the target debugging content;
获取所述目标调试内容对应的属性信息;Obtain attribute information corresponding to the target debugging content;
按照预设的调试内容的属性信息与管道配置参数之间的映射关系,确定所述目标调试内容的属性信息对应的所述目标管道配置参数。The target pipeline configuration parameters corresponding to the attribute information of the target debugging content are determined according to the preset mapping relationship between the attribute information of the debugging content and the pipeline configuration parameters.
可选的,所述装置600还具体用于:Optionally, the device 600 is also specifically used for:
通过所述处理器接收所述目标数据包,对所述目标数据包进行解包,得到所述运行数据,所述运行数据用于实现数据分析。The processor receives the target data packet, unpacks the target data packet to obtain the operation data, and the operation data is used for data analysis.
可选的,在所述对所述目标数据包进行解包,得到所述运行数据方面,所述装置600具体用于:Optionally, in the aspect of unpacking the target data packet to obtain the operation data, the device 600 is specifically used for:
将所述目标数据包以逐帧形式复制到由USB服务分配的目标缓存寄存器中;Copying the target data packet frame by frame into the target buffer register allocated by the USB service;
对所述目标缓存寄存器中的数据进行解包,得到所述运行数据。Unpacking the data in the target cache register to obtain the running data.
可选的,在所述对所述目标数据包进行解包,得到所述运行数据之后,所述装置600还具体用于:Optionally, after the target data packet is unpacked to obtain the operation data, the device 600 is further specifically configured to:
调用所述USB服务通过所述目标缓存寄存器将所述运行数据上传到外部设备,以供所述外部设备对所述运行数据进行数据分析。calling the USB service to upload the running data to the external device through the target buffer register, so that the external device can analyze the running data.
可选的,所述装置600还具体用于:Optionally, the device 600 is also specifically used for:
对所述目标缓存寄存器进行轮转操作,使得轮转之后的所述目标缓存寄存器继续用于容纳所述处理器接收到的数据包。A rotation operation is performed on the target cache register, so that the target cache register after rotation continues to be used for accommodating data packets received by the processor.
可选的,在所述设置虚拟视频设备之前,所述装置600还具体用于:Optionally, before the setting of the virtual video device, the apparatus 600 is further specifically configured to:
启用所述电子设备的相机,以调用硬件抽象模块,其中所述硬件抽象模块配置成:用于执行所述对所述目标数据包进行解包,得到所述运行数据的功能。Enabling the camera of the electronic device to call a hardware abstraction module, wherein the hardware abstraction module is configured to: perform the function of unpacking the target data packet to obtain the operation data.
需要注意的是,本申请实施例所描述的电子设备是以功能单元的形式呈现。这里所使用的术语“单元”应当理解为尽可能最宽的含义,用于实现各个“单元”所描述功能的对象例如可以是集成电路ASIC,单个电路,用于执行一个或多个软件或固件程序的处理器(共享的、专用的或芯片组)和存储器,组合逻辑电路,和/或提供实现上述功能的其他合适的组 件。It should be noted that the electronic devices described in the embodiments of the present application are presented in the form of functional units. The term "unit" used here should be understood as the broadest meaning possible. The object used to realize the functions described by each "unit" can be, for example, an integrated circuit ASIC, a single circuit, used to execute one or more software or firmware Processors (shared, dedicated, or chipsets) and memories of programs, combinational logic circuits, and/or other suitable components that provide the functions described above.
其中,设置单元601、打包单元602和发送单元603可以是前端模块,异常检测单元604可以是处理器,基于上述单元模块能够实现上述任一方法的功能或者步骤。Wherein, the setting unit 601, the packaging unit 602, and the sending unit 603 may be front-end modules, and the abnormality detection unit 604 may be a processor, based on the above-mentioned unit modules, the functions or steps of any of the above-mentioned methods can be realized.
本实施例还提供了一种计算机可读存储介质,其中,该计算机可读存储介质存储用于电子数据交换的计算机程序,其中,上述计算机程序使得计算机执行如本申请实施例,以用于实现上述实施例中的任一方法。This embodiment also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for electronic data exchange, wherein the above-mentioned computer program enables the computer to execute the embodiment of the present application to implement Any method in the above embodiments.
本实施例还提供了一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行上述相关步骤,以实现上述实施例中的任一方法。This embodiment also provides a computer program product, which, when running on a computer, causes the computer to execute the above-mentioned related steps, so as to implement any method in the above-mentioned embodiments.
另外,本申请的实施例还提供一种装置,这个装置具体可以是芯片,组件或模块,该装置可包括相连的处理器和存储器;其中,存储器用于存储计算机执行指令,当装置运行时,处理器可执行存储器存储的计算机执行指令,以使芯片执行上述各方法实施例中的任一方法。In addition, an embodiment of the present application also provides a device, which may specifically be a chip, a component or a module, and the device may include a connected processor and a memory; wherein the memory is used to store computer-executable instructions, and when the device is running, The processor can execute the computer-executable instructions stored in the memory, so that the chip executes any method in the above method embodiments.
其中,本实施例提供的电子设备、计算机存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。Wherein, the electronic device, computer storage medium, computer program product or chip provided in this embodiment is all used to execute the corresponding method provided above, therefore, the beneficial effects it can achieve can refer to the corresponding method provided above The beneficial effects in the method will not be repeated here.
通过以上实施方式的描述,所属领域的技术人员可以了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。Through the description of the above embodiments, those skilled in the art can understand that for the convenience and brevity of the description, only the division of the above functional modules is used as an example for illustration. In practical applications, the above functions can be assigned by different Completion of functional modules means that the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed devices and methods may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or It may be integrated into another device, or some features may be omitted, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。A unit described as a separate component may or may not be physically separated, and a component shown as a unit may be one physical unit or multiple physical units, which may be located in one place or distributed to multiple different places. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If an integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the software product is stored in a storage medium Among them, several instructions are included to make a device (which may be a single-chip microcomputer, a chip, etc.) or a processor (processor) execute all or part of the steps of the methods in various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes such as U disk, mobile hard disk, read only memory (ROM), random access memory (random access memory, RAM), magnetic disk or optical disk.
以上内容,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。The above content is only the specific implementation of the application, but the scope of protection of the application is not limited thereto. Anyone familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the application, and should covered within the scope of protection of this application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims (20)

  1. 一种数据传输控制方法,用于对电子设备进行测试,其特征在于,所述方法包括:A data transmission control method for testing electronic equipment, characterized in that the method includes:
    设置虚拟视频设备,所述虚拟视频设备配置成按第一帧率封装所述电子设备的前端模块的运行数据;Setting 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;
    利用所述虚拟视频设备按第二帧率将所述运行数据打包,得到目标数据包;Using the virtual video device to pack the running data at a second frame rate to obtain a target data packet;
    将所述目标数据包发送给处理器;sending the target data packet to a processor;
    至少部分地基于对所述第一帧率和/或所述第二帧率的值进行调节来确定所述前端模块是否存在异常。Determining whether the front-end module is abnormal is based at least in part on adjusting values of the first frame rate and/or the second frame rate.
  2. 根据权利要求1所述的方法,其特征在于,所述设置虚拟视频设备,包括:The method according to claim 1, wherein said setting a virtual video device comprises:
    通过所述前端模块的移动产业处理器接口MIPI设置所述虚拟视频设备。The virtual video device is set through the MIPI of the front-end module.
  3. 根据权利要求1或2所述的方法,其特征在于,在所述设置虚拟视频设备之前,所述方法还包括:The method according to claim 1 or 2, wherein, before the setting of the virtual video device, the method further comprises:
    获取目标管道配置参数;Get target pipeline configuration parameters;
    其中,所述利用所述虚拟视频设备按第二帧率将所述运行数据打包,得到目标数据包,包括:Wherein, said using said virtual video device to pack said running data according to a second frame rate to obtain a target data package, including:
    按照预设的管道配置参数与打包处理参数之间的映射关系,确定所述目标管道配置参数对应的目标打包处理参数,所述目标打包处理参数至少包括所述第二帧率;According to the preset mapping relationship between the pipeline configuration parameters and the packaging processing parameters, determine the target packaging processing parameters corresponding to the target pipeline configuration parameters, and the target packaging processing parameters include at least the second frame rate;
    通过所述虚拟视频设备采用所述目标打包处理参数将所述运行数据打包,得到所述目标数据包。The virtual video device packs the running data by using the target packing processing parameters to obtain the target data package.
  4. 根据权利要求3所述的方法,其特征在于,所述目标数据包包括至少一个数据包,每一数据包的数据大小均小于或等于由USB服务分配的多个缓存寄存器中的每一缓存寄存器的大小,所述缓存寄存器用于容纳所述至少一个数据包中的数据包。The method according to claim 3, wherein the target data packet comprises at least one data packet, and the data size of each data packet is less than or equal to each buffer register in a plurality of buffer registers allocated by the USB service The size of the cache register is used to accommodate the data packets in the at least one data packet.
  5. 根据权利要求3或4所述的方法,其特征在于,所述获取目标管道配置参数,包括:The method according to claim 3 or 4, wherein said acquiring target pipeline configuration parameters comprises:
    确定目标调试内容;Determine the target debugging content;
    获取所述目标调试内容的属性信息;Obtain attribute information of the target debugging content;
    按照预设的调试内容的属性信息与管道配置参数之间的映射关系,确定所述目标调试内容的属性信息对应的所述目标管道配置参数。The target pipeline configuration parameters corresponding to the attribute information of the target debugging content are determined according to the preset mapping relationship between the attribute information of the debugging content and the pipeline configuration parameters.
  6. 根据权利要求1-5任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1-5, wherein the method further comprises:
    通过所述处理器接收所述目标数据包,对所述目标数据包进行解包,得到所述运行数据,所述运行数据用于实现数据分析。The processor receives the target data packet, unpacks the target data packet to obtain the operation data, and the operation data is used for data analysis.
  7. 根据权利要求1-6任一项所述的方法,其特征在于,所述对所述目标数据包进行解包,得到所述运行数据,包括:The method according to any one of claims 1-6, wherein the unpacking the target data packet to obtain the operating data includes:
    将所述目标数据包以逐帧形式复制到由USB服务分配的目标缓存寄存器中;Copying the target data packet frame by frame into the target buffer register allocated by the USB service;
    对所述目标缓存寄存器中的数据进行解包,得到所述运行数据。Unpacking the data in the target cache register to obtain the running data.
  8. 根据权利要求7所述的方法,其特征在于,在所述对所述目标数据包进行解包,得到所述运行数据之后,所述方法还包括:The method according to claim 7, characterized in that, after the target data packet is unpacked to obtain the operating data, the method further comprises:
    调用所述USB服务通过所述目标缓存寄存器将所述运行数据上传到外部设备,以供所述外部设备对所述运行数据进行数据分析。calling the USB service to upload the running data to the external device through the target buffer register, so that the external device can analyze the running data.
  9. 根据权利要求8所述的方法,其特征在于,所述方法还包括:The method according to claim 8, characterized in that the method further comprises:
    对所述目标缓存寄存器进行轮转操作,使得轮转之后的所述目标缓存寄存器继续用于容纳所述处理器接收到的数据包。A rotation operation is performed on the target cache register, so that the target cache register after rotation continues to be used for accommodating data packets received by the processor.
  10. 根据权利要求1-9任一项所述的方法,其特征在于,在所述设置虚拟视频设备之前,所述方法还包括:The method according to any one of claims 1-9, wherein, before setting the virtual video device, the method further comprises:
    启用所述电子设备的相机,以调用硬件抽象模块,其中所述硬件抽象模块配置成:用 于执行所述对所述目标数据包进行解包,得到所述运行数据的功能。Enabling the camera of the electronic device 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 operation data.
  11. 一种数据传输控制装置,其特征在于,应用于电子设备,所述电子设备包括前端模块和处理器,所述装置包括:设置单元、打包单元、发送单元和异常检测单元,其中,A data transmission control device, characterized in that it is applied to electronic equipment, the electronic equipment includes a front-end module and a processor, and the device includes: a setting unit, a packaging unit, a sending unit, and an abnormality detection unit, wherein,
    所述设置单元,用于设置虚拟视频设备,所述虚拟视频设备配置成按第一帧率封装所述电子设备的前端模块的运行数据;The setting unit is configured to set a virtual video device, and the virtual video device is configured to encapsulate the operation data of the front-end module of the electronic device at a first frame rate;
    所述打包单元,用于利用所述虚拟视频设备按第二帧率将所述运行数据打包,得到目标数据包;The packaging unit is configured to use the virtual video device to package the running data at a second frame rate to obtain a target data package;
    所述发送单元,用于将所述目标数据包发送给处理器;The sending unit is configured to send the target data packet to a processor;
    所述异常检测单元,用于至少部分地基于对所述第一帧率和/或所述第二帧率的值进行调节来确定所述前端模块是否存在异常。The abnormality detection unit is configured to determine whether there is an abnormality in the front-end module based at least in part on adjusting the value of the first frame rate and/or the second frame rate.
  12. 根据权利要求11所述的装置,其特征在于,在所述设置虚拟视频设备方面,所述设置单元具体用于:The device according to claim 11, wherein, in terms of setting the virtual video device, the setting unit is specifically used for:
    通过所述前端模块的移动产业处理器接口MIPI设置所述虚拟视频设备。The virtual video device is set through the MIPI of the front-end module.
  13. 根据权利要求11或12所述的装置,其特征在于,在所述设置虚拟视频设备之前,所述装置还具体用于:The device according to claim 11 or 12, wherein, before setting the virtual video device, the device is further specifically used for:
    获取目标管道配置参数;Get target pipeline configuration parameters;
    其中,在所述利用所述虚拟视频设备按第二帧率将所述运行数据打包,得到目标数据包方面,所述打包单元具体用于:Wherein, in the aspect of using the virtual video device to pack the running data according to the second frame rate to obtain the target data packet, the packing unit is specifically used for:
    按照预设的管道配置参数与打包处理参数之间的映射关系,确定所述目标管道配置参数对应的目标打包处理参数,所述目标打包处理参数至少包括所述第二帧率;According to the preset mapping relationship between the pipeline configuration parameters and the packaging processing parameters, determine the target packaging processing parameters corresponding to the target pipeline configuration parameters, and the target packaging processing parameters include at least the second frame rate;
    通过所述虚拟视频设备采用所述目标打包处理参数将所述运行数据打包,得到所述目标数据包。The virtual video device packs the running data by using the target packing processing parameters to obtain the target data package.
  14. 根据权利要求13所述的装置,其特征在于,所述目标数据包包括至少一个数据包,每一数据包的数据大小均小于或等于由USB服务分配的多个缓存寄存器中的每一缓存寄存器的大小,所述缓存寄存器用于容纳所述至少一个数据包中的数据包。The device according to claim 13, wherein the target data packet comprises at least one data packet, and the data size of each data packet is less than or equal to each buffer register in a plurality of buffer registers allocated by the USB service The size of the cache register is used to accommodate the data packets in the at least one data packet.
  15. 根据权利要求13或14所述的装置,其特征在于,在所述获取目标管道配置参数方面,所述装置具体用于:The device according to claim 13 or 14, wherein, in terms of acquiring target pipeline configuration parameters, the device is specifically used for:
    确定目标调试内容;Determine the target debugging content;
    获取所述目标调试内容的属性信息;Obtain attribute information of the target debugging content;
    按照预设的调试内容的属性信息与管道配置参数之间的映射关系,确定所述目标调试内容的属性信息对应的所述目标管道配置参数。The target pipeline configuration parameters corresponding to the attribute information of the target debugging content are determined according to the preset mapping relationship between the attribute information of the debugging content and the pipeline configuration parameters.
  16. 根据权利要求10-15任一项所述的装置,其特征在于,所述装置还具体用于:The device according to any one of claims 10-15, wherein the device is further specifically used for:
    通过所述处理器接收所述目标数据包,对所述目标数据包进行解包,得到所述运行数据,所述运行数据用于实现数据分析。The processor receives the target data packet, unpacks the target data packet to obtain the operation data, and the operation data is used for data analysis.
  17. 一种电子设备,包括前端模块和处理器,其特征在于:An electronic device, comprising a front-end module and a processor, characterized in that:
    所述前端模块配置成:The front-end module is configured to:
    设置一虚拟视频设备以按第一帧率封装所述前端模块的运行数据;Setting a virtual video device to encapsulate the operation data of the front-end module at a first frame rate;
    利用所述虚拟视频设备按第二帧率将所述运行数据打包,得到目标数据包;以及Packing the running data at a second frame rate by using the virtual video device to obtain a target data packet; and
    将所述目标数据包发送给所述处理器;sending the target data packet to the processor;
    所述处理器配置成:The processor is configured to:
    至少部分地基于对所述第一帧率和/或所述第二帧率的值进行调节来确定所述前端模块是否存在异常。Determining whether the front-end module is abnormal is based at least in part on adjusting values of the first frame rate and/or the second frame rate.
  18. 一种电子设备,其特征在于,所述电子设备包括前端模块、处理器、存储器,所述存储器用于存储一个或多个程序,并且被配置由所述处理器或者所述前端模块执行,所 述程序包括用于执行如权利要求1-10任一项所述的方法中的步骤的指令。An electronic device, characterized in that the electronic device includes a front-end module, a processor, and a memory, the memory is used to store one or more programs, and is configured to be executed by the processor or the front-end module, the The program includes instructions for executing the steps in the method according to any one of claims 1-10.
  19. 一种计算机可读存储介质,其特征在于,存储用于电子数据交换的计算机程序,其中,所述计算机程序使得计算机执行如权利要求1-10任一项所述的方法。A computer-readable storage medium, characterized by storing a computer program for electronic data exchange, wherein the computer program causes a computer to execute the method according to any one of claims 1-10.
  20. 一种计算机程序产品,其特征在于,所述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,所述计算机程序可操作来使计算机执行如权利要求1-9任一项所述的方法。A computer program product, characterized in that the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute the computer program described in any one of claims 1-9. described method.
PCT/CN2022/095793 2021-08-09 2022-05-28 Data transmission control method and related apparatus WO2023016059A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110911104.8 2021-08-09
CN202110911104.8A CN115706769A (en) 2021-08-09 2021-08-09 Data transmission control method and related device

Publications (1)

Publication Number Publication Date
WO2023016059A1 true WO2023016059A1 (en) 2023-02-16

Family

ID=85180000

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/095793 WO2023016059A1 (en) 2021-08-09 2022-05-28 Data transmission control method and related apparatus

Country Status (2)

Country Link
CN (1) CN115706769A (en)
WO (1) WO2023016059A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117156088A (en) * 2023-04-21 2023-12-01 荣耀终端有限公司 Image processing method and related device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106713571A (en) * 2015-08-20 2017-05-24 广州爱九游信息技术有限公司 Mobile terminal and method for testing performance of game engine application
CN110162451A (en) * 2019-04-22 2019-08-23 腾讯科技(深圳)有限公司 A kind of method for analyzing performance, device, server and storage medium
WO2020000489A1 (en) * 2018-06-30 2020-01-02 华为技术有限公司 Pcie sending and receiving method, apparatus, device and system
CN112230758A (en) * 2020-11-09 2021-01-15 腾讯科技(深圳)有限公司 Frame rate adjustment method, device, equipment and computer readable storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106713571A (en) * 2015-08-20 2017-05-24 广州爱九游信息技术有限公司 Mobile terminal and method for testing performance of game engine application
WO2020000489A1 (en) * 2018-06-30 2020-01-02 华为技术有限公司 Pcie sending and receiving method, apparatus, device and system
CN110162451A (en) * 2019-04-22 2019-08-23 腾讯科技(深圳)有限公司 A kind of method for analyzing performance, device, server and storage medium
CN112230758A (en) * 2020-11-09 2021-01-15 腾讯科技(深圳)有限公司 Frame rate adjustment method, device, equipment and computer readable storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117156088A (en) * 2023-04-21 2023-12-01 荣耀终端有限公司 Image processing method and related device
CN117156088B (en) * 2023-04-21 2024-06-11 荣耀终端有限公司 Image processing method and related device

Also Published As

Publication number Publication date
CN115706769A (en) 2023-02-17

Similar Documents

Publication Publication Date Title
CN113726950B (en) Image processing method and electronic equipment
WO2020093988A1 (en) Image processing method and electronic device
WO2022127787A1 (en) Image display method and electronic device
WO2022042285A1 (en) Method for displaying interface of application program and electronic device
US11995317B2 (en) Method and apparatus for adjusting memory configuration parameter
WO2022100141A1 (en) Plug-in management method, system and apparatus
CN110636554B (en) Data transmission method and device
WO2022001258A1 (en) Multi-screen display method and apparatus, terminal device, and storage medium
CN115756268A (en) Cross-device interaction method and device, screen projection system and terminal
CN113641271A (en) Application window management method, terminal device and computer readable storage medium
CN113986070A (en) Quick viewing method for application card and electronic equipment
WO2023016059A1 (en) Data transmission control method and related apparatus
CN115119048B (en) Video stream processing method and electronic equipment
WO2023125518A1 (en) Image encoding method and device
US20240211509A1 (en) Image Data Invoking Method and System for Application, Electronic Device, and Storage Medium
WO2022121988A1 (en) Display synchronization method, electronic device, and readable storage medium
WO2022170866A1 (en) Data transmission method and apparatus, and storage medium
WO2022033355A1 (en) Mail processing method and electronic device
WO2021238376A1 (en) Function pack loading method and apparatus, and server and electronic device
CN112783418B (en) Method for storing application program data and mobile terminal
CN114630152A (en) Parameter transmission method and device for image processor and storage medium
CN114003241A (en) Interface adaptation display method and system of application program, electronic device and medium
CN114816973A (en) Method and device for debugging codes, electronic equipment and readable storage medium
CN116266159B (en) Page fault exception handling method and electronic equipment
CN116709609B (en) Message delivery method, electronic device and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22855045

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE