A data acquisition method, device, equipment, medium and product
Patent Information
- Application Number
- CN202611463162.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-20
- Publication Date
- 2026-10-27
AI Technical Summary
[0003]然而,受限于硬件成本、设备体积和功耗等因素,能够提供的物理采集通道数量往往有限,而需要监控的信号通道数量可能达到数千路甚至更高,各个信号无法在同一时刻被全部采集,难以有效地进行跨信号联合分析
根据上述实施例可知,通过获取数据采集设备的多个采集通道分别输出的采样数据,基于采样时间信息,将同一采集周期内采集到的多个采样数据对齐到同一时间窗口,生成与采集周期对应的数据集合,通过采用时分复用方式以数量有限的M个采集通道实现N路信号的采集,并将同一采集周期内分散在不同时间片段的多路采样数据归并为统一时序基准的数据集合,避免时分复用架构下由于各路信号采样时刻错位导致无法直接开展跨信号联合分析,在保障信号覆盖广度的同时,实现采集成本与采集效果的平衡。
Smart Images

Figure CN122994119A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a data acquisition method, apparatus, device, medium, and product. Background Technology
[0002] With the development of industrial technology, the number of controllers, sensors and actuators integrated into various equipment systems continues to grow. Data interaction is usually carried out using various types of buses such as controller area networks, local area networks and industrial Ethernet.
[0003] However, due to limitations in hardware cost, device size, and power consumption, the number of physical acquisition channels that can be provided is often limited, while the number of signal channels that need to be monitored may reach thousands or even higher. Since all signals cannot be acquired at the same time, it is difficult to effectively perform cross-signal joint analysis. Summary of the Invention
[0004] To overcome the problems existing in related technologies, this application provides a data acquisition method, apparatus, equipment, medium, and product.
[0005] According to a first aspect of any embodiment of this application, a data acquisition method is provided, the method comprising: The sampling data output from multiple acquisition channels of the data acquisition device is acquired; wherein each sampling data has sampling time information set by the data acquisition device, and the data acquisition device acquires N signals through M acquisition channels using time-division multiplexing, where M is less than N; Based on the sampling time information, multiple sampling data collected within the same acquisition period are aligned to the same time window to generate a data set corresponding to the acquisition period, wherein the time window is the time period corresponding to the acquisition period.
[0006] According to a second aspect of any embodiment of this application, a data acquisition apparatus is provided, the apparatus comprising: The acquisition module is used to acquire the sampled data output from multiple acquisition channels of the data acquisition device; wherein each sampled data has the sampling time information set by the data acquisition device, and the data acquisition device uses time-division multiplexing to acquire N signals through M acquisition channels, where M is less than N; The alignment module is used to align multiple sampled data collected within the same acquisition period to the same time window based on the sampling time information, thereby generating a data set corresponding to the acquisition period, wherein the time window is the time period corresponding to the acquisition period.
[0007] According to a third aspect of any embodiment of this application, an electronic device is provided, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor executes the executable instructions to implement the steps of the method described in any of the embodiments of this application above.
[0008] According to a fourth aspect of any embodiment of this application, a computer-readable storage medium is provided having computer instructions stored thereon that, when executed by a processor, implement the steps of the method described in any of the embodiments of this application described above.
[0009] According to a fifth aspect of any embodiment of this application, a computer program product is provided, having a computer program / instructions stored thereon, which, when executed by a processor, implement the steps of the method described in any of the embodiments of this application described above.
[0010] The technical solution provided in this application may include the following beneficial effects: As can be seen from the above embodiments, by acquiring the sampling data output from multiple acquisition channels of the data acquisition device, and based on the sampling time information, the multiple sampling data acquired in the same acquisition period are aligned to the same time window to generate a data set corresponding to the acquisition period. By adopting time-division multiplexing, N signals can be acquired with a limited number of M acquisition channels, and the multiple sampling data scattered in different time segments in the same acquisition period are merged into a data set with a unified time reference. This avoids the inability to directly carry out cross-signal joint analysis due to the misalignment of the sampling times of each signal under the time-division multiplexing architecture, and achieves a balance between acquisition cost and acquisition effect while ensuring the breadth of signal coverage.
[0011] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0012] The accompanying drawings, which are incorporated in and form part of this application, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0013] Figure 1 This is a flowchart illustrating a data acquisition method according to an exemplary embodiment of this application; Figure 2 This is a schematic diagram of the structure of a data acquisition system according to an exemplary embodiment of this application; Figure 3 This is an interactive flowchart illustrating a data acquisition method according to an exemplary embodiment of this application; Figure 4 This is a schematic diagram of the structure of an electronic device according to an exemplary embodiment of this application; Figure 5 This is a block diagram illustrating a data acquisition device according to an exemplary embodiment of this application. Detailed Implementation
[0014] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0015] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.
[0016] It should be understood that although the terms first, second, etc., may be used in this application to describe various information, this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."
[0017] When the number of physical channels is much smaller than the total scale of the signals to be collected, if time-division multiplexing is used to poll and collect massive target signals with a limited number of physical acquisition channels, the sampling actions of each signal will be completed at different time points, resulting in significant timing deviations in the sampling times of each signal in the same time dimension, making it impossible to directly carry out joint analysis across signals.
[0018] Cross-signal joint analysis has strict requirements for the full state of the system at the same moment. Especially in scenarios such as fault backtracking and troubleshooting, and cross-controller collaborative function verification, it is necessary to accurately restore the synchronization state of all relevant signals at a specific point in time, such as locating the combination of signal values and state change logic of each node of the vehicle at the moment of triggering an intermittent fault.
[0019] Taking the vehicle bus acquisition scenario as an example, the state transition of the vehicle bus signal has high-speed dynamic characteristics. A timing deviation of milliseconds may correspond to completely different system conditions in a high-speed electronic and electrical system. If the sampling time of a certain signal falls in the stable stage before the fault is triggered, and the sampling time of another related signal falls in the transition stage after the fault is triggered, although both belong to a relatively short time range, they actually represent the state values under different operating conditions.
[0020] If the data is directly compared and correlated based on the sampling timestamps of each signal, the data is in an asynchronous and discrete state on a unified time axis. Joint analysis based on this will introduce timing noise, leading to problems such as misjudgment of fault causation, and making it impossible to accurately locate faults and verify control logic.
[0021] If a fully parallel acquisition scheme is adopted to ensure the consistency of the sampling timing of all signals, and an independent acquisition channel is configured for each signal to be acquired to achieve synchronous sampling, it will lead to an increase in hardware cost and power consumption, and will not be able to meet the needs of large-scale signal coverage and cross-signal joint analysis at the same time.
[0022] To address the aforementioned problems, this application proposes a data acquisition method, apparatus, device, medium, and product. The following embodiments are provided to further illustrate this application: Please see Figure 1 , Figure 1 This is a flowchart illustrating a data acquisition method according to an exemplary embodiment of this application. The method can be executed by data processing devices with data processing and storage capabilities, such as a host computer, a cloud analysis platform, or a data processing module in the device under test. Alternatively, it can be executed collaboratively by the data acquisition device and processing devices such as the host computer and cloud analysis platform. This application does not impose any limitations on this method.
[0023] This method can be applied to scenarios where the number of signals to be acquired is greater than the number of acquisition channels. For example, it can be used in scenarios such as full signal scanning to test the vehicle bus signals in the early stages of R&D, fault location scenarios to locate the status of all signals after an occasional vehicle failure, and low-cost adaptation scenarios for large-scale vehicle testing.
[0024] like Figure 1 As shown, the method may include the following steps: Step S101: Acquire the sampling data output from multiple acquisition channels of the data acquisition device; wherein, each sampling data has the sampling time information set by the data acquisition device, and the data acquisition device uses time-division multiplexing to acquire N signals through M acquisition channels, where M is less than N.
[0025] In this step, sampling data output from multiple acquisition channels of the data acquisition device can be obtained through local direct connection methods such as universal serial bus or vehicle communication bus. Alternatively, sampling data transmitted back from the vehicle-side acquisition device can be obtained through remote transmission methods such as wireless local area network. Historical sampling data can also be obtained through file reading.
[0026] The sampling time information for each sampled data can be directly generated by the hardware timing module of the data acquisition device at the moment the sampling action is completed. The sampling time information is used to mark the acquisition time and timing position corresponding to the sampled data, and can be a acquisition timestamp.
[0027] The data acquisition equipment adopts a time-division multiplexing acquisition architecture, dividing the continuous acquisition time into multiple sequentially connected acquisition cycles, and each acquisition cycle is further divided into multiple time segments of fixed duration. By switching signal access paths through a programmable cross matrix switch and polling different signal links through a multi-channel analog switch array, M acquisition channels are respectively connected to different signal access terminals within a single time segment, and the sampling of the corresponding M signals is completed synchronously.
[0028] Among them, the time segment, also known as the micro-time slot, is the smallest time scheduling unit in the time-division multiplexing acquisition architecture. The time segment is the smallest time interval in a single acquisition cycle in which the conduction relationship between the acquisition channel and the signal access terminal remains fixed and each channel completes sampling in parallel.
[0029] By sequentially switching and scheduling all time segments within a single acquisition cycle, all N signals can be traversed, completing a full round of full signal acquisition. Upon entering the next acquisition cycle, the above-mentioned turn-on and sampling logic for each time segment is repeated, thereby enabling cyclic polling acquisition of N signals, which is larger than the number of channels. This expands the coverage of signal monitoring within the constraints of hardware cost, equipment size, and power consumption.
[0030] Step S102: Based on the sampling time information, align multiple sampling data collected within the same acquisition period to the same time window to generate a data set corresponding to the acquisition period. The time window is the time period corresponding to the acquisition period.
[0031] In this step, based on the sampling time information of each sampled data, the collection period to which each sampled data belongs can be determined by comparing timestamp intervals and matching collection period numbers. Then, all sampled data belonging to the same collection period are uniformly merged and aligned to the time window corresponding to that collection period to establish a unified time series reference.
[0032] The final generated dataset can be organized and output in the form of multidimensional feature vectors, structured data tables, etc. Each dataset includes the sampled values of all target signals within the current acquisition period, which can completely represent the overall operating status of all signals under this time window, providing a unified time-series data foundation for subsequent data applications such as fault diagnosis, status modeling, and trend analysis.
[0033] In one embodiment, the sampled data is vehicle bus data collected by the data acquisition device. The vehicle bus data may include message data from various vehicle communication buses such as Controller Area Network (CAN) bus, Local Interconnect Network (LIN) bus, and vehicle Ethernet bus, as well as sensor data, controller operating status, and other signal data extracted from the corresponding messages.
[0034] In vehicle scenarios such as whole vehicle testing and real vehicle data acquisition, the scale of bus signals to be monitored within the whole vehicle can reach thousands. However, the data acquisition equipment deployed in the vehicle is limited by the vehicle hardware cost and can only be configured with a limited number of acquisition channels. Therefore, using time-division multiplexing to poll and collect vehicle bus signals can control the hardware cost and deployment difficulty of the equipment while ensuring signal coverage.
[0035] Vehicle bus data can be collected by data acquisition devices that are connected to the vehicle bus network, and sampling time information adapted to the vehicle bus data can be generated.
[0036] By applying time-division multiplexing acquisition and time window alignment to the acquisition scenario of vehicle bus data, it is possible to adapt to the hardware cost constraints in the vehicle environment, achieve coverage of thousands of vehicle bus signals with a limited number of acquisition channels, and at the same time ensure the feasibility of cross-signal joint analysis.
[0037] It is understood that the sampling data can also be sensor data from an industrial bus system, logic data from an embedded system, etc., and this application embodiment does not limit this.
[0038] In one embodiment, by aligning multiple sampled data points acquired within the same acquisition period to the same time window, the generated dataset can include data values across multiple dimensions. For example, the dataset can be generated in the form of a feature vector.
[0039] The data values of multiple dimensions correspond to multiple sampled data points within the acquisition period. The number of dimensions corresponds to the total number of signals, and the mapping relationship between each dimension and each signal can be fixed by preset dimension indexing rules, such as arranging them in order of signal access number or signal functional domain classification. If a signal is sampled multiple times within a single acquisition period, the data values of the corresponding dimensions can be selected according to the analysis scenario requirements, such as single sample value or average value within the period, to adapt to different precision analysis requirements.
[0040] Each dataset corresponds to a unique dataset acquisition time, serving as a unified timing reference for the signal state data. Data values across multiple dimensions correspond to the same dataset acquisition time, which is the time window corresponding to the acquisition period. Data values for all dimensions within the same dataset share the same dataset acquisition time, logically equivalent to a snapshot of the entire signal's synchronized state acquired at the same moment.
[0041] For example, the start time of the time window can be selected as the data collection time, the end time of the time window can be selected as the data collection time, or the window period of the time window can be selected as the data collection time.
[0042] For example, a time-division multiplexing acquisition scenario based on M=3 acquisition channels and N=9 signals is described. A single acquisition cycle contains three consecutive time segments: Slot 0, Slot 1, and Slot 2. The time window corresponding to this acquisition cycle is [1.000s, 1.032s].
[0043] After the data acquisition device completes sampling within each time segment, the output sampled data carries independent sampling time information, and there is a timing misalignment in the sampling time of each signal.
[0044] Within Slot 0, the sampled values of signal A (2.5V), signal D (2.3V), and signal G (1.8V) were acquired, with corresponding sampling times of 1.005s, 1.006s, and 1.005s, respectively. Within Slot 1, the sampled values of signal B (3.1V), signal E (2V), and signal H (2.1V) were acquired, with corresponding sampling times of 1.016s, 1.017s, and 1.016s, respectively. Within Slot 2, the sampled values of signal C (1.8V), signal F (2V), and signal I (2.5V) were acquired, with corresponding sampling times of 1.027s, 1.028s, and 1.027s, respectively.
[0045] After time window alignment, the above 9 sampling data are uniformly merged into the time window corresponding to the current acquisition cycle, generating a data set organized in the form of feature vectors. The generated 9-dimensional feature vector can be represented as: [2.5, 2.3, 1.8, 3.1, 2, 2.1, 1.8, 2, 2.5]. The data acquisition time corresponding to this data set is [1.000s, 1.032s]. All data values in the 9 dimensions of the set share the same data acquisition time, which is logically equivalent to a snapshot of the entire signal state synchronously acquired at 1.000s.
[0046] If a signal is sampled multiple times within a single acquisition period, for example, a high-priority signal A is sampled once in Slot 0 and once in Slot 3 of the same acquisition period, with the two sampled values being 2.5V and 2.7V respectively, the average of the two sampled values, 2.6V, can be taken as the data value for the corresponding dimension.
[0047] By transforming asynchronous discrete multi-channel sampled data in time-division multiplexing mode into multi-dimensional state data with a unified timing reference, logical synchronization of all signals is achieved at the data level without increasing hardware channel resources. This enables joint comparison and correlation calculation across signals directly on a data set basis, reducing computational overhead in the analysis process. It also eliminates time differences caused by hardware rotation, restoring the time relationship between different signals to the same moment, thereby enabling accurate cross-signal correlation, fault reproduction, and root cause localization.
[0048] In one embodiment, the process of aligning sampled data to a time window can be achieved by determining the relative relationship between the sampling time and the period boundary. First, the acquisition period to which the sampled data belongs can be determined based on the relative relationship between the sampling time information and the boundary of each acquisition period; then, sampled data belonging to the same acquisition period can be aligned to the time window corresponding to that acquisition period.
[0049] For example, the acquisition period corresponding to each piece of sampled data can be determined by comparing the sampling time information of the sampled data with the start and end boundary times and the termination boundary times of each acquisition period. The boundary times of the acquisition period can be generated based on pre-configured acquisition period parameters or determined based on hardware synchronization pulse markers output by the data acquisition device.
[0050] When aligning sampled data from the same acquisition period to the corresponding time window, alignment can be achieved by configuring a unified period reference time label for all sampled data within the period, or by mapping the time reference of each sampled data to a specified reference time of the acquisition period.
[0051] The unified reference time for the time window can be selected from different nodes such as the start and end times of the acquisition cycle. After alignment processing, the sampling data of all signals within the same acquisition cycle have a unified time sequence reference benchmark, which can be directly used as a complete set of state data for joint comparison and correlation analysis across signals, solving the joint analysis obstacles caused by the scattered sampling times and inconsistent timing in time division multiplexing mode.
[0052] By determining the acquisition period to which the sampled data belongs based on the relative relationship between the sampling time information and the boundary of each acquisition period, and aligning the sampled data belonging to the same acquisition period to the corresponding time window, alignment errors of the acquired data can be avoided, and the accuracy of the data aligned to the time window can be guaranteed.
[0053] In one embodiment, after generating the data set corresponding to the acquisition period, the data set corresponding to each acquisition period can be sorted according to the temporal order of the acquisition periods, by sequentially splicing them according to the acquisition period number or assembling them frame by frame according to the time window order, to obtain time-series data. The time-series data consists of multiple sets of continuous single-cycle signal state snapshots, which can completely present the continuous change process of all signals over a longer time dimension.
[0054] Based on the obtained time-series data, the correlation and change characteristics among multiple signals are determined through methods such as correlation numerical calculation, time-series difference comparison, and change trend analysis. Correlation and change characteristics are feature information characterizing the linkage and temporal logic of multiple signals in the continuous time dimension. Examples include the linkage response relationship of signals from different functional domains, the temporal correspondence between sensor input signals and actuator output signals, and the coordinated change patterns of multiple signals during system state switching.
[0055] Based on the correlation and change characteristics between multiple signals, signal analysis tasks are performed on multiple signals. For example, in the scenario of sporadic fault location, the source node of the fault can be located based on the abnormal linkage characteristics between signals; in the scenario of whole vehicle testing, the execution effect of the control strategy can be verified by the correlation and change patterns of multiple signals.
[0056] By sorting the data sets corresponding to each acquisition cycle according to the temporal sequence of the acquisition cycle, time-series data is obtained. This allows the time-series data to reflect the changing trends of each signal in the continuous time dimension. Based on the time-series data, the correlation and change characteristics between multiple signals are determined, and signal analysis tasks such as trend prediction and anomaly detection are performed, thereby improving the efficiency of data analysis and utilization.
[0057] The data acquisition method in this embodiment acquires sampling data output from multiple acquisition channels of the data acquisition device. Based on the sampling time information, it aligns multiple sampling data acquired within the same acquisition period to the same time window, generating a data set corresponding to the acquisition period. By employing time-division multiplexing, it acquires N signals using a limited number of M acquisition channels. It also merges multiple sampling data scattered in different time segments within the same acquisition period into a data set with a unified timing reference. This avoids the inability to directly conduct cross-signal joint analysis due to the misalignment of sampling times of each signal under the time-division multiplexing architecture. While ensuring the breadth of signal coverage, it achieves a balance between acquisition cost and acquisition effect.
[0058] The foregoing embodiments introduced a time window alignment mechanism to ensure cross-signal joint analysis capabilities of sampled data acquired using time-division multiplexing. The following embodiments will provide a detailed description of the data acquisition and processing process, which can be applied to any of the embodiments described above.
[0059] In one embodiment, before acquiring the sampled data output from multiple acquisition channels of the data acquisition device, time-varying mapping data can be generated based on acquisition reference information of N signals. The acquisition reference information can be obtained through user configuration, reading configuration files, etc., and serves as the basis for generating the mapping rules for signal acquisition, reflecting information such as the signal to be acquired and acquisition performance requirements. The time-varying mapping data is used to indicate the mapping relationship between the signal access terminal and the acquisition channel corresponding to different time segments.
[0060] For example, the reference information to be collected may include at least one of the following: synchronous acquisition identifier; priority identifier; target sampling rate; signal to be acquired selected by the user; user input command; data acquisition alarm information.
[0061] The priority identifier is used to mark the importance of acquiring each signal, providing a priority basis for channel resource allocation. The target sampling rate is used to define the sampling frequency requirement for each signal to be acquired, reflecting the data update rate requirements of different signals.
[0062] Synchronization acquisition identifiers are used to mark synchronous acquisition constraints between multiple signals, that is, to mark the set of signals that need to be sampled at the same time, ensuring the consistency of sampling time for related signals. Data acquisition alarm information can come from abnormal states reported by data acquisition devices, fault alarms from the system under test, etc.
[0063] By supporting multi-dimensional acquisition reference information as a configuration reference, the generated time-varying mapping data can meet the acquisition requirements of various aspects such as signal range, sampling performance, and synchronization constraints, accurately match the differentiated acquisition requirements under different scenarios, and improve the rationality of data configuration.
[0064] The process of generating time-varying mapping data can be achieved through automatic arrangement using preset scheduling rules, neural network models, etc. The resulting time-varying mapping data is used to indicate the signal access terminals that are turned on by each acquisition channel in different time segments of each acquisition cycle, establishing a mapping relationship between time dimension, acquisition channel and signal access node.
[0065] After obtaining the time-varying mapping data, the system controls multiple acquisition channels of the data acquisition device to activate the corresponding signal access terminals, thereby acquiring the signal corresponding to each signal access terminal. For example, when the time-varying mapping data is transmitted to the data acquisition device, the control unit of the data acquisition device, according to the timing rules of the time-varying mapping data, controls programmable cross matrix switches, multi-channel analog switch arrays, etc., to sequentially activate each acquisition channel to the corresponding signal access terminal in different time segments, completing the sampling and output of the corresponding signal. Thus, with a limited number of M acquisition channels, the system achieves the polling acquisition of N signals, which is greater than the channel size.
[0066] For example, in a vehicle bus signal acquisition scenario, time-varying mapping data can be generated through quantization calculations and timing arrangement. First, determine the M acquisition channels configured in the data acquisition device, and the N vehicle bus signals to be acquired. Then, determine the target sampling rate for each signal based on the performance requirements of the acquisition task. For instance, when M is 32, N is 3000, and the target sampling rate for all signals is uniformly set to 1Hz, the acquisition period division and timing arrangement rules can be derived based on these parameters.
[0067] The acquisition period corresponds one-to-one with the target sampling rate. A single signal is sampled at least once within each acquisition period. Therefore, the duration of the acquisition period can be determined based on the reciprocal of the target equivalent sampling rate. In this example, the target equivalent sampling rate is 1Hz, corresponding to a single acquisition period of 1 second, meaning that a complete acquisition of all signals is completed every 1 second.
[0068] Next, the number and duration of time segments within the acquisition period are determined. Within a single time segment, each acquisition channel can activate one signal access terminal and complete one sampling. Therefore, a maximum of M signals can be acquired simultaneously within a single time segment. To cover all N target signals within one acquisition period, the total number of time segments required for each acquisition period can be calculated using the ratio of N to M.
[0069] Substituting the example parameters, we find that there are 94 time segments within each acquisition cycle. Distributing the total duration of the acquisition cycle evenly across these time segments yields the duration of a single time segment; in this example, the duration of a single time segment is approximately 10.64 milliseconds. Within each time segment, operations such as switching on the signal access point, signal sampling and conversion, and data buffering can be performed sequentially. Since the channel switching time and analog-to-digital conversion time are both in the microsecond range, much shorter than the total duration of a single time segment, the hardware timing has sufficient margin to ensure the stability and reliability of the acquisition process.
[0070] Finally, based on the above-mentioned acquisition period and time segment division results, a corresponding signal access terminal is assigned to each acquisition channel within each time segment, forming structured time-varying mapping data. For example, when M=3 and N=9, the time-varying mapping data shown in Table 1 below can be generated: Table 1 Time-varying mapping data
[0071] In Table 1, rows correspond to different time segments, columns correspond to different physical acquisition channels, and cell content represents the signals conducted by the acquisition channels in the corresponding time segment. In Slot 0, acquisition channels 1, 2, and 3 conduct signals A, D, and G respectively, synchronously sampling the three signals. In Slot 1, the three acquisition channels switch between conducting signals B, E, and H respectively. In Slot 2, the three acquisition channels switch between conducting signals C, F, and I respectively.
[0072] After three consecutive time segments from Slot 0 to Slot 2, a complete round of acquisition of all 9 signals can be completed, constituting one acquisition cycle; Slot 3 is the starting time segment of the next acquisition cycle, and the conduction relationship of this time segment is consistent with that of Slot 0, realizing cyclic polling acquisition.
[0073] During the data acquisition process, the number and arrangement of each signal in the time segment can be adjusted based on acquisition reference information such as synchronous acquisition identifier, priority identifier, and differentiated target sampling rate. By differentiating resource allocation, the acquisition performance requirements of different signals can be adapted, thereby improving the adaptability of the mapping scheme.
[0074] By generating time-varying mapping data based on the acquired reference information and controlling the conduction relationship between the acquisition channel and the signal access terminal, the scheduling rules of time-division multiplexing can be flexibly configured to adapt to different signal acquisition ranges and performance requirements. The acquisition strategy can be adjusted without modifying the hardware circuit, thereby improving the configuration flexibility and scenario adaptability of data acquisition.
[0075] In one embodiment, the acquisition reference information includes a synchronization acquisition identifier. The synchronization acquisition identifier is used to mark the set of signals that need to be sampled at the same sampling time. If signals with synchronization requirements are time-division multiplexed and accessed to the same acquisition channel, timing deviations will be introduced due to the time difference between sampling times, interfering with the accurate judgment of causal relationships and linkage logic between signals. Therefore, when the signal to be acquired carries a synchronization acquisition identifier, the timing alignment of the sampling actions needs to be ensured through the allocation of acquisition channels.
[0076] Signals with the same synchronization acquisition identifier can be mapped to different acquisition channels within the same time segment to generate time-varying mapping data. For example, all signals to be acquired can be grouped according to their synchronization acquisition identifiers, and signals carrying the same identifier can be grouped into the same synchronization acquisition group. Each signal within the same synchronization acquisition group is assigned an independent physical acquisition channel, and the signals in this group are uniformly configured to be sampled in parallel within the same time segment. This ensures that the sampling trigger times of all signals within the group are completely consistent, eliminating the timing deviation caused by time division multiplexing and generating time-varying mapping data.
[0077] The synchronization allocation rules in the time-varying mapping data are embedded in the time slice arrangement logic of each acquisition cycle. The signals of the same synchronous acquisition group are always bound to the same sequence number of time slice and correspond to different acquisition channels, and synchronous sampling is continuously maintained during the periodic rotation sampling process.
[0078] After allocating time segments for all synchronous acquisition signals, for signals that do not have a synchronous acquisition identifier, time-division multiplexing scheduling can continue to be used. The remaining signals without synchronization requirements are then filled into the idle acquisition channels of each time segment, sharing acquisition channel resources in different time segments to maintain high utilization of acquisition channel resources.
[0079] By mapping signals with the same synchronous acquisition identifier to different acquisition channels within the same time segment, it ensures that multiple signals with time-series correlation are sampled at the same time, eliminating the timing deviation caused by the time-division multiplexing mechanism, and meeting the synchronous acquisition requirements of correlated signals while ensuring channel multiplexing.
[0080] In one embodiment, the collected reference information may include a priority identifier and a target sampling rate. The sampling rate metric can be used as a constraint, and the priority identifier as the basis for resource allocation, to perform time-division multiplexing scheduling of the acquisition channel resources and generate corresponding time-varying mapping data.
[0081] The number of times each signal is sampled within the acquisition period can be determined based on a priority identifier. The priority identifier distinguishes the importance of each signal's acquisition. For example, the theoretical number of times each signal is sampled can be calculated first based on its target sampling rate and the duration of the acquisition period; then, adjustments can be made based on the corresponding signal's priority identifier.
[0082] For example, for high-priority signals, the number of acquisitions is guaranteed to be no less than the theoretical number of acquisitions. When there is redundancy in channel resources, the number of acquisitions can be increased to further improve the time uniformity of sampling and data reliability. For low-priority signals, the number of acquisitions is reduced within the allowable sampling rate error range to free up channel resources to ensure the acquisition performance of high-priority signals.
[0083] Finally, based on the duration of the acquisition period and the number of times each signal is acquired within the acquisition period, the correspondence between signals and channels in each time segment of a single acquisition period is planned. Multiple samples of the same signal are evenly distributed across different time segments of the acquisition period, generating time-varying mapping data. This time-varying mapping data clearly indicates the signal access terminal corresponding to each acquisition channel in each time segment within each acquisition period. The data acquisition device can then perform time-division multiplexing sampling cyclically according to the acquisition period based on this time-varying mapping data.
[0084] For example, in an on-board testing scenario, the duration of a single acquisition cycle is set to 10ms, corresponding to a maximum target sampling rate of 100Hz. The data acquisition device is configured with 8 acquisition channels. Among them, the drive motor torque signal has high priority, a target sampling rate of 100Hz, and is acquired once in a single acquisition cycle; the motor speed signal has high priority, a target sampling rate of 100Hz, and is acquired once in a single acquisition cycle; the power battery voltage signal has medium priority, a target sampling rate of 50Hz, and is acquired once every two acquisition cycles; and 16 signals such as door status and headlight status have low priority, a target sampling rate of 10Hz, and are acquired once every 10 acquisition cycles.
[0085] Based on the above parameters, time segments can be arranged, with two high-priority signals occupying two acquisition channels for synchronous sampling in each cycle. The remaining six acquisition channels are time-division multiplexed to carry the acquisition of medium and low-priority signals in a single acquisition cycle, ultimately generating the corresponding time-varying mapping data.
[0086] By determining the acquisition period based on the target sampling rate and the number of acquisitions for each signal within the acquisition period based on the priority identifier, it is possible to ensure that the equivalent sampling rate of each signal meets the preset target, and to allocate acquisition channel resources differently according to the importance of the signal, giving priority to the acquisition performance of high-priority signals.
[0087] In one embodiment, before aligning multiple sampled data collected within the same acquisition period to the same time window, the sampled data within the current acquisition period can be subjected to integrity verification and missing data completion processing to avoid signal sampling loss due to occasional hardware frame drops, buffer overflows, or other situations, thus ensuring the integrity of the data set.
[0088] For signals with missing sampled data in the current acquisition cycle, reference data can be determined based on the sampled data of the signal in adjacent acquisition cycles. For example, suitable reference data can be obtained by directly filling in the missing data with sampled data from the previous or next acquisition cycle, performing linear interpolation on the sampled data from two adjacent acquisition cycles, or fitting the signal according to its historical variation patterns.
[0089] The reference data is used as the sampled data of the signal in the current acquisition period. After the data of the full signal is completed, the subsequent time window alignment and data set generation operations are performed.
[0090] By determining reference data based on sampling data in adjacent acquisition cycles for signals with missing sampling data before data alignment, and using this reference data as the sampling data for the current acquisition cycle, it is possible to avoid the data loss caused by hardware frame dropping and other reasons affecting the integrity of the data set.
[0091] Understandably, in scenarios involving rapid changes and high-precision fault location analysis, it is necessary to strictly preserve the authenticity of the data. Missing sampled data can be marked as invalid. For example, in the dataset to be generated, an invalid marker can be added to the location corresponding to the signal with missing sampled data, indicating that there is no valid sampled data for that signal within the current acquisition period.
[0092] To further explain the data acquisition process, Figure 2 This is a schematic diagram illustrating the structure of a data acquisition system according to an exemplary embodiment of this application. The data acquisition system is applied in scenarios such as vehicle testing, industrial measurement and control, and embedded system testing, where there is a need to acquire multiple signals. The data acquisition system may include a data acquisition device 20, a data processing device 21, and a device under test 22.
[0093] The data acquisition device 20 and the data processing device 21 establish a data interaction channel through a wired or wireless communication link for transmitting information such as time-varying mapping data, acquisition status feedback, and sampling data. The data acquisition device 20 and the device under test 22 establish a signal path through a connection method such as a bus interface. The N channels of signals to be acquired output by the device under test 22 are led out to the signal access array, and the data acquisition device 20 is connected to the signal access array.
[0094] The data acquisition device 20 is a data acquisition execution terminal deployed on the device under test. It can receive various signals output by the device under test 22, input the signals into the acquisition channel for sampling processing according to the time-varying mapping data, and output the corresponding acquired data.
[0095] The data acquisition device 20 can be an independent external data acquisition recorder, which is connected to the bus interface and signal test points of the device under test via external wiring; or it can be an acquisition module integrated inside the device under test 22.
[0096] Data processing device 21 is a user-facing configuration and control terminal, responsible for generating time-varying mapping data, distributing the time-varying mapping data to data acquisition device 20, and aligning the sampled data output from multiple acquisition channels of the data acquisition device with the time window. Data processing device 21 can be a host computer or other upper-level device, directly connected to data acquisition device 20 via a wired link; or it can be a remote server device such as a cloud server or cloud management platform, establishing connections with multiple data acquisition devices 20 simultaneously via a communication network.
[0097] The device under test (DUT) 22 is the end of the system under test and can output multiple signals to be acquired. In different application scenarios, the DUT 22 has different forms and signal compositions. For example, in automotive testing scenarios, the DUT 22 can be an automotive domain controller, and the output signals can be automotive bus signals; in industrial measurement and control scenarios, the DUT 22 can be a multi-node measurement and control system of an industrial production line, and the output signals can be equipment operating status signals, control feedback signals, etc.
[0098] Figure 3 An interactive flowchart of a data acquisition method is shown. This method provides a brief description of the complete process of data configuration and data acquisition; for detailed implementation, please refer to the aforementioned embodiments. This method can be applied to... Figure 2 The data acquisition system shown.
[0099] like Figure 3 As shown, the method may include the following steps: Step S301: The data processing device acquires the collected reference information.
[0100] In this step, the data processing device can display the candidate signal set through a visual configuration interface, and receive the user's selection instructions for N signals in the candidate signal set, as well as the acquisition reference information configured for the N signals. It can also trigger acquisition requirements and obtain acquisition reference information by importing signal definition files, obtaining user input instructions, data acquisition alarm information, etc.
[0101] Step S302: The data processing device generates time-varying mapping data based on the acquisition reference information of N signals.
[0102] In this step, the data processing device generates suitable time-varying mapping data based on the acquisition reference information of N signals, combined with the hardware resource parameters of the data acquisition device, and according to the preset mapping generation rules and analysis models.
[0103] Step S303: The data processing device sends time-varying mapping data to the data acquisition device.
[0104] In this step, the data processing device sends the generated time-varying mapping data to the data acquisition device through a pre-established communication link with the data acquisition device.
[0105] Step S304: The data acquisition device acquires data based on the time-varying mapping data.
[0106] In this step, the data acquisition device parses and verifies the received time-varying mapping data. According to the scheduling logic of time segments, it controls multiple acquisition channels of the data acquisition device to turn on the corresponding signal access terminals during the intervals of each time segment, so as to acquire the signal corresponding to each signal access terminal and realize time-division sampling of multiple signals within a single acquisition cycle.
[0107] Step S305: The data acquisition device sends a configuration activation feedback message to the data processing device.
[0108] In this step, after the data acquisition device completes the configuration loading and confirms that the sampling process has started normally, it returns configuration effectiveness feedback information to the data processing device, including the configuration loading result, configuration effective time, and current running status.
[0109] During the continuous sampling process of the data acquisition device, the user can adjust the range of the signal to be acquired, modify the priority identifier of the signal or the target sampling rate in the visual configuration interface. The data processing device can respond to the dynamic changes in acquisition requirements and obtain updated acquisition reference information.
[0110] Based on the updated acquisition reference information, the data processing equipment determines the mapping relationship of newly added signals to be acquired, the mapping relationship of signals to be removed, the signal sampling timing and parameter adjustment content, etc., and generates incremental time-varying mapping data containing only the changed content.
[0111] The data processing device sends incremental time-varying mapping data to the data acquisition device via a communication link. Upon receiving the incremental time-varying mapping data, the data acquisition device can first cache it locally without interrupting the sampling process of the current acquisition cycle. Then, the incremental time-varying mapping data is merged and updated with the currently effective time-varying mapping data.
[0112] After all sampling in the current acquisition cycle has been completed, at the beginning of the next acquisition cycle, based on the updated complete mapping relationship, the conduction path between the signal access terminal and the acquisition channel is adjusted to control the acquisition channel to perform data sampling.
[0113] Step S306: The data acquisition device sends the sampled data to the data processing device.
[0114] In this step, during the sampling process, the data acquisition device associates the sampling data output from the acquisition channel with the corresponding sampling time information and sends it to the data processing device through the communication link using methods such as real-time streaming and timed uploading.
[0115] Step S307: The data processing device determines reference data based on the sampled data of the signal in adjacent acquisition cycles.
[0116] In this step, for each acquisition cycle, the integrity of the received sampled data in the current acquisition cycle is first checked to identify signals with missing sampled data in the current acquisition cycle. For signals with missing sampled data, the sampled data of that signal in the adjacent acquisition cycle is retrieved to generate corresponding reference data.
[0117] Step S308: The data processing device uses the reference data as the sampled data of the signal in the current acquisition cycle.
[0118] In this step, the data processing device fills the corresponding signal sampling data bits in the current acquisition cycle with the generated reference data, thus completing the sampling data completion for the current acquisition cycle.
[0119] Step S309: The data processing device aligns multiple sampled data collected within the same acquisition cycle to the same time window based on the sampling time information.
[0120] In this step, the data processing device extracts the sampling time information attached to each sampled data. By comparing the timestamp with the boundary time of the acquisition cycle, it determines the acquisition cycle to which each sampled data belongs. All sampled data belonging to the same acquisition cycle are uniformly merged into the time window corresponding to that acquisition cycle, establishing a unified time series reference, and finally generating a dataset containing the full signal of the current cycle.
[0121] Step S310: The data processing device performs signal analysis tasks based on the data set corresponding to each acquisition cycle.
[0122] In this step, the data processing device sequentially concatenates data sets corresponding to multiple consecutive acquisition cycles according to the temporal order of the acquisition cycle to form time-series data. Based on this time-series data, the correlation and change characteristics between multiple signals are extracted, and cross-signal analysis tasks are performed.
[0123] Figure 4 This is a schematic diagram illustrating the structure of an electronic device according to an exemplary embodiment of this application. The electronic device may be, for example, a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, personal digital assistant, server, smart home appliance, in-vehicle system, etc. (Reference) Figure 4 At the hardware level, the electronic device includes a processor 401, an internal bus 402, a network interface 403, memory 404, and non-volatile memory 405, and may also include other hardware required for business operations. The processor 401 reads the corresponding computer program from the non-volatile memory 405 into the memory 404 and then runs it, forming a data acquisition device at the logical level. Of course, in addition to software implementation, this application does not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. That is to say, the execution subject of the following processing flow is not limited to individual logic units, but can also be hardware or logic devices.
[0124] Figure 5 This is a block diagram illustrating a data acquisition device according to an exemplary embodiment of this application. (Refer to...) Figure 5 The device may include: The acquisition module 501 is used to acquire the sampled data output by multiple acquisition channels of the data acquisition device; wherein each sampled data has the sampling time information set by the data acquisition device, and the data acquisition device uses time-division multiplexing to acquire N signals through M acquisition channels, where M is less than N; Alignment module 502 is used to align multiple sampled data collected within the same acquisition period to the same time window based on the sampling time information, and generate a data set corresponding to the acquisition period, wherein the time window is the time period corresponding to the acquisition period.
[0125] Optionally, before aligning multiple sampled data collected within the same acquisition period to the same time window based on the sampling time information to generate a data set corresponding to the acquisition period, the method further includes: For signals with missing sampled data in the current acquisition cycle, reference data is determined based on the sampled data of the signal in adjacent acquisition cycles. The reference data is used as the sampled data of the signal during the current acquisition period.
[0126] Optionally, before acquiring the sampled data output from the multiple acquisition channels of the data acquisition device, the device further includes: The generation module is used to generate time-varying mapping data based on the acquisition reference information of the N signals. The time-varying mapping data is used to indicate the mapping relationship between the signal access terminal and the acquisition channel corresponding to different time segments. The control module is used to control multiple acquisition channels of the data acquisition device to activate the corresponding signal access terminals based on the time-varying mapping data, so as to acquire the signal corresponding to each signal access terminal.
[0127] Optionally, the data acquisition reference information includes a synchronous acquisition identifier; The generation module, when used to generate time-varying mapping data based on the acquisition reference information of the N signals, includes: Signals with the same synchronous acquisition identifier are mapped to different acquisition channels within the same time segment to generate the time-varying mapping data.
[0128] Optionally, the collected reference information includes a priority identifier and a target sampling rate; The generation module, when used to generate time-varying mapping data based on the acquisition reference information of the N signals, includes: Based on the priority identifier, the number of times each signal is sampled within the sampling period is determined; The time-varying mapping data is generated based on the duration of the acquisition period and the number of times each signal is acquired within the acquisition period.
[0129] Optionally, the alignment module 502, when used to align multiple sampled data collected within the same acquisition period to the same time window based on the sampling time information, includes: Based on the relative relationship between the sampling time information and the boundary of each sampling period, the sampling period to which the sampling data belongs is determined; Align sampling data belonging to the same acquisition period to the time window corresponding to the acquisition period.
[0130] Optionally, the alignment module 502, when aligning multiple sampled data collected within the same acquisition period to the same time window to generate a data set corresponding to the acquisition period, includes: Generate a dataset, which includes data values across multiple dimensions; The data values of the multiple dimensions correspond to multiple sampled data within the acquisition period; and the data values of the multiple dimensions correspond to the same set data acquisition time, which is the time window corresponding to the acquisition period.
[0131] Optionally, after aligning multiple sampled data collected within the same acquisition period to the same time window based on the sampling time information to generate a data set corresponding to the acquisition period, the device further includes: The sorting module is used to sort the data set corresponding to each acquisition cycle according to the time sequence of the acquisition cycle to obtain time-series data; The correlation module is used to determine the correlation change characteristics among the multiple signals based on the time-series data; The execution module is used to perform signal analysis tasks based on the associated change characteristics.
[0132] Optionally, the sampled data is vehicle bus data collected by the data acquisition device.
[0133] The specific implementation process of the functions and roles of each unit in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.
[0134] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this application according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0135] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions, such as a memory including instructions, is also provided, which can be executed by a processor of a data acquisition device to implement the method as described in any of the above embodiments.
[0136] The non-transitory computer-readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk and optical data storage device, etc., and this application does not limit it.
[0137] In an exemplary embodiment, a computer program product including a computer program / instructions is also provided, which can be executed by a processor of a data acquisition device to implement the method described in any of the above embodiments.
[0138] The foregoing has described specific embodiments of this application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired results. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0139] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention filed herein. This application is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and alterations can be made without departing from its scope. The scope of this application is limited only by the appended claims.
[0140] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A data acquisition method, characterized in that, The method includes: The sampling data output from multiple acquisition channels of the data acquisition device is acquired; wherein each sampling data has sampling time information set by the data acquisition device, and the data acquisition device acquires N signals through M acquisition channels using time-division multiplexing, where M is less than N; Based on the sampling time information, multiple sampling data collected within the same acquisition period are aligned to the same time window to generate a data set corresponding to the acquisition period, wherein the time window is the time period corresponding to the acquisition period.
2. The method according to claim 1, characterized in that, Before aligning multiple sampled data collected within the same acquisition period to the same time window based on the sampling time information to generate a data set corresponding to the acquisition period, the method further includes: For signals with missing sampled data in the current acquisition cycle, reference data is determined based on the sampled data of the signal in adjacent acquisition cycles. The reference data is used as the sampled data of the signal during the current acquisition period.
3. The method according to claim 1, characterized in that, Before acquiring the sampled data output from the multiple acquisition channels of the data acquisition device, the method further includes: Based on the acquisition reference information of the N signals, time-varying mapping data is generated, which is used to indicate the mapping relationship between the signal access terminal and the acquisition channel corresponding to different time segments. Based on the time-varying mapping data, the multiple acquisition channels of the data acquisition device are controlled to activate the corresponding signal access terminals to acquire the signal corresponding to each signal access terminal.
4. The method according to claim 3, characterized in that, The collected reference information includes a synchronous collection identifier; The step of generating time-varying mapping data based on the acquisition reference information of the N signals includes: Signals with the same synchronous acquisition identifier are mapped to different acquisition channels within the same time segment to generate the time-varying mapping data.
5. The method according to claim 3, characterized in that, The collected reference information includes a priority identifier and a target sampling rate; The step of generating time-varying mapping data based on the acquisition reference information of the N signals includes: Based on the priority identifier, the number of times each signal is sampled within the sampling period is determined; The time-varying mapping data is generated based on the duration of the acquisition period and the number of times each signal is acquired within the acquisition period.
6. The method according to claim 1, characterized in that, The step of aligning multiple sampled data collected within the same acquisition period to the same time window based on the sampling time information includes: Based on the relative relationship between the sampling time information and the boundary of each sampling period, the sampling period to which the sampling data belongs is determined; Align sampling data belonging to the same acquisition period to the time window corresponding to the acquisition period.
7. The method according to claim 1, characterized in that, The step of aligning multiple sampled data collected within the same acquisition period to the same time window to generate a data set corresponding to the acquisition period includes: Generate a dataset, which includes data values across multiple dimensions; The data values of the multiple dimensions correspond to multiple sampled data within the acquisition period; and the data values of the multiple dimensions correspond to the same set data acquisition time, which is the time window corresponding to the acquisition period.
8. The method according to claim 1, characterized in that, After aligning multiple sampled data collected within the same acquisition period to the same time window based on the sampling time information to generate a data set corresponding to the acquisition period, the method further includes: According to the time sequence of the acquisition cycle, the data set corresponding to each acquisition cycle is sorted to obtain time-series data; Based on the time-series data, the correlation and change characteristics among the multiple signals are determined; Based on the aforementioned correlation and change characteristics, perform signal analysis tasks.
9. The method according to claim 1, characterized in that, The sampled data is the vehicle bus data collected by the data acquisition device.
10. A data acquisition device, characterized in that, The device includes: The acquisition module is used to acquire the sampled data output from multiple acquisition channels of the data acquisition device; wherein each sampled data has the sampling time information set by the data acquisition device, and the data acquisition device uses time-division multiplexing to acquire N signals through M acquisition channels, where M is less than N; The alignment module is used to align multiple sampled data collected within the same acquisition period to the same time window based on the sampling time information, thereby generating a data set corresponding to the acquisition period, wherein the time window is the time period corresponding to the acquisition period.
11. An electronic device, characterized in that, include: processor; A memory for storing processor-executable instructions; wherein the processor implements the steps of the method as described in any one of claims 1-9 by executing the executable instructions.
12. A computer-readable storage medium, characterized in that, It stores computer instructions that, when executed by a processor, implement the steps of the method as described in any one of claims 1-9.
13. A computer program product, characterized in that, Includes a computer program / instructions that, when executed by a processor, implement the steps of the method as described in any one of claims 1-9.