Data transmission method, data receiving method, device and storage medium
By controlling the sensor's output frequency and time allocation method, complete data transmission was achieved under time-division multiplexing of MIPI signals, solving the problem of sensor exposure time compression and improving image quality in low-light environments.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HANGZHOU HUACHENG SOFTWARE TECH CO LTD
- Filing Date
- 2026-04-29
- Publication Date
- 2026-06-05
AI Technical Summary
When MIPI signals are time-division multiplexed, existing technologies cannot transmit effective data completely, resulting in the compression of the effective exposure time of each sensor, which affects the image signal-to-noise ratio and imaging quality in low-light environments.
By controlling N sensors to output data at a target sampling frequency and allocating their output windows to a transmission cycle according to a preset allocation method, the sensors transmit data through the data transmission channel in a staggered manner within the transmission cycle, ensuring that the effective data output time of each sensor does not overlap, and achieving non-alternating frame dropping processing by using a preset time interval.
It enables the complete transmission of effective data from each sensor without reducing sensor exposure time or increasing hardware costs, thereby improving image signal-to-noise ratio and imaging quality in low-light environments.
Smart Images

Figure CN122160408A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing, and more specifically, to a data transmission method, a data receiving method, an apparatus, and a storage medium. Background Technology
[0002] In related technologies, when using Mobile Industry Processor Interface (MIPI) time-division multiplexing of multiple signals, to achieve the transmission of multiple data streams on a single MIPI channel, it is necessary to perform "alternating frame dropping" processing on the data output from multiple sensors. For example, when two sensors output 30fps data, alternating frame dropping will reduce the frame rate of each video stream to 15fps, forcibly compressing the effective exposure time of each sensor to approximately 33ms. This severely restricts the signal-to-noise ratio and image quality in low-light environments. Therefore, it is evident that related technologies suffer from the technical problem of being unable to completely transmit effective data.
[0003] There is currently no effective solution to the aforementioned problems in the relevant technologies. Summary of the Invention
[0004] This application provides a data transmission method, a data reception method, an apparatus, and a storage medium to at least solve the technical problem in the related art of being unable to completely transmit valid data.
[0005] According to one aspect of the embodiments of this application, a data transmission method is provided, comprising: controlling N sensors to output data at a target sampling frequency, wherein N is a natural number greater than 1; and allocating the output windows of the valid data output by the N sensors to a transmission cycle according to a preset allocation method, wherein the preset allocation method is used to instruct the N sensors to transmit their respective output valid data through a data transmission channel in a sequentially interleaved manner within the transmission cycle, wherein the time of each sensor outputting the valid data does not overlap, the transmission rate of the data transmission channel is determined based on the target sampling frequency, and the N sensors output their respective valid data sequentially at preset time intervals.
[0006] In an exemplary embodiment, before controlling N sensors to output data at a target sampling frequency, the method further includes: setting a data acquisition duration for each sensor based on the target sampling frequency, wherein the data acquisition duration is the duration for acquiring the valid data.
[0007] In an exemplary embodiment, after setting the data acquisition duration of each sensor based on the target sampling frequency, the method further includes: determining the preset time interval based on the data acquisition duration, wherein the preset time interval is the time interval between the N sensors outputting the valid data without time overlap, and the time interval between the N sensors transmitting their output valid data through the data transmission channel in a staggered manner within the transmission period.
[0008] In an exemplary embodiment, controlling N sensors to output data at a target sampling frequency includes: controlling a first sensor to output first valid data at the target sampling frequency, wherein the first sensor is any one of the N sensors; when it is determined that the first sensor has output the first valid data, controlling a second sensor to output second valid data at the target sampling frequency, and simultaneously controlling the first sensor to output first filler data of the first valid data according to a preset timing protocol during the same period when the second sensor outputs the second valid data, wherein the second sensor is a sensor among the N sensors that is to output the valid data after the first sensor; and simultaneously controlling the second sensor to output second filler data of the second valid data according to the preset timing protocol during the same period when the first sensor transmits the first valid data to the data transmission channel.
[0009] In an exemplary embodiment, the output windows of the N sensors that output valid data are allocated to a single transmission cycle according to a preset allocation method, including: when it is determined that the first sensor has output the first valid data, controlling the first sensor to transmit the first valid data to the data transmission channel; when the second sensor has output the second valid data and the first sensor has simultaneously output the fill data of the first valid data, controlling the second sensor to transmit the second valid data to the data transmission channel, and controlling the first sensor to transmit the first fill data to the data transmission channel; when it is determined that the second sensor has output the second fill data, controlling the second sensor to transmit the second fill data to the data transmission channel; wherein, the time period for the first sensor to transmit the first valid data and the first fill data, and the time period for the second sensor to transmit the second valid data and the second fill data constitute one transmission cycle.
[0010] According to another aspect of the embodiments of this application, a data receiving method is provided, comprising: receiving valid data transmitted by N sensors through a data transmission channel, wherein N is a natural number greater than 1, the output windows of the N sensors outputting the valid data are allocated to windows within a transmission cycle according to a preset allocation method, the preset allocation method being used to instruct the N sensors to transmit their respective output valid data through the data transmission channel in a sequentially interleaved manner within the transmission cycle, the time of each sensor outputting the valid data not overlapping, the transmission rate of the data transmission channel being determined based on the target sampling frequency of the N sensors, and the N sensors sequentially outputting their respective valid data at preset time intervals.
[0011] In one exemplary embodiment, before receiving valid data output from N sensors through a data transmission channel, the method further includes: determining the transmission rate as the product of the target sampling frequency and the N.
[0012] In one exemplary embodiment, receiving valid data transmitted by N sensors through a data transmission channel includes: receiving the data transmitted by the N sensors through the data transmission channel, wherein the data transmitted by the N sensors are data output by the N sensors respectively at the target sampling frequency, and the data transmitted by the N sensors includes the valid data and padding data transmitted by each of the N sensors; and parsing the data transmitted by the N sensors to receive the valid data from the data transmitted by the N sensors.
[0013] In one exemplary embodiment, parsing the data transmitted by the N sensors to receive the valid data from the data transmitted by the N sensors includes: receiving first valid data transmitted by a first sensor, wherein the first sensor is any one of the N sensors; if it is identified that first fill data transmitted by the first sensor and second valid data transmitted by the second sensor arrive simultaneously, discarding the first fill data and receiving the second valid data, wherein the second sensor is one of the N sensors that is to transmit the valid data after the first sensor, and the first fill data and the second valid data are data transmitted simultaneously; if it is identified that third valid data transmitted by the first sensor and second fill data output by the second sensor arrive simultaneously, discarding the second fill data and receiving the third valid data, wherein the second fill data and the third valid data are data output simultaneously after the second sensor outputs the second valid data; wherein the time period for the first sensor to transmit the first valid data and the first fill data, and the time period for the second sensor to transmit the second valid data and the second fill data constitute one transmission period.
[0014] According to another aspect of the embodiments of this application, a data transmission device is also provided, comprising: a control module for controlling N sensors to output data at a target sampling frequency, wherein N is a natural number greater than 1; and an allocation module for allocating the output windows of the valid data output by the N sensors to a transmission cycle according to a preset allocation method, wherein the preset allocation method is used to instruct the N sensors to transmit their respective output valid data through a data transmission channel in a sequentially interleaved manner within the transmission cycle, wherein the time of each sensor outputting the valid data does not overlap, the transmission rate of the data transmission channel is determined based on the target sampling frequency, and the N sensors output their respective valid data sequentially at preset time intervals.
[0015] According to another aspect of the embodiments of this application, a data transmission apparatus is also provided, comprising: a receiving module, configured to receive valid data transmitted by N sensors through a data transmission channel, wherein N is a natural number greater than 1, the output windows of the N sensors outputting the valid data are allocated to windows within a transmission cycle according to a preset allocation method, the preset allocation method being used to instruct the N sensors to transmit their respective output valid data through the data transmission channel in a sequentially interleaved manner within the transmission cycle, the time of each sensor outputting the valid data not overlapping, the transmission rate of the data transmission channel being determined based on the target sampling frequency of the N sensors, and the N sensors sequentially outputting their respective valid data at preset time intervals.
[0016] According to another aspect of the embodiments of this application, a computer-readable storage medium, program product, or computer program is provided, the computer-readable storage medium, program product, or computer program including computer instructions. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, causing the computer device to perform the steps in any of the method embodiments described above.
[0017] According to another aspect of the embodiments of this application, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to perform the steps of any of the above method embodiments through the computer program.
[0018] By allocating the output windows of N sensors that output valid data to a single transmission cycle according to a preset allocation method, the N sensors can output valid data sequentially at preset time intervals. That is, the time when each sensor outputs its own valid data does not overlap. While reusing the data transmission channel, there is no need to perform alternating frame dropping processing on the valid data output by the N sensors. The valid data of each sensor can be transmitted completely without causing the loss of valid data. Therefore, the problem of incomplete transmission of valid data can be solved, and the effect of ensuring complete data transmission can be achieved. Attached Figure Description
[0019] Figure 1 This is a schematic diagram illustrating an application scenario of a data transmission method according to an embodiment of this application;
[0020] Figure 2 This is a flowchart illustrating an optional data transmission method according to an embodiment of this application;
[0021] Figure 3 This is a schematic diagram of the sensor data transmission process according to an embodiment of this application;
[0022] Figure 4 This is a flowchart illustrating an optional data receiving method according to an embodiment of this application;
[0023] Figure 5 This is a method for improving the low-light imaging effect of a multi-view camera according to an embodiment of this application;
[0024] Figure 6 This is a structural block diagram of an optional data transmission device according to an embodiment of this application;
[0025] Figure 7 This is a structural block diagram of an optional data receiving device according to an embodiment of this application;
[0026] Figure 8 This is a computer system architecture block diagram of an optional electronic device according to an embodiment of this application. Detailed Implementation
[0027] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0028] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0029] According to one aspect of the embodiments of this application, a data transmission method is provided. Optionally, in this embodiment, the above-described data transmission method may be applied, but is not limited to, to applications such as... Figure 1The hardware environment shown includes terminal device 102 and server 104. Server 104 can be connected to terminal device 102 via a network and can be used to provide services (e.g., application services, etc.) to terminal device 102 or clients installed on terminal device 102. A database can be set up on server 104 or independently of server 104 to provide data storage services for server 104.
[0030] The aforementioned network may include, but is not limited to, at least one of the following: wired network and wireless network. The aforementioned wired network may include, but is not limited to, at least one of the following: wide area network (WAN), metropolitan area network (MAN), and local area network (LAN). The aforementioned wireless network may include, but is not limited to, at least one of the following: Wireless Fidelity (WIFI) and Bluetooth. Terminal device 102 may be, but is not limited to, a personal computer (PC), mobile phone, tablet computer, etc. Server 104 may be, but is not limited to, a cloud server, server cluster, or other server types.
[0031] The data transmission method of this application embodiment can be executed by server 104, terminal device 102, or jointly by server 104 and terminal device 102. Alternatively, the data transmission method of this application embodiment can be executed by a client installed on terminal device 102.
[0032] Figure 2 This is a flowchart illustrating an optional data transmission method according to an embodiment of this application, such as... Figure 2 As shown, the process of this method may include the following steps:
[0033] Step S202: Control N sensors to output data at the target sampling frequency, where N is a natural number greater than 1;
[0034] The data transmission method in this embodiment can be applied to building / park intelligent security monitoring systems, intelligent vehicle and driver status monitoring systems, industrial vision and nighttime dark production line inspection, smart home and smart door locks / home cameras, and other fields. Specifically, it can be applied to scenarios where imaging is performed using binocular / multi-view cameras in low-light environments. Cameras are common electronic devices in daily life. Their working principle involves acquiring images through an image sensor and transmitting them to the main control chip via a Mobile Industry Processor Interface (MIPI) for image processing, encoding, and storage. MIPI can be understood as a commonly used interface standard in signal transmission, widely used in common camera serial interfaces (CSI), display interfaces, RF interfaces, microphone / speaker interfaces, etc. Typically, one MIPI interface is used for one video transmission, but for cost considerations, a solution has emerged that allows one MIPI interface to transmit two video streams. This solution significantly reduces the production cost of cameras and facilitates the widespread adoption of camera products. The existing solution involves two video data channels, each outputting 30fps data. Half of the data is then discarded alternately, and the MIPI data interface is reused to achieve 15fps data transmission for each channel. The MIPI receiver then demultiplexes the data alternately to restore two independent 15fps video signals. However, when two sensors are connected, half of the data is wasted due to time-division multiplexing. Therefore, when transmitting two 15fps video signals, the maximum exposure time for both channels is only 1000 / 15 / 2 = 33ms, resulting in insufficient sensor exposure and affecting image quality.
[0035] In at least one embodiment, the sensor described above may be, but is not limited to, an image sensor, and may also be a line scan image sensor, a spectral sensor / multispectral / hyperspectral imaging sensor, etc., as long as it is a line scan data sensor with exposure-readout-transmission timing characteristics. The number of sensors N may be 2, 3, or 6, etc., and this application does not limit this. For example, when N is 2 and the sensor is an image sensor, both image sensors acquire images at the same target sampling frequency; when N is 4 and the sensor is a spectral sensor, all four spectral sensors acquire spectral response data at the same target sampling frequency.
[0036] In at least one embodiment, the target sampling frequency can be, but is not limited to, the sensor's frame rate. For example, in an image acquisition scenario, the frequency at which a sensor senses light and reads out one frame of an image, the sampling frequency of the image sensor can be set to 15fps, 30fps, etc. It should be noted that the target sampling frequency is the same for all N sensors.
[0037] Step S204: The output windows of the N sensors that output valid data are allocated to one transmission cycle according to a preset allocation method. The preset allocation method is used to instruct the N sensors to transmit their respective output valid data through the data transmission channel in a staggered manner within the transmission cycle. The time when each sensor outputs the valid data does not overlap. The transmission rate of the data transmission channel is determined based on the target sampling frequency. The N sensors output their respective valid data sequentially at preset time intervals.
[0038] In at least one embodiment, when N sensors output valid data after acquiring data, the output windows of the valid data from the N sensors can be allocated to a transmission cycle according to a preset allocation method. This preset allocation method instructs the N sensors to transmit their respective valid data through the data transmission channel in a staggered manner within the transmission cycle. This ensures that the N sensors output their acquired valid data sequentially through the same MIPI data transmission channel in each transmission cycle with strict time staggering, no overlap, and continuous connection. That is, the valid data output periods of each sensor are completely independent on the time axis, with no overlap between them. This ensures that the receiving end can unambiguously distinguish the image sources based on the channel identifier in the data packet header, avoiding data aliasing or frame misalignment. Furthermore, since the exposure start time and data output time of each sensor are strictly synchronized within their preset time window, and the exposure time lasts for a complete frame cycle, each sensor can obtain a maximum theoretical exposure time of 66.67ms (when f=15fps) in low-light environments, without being forced to compress it to 33.33ms due to a halved frame rate as in traditional solutions. For example, if the number of sensors N is , sensor 1 can be set in At 1 second, the valid data of sensor 1 is transmitted through data transmission channel 1, and sensor 2... At 10s, the valid data of sensor 2 is transmitted through data transmission channel 2, and sensor 3 transmits the valid data of sensor 2. At 19s, the valid data of sensor 3 is transmitted through data transmission channel 3; the number of sensors N is 2, and sensor 4 can be set to... At 0s, valid data from sensor 4 is transmitted via data transmission channel 4, and sensor 5... At 33 seconds, the valid data of sensor 5 is transmitted through data transmission channel 5. That is, each sensor transmits its output valid data through the data transmission channel in a sequential, interleaved manner. In this case, each sensor transmits data at a preset time interval (e.g., ...). and time interval, and time interval, and (The time intervals between each sensor outputting valid data do not overlap).
[0039] For example, in at least one specific embodiment, in the scenario of urban nighttime road monitoring, a binocular low-light enhancement camera is deployed and installed on a street lamp pole, with the working environment being nighttime light intensity; the camera is equipped with two identical image sensors, facing different directions (left and right) to form a 180° panoramic coverage, used to simultaneously cover three key areas: main road, sidewalk, and intersection. The target sampling frequency of each sensor is 15fps, the MIPI transmission rate is 30fps, the preset time interval is 33ms, and the maximum exposure time is 66ms. Within a complete transmission cycle of 66ms, the sensor (left) begins transmission at 0ms, transmits valid data from the sensor (left) within 0-33ms, and transmits the frame blanking line from the sensor (left) within 33ms-66ms; the sensor (right) begins transmission simultaneously with the frame blanking line output by the sensor (left), that is, transmits valid data from the sensor (right) within 33ms-66ms; the transmitting sensor (right) begins transmitting the frame blanking line from the sensor (right) at 66ms, and at the same time, the sensor (left) begins transmitting the valid data of the next frame, that is, within 66ms-99ms, the sensor (right) transmits the frame blanking line, and the sensor (left) transmits the valid data of the next frame, and so on, until the image acquisition ends.
[0040] In this embodiment, the entity executing the above steps can be a terminal, a server, a specific processor installed in the terminal or server, or a processor or processing device that is relatively independent of the terminal or server, but is not limited thereto. For example, the entity executing the above steps can be, but is not limited to, a sending end, which can control the sensor to collect data and transmit it to the receiving end.
[0041] By allocating the output windows of N sensors that output valid data to a single transmission cycle according to a preset allocation method, the N sensors can output valid data sequentially at preset time intervals. That is, the time when each sensor outputs its own valid data does not overlap. While reusing the data transmission channel, there is no need to perform alternating frame dropping processing on the valid data output by the N sensors. The valid data of each sensor can be transmitted completely without causing the loss of valid data. Therefore, the problem of incomplete transmission of valid data can be solved, and the effect of ensuring complete data transmission can be achieved.
[0042] In an exemplary embodiment, before controlling N sensors to output data at a target sampling frequency, the method further includes: setting a data acquisition duration for each sensor based on the target sampling frequency, wherein the data acquisition duration is the duration for acquiring the valid data.
[0043] In at least one embodiment, the data acquisition duration of the aforementioned sensor may be, but is not limited to, the maximum exposure time of the sensor. Before the sensor actually acquires data, the data acquisition duration of each sensor can be set according to the target sampling frequency. The data acquisition duration of each sensor is the same and equal to the total duration of its sampling period. For example, in an image acquisition scenario, the target sampling frequency of the sensor can be set to 15 fps, and the maximum time (i.e., the maximum exposure time) during a single frame imaging process can be set to 1000 ms (1 s) / 15 fps = 66.67 ms; alternatively, the target sampling frequency of the sensor can be set to 5 fps, and the maximum exposure time of the sensor can be set to 1000 ms (1 s) / 5 fps = 200 ms.
[0044] In this embodiment, the maximum exposure time of the sensor is set to be completely consistent with the output frame rate. That is, lossless data transmission is achieved by reusing the blanking time slot of MIPI. This solves the problem in related technologies where the frame rate is reduced in order to increase exposure, and allows the low-light imaging quality to be doubled without reducing the frame rate.
[0045] In an exemplary embodiment, after setting the data acquisition duration of each sensor based on the target sampling frequency, the method further includes: a preset time interval based on the data acquisition duration, wherein the preset time interval is the time interval between the N sensors outputting the valid data without temporal overlap, and the time interval between the N sensors transmitting their respective output valid data through the data transmission channel in a sequentially interleaved manner within the transmission period.
[0046] In at least one embodiment, the aforementioned preset time interval can be, but is not limited to, the delay time for transmitting valid data between each sensor. After determining the target sampling frequency and data acquisition duration of the sensors, a preset time interval for transmitting valid data between each sensor can be set according to the data acquisition duration. This preset time interval can represent the time interval between each sensor's output of valid data without temporal overlap, and the time interval between each sensor's output of valid data transmitted through the data transmission channel in a staggered manner within the transmission cycle. Since the preset time interval is determined based on the data acquisition duration and the number of sensors, and the data acquisition duration is determined based on the target sampling frequency, it can also be said that the preset time interval can be calculated based on the sampling frequency and the number of sensors. In summary, the essence of the preset time interval is the half-frame period of the sensor output, used to allow the valid data of each sensor to be transmitted interpolated on the time axis, perfectly filling the MIPI bandwidth, while maintaining complete exposure, that is, the MIPI channel always transmits the valid data of one sensor.
[0047] For example, in an image acquisition scenario, if the number of sensors is 2, the target sampling frequency is 15fps, and the data acquisition duration is 66ms, then the preset time interval between the two sensors is 1000 / (15×2) = (1000 / 15) / 2 = 33ms, meaning the first sensor transmits valid data at 0ms and the second sensor transmits valid data at 33ms. When the number of sensors N is 2, the target sampling frequency is 30fps, and the data acquisition duration is 33ms, then the preset time interval between the two sensors is 1000 / (30×2) = 1000 / 60 = 16.67ms, meaning the first sensor transmits valid data at 0ms and the second sensor transmits valid data at 16.67ms.
[0048] In this embodiment, the preset time interval can ensure that the effective image data output by N sensors do not overlap in the time domain. At the same time, it can also realize the sequential interleaving of N data through a single MIPI channel in each transmission cycle. Therefore, the reuse of multi-sensor image data can be realized without reducing the exposure time of a single sensor, increasing hardware costs, or discarding any effective image frames. This can significantly improve the image signal-to-noise ratio in low-light environments and reduce the complexity of the receiving end algorithm.
[0049] In an exemplary embodiment, controlling N sensors to output data at a target sampling frequency includes: controlling a first sensor to output first valid data at the target sampling frequency, wherein the first sensor is any one of the N sensors; when it is determined that the first sensor has output the first valid data, controlling a second sensor to output second valid data at the target sampling frequency, and simultaneously controlling the first sensor to output first filler data of the first valid data according to a preset timing protocol during the same period when the second sensor outputs the second valid data, wherein the second sensor is a sensor among the N sensors that is to output the valid data after the first sensor; and simultaneously controlling the second sensor to output second filler data of the second valid data according to the preset timing protocol during the same period when the first sensor transmits the first valid data to the data transmission channel.
[0050] In at least one embodiment, the first sensor can be controlled to output first valid data at a target sampling frequency. Once it is determined that the first sensor has output the first valid data, the second sensor can then be controlled to output second valid data at the target sampling frequency, and the first sensor can be controlled to output first padding data of the first valid data according to a preset timing protocol. That is, the time when the first sensor outputs the first padding data of the first frame is the same as the time when the second sensor outputs the second valid data of the first frame. The second sensor is one of N sensors that will output valid data after the first sensor. Since the MIPI transmission signal of a frame includes a valid line signal (i.e., valid data) and a frame blanking signal (i.e., padding data) that is not actually useful for the image content, the valid line signal can contain all actual image information and some control information such as the channel number, and the frame blanking signal can contain padding transmission bandwidth, etc., mainly serving a synchronization function. During the same period that the first sensor transmits the first valid data to the data transmission channel, the second sensor is controlled to output the second padding data of the second valid data according to a preset timing protocol. That is, the time when the first sensor outputs the first valid data of the next frame is the same as the time when the second sensor outputs the second padding data of the second valid data of the first frame.
[0051] In at least one embodiment, taking two sensors, a target sampling frequency of 15fps, a sensor data acquisition duration of 66ms, a data transmission channel transmission rate of 60fps, and a preset interval of 33ms as an example, the specific process of sensor data transmission is as follows: Figure 3 As shown, Figure 3 This is a schematic diagram of the sensor data transmission process according to an embodiment of this application, wherein the first sensor ( Figure 3 sensor0 in At each time point, the first frame of valid data (i.e., the aforementioned first valid data) is output at the target sampling frequency. 33ms after the time The transmission of valid data must be complete at all times, among which, Figure 3 The Start of Transmission (SoT) to End of Transmission (EoT) flags in the protocol represent a complete data transmission. Low Power State (LPS) can be understood as the phase where no valid data is transmitted. This occurs when sensor0 has completely output the first frame of valid data (i.e., reaching...). (Time), control sensor0 at - The system continuously outputs the first frame of valid data (i.e., the aforementioned first fill data) according to a preset timing protocol, while simultaneously controlling the second sensor. Figure 3 sensor1 in - The first 33ms of valid data from sensor2 is output at a time (i.e., the second valid data mentioned above). Then, sensor1 is controlled to... - The first frame of padding data (i.e., the second padding data mentioned above) is output at constant intervals, while sensor0 is controlled to... - The second frame's valid data (i.e., the first valid data mentioned above) is output at the target sampling frequency at all times. This can be summarized as follows: after the valid row data of sensor0 is transmitted, sensor1 is controlled to start outputting valid row data, ensuring that the two sensors interleave the output of valid row data. For example... Figure 3 middle - (Output duration of the first valid data) - Output the valid data time period for sensor0. - (The output duration of the first filled data) is the time period for the blanking row output, and so on. - (Output duration of the second valid data) - Output the valid data time period for sensor1. - (The output duration of the second padding data) is the blanking line output time period, which is equal to the output duration of the first valid data, the second valid data, the first padding data, and the second padding data, all of which are equal to the preset time interval of 33ms. Taking a sensor N of 2, a target sampling frequency of 30fps, a sensor data acquisition duration of 33ms, a data transmission channel transmission rate of 60fps, and a preset interval of 16.67ms as an example, the valid data of the first frame of sensor0 is transmitted in the first 16.67ms, the invalid data of the first frame of sensor0 and the valid data of the first frame of sensor1 are transmitted in the second 16.67ms, the valid data of the second frame of sensor0 and the padding data of the first frame of sensor1 are transmitted in the third 16.67ms, the padding data of the second frame of sensor0 and the valid data of the second frame of sensor1 are transmitted in the fourth 16.67ms, and so on.
[0052] In this embodiment, by controlling N sensors to output valid data in an interleaved manner at a target sampling frequency, it is possible to achieve conflict-free, frame-free, and high-bandwidth-utilization multiplexing of multiple image data on a single MIPI data transmission channel.
[0053] In an exemplary embodiment, allocating the output windows of the N sensors that output valid data to a single transmission cycle according to a preset allocation method includes: when it is determined that the first sensor has output the first valid data, controlling the first sensor to transmit the first valid data to the data transmission channel; when the second sensor has output the second valid data and the first sensor has simultaneously output the first fill data, controlling the second sensor to transmit the second valid data to the data transmission channel, and controlling the first sensor to transmit the first fill data to the data transmission channel; when it is determined that the second sensor has output the second fill data, controlling the second sensor to transmit the second fill data to the data transmission channel; wherein, the time period for the first sensor to transmit the first valid data and the first fill data, and the time period for the second sensor to transmit the second valid data and the second fill data, constitutes one transmission cycle.
[0054] In at least one embodiment, a transmission cycle may be, but is not limited to, the time period for the first sensor to transmit first valid data and first padding data, and the time period for the second sensor to transmit second valid data and second padding data, wherein the first valid data and first padding data can be used to represent data of all frames of the target image being transmitted. Allocating the output window of the sensor output valid data according to a preset allocation method can be understood as the following process: when it is determined that the first sensor has output first valid data, the first sensor is controlled to transmit the first valid data to the data transmission channel; when it is determined that the second sensor has output second valid data, and the first sensor has simultaneously output first padding data, the second sensor is controlled to transmit the second valid data to the data transmission channel, and the first sensor is controlled to transmit the first padding data to the data transmission channel; when it is determined that the second sensor has output second padding data, the second sensor is controlled to transmit the second padding data to the data transmission channel.
[0055] For example, in a stereo camera in an image acquisition scenario, each sensor has a target sampling frequency of 15fps, a MIPI transmission rate of 30fps, a preset time interval of 33ms, and a maximum exposure time of 66ms. The first sensor outputs the first valid data within 0ms-33ms, the first sensor outputs the first fill data of the first valid data within 33ms-66ms, and the second sensor outputs the second valid data. Within 66ms-99ms, the second sensor outputs the second fill data of the second valid data, and the first sensor transmits the valid data for the next frame. One transmission cycle includes the transmission time of the first valid data, the second valid data, the first fill data, and the second fill data. Since the common exposure method for image sensors is rolling shutter exposure, which exposes line by line sequentially instead of exposing all pixels simultaneously, and since MIPI transmits images not frame by frame but line by line serially, once it is determined that the first sensor has output the first valid data within 0ms-33ms, the first sensor can be controlled to transmit the first valid data to the data transmission channel. When it is determined that the second sensor has output the second valid data and the first sensor has simultaneously output the first fill data, the second sensor is controlled to transmit the second valid data to the data transmission channel, and the first sensor is controlled to transmit the first fill data to the data transmission channel. When it is determined that the second sensor has output the second fill data, the second sensor is controlled to transmit the second fill data to the data transmission channel.
[0056] This embodiment precisely aligns the effective data output windows of N sensors with their corresponding fill data time slots and distributes them evenly within a unified transmission cycle, enabling non-overlapping, uninterrupted, and highly synchronous interleaved transmission of multiple image data streams on a single MIPI data channel.
[0057] Figure 4 This is a flowchart illustrating an optional data receiving method according to an embodiment of this application, such as... Figure 4 As shown, the process of this method may include the following steps:
[0058] Step S402: Receive valid data transmitted from N sensors through a data transmission channel, where N is a natural number greater than 1. The output windows of the valid data from the N sensors are allocated to windows within a transmission cycle according to a preset allocation method. The preset allocation method instructs the N sensors to transmit their respective output valid data through the data transmission channel in a staggered manner within the transmission cycle. The output times of each sensor's valid data do not overlap. The transmission rate of the data transmission channel is determined based on the target sampling frequency of the N sensors. The N sensors output their respective valid data sequentially at preset time intervals.
[0059] The data transmission method in this embodiment can be applied to building / park intelligent security monitoring systems, intelligent vehicle and driver status monitoring systems, industrial vision and nighttime dark production line inspection, smart home and smart door locks / home cameras, and other fields. Specifically, it can be applied to scenarios where imaging is performed using binocular / multi-view cameras in low-light environments. Cameras are common electronic devices in daily life. Their working principle involves acquiring images through an image sensor and transmitting them to the main control chip via a Mobile Industry Processor Interface (MIPI) for image processing, encoding, and storage. MIPI can be understood as a commonly used interface standard in signal transmission, widely used in common camera serial interfaces (CSI), display interfaces, RF interfaces, microphone / speaker interfaces, etc. Typically, one MIPI interface is used for one video transmission, but for cost considerations, a solution has emerged that allows one MIPI interface to transmit two video streams. This solution significantly reduces the production cost of cameras and facilitates the widespread adoption of camera products. The existing solution involves two video data channels, each outputting 30fps data. Half of the data is then discarded alternately, and the MIPI data interface is reused to achieve 15fps data transmission for each channel. The MIPI receiver then demultiplexes the data alternately to restore two independent 15fps video signals. However, when two sensors are connected, half of the data is wasted due to time-division multiplexing. Therefore, when transmitting two 15fps video signals, the maximum exposure time for both channels is only 1000 / 15 / 2 = 33ms, resulting in insufficient sensor exposure and affecting image quality.
[0060] In at least one embodiment, the sensor described above may be, but is not limited to, an image sensor, and may also be a line scan image sensor, a spectral sensor / multispectral / hyperspectral imaging sensor, etc., as long as it is a line scan data sensor with exposure-readout-transmission timing characteristics. The number of sensors N may be 2, 3, or 6, etc., and this application does not limit this. For example, when N is 2 and the sensor is an image sensor, both image sensors acquire images at the same target sampling frequency; when N is 4 and the sensor is a spectral sensor, all four spectral sensors acquire spectral response data at the same target sampling frequency. When N sensors output valid data after acquiring data, the output windows of the valid data from the N sensors can be allocated within a transmission cycle according to a preset allocation method. This preset allocation method instructs the N sensors to transmit their respective valid data through the data transmission channel in a staggered manner within the transmission cycle. This ensures that the N sensors output their acquired valid data sequentially through the same MIPI data transmission channel in each transmission cycle with strict time staggering, no overlap, and continuous connection. That is, the valid data output time of each sensor is completely independent on the time axis, with no overlap between them. This ensures that the receiving end can unambiguously distinguish the image sources based on the channel identifier in the data packet header, avoiding data aliasing or frame misalignment. Furthermore, since the exposure start time and data output time of each sensor are strictly synchronized within their preset time window, and the exposure time lasts for a complete frame cycle, each sensor can obtain a maximum theoretical exposure time of 66.67ms (when f=15fps) in low-light environments, without being forced to compress it to 33.33ms due to the halved frame rate in traditional solutions. For example, if the number of sensors N is , sensor 1 can be set to... At 1 second, the valid data of sensor 1 is transmitted through data transmission channel 1, and sensor 2... At 10s, the valid data of sensor 2 is transmitted through data transmission channel 2, and sensor 3 transmits the valid data of sensor 2. At 19s, the valid data of sensor 3 is transmitted through data transmission channel 3; the number of sensors N is 2, and sensor 4 can be set to... At 0s, valid data from sensor 4 is transmitted via data transmission channel 4, and sensor 5... At 33 seconds, the valid data of sensor 5 is transmitted through data transmission channel 5. That is, each sensor transmits its output valid data through the data transmission channel in a sequential, interleaved manner. In this case, each sensor transmits data at a preset time interval (e.g., ...). and time interval, and time interval, and (The time intervals between each sensor outputting valid data do not overlap).
[0061] For example, in at least one specific embodiment, in the scenario of urban nighttime road monitoring, a binocular low-light enhancement camera is deployed and installed on a street lamp pole, with the working environment being nighttime light intensity; the camera is equipped with two identical image sensors, facing different directions (left and right) to form a 180° panoramic coverage, used to simultaneously cover three key areas: main road, sidewalk, and intersection. The target sampling frequency of each sensor is 15fps, the MIPI transmission rate is 30fps, the preset time interval is 33ms, and the maximum exposure time is 66ms. Within a complete 66ms transmission cycle, the receiving end controls the sensor (left) to start transmitting at 0ms, transmitting valid data from the sensor (left) within 0-33ms, and transmitting the frame blanking line from the sensor (left) within 33ms-66ms. The sensor (right) starts transmitting simultaneously with the frame blanking line output by the sensor (left), i.e., transmitting valid data from the sensor (right) within 33ms-66ms. In the next 66ms transmission cycle, the transmitting sensor (right) starts transmitting its own frame blanking line at 66ms, and simultaneously, the sensor (left) starts transmitting the valid data of the next frame. That is, from 66ms to 99ms, the sensor (right) transmits the frame blanking line, and the sensor (left) transmits the valid data of the next frame, and so on, until the image acquisition and transmission are completed. The receiving end can receive the valid data from the transmitting sensor (left) at 33ms, the frame blanking line from the sensor (left) and the valid data from the sensor (right) at 66ms, and the frame blanking line from the sensor (right) and the valid data of the next frame from the sensor (left) at 99ms. In this embodiment, the entity executing the above steps can be a terminal, a server, a specific processor installed in the terminal or server, or a processor or processing device that is relatively independent of the terminal or server, but is not limited thereto. For example, the entity executing the above steps can be, but is not limited to, a receiving end, which can receive and identify data sent from the sending end.
[0062] By means of this application, since the N sensors output valid data sequentially at preset time intervals, that is, the time when each sensor outputs its own valid data does not overlap, while reusing the data transmission channel, there is no need to perform alternating frame dropping processing on the valid data output by the N sensors. Thus, the valid data of each sensor can be transmitted completely without causing the loss of valid data. As a result, the receiving end can receive the complete valid data. Therefore, the problem of not being able to transmit valid data completely can be solved, and the effect of ensuring the complete transmission of data can be achieved.
[0063] In one exemplary embodiment, before receiving valid data output from N sensors through a data transmission channel, the method further includes: determining the transmission rate as the product of the target sampling frequency and the N.
[0064] In at least one embodiment, the aforementioned transmission rate may be, but is not limited to, the MIPI transmission rate. Before receiving valid data output from N sensors through the data transmission channel, and also before the sensors actually acquire frame images, the MIPI transmission rate can be set to N times the actual required frame rate (i.e., the target sampling frequency). For example, if the actual frame rate is 15fps and the number of sensors N is 2, then the transmission rate is 30fps; if the actual frame rate is 15fps and the number of sensors N is 4, then the transmission rate is 60fps; if the actual frame rate is 30fps and the number of sensors N is 2, then the transmission rate is 60fps.
[0065] In at least one embodiment, while determining the transmission rate, the data acquisition duration of each sensor can also be set according to the target sampling frequency. The data acquisition duration of the sensor can be, but is not limited to, the maximum exposure time of the sensor. Before the sensor actually acquires data, the data acquisition duration of each sensor can be set according to the target sampling frequency. The data acquisition duration of each sensor is the same and equal to the total duration of its sampling period. For example, in an image acquisition scenario, the target sampling frequency of the sensor can be set to 15fps, and the maximum time (i.e., the maximum exposure time) during a single frame imaging process can be set to 1000ms (1s) / 15fps = 66.67ms; or the target sampling frequency of the sensor can be set to 5fps, and the maximum exposure time of the sensor can be set to 1000ms (1s) / 5fps = 200ms.
[0066] In at least one embodiment, after determining the target sampling frequency and data acquisition duration of the sensors, a preset time interval between each sensor can be set according to the data acquisition duration. This preset time interval can be, but is not limited to, the delay time for transmitting valid data between each sensor. It can represent the time interval between each sensor's output of valid data without temporal overlap, and the time interval between each sensor's output of valid data transmitted sequentially and interleaved through the data transmission channel within the transmission cycle. Since the preset time interval is determined based on the data acquisition duration and the number of sensors, and the data acquisition duration is determined based on the target sampling frequency, it can also be said that the preset time interval can be calculated based on the sampling frequency and the number of sensors. In summary, the essence of the preset time interval is the half-frame period of the sensor output, used to allow the valid data of each sensor to be interleaved and transmitted on the time axis, perfectly filling the MIPI bandwidth while maintaining complete exposure; that is, the MIPI channel always transmits valid data from one sensor.
[0067] For example, in an image acquisition scenario, if the number of sensors is 2, the target sampling frequency is 15fps, and the data acquisition duration is 66ms, then the preset time interval between the two sensors is 1000 / (15×2) = (1000 / 15) / 2 = 33ms, meaning the first sensor transmits valid data at 0ms and the second sensor transmits valid data at 33ms. When the number of sensors N is 2, the target sampling frequency is 30fps, and the data acquisition duration is 33ms, then the preset time interval between the two sensors is 1000 / (30×2) = 1000 / 60 = 16.67ms, meaning the first sensor transmits valid data at 0ms and the second sensor transmits valid data at 16.67ms.
[0068] In this embodiment, based on the basic characteristics of sensor rolling shutter exposure, MIPI transmission line-by-line delayed exposure, and MIPI serial output, the time difference from the start to the end of the exposure of a frame and the MIPI transmission window can be cleverly utilized to discard useless frame blanking data, so that each of the two channels can be exposed for 66ms and a MIPI data channel can be reused, and both channels can achieve an output effect of 15fps.
[0069] In one exemplary embodiment, receiving valid data transmitted by N sensors through a data transmission channel includes: receiving the data transmitted by the N sensors through the data transmission channel, wherein the data transmitted by the N sensors are data output by the N sensors respectively at the target sampling frequency, and the data transmitted by the N sensors includes the valid data and padding data transmitted by each of the N sensors; and parsing the data transmitted by the N sensors to receive the valid data from the data transmitted by the N sensors.
[0070] In at least one embodiment, the N sensors output valid data at a target sampling frequency, which may be, but is not limited to, the sensor's frame rate. For example, in an image acquisition scenario, the frequency at which a sensor senses light and reads out a frame of image data, the sampling frequency of the image sensor can be set to 15fps, 30fps, etc. It should be noted that the target sampling frequency of all N sensors is the same. The process of the sensors outputting valid data and filling data is as follows: the first sensor outputs first valid data at the target sampling frequency; when it is determined that the first sensor has output the first valid data, the second sensor outputs second valid data at the target sampling frequency, and the first sensor outputs first filling data of the first valid data according to a preset timing protocol. That is, the time when the first sensor outputs the first filling data of the first frame is the same as the time when the second sensor outputs the second valid data of the first frame. Here, the second sensor is the sensor among the N sensors that is to output valid data after the first sensor. Since the MIPI transmission signal of a frame of image includes the valid line signal (i.e., valid data) and the frame blanking signal (i.e., padding data) which is not actually useful for the image content, the valid line signal can contain all the actual image information and some control information such as the channel number, while the frame blanking signal can contain the padding transmission bandwidth, etc., mainly serving a synchronization function. At the same time that the first sensor transmits the first valid data to the data transmission channel, the second sensor can output the second padding data of the second valid data according to a preset timing protocol. That is, the time when the first sensor outputs the first valid data of the next frame is the same as the time when the second sensor outputs the second padding data of the second valid data of the first frame.
[0071] In this embodiment, taking a sensor N of 2, a target sampling frequency of 15fps, a sensor data acquisition duration of 66ms, a data transmission channel transmission rate of 60fps, and a preset interval of 33ms as an example, the specific process of sensor data transmission can be found in [reference needed]. Figure 3 , Figure 3 This is a schematic diagram of the sensor data transmission process according to an embodiment of this application, such as... Figure 3 As shown, the first sensor ( Figure 3 sensor0 in At each time point, the first frame of valid data (i.e., the aforementioned first valid data) is output at the target sampling frequency. 33ms after the time The transmission of valid data must be complete at all times, among which, Figure 3 The Start of Transmission (SoT) to End of Transmission (EoT) flags in the data transmission protocol represent a complete data transmission. The Low Power State (LPS) can be understood as the phase where no valid data is transmitted. This occurs when sensor0 has completely output the first frame of valid data (i.e., reaching the threshold of...). (moment), sensor0 at - The first frame of valid data (i.e., the aforementioned first fill data) is output according to a preset timing protocol, while the second sensor ( Figure 3 sensor1 in - At each time point, sensor2 outputs the first 33ms of valid data (i.e., the second valid data mentioned above), and then sensor1 outputs... - The first frame of padding data (i.e., the second padding data mentioned above) is output at constant intervals, while sensor0 is... - The second frame's valid data (i.e., the first valid data mentioned above) is output at the target sampling frequency at all times. This can be summarized as follows: after the valid row data of sensor0 is transmitted, sensor1 is controlled to start outputting valid row data, ensuring that the two sensors interleave the output of valid row data. For example... Figure 3 middle - (Output duration of the first valid data) - Output the valid data time period for sensor0. - (The output duration of the first filled data) is the time period for the blanking row output, and so on. - (Output duration of the second valid data) - Output the valid data time period for sensor1. - (The output duration of the second padding data) is the blanking line output time period, which is equal to the output duration of the first valid data, the second valid data, the first padding data, and the second padding data, all of which are equal to the preset time interval of 33ms. Taking a sensor N of 2, a target sampling frequency of 30fps, a sensor data acquisition duration of 33ms, a data transmission channel transmission rate of 60fps, and a preset interval of 16.67ms as an example, the valid data of the first frame of sensor0 is transmitted in the first 16.67ms, the invalid data of the first frame of sensor0 and the valid data of the first frame of sensor1 are transmitted in the second 16.67ms, the valid data of the second frame of sensor0 and the padding data of the first frame of sensor1 are transmitted in the third 16.67ms, the padding data of the second frame of sensor0 and the valid data of the second frame of sensor1 are transmitted in the fourth 16.67ms, and so on. Therefore, when the receiving end receives data transmitted from N sensors through the data transmission channel, the received data includes both valid data and padding data. The received data needs to be parsed in order to determine the valid data.
[0072] Through this embodiment, in the case of MIPI multiplexing, the maximum exposure time of each channel is not affected. Even with two channels at 15fps each, the maximum exposure time can still be maintained at 66.66ms, which is twice that of the prior art, effectively improving the imaging quality of the camera in low-light environments.
[0073] In one exemplary embodiment, parsing the data transmitted by the N sensors to receive the valid data from the data transmitted by the N sensors includes: receiving first valid data transmitted by a first sensor, wherein the first sensor is any one of the N sensors; if it is identified that first fill data transmitted by the first sensor and second valid data transmitted by the second sensor arrive simultaneously, discarding the first fill data and receiving the second valid data, wherein the second sensor is one of the N sensors that is to transmit the valid data after the first sensor, and the first fill data and the second valid data are data transmitted simultaneously; if it is identified that third valid data transmitted by the first sensor and second fill data output by the second sensor arrive simultaneously, discarding the second fill data and receiving the third valid data, wherein the second fill data and the third valid data are data output simultaneously after the second sensor outputs the second valid data; wherein the time period for the first sensor to transmit the first valid data and the first fill data, and the time period for the second sensor to transmit the second valid data and the second fill data constitute one transmission period.
[0074] In at least one embodiment, when the receiving end only receives the first valid data output by the sensor, it can directly receive the first valid data; when the receiving end simultaneously receives the first filler data transmitted by the first sensor and the second valid data transmitted by the second sensor, the first filler data can be discarded, and only the second valid data can be received and transmitted; when the receiving end simultaneously receives the third valid data transmitted by the first sensor and the second filler data output by the second sensor, the second filler data can be discarded, and only the third valid data can be received and transmitted. The time period for the first sensor to transmit the first valid data and the first filler data, and the time period for the second sensor to transmit the second valid data and the second filler data, constitutes a transmission cycle. In summary, when the receiving end simultaneously receives valid data and invalid data, it discards the filler data and transmits the valid data. For example, in an image acquisition scenario, the receiving end transmits the first valid data from the first sensor within 0-33ms, the first padding data from the first sensor and the second valid data from the second sensor within 33-66ms, and the second padding data from the second sensor and the valid data of the next frame from the first sensor within 66-99ms. Therefore, if the receiving end receives the first valid data at 33ms, it can directly retain it. If it receives both valid data and padding data at 66ms, it only retains the valid data and discards the padding data. If it receives both valid data and padding data at 99ms, it still discards the padding data and retains the valid data.
[0075] In this embodiment, the discarding of blanking data can be achieved through software logic at the MIPI receiver, which can connect to two independent MIPI signals. Alternatively, an external switch device can be used for hardware signal isolation, periodically alternating the conduction of signals from sensor0 and sensor1 using PWM waveforms or other control signals. This allows a single MIPI signal to alternately transmit data from both sensors. The specific implementation processes of these two methods are identical; the only differences lie in the method of discarding blanking data and the number of MIPI signals used in the transmission path.
[0076] By discarding useless blanking data, effective image data can be utilized 100% without affecting the frame rate, which is twice as effective as traditional solutions in the prior art.
[0077] The data receiving method in this application will be explained below with reference to specific embodiments:
[0078] In image acquisition scenarios, to address the low data transmission bandwidth utilization issue under MIPI time-division multiplexing, this specific embodiment provides a method for improving the low-light imaging effect of multi-view cameras. For example... Figure 5 As shown, it includes the following steps:
[0079] In the S501, the MIPI controller of the main control chip sets the MIPI transmission rate to twice the actual frame rate required by the sensor. For example, if the actual frame rate of the two sensors is 15fps, in order to achieve lossless multiplexing of the two sensors on a single MIPI channel, it is necessary to ensure that each of the two valid data frames can be transmitted completely within 66.67ms of a single frame period (1 / 15fps). If the MIPI transmission rate is set to 15 (i.e., one frame is transmitted every 66.67ms), it cannot accommodate the two data streams. Therefore, the MIPI transmission rate is set to 30fps, and the following frame rate-related parameters are all based on this.
[0080] In the S502, the timing controller inside each sensor can set the target sampling frequency of its corresponding sensor to 15fps and the data acquisition duration of the sensor to 66ms.
[0081] S503, the main control chip sets the preset time interval between N sensors to 33ms, that is, while the first sensor is transmitting data, the second sensor starts exposure with a preset time interval of 33ms relative to the first sensor;
[0082] S504, the MIPI output controller of the sensor, after determining that the first valid data transmission from the first sensor has been completed, can control the second sensor to start outputting valid data, ensuring that the valid data outputs from the two sensors are interleaved. Figure 3 middle - , - The time period during which the first sensor outputs the first valid data. - This is the blanking line output time period, which is the time period during which the first sensor transmits the first filling data. Similarly... - , - The time period during which the second sensor outputs the first valid data. - The blanking line output time period is the time period during which the second sensor transmits the second filling data;
[0083] In the S505, the MIPI receiver receives the valid data and padding data sent by the transmitter according to the timing relationship. When both valid data and padding data are received simultaneously, the identified padding data is discarded, and only the valid data is retained. - , - , - , - The system receives valid signals in sequence, which are four valid images transmitted alternately by the first sensor and the second sensor. Then, it demultiplexes the signals according to the channel number in the signal frame header information to obtain two independent image data streams.
[0084] S506, the main control chip and the MIPI receiver execute steps S503-S505 in a loop, the receiver demultiplexes, and obtains two independent and continuous image data.
[0085] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0086] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory (ROM) / random access memory (RAM), magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0087] According to another aspect of the embodiments of this application, a data transmission apparatus is also provided, which can be used to implement the data transmission method provided in the above embodiments, and will not be repeated hereafter. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0088] Figure 6 This is a structural block diagram of an optional data transmission device according to an embodiment of this application, such as... Figure 6 As shown, the data transmission device includes:
[0089] The control module 62 is used to control N sensors to output data at a target sampling frequency, wherein N is a natural number greater than 1;
[0090] The allocation module 64 is used to allocate the output windows of the valid data output by the N sensors to one transmission cycle according to a preset allocation method. The preset allocation method is used to instruct the N sensors to transmit their respective output valid data through the data transmission channel in a staggered manner within the transmission cycle. The time when each sensor outputs the valid data does not overlap. The transmission rate of the data transmission channel is determined based on the target sampling frequency. The N sensors output their respective valid data sequentially at preset time intervals.
[0091] In an exemplary embodiment, the apparatus is further configured to: set the data acquisition duration for each of the N sensors based on the target sampling frequency before controlling the N sensors to output data at the target sampling frequency, wherein the data acquisition duration is the duration for which the valid data is acquired.
[0092] In an exemplary embodiment, the apparatus is further configured to: after setting the data acquisition duration of each of the sensors based on the target sampling frequency, determine the preset time interval based on the data acquisition duration, wherein the preset time interval is the time interval between the N sensors outputting the valid data without temporal overlap, and the time interval between the N sensors transmitting their respective output valid data through the data transmission channel in a sequentially interleaved manner within the transmission period.
[0093] In an exemplary embodiment, the control module 62 can control N sensors to output data at a target sampling frequency in the following manner: controlling a first sensor to output first valid data at the target sampling frequency, wherein the first sensor is any one of the N sensors; when it is determined that the first sensor has output the first valid data, controlling a second sensor to output second valid data at the target sampling frequency, and simultaneously controlling the first sensor to output first filler data of the first valid data according to a preset timing protocol during the same period when the second sensor outputs the second valid data, wherein the second sensor is the sensor among the N sensors that is to output the valid data after the first sensor; and simultaneously controlling the second sensor to output second filler data of the second valid data according to the preset timing protocol during the same period when the first sensor transmits the first valid data to the data transmission channel.
[0094] In an exemplary embodiment, the control module 62 can allocate the output windows of the N sensors that output valid data to a single transmission cycle according to a preset allocation method as follows: when it is determined that the first sensor has output the first valid data, the control module 62 controls the first sensor to transmit the first valid data to the data transmission channel; when the second sensor has output the second valid data and the first sensor has simultaneously output the fill data of the first valid data, the control module 62 controls the second sensor to transmit the second valid data to the data transmission channel and controls the first sensor to transmit the first fill data to the data transmission channel; when it is determined that the second sensor has output the second fill data, the control module 62 controls the second sensor to transmit the second fill data to the data transmission channel; wherein, the time period for the first sensor to transmit the first valid data and the first fill data, and the time period for the second sensor to transmit the second valid data and the second fill data constitute one transmission cycle.
[0095] According to another aspect of the embodiments of this application, a data receiving apparatus is also provided, which can be used to implement the data receiving method provided in the above embodiments, and will not be repeated hereafter. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0096] Figure 7 This is a structural block diagram of an optional data receiving device according to an embodiment of this application, such as... Figure 7 As shown, the data receiving device includes:
[0097] The receiving module 72 is used to receive valid data transmitted by N sensors through a data transmission channel, wherein N is a natural number greater than 1. The output windows of the valid data output by the N sensors are allocated to windows within a transmission cycle according to a preset allocation method. The preset allocation method is used to instruct the N sensors to transmit their respective output valid data through the data transmission channel in a staggered manner within the transmission cycle. The time of each sensor outputting the valid data does not overlap. The transmission rate of the data transmission channel is determined based on the target sampling frequency of the N sensors. The N sensors output their respective valid data sequentially at preset time intervals.
[0098] In one exemplary embodiment, the apparatus is further configured to determine the transmission rate as the product of the target sampling frequency and the N before receiving valid data output by the N sensors through the data transmission channel.
[0099] In an exemplary embodiment, the receiving device 72 can receive valid data transmitted by N sensors through a data transmission channel in the following manner: receiving the data transmitted by the N sensors through the data transmission channel, wherein the data transmitted by the N sensors are data output by the N sensors respectively at the target sampling frequency, and the data transmitted by the N sensors includes the valid data and padding data transmitted by each sensor; parsing the data transmitted by the N sensors to receive the valid data from the data transmitted by the N sensors.
[0100] In an exemplary embodiment, the receiving device 72 can parse the data transmitted by the N sensors to receive the valid data from the data transmitted by the N sensors in the following manner: receiving first valid data transmitted by a first sensor, wherein the first sensor is any one of the N sensors; if it is identified that first fill data transmitted by the first sensor and second valid data transmitted by the second sensor arrive simultaneously, discarding the first fill data and receiving the second valid data, wherein the second sensor is the sensor among the N sensors that is to transmit the valid data after the first sensor, and the first fill data and the second valid data are transmitted data in the same period; if it is identified that third valid data transmitted by the first sensor and second fill data output by the second sensor arrive simultaneously, discarding the second fill data and receiving the third valid data, wherein the second fill data and the third valid data are data output in the same period after the second sensor outputs the second valid data; wherein the time period for the first sensor to transmit the first valid data and the first fill data, and the time period for the second sensor to transmit the second valid data and the second fill data constitute one transmission period.
[0101] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.
[0102] According to another aspect of the embodiments of this application, a computer-readable storage medium is provided, the computer-readable storage medium including a stored program, wherein the program executes the steps in any of the above method embodiments when it is run.
[0103] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, ROMs, RAMs, portable hard drives, magnetic disks, or optical disks.
[0104] According to another aspect of the embodiments of this application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor is configured to perform the steps of any of the method embodiments described above via the computer program. In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0105] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.
[0106] According to another aspect of the embodiments of this application, a computer program product is also provided, comprising a computer program / instructions containing program code for performing the methods shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication section 809, and / or installed from a removable medium 811. When the computer program is executed by a central processing unit 801, it performs various functions provided in the embodiments of this application. The sequence numbers of the embodiments of this application above are merely descriptive and do not represent the superiority or inferiority of the embodiments.
[0107] Figure 8 A schematic block diagram of a computer system architecture for implementing embodiments of the present application is shown. Figure 8 As shown, the computer system 800 includes a Central Processing Unit (CPU) 801, which can perform various appropriate actions and processes based on programs stored in ROM 802 or programs loaded into RAM 803 from storage section 808. Random Access Memory 803 also stores various programs and data required for system operation. The CPU 801, ROM 802, and RAM 803 are interconnected via bus 804. Input / Output (I / O) interface 805 is also connected to bus 804.
[0108] The following components are connected to I / O interface 805: an input section 806 including a keyboard, mouse, etc.; an output section 807 including a cathode ray tube (CRT), liquid crystal display (LCD), and speakers, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card, such as a local area network card or modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to I / O interface 805 as needed. Removable media 811, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 810 as needed so that computer programs read from them can be installed into storage section 808 as needed.
[0109] Specifically, according to embodiments of this application, the processes described in the various method flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 809, and / or installed from removable medium 811. When the computer program is executed by central processing unit 801, it performs various functions defined in the system of this application.
[0110] It should be noted that, Figure 8 The computer system 800 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0111] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those described herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.
[0112] The above are merely preferred embodiments of this application and are not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this application should be included within the protection scope of this application.
Claims
1. A data transmission method, characterized in that, include: Control N sensors to output data at a target sampling frequency, where N is a natural number greater than 1; The output windows of the N sensors that output valid data are allocated to one transmission cycle according to a preset allocation method. The preset allocation method is used to instruct the N sensors to transmit their respective output valid data through the data transmission channel in a staggered manner within the transmission cycle. The time when each sensor outputs the valid data does not overlap. The transmission rate of the data transmission channel is determined based on the target sampling frequency. The N sensors output their respective valid data sequentially at preset time intervals.
2. The method according to claim 1, characterized in that, Before controlling N sensors to output data at the target sampling frequency, the method further includes: The data acquisition duration for each sensor is set based on the target sampling frequency, wherein the data acquisition duration is the duration for acquiring the valid data.
3. The method according to claim 2, characterized in that, After setting the data acquisition duration for each sensor based on the target sampling frequency, the method further includes: The preset time interval is determined based on the data acquisition duration, wherein the preset time interval is the time interval between the N sensors outputting their valid data without time overlap, and the time interval between the N sensors transmitting their output valid data through the data transmission channel in a staggered manner within the transmission cycle.
4. The method according to claim 1, characterized in that, Control N sensors to output data at a target sampling frequency, including: Control the first sensor to output first valid data at the target sampling frequency, wherein the first sensor is any one of the N sensors; When it is determined that the first sensor has output the first valid data, the second sensor is controlled to output the second valid data at the target sampling frequency. At the same time that the second sensor outputs the second valid data, the first sensor is controlled to output the first filling data of the first valid data according to a preset timing protocol. The second sensor is the sensor that is to output the valid data after the first sensor among the N sensors. While the first sensor transmits the first valid data to the data transmission channel, the second sensor is controlled to output the second filler data of the second valid data according to the preset timing protocol.
5. The method according to claim 4, characterized in that, The output windows of the N sensors that output valid data are evenly distributed into one transmission cycle according to a preset allocation method, including: When it is determined that the first sensor has output the first valid data, the first sensor is controlled to transmit the first valid data to the data transmission channel; When the second sensor has output the second valid data and the first sensor has simultaneously output the first filling data, control the second sensor to transmit the second valid data to the data transmission channel, and control the first sensor to transmit the first filling data to the data transmission channel; When it is determined that the second sensor has output the second filling data, the second sensor is controlled to transmit the second filling data to the data transmission channel; The time period during which the first sensor transmits the first valid data and the first fill data, and the time period during which the second sensor transmits the second valid data and the second fill data, constitutes one transmission cycle.
6. A data receiving method, characterized in that, include: The system receives valid data transmitted from N sensors through a data transmission channel, where N is a natural number greater than 1. The output windows of the valid data from the N sensors are allocated to windows within a transmission cycle according to a preset allocation method. The preset allocation method instructs the N sensors to transmit their respective output valid data through the data transmission channel in a staggered manner within the transmission cycle. The output times of each sensor's valid data do not overlap. The transmission rate of the data transmission channel is determined based on the target sampling frequency of the N sensors. The N sensors output their respective valid data sequentially at preset time intervals.
7. The method according to claim 6, characterized in that, Before receiving valid data output from N sensors through the data transmission channel, the method further includes: The product of the target sampling frequency and N is determined as the transmission rate.
8. The method according to claim 6, characterized in that, Receive valid data transmitted from N sensors through the data transmission channel, including: Receive data transmitted by the N sensors through the data transmission channel, wherein the data transmitted by the N sensors are the data output by the N sensors at the target sampling frequency, and the data transmitted by the N sensors includes the valid data and padding data transmitted by each sensor; The data transmitted by the N sensors is parsed to receive the valid data from the data transmitted by the N sensors.
9. The method according to claim 8, characterized in that, Parsing the data transmitted by the N sensors to receive the valid data from the data transmitted by the N sensors includes: Receive first valid data transmitted by a first sensor, wherein the first sensor is any one of the N sensors; If it is detected that the first fill data transmitted by the first sensor and the second valid data transmitted by the second sensor arrive at the same time, the first fill data is discarded and the second valid data is received, wherein the second sensor is the sensor among the N sensors that is to transmit the valid data after the first sensor, and the first fill data and the second valid data are data transmitted at the same time. If it is detected that the third valid data transmitted by the first sensor and the second fill data output by the second sensor arrive at the same time, the second fill data is discarded and the third valid data is received, wherein the second fill data and the third valid data are data output simultaneously after the second sensor outputs the second valid data; The time period during which the first sensor transmits the first valid data and the first fill data, and the time period during which the second sensor transmits the second valid data and the second fill data, constitutes one transmission cycle.
10. A data transmission device, characterized in that, include: A control module is used to control N sensors to output data at a target sampling frequency, where N is a natural number greater than 1; The allocation module is used to allocate the output windows of the N sensors that output valid data to one transmission cycle according to a preset allocation method. The preset allocation method is used to instruct the N sensors to transmit their respective output valid data through the data transmission channel in a sequential and staggered manner within the transmission cycle. The time when each sensor outputs the valid data does not overlap. The transmission rate of the data transmission channel is determined based on the target sampling frequency. The N sensors output their respective valid data sequentially at preset time intervals.
11. A data receiving device, characterized in that, include: A receiving module is used to receive valid data transmitted by N sensors through a data transmission channel, wherein N is a natural number greater than 1. The output windows of the valid data output by the N sensors are allocated to windows within a transmission cycle according to a preset allocation method. The preset allocation method is used to instruct the N sensors to transmit their respective output valid data through the data transmission channel in a staggered manner within the transmission cycle. The time of each sensor outputting its valid data does not overlap. The transmission rate of the data transmission channel is determined based on the target sampling frequency of the N sensors. The N sensors output their respective valid data sequentially at preset time intervals.
12. A computer-readable storage medium / program product, comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method according to any one of claims 1 to 5, or the steps of the method according to any one of claims 6 to 9.
13. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5, or the steps of the method according to any one of claims 6 to 9.