Multi-sensor data acquisition and processing method and system for tank semi-trailer
Patent Information
- Application Number
- CN202611141583.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-30
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2046-07-30
AI Technical Summary
[0003]现有罐式半挂车多传感器采集流程中,各物理通道常按数据帧到达时间直接汇集,触发边沿与接收完成时刻之间存在迟滞差异,跨通道数据容易落入相邻采样周期,轮次归属依赖粗粒度时间划分,前后脉冲扰动易引起重复锁存或遗漏锁存,状态数据缺乏统一缓存与必需字段校验,服务器端写入记录可能出现通道错配、字段缺失、时序偏移,影响车辆运行状态还原准确性
围绕物理通道编号、传感器类型、触发边沿时刻和数据帧接收完成时刻建立通道登记关系与迟滞指纹关系,使各通道采集行为先形成可追溯时序基准,再结合采集周期及前后容许脉冲边界完成锁存约束,通过迟滞回拨将接收完成时刻还原为实际锁存时刻,使不同传感器数据按照真实触发时序进入同一采样窗口,轮次归属与车辆标识、轮次序号保持一致,状态片缓存按传感器物理意义数值、锁存时刻和通道编号聚合,并经必需字段完整性筛除后写入数据库,减少通道错配,时序漂移和缺项记录。
Smart Images

Figure CN122633772B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial data processing technology, and in particular to a method and system for multi-sensor data acquisition and processing of tank semi-trailers. Background Technology
[0002] The field of industrial data processing technology involves data processing workflows that utilize computer equipment to perform format conversion, field merging, time synchronization, cache reading and writing, and database storage of sensor data from industrial equipment. Specifically, multi-sensor data acquisition and processing for tank semi-trailers refers to the processor reading data from multiple sensors through the acquisition interface, generating structured records according to data type, sensor channel, vehicle identifier, and timestamp, and storing the data in local storage or a server database.
[0003] In the existing multi-sensor acquisition process for tank semi-trailers, each physical channel is often directly aggregated according to the arrival time of the data frame. There is a hysteresis difference between the trigger edge and the time of reception completion. Cross-channel data is prone to falling into adjacent sampling cycles. The wheel assignment depends on coarse-grained time division. The disturbance of the preceding and following pulses is prone to causing repeated latching or missed latching. The status data lacks unified caching and necessary field verification. The server-side record writing may have channel mismatch, field missing and time sequence offset, which affects the accuracy of vehicle operation status restoration. Summary of the Invention
[0004] The purpose of this invention is to address the shortcomings of existing technologies by proposing a multi-sensor data acquisition and processing method for tank semi-trailers.
[0005] To achieve the above objectives, the present invention adopts the following technical solution: a multi-sensor data acquisition and processing method for tank semi-trailers, comprising the following steps: Obtain the physical channel number, sensor type, trigger edge time, and data frame reception completion time to determine the channel registration table and channel hysteresis fingerprint table; based on the channel registration table, trigger physical channel latching by the acquisition period, the number of pre-allowed pulses, and the number of post-allowed pulses to form a wheel record including vehicle identification, wheel number, and trigger edge time; Based on the channel hysteresis fingerprint table, the data frame reception completion time is recalled to determine the actual latching time, and the sampling window and round assignment result are determined according to the trigger edge time, the number of pre-allowed pulses and the number of post-allowed pulses; Based on the collection round assignment result, the vehicle identifier, the round number, and the sampling window start time, a status slice buffer slot is created, and the physical meaning value, the actual latching time, and the physical channel number are recorded according to the sensor type. Based on the status slice cache slot and the channel registration table, check the write status of the required fields, eliminate items with missing required fields, generate a structured status slice record, and write the structured status slice record into the server database.
[0006] As a further aspect of the present invention, the step of determining the channel registration form includes: Obtain the physical channel number, sensor type, trigger edge time, and data frame reception completion time. Deduplicatively register sensor input terminals under the same acquisition controller interface according to the physical channel number, establish a one-to-one correspondence between sensor type and physical channel number, and generate the channel registration table.
[0007] As a further aspect of the present invention, the step of generating the channel hysteresis fingerprint table includes: Extract the reception hysteresis duration corresponding to the same physical channel number and filter it. When any reception hysteresis duration exceeds the maximum registration hysteresis threshold or is less than the minimum registration hysteresis threshold of the same type of sensor, mark the corresponding data frame reception completion time as a hysteresis anomaly and remove it. Write the physical channel number and the sensor type together to obtain the channel hysteresis fingerprint table.
[0008] As a further aspect of the present invention, the step of triggering physical channel latching and forming a round record includes: Read the sensor type and registration status corresponding to the physical channel number in the channel registration table, remove the physical channel inputs that are not registered, record the acquisition cycle and determine the trigger reference time of the current round, and write the number of pre-allowed pulses and the number of post-allowed pulses into the latch boundary parameters of the current round; When the trigger edge time falls within the latch boundary parameters corresponding to the trigger reference time of the current round, the corresponding physical channel input is latched and the vehicle identifier is determined. The round number is generated incrementally according to the acquisition cycle, and the vehicle identifier, the round number and the trigger edge time are associated and written to form the round record.
[0009] As a further aspect of the present invention, the steps for determining the actual latching time, sampling window, and round assignment result include: Read the reception hysteresis duration corresponding to the physical channel number and the sensor type in the channel hysteresis fingerprint table, and perform reverse correction on the data frame reception completion time based on the reception hysteresis duration to determine the actual latching time; Based on the trigger edge time and the acquisition period, the window reference time for the current round is determined. The window boundary is expanded according to the number of pre-allowed pulses and the number of post-allowed pulses. The actual latching time falling into the window boundary is associated with the corresponding round to obtain the sampling window and round assignment results.
[0010] As a further aspect of the present invention, the specific steps for performing reverse correction are as follows: Using the physical channel number as the first search condition and the sensor type as the second search condition, the data frames in the channel hysteresis fingerprint table are jointly matched. When there is a data frame that satisfies both the first and second search conditions, the corresponding reception hysteresis duration is read. When there is no data frame that simultaneously satisfies the first and second search conditions, read the type hysteresis substitution value corresponding to the sensor type, replace the receiving hysteresis duration with the type hysteresis substitution value, and output the hysteresis correction amount for reverse correction. Obtain the hysteresis floating boundary corresponding to the hysteresis correction amount in the channel hysteresis fingerprint table, reverse the data frame reception completion time and the hysteresis correction amount to obtain the candidate latch time, and compare the time interval between the candidate latch time and the trigger edge time. When the time interval exceeds the hysteresis floating boundary, the candidate latching time is marked as a callback abnormal time, and the trigger edge time is used as the correction benchmark to perform boundary convergence on the callback abnormal time to determine the actual latching time.
[0011] As a further aspect of the present invention, the step of creating the state slice cache slot includes: Read the determined sampling window and round assignment results, establish a cache slot index with the vehicle identifier, the round number and the sampling window start time, and query in the cache area whether there is an existing cache slot that matches the cache slot index. If there is no existing cache slot, allocate a cache address and create the state slice cache slot.
[0012] As a further aspect of the present invention, the step of establishing a cache slot index includes: The vehicle identifier is used as the vehicle dimension index, the round number is used as the round dimension index, and the sampling window start time is used as the time dimension index. The vehicle dimension index, the round dimension index, and the time dimension index are then jointly matched. When a unique cache address is matched, the unique cache address is determined as the write address of the state slice cache slot; when multiple cache addresses are matched, the write address is selected according to the principle of the closest time between the actual latch time and the sampling window start time, and the cache slot index is output.
[0013] As a further aspect of the present invention, the step of checking the write status of the required fields and generating the structured status fragment record includes: Read the channel entry in the channel registration table that corresponds to the same vehicle identifier and the same wheel number, generate a list of required fields according to the sensor type in the channel entry, and extract the field writing flag, physical meaning value, actual latching time and physical channel number corresponding to the list of required fields from the status slice cache slot; When the field write mark corresponding to any required field is empty or the physical meaning value is empty, the corresponding cached field is determined as the missing field corresponding item, and the missing field corresponding item is removed from the state slice cache slot. The remaining field write content, vehicle identifier, wheel number and sampling window start time are recorded to generate the structured state slice record.
[0014] The multi-sensor data acquisition and processing system for tank semi-trailers includes: The channel table creation and latching module is used to obtain the physical channel number, sensor type, trigger edge time, and data frame reception completion time to determine the channel registration table and the channel hysteresis fingerprint table; based on the channel registration table, the physical channel latching is triggered by the acquisition period, the number of pre-allowed pulses, and the number of post-allowed pulses to form a round record including vehicle identification, round number, and trigger edge time; The attribution determination module is used to determine the actual latching time by recalling the data frame reception completion time based on the channel hysteresis fingerprint table, and to determine the sampling window and round attribution result according to the trigger edge time, the number of pre-allowed pulses and the number of post-allowed pulses; The cache recording module is used to create a status slice cache slot based on the collection round assignment result, the vehicle identifier, the round number and the sampling window start time, and record the physical meaning value, the actual latching time and the physical channel number according to the sensor type. The data entry module is used to check the write status of required fields based on the status slice cache slot and the channel registration table, remove items that are missing required fields, generate structured status slice records, and write the structured status slice records into the server database.
[0015] Compared with the prior art, the advantages and positive effects of the present invention are as follows: Channel registration and hysteresis fingerprint relationships are established based on physical channel number, sensor type, trigger edge time, and data frame reception completion time. This allows each channel's acquisition behavior to first form a traceable timing benchmark, and then latch constraints are completed by combining the acquisition cycle and the allowable pulse boundaries before and after. Hysteresis callback restores the reception completion time to the actual latch time, ensuring that data from different sensors enter the same sampling window according to the true trigger timing. The round assignment is consistent with the vehicle identifier and round number. The status slice buffer is aggregated according to the sensor's physical meaning value, latch time, and channel number, and written to the database after filtering for necessary field integrity, reducing channel mismatch, timing drift, and missing records. Attached Figure Description
[0016] Figure 1 This is the main flowchart of the multi-sensor data acquisition and processing for the tank semi-trailer of the present invention; Figure 2 This is a schematic diagram illustrating the deployment effect of the multi-sensor data link of the present invention; Figure 3 This is a schematic diagram illustrating the channel hysteresis callback correction effect of the present invention; Figure 4 This is a schematic diagram illustrating the aggregation effect of the state slice cache slots in this invention; Figure 5 This is a schematic diagram illustrating the effect of necessary field checks and data entry traceability in this invention. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0018] Example
[0019] Please see Figures 1 to 5 This embodiment provides a method for multi-sensor data acquisition and processing of tank semi-trailers. In practical applications, for example, during the continuous data acquisition process of pressure sensors, temperature sensors, liquid level sensors, valve status sensors, and vehicle operating status sensors by the on-board acquisition controller of the tank semi-trailer, the acquisition controller receives trigger signals and data frames from each sensor through a physical channel. The on-board gateway uploads the processed status data to the server database. The server database continuously stores the vehicle operating status, tank medium status, and channel acquisition status, including the following steps: S1: Obtain the physical channel number, sensor type, trigger edge time, and data frame reception completion time; determine the channel registration table and channel hysteresis fingerprint table; and trigger physical channel latching based on the channel registration table, acquisition cycle, number of pre-allowed pulses, and number of post-allowed pulses to form a wheel record including vehicle identification, wheel number, and trigger edge time. The physical channel number is a channel identifier assigned to the sensor input by the acquisition controller interface side, used to distinguish sensor input sources such as pressure, temperature, liquid level, valve status, and vehicle operating status. The sensor type is a category field generated after the acquisition controller parses the channel configuration, used to determine the physical meaning of the channel's acquired value in subsequent status slices. The trigger edge time is a time field written by the acquisition controller's local clock when a valid trigger edge occurs at the sensor input, used to establish the acquisition cycle reference. The data frame reception completion time is a time field written by the acquisition controller after completing the corresponding sensor data frame verification and parsing, used to restore the sensor's actual latching time after hysteresis correction.
[0020] The channel registration table is a channel management data object, consisting of physical channel number, sensor type, interface affiliation, registration status, and required field attributes. This table is generated by the acquisition controller during channel initialization, channel hot-plug detection, or configuration synchronization, and stored in the acquisition controller's local configuration area. Subsequent latching, field list generation, and missing field checks all retrieve channel affiliation relationships from this table. The channel hysteresis fingerprint table is a hysteresis correction data object, consisting of physical channel number, sensor type, reception hysteresis duration, hysteresis floating boundary, hysteresis anomaly flag, and hysteresis substitution source. This table is generated from historical reception records of similar sensors and channel verification records, and stored in the acquisition controller's hysteresis correction area. It is subsequently used for callback correction of data frame reception completion times.
[0021] The acquisition cycle is a periodic control field used by the acquisition controller to organize the sensor status under the same vehicle identifier in rounds, derived from the vehicle acquisition task configuration. The number of pre-emptive and post-emptive pulses are latching boundary parameters derived from the channel configuration table or acquisition rules issued by the server, used to limit the acceptable pulse boundaries before and after the trigger edge in the current round. After reading the channel registration table, the acquisition controller only latches inputs from registered physical channels. Inputs from unregistered channels are entered into the channel exception log. The log content includes the physical channel number, trigger edge time, exception type, and processing status. This exception log is stored in the local log area and uploaded to the server database synchronously with the next communication.
[0022] S101: Obtain the physical channel number, sensor type, trigger edge time and data frame reception completion time; deduplicatize the sensor input terminals under the same acquisition controller interface according to the physical channel number; establish a correspondence between sensor type and physical channel number; and generate a channel registration table. During deduplication registration, the acquisition controller first reads the physical channel numbers already registered in the local interface configuration area, and then matches the newly entered physical channel number with the interface attribution field. If the matching result points to an already registered channel item, the registration status of the original channel item is retained, and the trigger edge time and data frame reception completion time of the newly entered channel item are written as sampling events to the event queue of that channel item. If the matching result does not point to an already registered channel item, a channel item is created in the channel registration table, and the physical channel number, sensor type, interface attribution, and required field attributes are written to that channel item.
[0023] The mapping between sensor type and physical channel number is used for subsequent field assignment. Pressure sensors correspond to the tank pressure field, temperature sensors to the tank temperature field, level sensors to the tank level field, valve status sensors to the valve open / closed status field, and vehicle operation status sensors to the driving status field. The physical meaning values are the business field values obtained after protocol parsing, validity verification, and field mapping of the sensor data frames, and are used in writing to the status slice cache slot. If the same physical channel number is written to different sensor types during configuration synchronization, the acquisition controller sets that channel item to a type conflict state, stops that channel from entering the latching process, and writes the conflicting channel number, the original sensor type, the new sensor type, and the configuration source to the configuration exception log.
[0024] S102: Extract the reception hysteresis duration corresponding to the same physical channel number and filter it. When any reception hysteresis duration exceeds the maximum registration hysteresis threshold or is less than the minimum registration hysteresis threshold of the same type of sensor, mark the corresponding data frame reception completion time as a hysteresis anomaly and remove it. Write the physical channel number and sensor type together to obtain the channel hysteresis fingerprint table. The reception hysteresis duration is a channel reception delay field formed by the time the data frame reception is completed relative to the trigger edge time, derived from the data frame event records that have already been verified. The maximum and minimum registration hysteresis thresholds are hysteresis boundary fields corresponding to the same sensor type, derived from the rule tables of sensor driver configuration, vehicle-mounted acquisition controller interface configuration, and historical stable reception records. The hysteresis boundary fields are stored in the acquisition controller's hysteresis rule area and are refreshed after sensor type changes, interface configuration changes, or server-issued rule updates.
[0025] During the filtering process, the acquisition controller aggregates the reception hysteresis duration according to the physical channel number and reads the hysteresis boundary field corresponding to the sensor type. When the reception hysteresis duration falls within the registerable state defined by the hysteresis boundary field, it is retained as a valid hysteresis record. When the reception hysteresis duration exceeds the boundary field, the corresponding data frame reception completion time is marked as a hysteresis anomaly. Hysteresis anomalies do not participate in the generation of hysteresis correction values in the channel hysteresis fingerprint table but are written to the hysteresis anomaly log. The hysteresis anomaly log stores the physical channel number, sensor type, trigger edge time, data frame reception completion time, anomaly state, and rejection reason, which is used by the server to trace the channel acquisition quality.
[0026] After the channel hysteresis fingerprint table is generated, each channel entry in the table maintains the association between the physical channel number and the sensor type. If a physical channel number lacks sufficient valid hysteresis records during the startup phase, the channel entry first uses the type hysteresis substitute value corresponding to the sensor type as the source of hysteresis correction and is marked as a substitute correction state. The type hysteresis substitute value comes from the stable reception rule table of the same type of sensor under the same acquisition controller interface category. After the channel forms a registrable hysteresis record, the channel hysteresis fingerprint table is updated to the channel correction state.
[0027] S103: Read the sensor type and registration status corresponding to the physical channel number in the channel registration table, remove the physical channel inputs that are not registered, record the acquisition cycle and determine the trigger reference time of the current round, and write the number of pre-allowed pulses and the number of post-allowed pulses into the latch boundary parameters of the current round. The trigger reference time for the current round is a round reference field generated by the acquisition controller during the acquisition task, derived from the acquisition cycle and the previous valid round record. When the vehicle is first powered on or the acquisition task is just started, the previous valid round record has not yet been formed, and the acquisition controller uses the initial round reference field established when the acquisition task starts as the trigger reference time for the current round. After the next round enters stable acquisition, the trigger reference time for the current round is generated sequentially from the previous valid round record.
[0028] The latch boundary parameters are the boundary control objects that allow the acceptance of trigger edges in the current round. They are jointly determined by the trigger reference time of the current round, the number of preceding allowable pulses, and the number of following allowable pulses. The number of preceding allowable pulses is used to accept inputs that are close to the current round reference due to the sensor triggering first, while the number of following allowable pulses is used to accept inputs that are close to the current round reference due to communication or hardware response delays. After the latch boundary parameters are written to the round control area, subsequent round records, sampling windows, and round assignment results all read these parameters, ensuring that latching and assignment use the same boundary source.
[0029] S104: When the trigger edge time falls within the latch boundary parameters corresponding to the trigger reference time of the current round, the corresponding physical channel input is latched and the vehicle identifier is determined. The round number is generated incrementally according to the acquisition cycle. The vehicle identifier, round number and trigger edge time are associated and written to form a round record.
[0030] The vehicle identifier is a vehicle identity field read by the onboard acquisition controller from the vehicle gateway identity configuration, vehicle communication messages, or server authorization configuration. It is used to distinguish the status slice data of different tank semi-trailers. The round sequence number is a sequential field generated by the acquisition controller according to the acquisition process under the same vehicle identifier and acquisition cycle. It is used to establish an index relationship with the sampling window and status slice cache slot. The round record is a round management data object, consisting of the vehicle identifier, round sequence number, trigger edge time, current round trigger reference time, latch boundary parameters, and channel latch status.
[0031] When the trigger edge time falls within the latch boundary parameters, the corresponding physical channel input is written to the current round record, and the latch status is marked as latched. When the trigger edge time does not fall within the latch boundary parameters, the corresponding input is not written to the current round record, but to the external trigger log. The external trigger log retains the vehicle identifier, physical channel number, sensor type, trigger edge time, and current round trigger reference time for subsequent judgment of sensor jitter, channel drift, or communication anomalies. If the vehicle identifier cannot be read from the vehicle gateway identity configuration during latching, the acquisition controller sets the round record to an identity pending confirmation state, and the status slice cache slot does not enter the server database stage until the vehicle identifier is completed and subsequent processing resumes.
[0032] S2: Based on the completion time of the callback data frame reception in the channel hysteresis fingerprint table, determine the actual latching time, and determine the sampling window and round assignment result according to the trigger edge time, the number of pre-allowed pulses and the number of post-allowed pulses; The actual latching time is the effective sensor sampling time formed after hysteresis correction from the data frame reception completion time. It is used to replace the simple reception completion time in sampling window assignment. The sampling window is the time range object used to accept the actual latching time in the current round. It is formed by the window reference time and latching boundary parameters, and the sampling window start time is saved. The round assignment result is the assigned data object after the actual latching time is assigned to the vehicle identifier and round number. It includes the vehicle identifier, round number, physical channel number, sensor type, actual latching time, and sampling window start time.
[0033] S201: Read the reception hysteresis duration corresponding to the physical channel number and sensor type in the channel hysteresis fingerprint table, and perform reverse correction on the data frame reception completion time based on the reception hysteresis duration to determine the actual latching time. During reverse correction, the acquisition controller first performs a joint match using the physical channel number and sensor type. If the joint match points to the channel correction status in the channel hysteresis fingerprint table, the reception hysteresis duration of that channel entry is read as the hysteresis correction amount. If the joint match does not point to a channel correction status, the type hysteresis substitution value corresponding to the sensor type is read, and this type hysteresis substitution value is used as the hysteresis correction amount. The correction source is then marked as the type substitution status. The type substitution status is written to the round assignment result, allowing the server to identify the channel hysteresis source recorded in that status slice.
[0034] The hysteresis floating boundary is a corrected tolerance boundary field stored in the channel hysteresis fingerprint table along with the physical channel number and sensor type, derived from the channel hysteresis rule table and historical stable reception records. The acquisition controller uses the hysteresis correction amount to roll back the data frame reception completion time to generate candidate latch times. Then, it compares the time interval between the candidate latch time and the trigger edge time with the hysteresis floating boundary. When the candidate latch time falls within the hysteresis floating boundary, it is written as the actual latch time. When the candidate latch time exceeds the hysteresis floating boundary, it is marked as a rollback anomaly. The acquisition controller uses the trigger edge time as a correction benchmark to perform boundary convergence on the rollback anomaly time and writes the converged time as the actual latch time. The rollback anomaly mark is written to the status slice buffer slot along with the actual latch time, and is subsequently used by the server to trace the hysteresis correction quality.
[0035] If the channel hysteresis fingerprint table read fails, the acquisition controller writes the corresponding data frame into the hysteresis rule missing state and uses the trigger edge time as a temporary latch reference. The hysteresis rule missing state does not directly enter the required field completion state of the structured state slice record, but enters the missing field check stage along with the cached fields. The missing field check stage decides whether to retain or remove the missing field based on the required field list and field write flags.
[0036] S202: Determine the window reference time for the current round based on the trigger edge time and the acquisition cycle, expand the window boundary according to the number of pre-allowed pulses and the number of post-allowed pulses, and associate the actual latching time that falls into the window boundary with the corresponding round to obtain the sampling window and round assignment results.
[0037] The window reference time is the round reference field used when generating the sampling window, derived from the current round trigger reference time in the round record. After reading the number of preceding and following allowable pulses, the acquisition controller converts them into window boundary direction fields, which, together with the window reference time, form the sampling window. The sampling window start time serves as the time dimension index for subsequent state slice buffer slots and is written into the round assignment result.
[0038] When the actual latch time falls within the window boundary, the acquisition controller associates the actual latch time, physical channel number, and sensor type with the corresponding round number and outputs the round assignment result. When the actual latch time is close to multiple existing sampling windows simultaneously, the acquisition controller determines the round assignment based on the shortest time between the actual latch time and the sampling window start time, and writes a window contention flag into the assignment result. When the actual latch time does not fall within any sampling window, the acquisition controller marks the data frame as an out-of-window sampling item. Out-of-window sampling items enter the abnormal buffer area and do not participate in the normal writing of the state slice buffer slot. The abnormal buffer area stores the data frame source, actual latch time, trigger edge time, physical channel number, sensor type, and abnormal state.
[0039] S3: Based on the collection round assignment results, vehicle identification, round number and sampling window start time, create a status slice buffer slot and record the physical meaning value, actual latching time and physical channel number according to sensor type; The status slice cache slot is a temporary recording space in the acquisition controller's cache area, organized by vehicle, round, and sampling window. It is used to aggregate multi-sensor data with the same vehicle identifier and round number before it is stored in the server database. The round assignment result is the input object for the aforementioned round assignment result during the cache writing phase, including the sampling window start time, vehicle identifier, round number, physical channel number, sensor type, and actual latching time. The field write objects for the status slice cache slot include the physical meaning value, actual latching time, physical channel number, field write flag, hysteresis correction status, and channel abnormal status.
[0040] S301: Read the sampling window and round assignment results, establish a cache slot index with vehicle identifier, round number and sampling window start time, and query whether there is an existing cache slot that matches the cache slot index in the cache area. If there is no existing cache slot, allocate a cache address and create a state slice cache slot. The cache slot index is the location data object for the state slice cache slot, composed of a vehicle-dimensional index, a round-dimensional index, and a time-dimensional index. The vehicle-dimensional index is derived from the vehicle identifier in the round-count record, the round-count index is derived from the round sequence number in the round-count record, and the time-dimensional index is derived from the start time of the sampling window. The cache area is first queried by the vehicle-dimensional index, then filtered by the round-count index, and finally the cache slot location is confirmed by the time-dimensional index.
[0041] When no matching cache slot exists in the buffer, the acquisition controller allocates a cache address in the buffer, creates a status slice cache slot, and writes the cache slot index, creation status, vehicle identifier, round number, and sampling window start time into the slot header field. When a matching cache slot exists in the buffer, the acquisition controller reads the write status of that cache slot. If the cache slot is in a writable state, subsequent sensor fields are written to that cache slot. If the cache slot has entered the structured status slice generation stage, newly arrived data frames enter the late data buffer and record the late status, physical channel number, sensor type, and actual latching time. The server reads this status during tracing to determine the integrity of the sampling round.
[0042] S302: Use the vehicle identifier as the vehicle dimension index, the round number as the round dimension index, and the sampling window start time as the time dimension index, and perform joint matching on the vehicle dimension index, round dimension index, and time dimension index; Joint matching is performed in the order of vehicle dimension index, round dimension index, and time dimension index. If the vehicle dimension index does not match, the acquisition controller stops writing to the current cache and records the missing vehicle index. If the vehicle dimension index matches but the round dimension index does not, the data frame enters the round pending confirmation state. If the vehicle dimension index and the round dimension index match but the time dimension index does not match, the acquisition controller enters the window verification state based on the relationship between the sampling window start time and the actual latching time.
[0043] After the joint matching outputs the buffer slot index, the sensor field write operation uses the buffer slot index as the entry point. The sensor type determines the field write position, the physical meaning value is written to the corresponding sensor field, the actual latching time is written to the sampling time sub-item of that field, and the physical channel number is written to the channel source sub-item. After a field is successfully written, the corresponding field write flag is set to "written," and the hysteresis correction status and channel abnormal status are entered into the buffer slot as accompanying fields for the next step to check the write status of necessary fields.
[0044] S303: When a corresponding deterministic cache address is matched, the deterministic cache address is determined as the write address of the state slice cache slot; when multiple corresponding cache addresses are matched, the write address is selected according to the principle of the closest time between the actual latch time and the sampling window start time, and the cache slot index is output.
[0045] The deterministic cache address is an address field that, after joint matching of cache areas, points to only a single writable cache slot. The acquisition controller directly uses this address as the write address for the status slice cache slot. When multiple cache addresses simultaneously meet the joint matching condition, the acquisition controller reads the sampling window start time of each candidate cache slot and compares the actual latch time with the sampling window start time of the candidate cache slot for time proximity, selecting the candidate cache slot with the highest proximity as the write address. Candidate cache slots that are rejected due to write contention are marked as not selected; the marker includes the physical channel number, sensor type, and reason for being considered.
[0046] After the cache slot index is output, the acquisition controller performs field writing. If the same sensor type is repeatedly written to the same cache slot, the acquisition controller reads the field write flag and the actual latching time, retains the field write content that is closer to the start time of the sampling window, and writes the replaced field to the duplicate sampling log. If there is a channel abnormality in the duplicate field, the abnormality status is written along with the duplicate sampling log, without overwriting the normal field write content. If the cache write fails, the acquisition controller writes the corresponding sampling round assignment result to the local fault queue and outputs the cache write failure status to the vehicle gateway. The fault queue is rewritten according to the vehicle identifier and round number after the cache is restored.
[0047] S4: Based on the status slice cache slot and channel registration table, check the write status of the required fields, remove items that are missing the corresponding required fields, generate a structured status slice record, and write the structured status slice record to the server database. The required fields are status slice fields configured in the channel registration table based on the vehicle acquisition task and sensor type. These include fields corresponding to the current vehicle acquisition task, such as tank pressure, tank temperature, tank liquid level, valve status, and vehicle operating status. The required field list is a set of fields formed by the acquisition controller after reading the registered channel items with the same vehicle identifier and wheel number from the channel registration table. It is used to check the integrity of field writes in the status slice buffer slot. The structured status slice record is a status slice data object that can be received by the server database. It consists of vehicle identifier, wheel number, sampling window start time, sensor type field, physical meaning value, actual latch time, physical channel number, field write status, and accompanying abnormal status.
[0048] S401: Read the channel entries in the channel registration table that correspond to the same vehicle identifier and the same wheel number, generate a list of required fields according to the sensor type in the channel entries, and extract the fields corresponding to the list of required fields from the status chip cache slot, write the flag, physical meaning value, actual latching time and physical channel number. When the acquisition controller reads channel entries from the channel registration table, it first verifies whether the vehicle identifier and wheel number correspond to the wheel record, and then generates a list of required fields according to the sensor type. Each field in the list of required fields records the field name, corresponding sensor type, physical channel number source, required attributes, and write check status. When the field write flag is empty, it indicates that no valid write corresponding to that required field has been received in the status slice buffer slot. When the physical meaning value is empty, it indicates that the data frame has arrived, but protocol parsing, field mapping, or validity verification has not formed a writable value. When the actual latch time is empty, it indicates that hysteresis correction has not formed a valid sampling time. When the physical channel number is empty, it indicates that the field source cannot be traced to the specific physical input.
[0049] The validity of physically meaningful numerical values is determined by the protocol parsing rules and device range rules corresponding to the sensor type. The protocol parsing rules, derived from the sensor communication protocol configuration, are used to identify data frame field boundaries, field types, and verification status. The device range rules, derived from the sensor's factory configuration and acquisition task configuration, are used to eliminate field values that exceed the device's valid output boundaries. Parsing failure, verification failure, device range mismatch, and missing channel source are all written into the field's abnormal status and used as input for required field checks.
[0050] S402: When the field write mark corresponding to any required field is empty or the physical meaning value is empty, the corresponding cached field is determined as the missing field corresponding item, and the missing field corresponding item is removed from the status slice cache slot. The remaining field write content, vehicle identifier, wheel number and sampling window start time are recorded to generate a structured status slice record.
[0051] Missing fields correspond to cached field objects in the required field list that have not been fully written. These include fields with empty write flags, fields with empty physical meaning values, fields whose actual latching time cannot be used as valid sampling time, and fields whose physical channel numbers cannot be traced. The acquisition controller removes the corresponding missing field items from the state slice cache field set and simultaneously writes the vehicle identifier, wheel number, sampling window start time, sensor type, physical channel number source status, and reason for the missing field to the missing field log. The missing field log is associated with the structured state slice record, and the server database uses this association to trace the integrity of the state slice.
[0052] The remaining fields are cached fields that, after removing the corresponding items for missing fields, still contain the field write flag, physical meaning value, actual latch time, and physical channel number. The acquisition controller merges the remaining fields with the vehicle identifier, wheel number, and sampling window start time to generate a structured status slice record. Before being written to the server database, the structured status slice record undergoes field integrity verification, vehicle identifier verification, wheel number verification, and sampling window start time verification. If the verification passes, the vehicle gateway sends the structured status slice record to the server database. If the verification fails, the structured status slice record enters the pending review queue and is written with an upload error status.
[0053] After receiving the structured status slice records, the server database establishes an entry index based on the vehicle identifier and wheel sequence number, storing the sensor type, physical meaning value, actual latching time, physical channel number, field write status, and accompanying abnormal status. If the server database returns a successful entry status, the vehicle gateway marks the corresponding local cache slot as entered and releases reclaimable cache space. If the server database returns an entry failure status or the communication link is not confirmed, the vehicle gateway retains the structured status slice records and writes them to the retransmission queue. The retransmission queue maintains the original order according to the vehicle identifier, wheel sequence number, and sampling window start time to prevent subsequent wheel entries from overwriting unconfirmed entry records.
[0054] The multi-sensor data acquisition and processing system for tank semi-trailers that works in conjunction with the aforementioned method includes a channel table creation and latching module, an attribution determination module, a cache recording module, and a data storage module. Each module is deployed in the data link formed by the vehicle-mounted acquisition controller, the vehicle-mounted gateway, and the server database, and carries out the data acquisition, hysteresis correction, cache recording, and storage processing of the aforementioned method. The channel table creation and latching module receives the physical channel number, sensor type, trigger edge time, and data frame reception completion time. It generates a channel registration table and a channel hysteresis fingerprint table, and performs physical channel latching based on the channel registration table, acquisition cycle, number of pre-allowed pulses, and number of post-allowed pulses. The module's input interface connects to the sensor input and the acquisition controller configuration area, while its output interface connects to the attribution determination module. The output includes round records, the channel registration table, the channel hysteresis fingerprint table, and anomaly logs. The channel table creation and latching module does not handle status slice storage; latched round data must be processed by the attribution determination module to determine the actual latching time and sampling window before entering the buffer recording module.
[0055] The attribution determination module reads the channel hysteresis fingerprint table, performs callback correction on the data frame reception completion time, generates the actual latch time, and generates the sampling window and round attribution result according to the trigger edge time, the number of pre-allowed pulses, and the number of post-allowed pulses. The input to this module comes from the channel table building and latching module, and the output includes the actual latch time, sampling window start time, round attribution result, hysteresis correction status, and window exception status. The attribution determination module does not write to the server database; its output is used by the cache recording module as the basis for creating status slice cache slots and writing fields.
[0056] The cache recording module reads the round assignment result, vehicle identifier, round sequence number, and sampling window start time, creates a status slice cache slot, and records the physical meaning value, actual latching time, and physical channel number according to sensor type. The module's input interface connects to the assignment determination module and the data frame parsing interface, while its output interface connects to the data storage module. The output includes the status slice cache slot, field write flags, duplicate sampling logs, late data status, and cache exception status. The cache recording module does not generate a list of required fields; this list is generated by the data storage module after reading the channel registration table.
[0057] The data import module checks the write status of required fields based on the status slice cache slots and the channel registration table, removes entries corresponding to missing fields, generates structured status slice records, and writes these records to the server database. The module's inputs include status slice cache slots, the channel registration table, vehicle identifiers, wheel sequence numbers, and the start time of the sampling window. Its outputs include structured status slice records, missing field logs, upload error statuses, and import confirmation status. After receiving the confirmation status from the server database, the data import module feeds it back to the cache record module, causing the cache record module to release the already imported cache slots or retain the cache slots awaiting retransmission.
[0058] The system restricts the correspondence between physical channels and sensor types through a channel registration table, corrects the reception completion time through a channel hysteresis fingerprint table, unifies the round boundaries of multi-sensor fields through sampling windows and round assignment results, aggregates sensor fields under the same vehicle identifier and round number before storage through a status slice cache slot, and removes missing field corresponding items through a required field write status check. The structured status slice records received by the server database retain the correspondence between vehicle identifier, round number, sampling window start time, physical meaning value, actual latching time, and physical channel number. Sensor acquisition anomalies, hysteresis correction anomalies, cache write anomalies, and storage confirmation anomalies are all entered into the traceability link through the corresponding status and logs.
[0059] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments that can be applied to other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.
Claims
1. A method for multi-sensor data acquisition and processing of tank semi-trailers, characterized in that, include: Obtain the physical channel number, sensor type, trigger edge time, and data frame reception completion time to determine the channel registration table and channel hysteresis fingerprint table; According to the channel registration form, the collection period, the number of pre-allowed pulses, and the number of post-allowed pulses trigger the physical channel latch, forming a wheel record including vehicle identification, wheel number, and trigger edge time. The trigger edge time is a time field written by the local clock of the acquisition controller when a valid trigger edge appears at the sensor input terminal, which is used to establish the acquisition cycle reference. The channel registration form is a channel management data object, which consists of physical channel number, sensor type, interface affiliation, registration status, and required field attributes; The channel hysteresis fingerprint table is a hysteresis correction data object, which consists of physical channel number, sensor type, reception hysteresis duration, hysteresis floating boundary, hysteresis anomaly marker and hysteresis substitution source; Based on the channel hysteresis fingerprint table, the data frame reception completion time is recalled to determine the actual latching time, and the sampling window and round assignment result are determined according to the trigger edge time, the number of pre-allowed pulses and the number of post-allowed pulses; Based on the round assignment result, the vehicle identifier, and the round sequence number, combined with the sampling window start time, a status slice buffer slot is created, and the physical meaning value, the actual latching time, and the physical channel number are recorded according to the sensor type. Based on the status slice cache slot and the channel registration table, check the write status of the required fields, remove items that are missing the corresponding required fields, generate a structured status slice record, and write the structured status slice record into the server database. The steps for determining the actual latching time, sampling window, and round assignment result include: Read the reception hysteresis duration corresponding to the physical channel number and the sensor type in the channel hysteresis fingerprint table, and perform reverse correction on the data frame reception completion time based on the reception hysteresis duration to determine the actual latching time; Based on the trigger edge time and the acquisition period, the window reference time of the current round is determined. The window boundary is expanded according to the number of pre-allowed pulses and the number of post-allowed pulses. The actual latching time falling into the window boundary is associated with the corresponding round to obtain the sampling window and round assignment result. The specific steps for performing reverse correction are as follows: Using the physical channel number as the first search condition and the sensor type as the second search condition, the data frames in the channel hysteresis fingerprint table are jointly matched. When there is a data frame that satisfies both the first and second search conditions, the corresponding reception hysteresis duration is read. When there is no data frame that simultaneously satisfies the first and second search conditions, read the type hysteresis substitution value corresponding to the sensor type, replace the receiving hysteresis duration with the type hysteresis substitution value, and output the hysteresis correction amount for reverse correction. Obtain the hysteresis floating boundary corresponding to the hysteresis correction amount in the channel hysteresis fingerprint table, reverse the data frame reception completion time and the hysteresis correction amount to obtain the candidate latch time, and compare the time interval between the candidate latch time and the trigger edge time. When the time interval exceeds the hysteresis floating boundary, the candidate latching time is marked as a callback abnormal time, and the trigger edge time is used as the correction benchmark to perform boundary convergence on the callback abnormal time to determine the actual latching time.
2. The method for multi-sensor data acquisition and processing of tank semi-trailers according to claim 1, characterized in that, The steps for determining the channel registration form include: Obtain the physical channel number, sensor type, trigger edge time, and data frame reception completion time. Deduplicatively register sensor input terminals under the same acquisition controller interface according to the physical channel number, establish a one-to-one correspondence between sensor type and physical channel number, and generate the channel registration table.
3. The method for multi-sensor data acquisition and processing of tank semi-trailers according to claim 1, characterized in that, The steps for generating the channel hysteresis fingerprint table include: Extract the reception hysteresis duration corresponding to the same physical channel number and filter it. When any reception hysteresis duration exceeds the maximum registration hysteresis threshold or is less than the minimum registration hysteresis threshold of the same type of sensor, mark the corresponding data frame reception completion time as a hysteresis anomaly and remove it. Write the physical channel number and the sensor type together to obtain the channel hysteresis fingerprint table.
4. The method for multi-sensor data acquisition and processing of tank semi-trailers according to claim 1, characterized in that, The steps to trigger physical channel latching and generate round records include: Read the sensor type and registration status corresponding to the physical channel number in the channel registration table, remove the physical channel inputs that are not registered, record the acquisition cycle and determine the trigger reference time of the current round, and write the number of pre-allowed pulses and the number of post-allowed pulses into the latch boundary parameters of the current round; When the trigger edge time falls within the latch boundary parameters corresponding to the trigger reference time of the current round, the corresponding physical channel input is latched and the vehicle identifier is determined. The round number is generated incrementally according to the acquisition cycle, and the vehicle identifier, the round number and the trigger edge time are associated and written to form the round record.
5. The method for multi-sensor data acquisition and processing of tank semi-trailers according to claim 1, characterized in that, The steps for creating the state slice cache slot include: Read the determined sampling window and round assignment results, establish a cache slot index with the vehicle identifier, the round number and the sampling window start time, and query in the cache area whether there is an existing cache slot that matches the cache slot index. If there is no existing cache slot, allocate a cache address and create the state slice cache slot.
6. The method for multi-sensor data acquisition and processing of tank semi-trailers according to claim 5, characterized in that, The steps to create a cache slot index include: The vehicle identifier is used as the vehicle dimension index, the round number is used as the round dimension index, and the sampling window start time is used as the time dimension index. The vehicle dimension index, the round dimension index, and the time dimension index are then jointly matched. When a unique cache address is matched, the unique cache address is determined as the write address of the state slice cache slot; when multiple cache addresses are matched, the write address is selected according to the principle of the closest time between the actual latch time and the sampling window start time, and the cache slot index is output.
7. The method for multi-sensor data acquisition and processing of tank semi-trailers according to claim 1, characterized in that, The steps of checking the write status of required fields and generating the structured status fragment record include: Read the channel entry in the channel registration table that corresponds to the same vehicle identifier and the same wheel number, generate a list of required fields according to the sensor type in the channel entry, and extract the field writing flag, physical meaning value, actual latching time and physical channel number corresponding to the list of required fields from the status slice cache slot; When the field write mark corresponding to any required field is empty or the physical meaning value is empty, the corresponding cached field is determined as the missing field corresponding item, and the missing field corresponding item is removed from the state slice cache slot. The remaining field write content, vehicle identifier, wheel number and sampling window start time are recorded to generate the structured state slice record.
8. A multi-sensor data acquisition and processing system for tank semi-trailers, characterized in that: The system is used to implement the method according to any one of claims 1-7, comprising: The channel table creation and latching module is used to obtain the physical channel number, sensor type, trigger edge time, and data frame reception completion time to determine the channel registration table and the channel hysteresis fingerprint table; based on the channel registration table, the physical channel latching is triggered by the acquisition period, the number of pre-allowed pulses, and the number of post-allowed pulses to form a round record including vehicle identification, round number, and trigger edge time; The attribution determination module is used to determine the actual latching time by recalling the data frame reception completion time based on the channel hysteresis fingerprint table, and to determine the sampling window and round attribution result according to the trigger edge time, the number of pre-allowed pulses and the number of post-allowed pulses; The cache recording module is used to create a status slice cache slot based on the round assignment result, the vehicle identifier, the round sequence number and the sampling window start time, and record the physical meaning value, the actual latching time and the physical channel number according to the sensor type. The data entry module is used to check the write status of required fields based on the status slice cache slot and the channel registration table, remove items that are missing required fields, generate structured status slice records, and write the structured status slice records into the server database.
Citation Information
Patent Citations
All-weather automatic sensing liquid snow-melting agent spraying method and system
CN121352333A
Intelligent automobile-oriented end-side cloud collaborative driving test and evaluation method and system
CN122312349A