Method and device for generating configuration data of signal machine structure body of vehicle-mounted controller
By collecting and recognizing image data of signal plan diagrams, a unified and standardized signal equipment plan diagram is generated, which solves the problems of inconsistent data formats and compatibility of heterogeneous signal plan diagrams, and ensures the effective use of signal device structure configuration data and the engineering process.
Patent Information
- Application Number
- CN202510894901.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-30
- Publication Date
- 2025-11-18
AI Technical Summary
The inconsistent data formats, unusable data, and inability to share heterogeneous signal plane diagrams lead to compatibility issues during data exchange and sharing, affecting the consistency of the signal plane diagrams.
By collecting image data of the signal plan, the signal data, including the color of the signal lights and the shape features of the signal, is identified using an image recognition model, converted into structured data, and a standardized signal equipment plan is generated.
The unified standardization of signal controller structure configuration data has been achieved, ensuring the smooth progress of subsequent engineering configuration and testing verification of the product, and improving the availability and compatibility of the data.
Smart Images

Figure CN120976957A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image recognition and processing technology, and in particular to a method and apparatus for generating signal structure configuration data for a vehicle controller. Background Technology
[0002] In recent years, subway route plans have typically been produced by city transportation departments or designated professional design companies. These organizations are responsible for the planning and management of public transportation systems. Different manufacturers produce different versions of signal plan diagrams, which do not adhere to a unified standard and are thus called heterogeneous plan diagrams.
[0003] The defects of heterogeneous signal planar diagrams are summarized as follows: Differences in technical standards and specifications lead to inconsistent data formats. Different regions or countries may have different technical standards and industry specifications, which affect the design and layout of signal floor plans. Signal floor plans created under different specifications are not compatible with each other, and their data formats cannot be standardized.
[0004] Differences in software and tools can render data unusable. Designers may use different design software and tools, whose functions and user interfaces can lead to differences in design formats. Different design formats are not reusable, thus affecting the availability of signal plan data.
[0005] Differences in data formats and compatibility can prevent data sharing. Different design software may generate data with inconsistent formats, leading to compatibility issues during data exchange and sharing, which in turn affects the consistency of signal plane diagrams.
[0006] Based on the above issues, in order to address the problem that heterogeneous signaling plan data cannot be shared or reused, urban rail transit urgently needs a standardized system solution for heterogeneous signaling plan data. Summary of the Invention
[0007] This invention provides a method and apparatus for generating signal structure configuration data for vehicle controllers, which solves the defects of existing technologies such as inconsistent data formats, unusable data, inability to share data, and compatibility issues during data exchange and sharing. It enables the generation of standardized signal plan diagrams based on the signal structure configuration data of vehicle controllers, ensuring the smooth progress of subsequent engineering configuration, testing and verification of the product.
[0008] This invention provides a method for generating signal controller structure configuration data for an on-board controller, comprising: Acquire image data of the signal plane diagram; The image data is input into an image recognition model, which identifies the signal data in the image data. The image recognition model is trained based on a sample signal plane, the color features of the signal lights and the shape features of the signal in the sample signal plane, and the compressed features of the compressed image of the sample signal plane.
[0009] In one possible implementation, the method further includes: Acquire a sample signal plane image and convert the color space of the sample signal plane image into a target color space; The first image features of the sample signal plane map of the target color space are extracted using a compression algorithm; Image compression is performed on the sample signal plane map of the target color space, and the compressed second image features are extracted; The self-learning model is trained based on the first image features and the second image features, and the signal equipment in the sample signal plane is classified and identified by the self-learning model. When the accuracy of the classification and recognition result is greater than the first preset threshold, it is determined that the self-learning model has been trained and the trained self-learning model is used as the image recognition model.
[0010] In one possible implementation, the method further includes: The signal data includes the color of the signal lights and the shape of the signal; The identified traffic light colors and traffic signal shapes are converted into structured data; Based on the structured data, signal structure data is generated, which includes the signal number, name, location, and line to which it belongs; The signal controller structure data is input into the integrated data configuration tool to generate signal controller structure configuration data; Generate standardized signal equipment plan views based on signal controller structure configuration data; The plan view of the signal equipment is converted into configuration data of the vehicle controller signal structure.
[0011] In one possible implementation, the method further includes: The target color space is the HSV color space; The first image features include traffic light color features and traffic signal shape features; Determine the color segmentation threshold based on HSV component values; The color of the traffic light is determined based on the color segmentation threshold, and the color features of the traffic light are extracted. Identifying signal outline edges using Freeman neighborhood chain code technology; The shape features of the signal are extracted based on the outline edge of the signal.
[0012] In one possible implementation, the method further includes: Image compression technology is used to compress the sample signal plane image of the target color space; The compressed image is downsampled to extract the compressed second image features, which include traffic light color features and traffic signal shape features.
[0013] In one possible implementation, the method further includes: Compare the similarity of the same type of features in the first image features and the second image features; Clustering sample signal plane images with similarity greater than a second preset threshold yields multiple types of sample signal plane images, where sample signal plane images of the same type have similar image features. Extract the third image features of the plane plot of the sample signal for each type; The self-learning model classifies and identifies signal equipment in the sample signal plane based on the third image features.
[0014] In one possible implementation, the method further includes: Image data of the signal plan is acquired by an image acquisition device installed on the front of the train. The image data includes the main line, side lines and signal markings on the signal plan.
[0015] The present invention also provides a device for generating signal structure configuration data for an on-board controller, comprising the following modules: The acquisition module is used to acquire image data of the signal plane diagram; The recognition module is used to input the image data into the image recognition model, and to recognize the signal data in the image data through the image recognition model. The image recognition model is trained based on the sample signal plane map, the signal light color features and signal shape features in the sample signal plane map, and the compressed image features of the sample signal plane map. The generation module is used to convert the signal controller data into signal controller structure data, and input the signal controller structure data into the integrated configuration tool to generate the signal controller structure configuration data of the vehicle controller. The signal controller structure configuration data is used to generate the signal equipment plan view.
[0016] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the signal structure configuration data generation method for vehicle controller as described above.
[0017] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the signal structure configuration data generation method for vehicle controllers as described above.
[0018] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the signal structure configuration data generation method for vehicle controllers as described above.
[0019] The present invention provides a method and apparatus for generating signal controller structure configuration data for a vehicle controller. This involves acquiring image data of a signal plane diagram; inputting the image data into an image recognition model; identifying signal controller data within the image data using the image recognition model, which is trained based on a sample signal plane diagram, the color features of traffic lights and the shape features of the signal controllers in the sample signal plane diagram, and the compressed image features of the sample signal plane diagram; converting the signal controller data into signal controller structure data; and inputting the signal controller structure data into an integrated configuration tool to generate signal controller structure configuration data for the vehicle controller. This signal controller structure configuration data is used to generate a signal equipment plane diagram. Compared to existing technologies where heterogeneous signal plane diagrams suffer from inconsistent data formats, unusable data, inability to share data, and compatibility issues during data exchange and sharing, this solution generates a standardized signal plane diagram based on the vehicle controller's signal controller structure configuration data, ensuring smooth progress in subsequent engineering configuration, testing, and verification processes. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0021] Figure 1 This is a system architecture diagram of the method for generating configuration data of the signal structure of the vehicle controller provided by the present invention.
[0022] Figure 2This is a flowchart illustrating the method for generating signal structure configuration data for an on-board controller provided by the present invention.
[0023] Figure 3 This is the OpenCV structure diagram provided by the present invention.
[0024] Figure 4 This is a schematic diagram of the camera driver architecture layer provided by the present invention.
[0025] Figure 5 This is a diagram of the frame buffer driver structure provided by the present invention.
[0026] Figure 6 This is a flowchart illustrating the training method for the image recognition model provided by the present invention.
[0027] Figure 7 This is a schematic diagram of the network convolutional attention module provided by the present invention.
[0028] Figure 8 This is a schematic diagram of the multi-layer model structure provided by the present invention.
[0029] Figure 9 This is a structural diagram of the classifier provided by the present invention.
[0030] Figure 10 It is a heterogeneous signal plane diagram.
[0031] Figure 11 This is a plan view corresponding to the signal controller structure configuration data provided by the present invention.
[0032] Figure 12 This is a schematic diagram of a signal transmitter in the RGB color space.
[0033] Figure 13 This is a schematic diagram of a signal transmitter in the HSV color space.
[0034] Figure 14 It is a binarized target image.
[0035] Figure 15 This is a standardized signal device plan view provided by the present invention.
[0036] Figure 16 This is a schematic diagram of the signal controller configuration data generation device for the vehicle controller provided by the present invention.
[0037] Figure 17 This is a diagram illustrating the colors of a color light signal.
[0038] Figure 18 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0039] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0040] To facilitate understanding of the embodiments of the present invention, further explanations and descriptions will be provided below with reference to the accompanying drawings and specific embodiments. These embodiments do not constitute a limitation on the embodiments of the present invention.
[0041] Figure 1 This is a system architecture diagram of the signal controller structure configuration data generation method for the vehicle controller provided by the present invention, as shown in the figure. Figure 1 As shown, the embedded system's hardware components are as follows: the core board uses the S5PV210, based on the IMX6 central processing unit, and connects to a video encoding module, an LCD display unit, and a data storage unit.
[0042] Example 1 Figure 2 This is a flowchart illustrating the method for generating signal structure configuration data for an on-board controller provided by the present invention, as shown below. Figure 2 As shown, the method includes the following: S21. Acquire image data of the signal plane diagram.
[0043] Upon power-up, the BootLoader executes and initializes the hardware devices. In embedded operating systems, the BootLoader runs before the operating system kernel. It initializes hardware devices, establishes a memory space mapping, and brings the system's hardware and software environment to a suitable state, preparing the correct environment for the final call to the operating system kernel. It sets exception vectors, configures the ARM chip's speed, clock, frequency, and termination registers, and initializes the memory controller. The kernel then boots, setting up the stack, initializing data segments, system memory, NAND flash memory, network devices, mapping the kernel root file system into the kernel, and finally initializing the drivers.
[0044] After hardware initialization, the system application software performs image acquisition. Image data of the signal plan is acquired through image acquisition devices installed on the train's cab. These devices include, but are not limited to, cameras. The main acquisition focuses on image information of the main line, sidings, and trackside signals and lights on the signal plan.
[0045] S22. Input the image data into the image recognition model, and use the image recognition model to identify the signal data in the image data, wherein the signal data includes the color of the signal light and the shape of the signal.
[0046] Image data is input into a trained image recognition model. The model extracts features from the image through convolutional layers, such as the edges and textures of the signal. These features are then classified and located in the fully connected layers.
[0047] For traffic light color recognition, the model can determine the color by analyzing the color distribution of the traffic light area. For example, the color of the traffic light can be determined by comparing the RGB values of the traffic light area with the RGB value range of standard colors (red, yellow, and green).
[0048] For traffic signal shape recognition, the model determines its shape based on the signal's contour features. For example, by detecting the signal's boundary points, it calculates the geometric features of its shape (such as perimeter, area, aspect ratio, etc.) to determine whether the signal is circular, square, or another shape.
[0049] S23. Convert the signal controller data into signal controller structure data, and input the signal controller structure data into the integrated configuration tool to generate the signal controller structure configuration data of the vehicle controller. The signal controller structure configuration data is used to generate the signal equipment plan view.
[0050] The identified traffic light colors and traffic signal shapes are converted into structured data; based on the structured data, traffic signal structure data is generated, which includes the traffic signal number, name, location, and associated circuit; the traffic signal structure data is input into an integrated data configuration tool to generate traffic signal structure configuration data; based on the traffic signal structure configuration data, a standardized traffic equipment plan view is generated; finally, the traffic equipment plan view is converted into vehicle controller traffic signal structure configuration data.
[0051] The present invention provides a method for generating signal controller structure configuration data for vehicle controllers. This method involves acquiring image data of a signal plane diagram; inputting the image data into an image recognition model; and using the image recognition model to identify signal controller data within the image data. The image recognition model is trained based on a sample signal plane diagram, the color features of traffic lights and the shape features of the signal controllers within the sample signal plane diagram, and the compressed image features of the sample signal plane diagram. The signal controller data is then converted into signal controller structure data, which is input into an integrated configuration tool to generate signal controller structure configuration data for the vehicle controller. This signal controller structure configuration data is used to generate signal equipment plane diagrams. Compared to existing technologies where heterogeneous signal plane diagrams suffer from inconsistent data formats, unusable data, inability to share data, and compatibility issues during data exchange and sharing, this method generates standardized signal plane diagrams based on the vehicle controller's signal controller structure configuration data, ensuring smooth progress in subsequent engineering configuration, testing, and verification processes.
[0052] Example 2 The embodiments of the present invention will now be described in their entirety: The method for generating signal controller structure configuration data for vehicle controllers provided by this invention includes a series of functions such as hardware configuration, driver development under Linux system, signal plan diagram signal device identification, signal plan diagram line identification, deep learning, unified standard format conversion, and generation of vehicle VOBC signal controller structure.
[0053] Specifically, Linux power-on self-test and image acquisition: Power is supplied, the bootloader is executed, and hardware devices are initialized. Exception vectors are set, the ARM chip's speed, clock, frequency, and termination registers are configured, and the memory controller is initialized. The kernel is then booted, setting up the stack, initializing data segments, system memory, NAND flash memory, network devices, etc., mapping the kernel root file system into the kernel, and finally initializing the drivers.
[0054] After hardware initialization is complete, the system application software begins image acquisition. The camera is installed in front of the train's cab and is mainly used to collect image information of the main line, sidings, and signals and lights along the tracks on the signal plan.
[0055] The self-learning model AutoEncoder combines a Convolutional Block Attention Module (CBAM) with deep learning of image data and is trained based on image features.
[0056] like Figure 7 The Convolutional Convolutional Attention Module (CBAM) is a representative model of hybrid attention mechanisms: it includes a channel attention module and a spatial attention module. The CBAM model structure is as follows: it extracts input features, first processes them using the channel attention module, then processes the results using the spatial attention module, finally obtaining the adjusted features. CBAM is a lightweight attention module in feedforward convolutional neural networks, consisting of channel and spatial attention modules. After inferring the attention map based on these two dimensions, it refines the features by multiplying the attention map and the feature map. The CBAM model has low overhead and can be integrated into various architectures.
[0057] like Figure 8 The self-learning model autoencoder is an unsupervised learning model. In order to obtain W0, we add intermediate hidden layers. The purpose is to output y1=x1, y2=x2, y3=x3. Through the training mechanism of the neural network model, we obtain W0. Then, layer0 to layer1 are used as the first layer structure of the autoencoder. The output of layer1 is used as the input of the next layer of the autoencoder, and so on, to obtain a multi-layer model structure.
[0058] like Figure 9 Like traditional neural networks, autoencoders have input and output layers, and can fit data effectively with high fitting rates. Through the design and construction of autoencoders, large amounts of data are trained, and unique feature extraction capabilities are used to extract valuable data through multiple hidden layers. Since the essence of an autoencoder is still classification, the final layer selects a classifier, or perhaps the original neural network, and fine-tunes the overall model structure using data with categorical features. Therefore, the autoencoder learns a model that intelligently judges data, extracting valuable data and filtering out invalid information.
[0059] Given a set of planar signal machine information, the `model.add(MaxPoolingGypoX(), MaxPoolingSignal())` method is called to perform attitude vector compression. Then, the CBAM attention model is started by calling `CBAM(nn.model)`. The CBAM convolutional attention model is used to evaluate the similarity of the signal machines on the planar diagram and to predict the signal machines using `feature_model.predict(X)`. After fine-tuning, the recognition rate of signal machines on the planar diagram reaches 100%, effectively supporting image recognition and judgment.
[0060] like Figure 6This is a flowchart illustrating the training method for the image recognition model provided by the present invention, specifically including: S61. Obtain the sample signal plane image and convert the color space of the sample signal plane image into the target color space.
[0061] The system service automatically starts the application daemon process TH_daemon_maintain_server(), which starts activePerceptionServer() by calling TH_maintain_process_by_name(), and starts the image recognition main program by calling ThreadingPerceptionServer(). Then, it collects image information such as the main line, side line, and signal lights next to the track on the signal plan by calling the camera driver tvp_5150X().
[0062] Start the autonomous learning model, set the initialization parameters for the autoencoder learning model, and set the initialization parameters for the CBAM hybrid attention model. Set the weights, learning rate, bias, layer number, error value, and loss value for the autoencoder() function, set the layer number, and set the number of nodes in each layer.
[0063] S62. Extract the first image features of the sample signal plane map of the target color space using a compression algorithm.
[0064] After setting the number of nodes, start aetrain() for autonomous learning. First, call encoder() to start autonomous learning to capture the features of the graphic data in Table 2. Then, call the compression algorithm tf.nn.sigmoid() for feature detection, and then call the tf.Session() function for hierarchical encoding and compression.
[0065] S63. Perform image compression on the sample signal plane map of the target color space and extract the compressed second image features.
[0066] S64. The self-learning model is trained based on the first image features and the second image features, and the signal equipment in the sample signal plane is classified and identified by the self-learning model.
[0067] S65. When the accuracy of the classification and recognition result is greater than the first preset threshold, it is determined that the self-learning model has been trained and the trained self-learning model is used as the image recognition model.
[0068] Image compression is performed using `model.add(MaxPooling2D())`, followed by feature extraction using `X_encoded.reshape()`. Finally, the KMeans clustering algorithm is applied, using distance to evaluate image similarity and perform classification. Distance refers to proximity or similarity under a certain metric, such as shape, size, or pixels. KMeans clustering is biased towards spherical clusters; it yields better clustering results for continuous, spherical sample data, while its clustering effect is less than ideal for other shapes.
[0069] After image classification is completed, the decoder() function is called to decode the data, the tf.Session() function performs layered decoding and decompression, and finally the plt.scatter() function is called to reconstruct the data, thus obtaining the reconstructed data.
[0070] Based on the closest similarity between the input data and the reconstructed data, util.nntrain() was finally called for fine-tuning. After fine-tuning, the recognition of traffic light outlines and colors reached 99%, and the recognition of human bodies or other equipment signals reached 90%.
[0071] The `aetrain()` function continues to be called to input new image data for the next stage of the learning process. The more learning data, the more accurate the image feature data becomes. After acquiring new signal images, the autonomous learning model uses `feature_model.predict(X)` to predict the image, effectively supporting active perception and judgment. After a period of training and fine-tuning, the model achieved 100% recognition of signal light outlines and colors, and 94% recognition of turnouts or other equipment signals.
[0072] The identified signal equipment is converted into signal structure data, as shown in Table 1:
[0073] Table 1 Signal Mechanism Structure Data It's important to note that before training the self-learning model, the image must first be converted from the RGB color space to the HSV color space. In the HSV color space, color is perceived through hue (H), saturation (S), and brightness (V). Since the images captured by the camera are in RGB format, converting RGB to HSV requires an algorithm.
[0074] The process involves converting an image's color space from RGB to HSV for color segmentation and color identification. The HSV color space, also known as the hexagonal pyramid model, is a color space defined from a human perception perspective, more closely resembling human visual experience and color cognition. The three components of the HSV color space are: Hue (H), Saturation (S), and Value (V). Hue (H) is measured in degrees, ranging from 0° to 360°; Saturation (S) represents the purity of the color, ranging from [0.0, 1.0]; and Value (V) represents the lightness or darkness of the color, ranging from [0.0, 1.0], where 0 represents black and 1 represents white. The HSV color space is suitable for specifying color segmentation. For different color regions, mixing the H and S components and defining thresholds allows for color segmentation.
[0075] The conversion algorithm for RGB to HSV is as follows: In the HSV color space, color is perceived through hue (H), saturation (S), and brightness (V). Images captured by a camera are in RGB format; converting RGB to HSV requires an algorithm. The formula for converting a color space from RGB to HSV is shown below, where (r, g, b) are the RGB coordinates of the color, ranging from [0, 1], Max represents the maximum value among r, g, and b, and Min represents the minimum value. h represents the hue value, s represents the saturation, and v represents the brightness. The specific algorithm process is as follows: (1) Find the maximum value Max and the minimum value Min in RGB. Input RGB, find the maximum value Max and the minimum value Min in RGB, then V = *255.
[0076] (2) Determine whether the maximum value Max and the minimum value Min are equal, and calculate the values of S and H based on whether they are equal. If Max and Min are equal, then S equals 0 and H also equals 0. If Max and Min are not equal, then determine whether Max and R are equal.
[0077] (3) Determine if Max and R are equal. When Max equals R, calculate the values of S and H respectively. If Max equals R and G is greater than or equal to B, then S equals 255*(Max-Min) / Max and H equals (60*(GB) / (Max-Min)) / 2. If Max equals R and G is less than B, then S equals 255*(Max-Min) / Max and H equals (60*(GB) / (Max-Min)+360) / 2.
[0078] (4) Determine if Max and R are equal. If Max is not equal to R, calculate the values of S and H respectively. If Max is not equal to R and Max is equal to G, then S is equal to 255*(Max-Min) / Max and H is equal to (60*(GB) / (Max-Min)+120) / 2. If Max is not equal to R and Max is not equal to G, then S is equal to 255*(Max-Min) / Max and H is equal to (60*(GB) / (Max-Min)+240) / 2.
[0079] By converting the graphic's RGB color space to the HSV color space, and determining the color segmentation threshold based on multiple measurements of the actual red, green, or yellow film HSV component values of the traffic lights, the film region can be extracted from the image to achieve red, green, and yellow light position film recognition.
[0080] According to the "Railway Signal Design Specification" and the "Railway Industry Standard of the People's Republic of China," the signals used in high-speed rail and subway systems are generally color light signals. Color light signals are classified according to their purpose into entry signals, exit signals, passage signals, warning signals, approach signals, and hump signals, as shown in Table 2 and... Figure 17 :
[0081] Table 2 Graphic Symbols for Color Light Signals This invention utilizes embedded device driver development to initialize modules such as the camera module, video encoding module, and LCD display unit, and then drives the device. The signal shape recognition algorithm and signal color recognition algorithm first identify the signal outline edge using Freeman neighborhood chain code technology, and then use the OpenCV library to identify the signal color and chromaticity. Chromaticity identification uses an RGB color space to HSV color space conversion algorithm. The image recognition algorithm calculates the signal shape and color, and then uses the calculation results to train a self-learning model. After training the self-learning model with a certain amount of input, the signal recognition becomes increasingly accurate, achieving 100% recognition of signal light outlines and colors, and 94% recognition of other signal devices. This improves the safety and intelligence level of train operation. The calculated signal data is structured data and can be used as input for an integrated data configuration tool to assist in drawing calculations and regenerating a unified and standardized signal equipment plan.
[0082] like Figure 3 As shown, the structure of the OpenCV library has been continuously optimized and improved. It can be divided into five modules: cxcore, cv, Machine Learning (ML), HighGUI, and cvaux.
[0083] cxcore: This module provides some of the most basic data structures for the OpenCV runtime, including data structures, matrix operations, data transformations, object persistence, memory management, error handling, dynamic loading, plotting, text processing, and basic mathematical functions.
[0084] cv: This module mainly includes some advanced algorithms in vision, and it is also the main module used in this study.
[0085] HighGUI: Includes a graphical user interface and the ability to read and write images and videos.
[0086] Machine Learning (ML): This module contains many clustering, classification, and data analysis functions, such as the Bayes classifier, K-nearest neighbors algorithm, support vector machine, decision tree, neural network, and more.
[0087] cvaux: This module typically stores algorithms and functions that are about to be phased out, as well as some experimental algorithms and functions.
[0088] Figure 4 This is a schematic diagram of the camera driver architecture layer provided by this invention. The development process for the TVP5150 camera driver is as follows: The camera driver utilizes the FIMC driver in the Linux kernel, using an interface to attach the TVP5150 driver to the FIMC driver. The interface between the TVP5150 driver and the FIMC driver is achieved as follows: (1) Achieve matching between platform_device and platform_driver.
[0089] In the kernel, the FIMC integrated into the SOC is usually connected to the platform bus. During kernel initialization, the platform_device and platform_driver are matched, and then the probe function in the driver is called. The probe function will call other kernel functions one after another to implement the driver functions.
[0090] (2) Register the V4L2 device.
[0091] The probe function first calls the video_register_device function to register the FIMC as a V4L2 device, and then uses the data structures in the V4L2 architecture to control the FIMC.
[0092] (3) Obtain TVP5150 device information The probe function calls the fimc_init_global function to obtain specific platform information. On the hardware platform, data structure information about TVP5150 must be filled in first, so that the driver can obtain TVP5150 device information, including interface, output format, clock source and other information.
[0093] (4) Obtain I2C information After obtaining the TVP5150 device information, the probe function continues to call the fimc_configure_subdev function. Since the TVP5150 itself is an I2C device, this function extracts relevant I2C information from the TVP5150 device information, such as adapter, name, address, etc.
[0094] (5) Add I2C device and register V4L2 sub-device The `v4l2_i2c_new_subdev_board` function is called. This function first adds an `i2c_client` to the I2C bus based on the passed I2C device information. Prior to this, the system registered a corresponding `i2c_driver`, so the `i2c_client` matches the `i2c_driver`. Therefore, the I2C driver initialization function is called, which associates the `i2c_client` with the V4L2 sub-device. Then, the `v4l2_device_register_subdev` function is called to register a V4L2 sub-device. Thus, the TVP5150 is both an I2C device and a V4L2 sub-device, achieving interface with the FIMC driver.
[0095] LCD driver development process: LCD operations are achieved by directly "drawing" images on video memory through the framebuffer. The framebuffer is an abstract graphics device that provides an access interface for various device graphics. The framebuffer is mounted in the / dev directory and accessed through the / dev / fb* device files.
[0096] The development of the LCD driver is based on the framebuffer driver structure. Figure 5 This is a diagram of the framebuffer driver structure provided by this invention. The main process is as follows: (1) Matching platform_device and platform_driver. The LCD controller is connected to the platform bus. The matching of platform_device and platform_driver is completed during system initialization, and the driver initialization probe function is called.
[0097] (2) Initialize the LCD controller The Probe function calls relevant functions to obtain and save architecture-related information, enable the LCD controller's clock, and initialize the LCD controller's registers, thus configuring the LCD controller.
[0098] (3) Register the framebuffer device The Probe function initializes fb_info, sets relevant parameters of the framebuffer such as resolution and pixel width, and finally registers the framebuffer device with the kernel.
[0099] Traffic signal or traffic signal color recognition calculation method: Based on the traffic signal shape recognition calculation method, the shape is extracted, the center position coordinates of the traffic signal are obtained, the foreground color and background color are separated, and then the OpenCV library is used to convert the graphic from RGB color space to HSV color space to calculate the H hue value inside the outline. Finally, the color features (hue H, saturation S, and brightness V) and coordinates of the traffic signal in the area are extracted into the initial traffic signal structure data. The main process is as follows: Figure 10 This is a heterogeneous signal plane image. A signal shape recognition algorithm is used to extract the signal outline from the heterogeneous signal plane image. The `cv.inRange()` function is used to separate the signal from the background color. The signal outline is found using `cv2.findContours()`. Based on the outline, an image with a border is displayed using `cv.rectangle(image, (x, y),(x + w, y + h), (0, 255, 0), 2)`, obtaining the bounding box coordinates `x, y, w, h = cv2.boundingRect(contour)`. Based on the bounding box coordinates, the center coordinates of the signal are calculated: `center_x = (x + w) / 2` and `center_y = (y + h) / 2`. The signal shape region is defined; the signal can be set as the upper half of the region. Similarly, the background region is a dark area. The orientation, name, and number of the signal are identified using `cv2.detect_objects_and_read_text(image, (center_x, center_y))`. The final plan view corresponding to the signal machine structure configuration data is as follows: Figure 11 As shown.
[0100] Image HSV processing: such as Figure 12This is a schematic diagram of a signal generator in the RGB color space. In the RGB color components, the color of the signal generator is mainly determined by R, G, and B. The RGB color space can be converted to the HSV color space using `cv.cvtColor()`. After the image is converted to HSV, the hue (H), saturation (S), and brightness (V) of the image can be easily obtained using the `split(hsvImage, hsvChannel)` function. Figure 13 This is a schematic diagram of a signal transmitter in the HSV color space.
[0101] Furthermore, shape is extracted based on the signal machine shape recognition calculation method, followed by image binarization. Figure 14 This is a binarized target image. In the RGB color components, the color of the residual contour is mainly determined by R and B, and the number of these components satisfies the inequalities (RB>N) and (R>G). The minimum values of R, G, and B in the segmentation threshold determine the value of N in the inequality (RB>N). Then, the CPU sets pixels that do not satisfy the inequalities to 255 (black) and pixels that satisfy the inequalities to 0 (white) according to the inequalities (RB>N) and (R>G). After image reconstruction, the signal horn and background are clearly distinguishable within the original color frame. White represents the signal horn outline, and black represents other background colors. The signal horn is identified as a traffic light based on its outline.
[0102] The process involves converting the graphic's RGB color space to the HSV color space, and then obtaining a new image based on the HSV color space. The hue (H) value of the signal's internal components is calculated from this new image. The color characteristics (H, Saturation, and Brightness V) of the signal within the designated area are then used to identify the green light. Finally, these color characteristics (H, Saturation, and Brightness V) are extracted into the initial signal structure data.
[0103] By identifying the shape of traffic signals within a region through edge recognition, and using a self-learning model for graphic feature and image classification learning, the model can quickly improve its ability to determine the current traffic signal category, such as for traffic light recognition. Recognition results: Entry / exit traffic signals, light sequence red-green-yellow, traffic signal direction upwards. See Table 3:
[0104] Table 3 Data Structure of Signal Stations The identified signal controllers are input into the integrated data configuration tool, which then converts them into a standardized signal equipment plan. A unified data source is generated based on this plan and input into the VOBC data configuration tool (hereinafter referred to as the "VOBC data configuration tool"). Configuration parameters are added to the VOBC data configuration tool, such as signal controller number, signal controller attributes, track affiliation, and offset position within the track. This is then converted into a standardized VOBC signal controller structure, as shown in the example below. Figure 15 As shown.
[0105] The following describes the signal controller configuration data generation device for the vehicle controller provided by the present invention. The signal controller configuration data generation device described below and the signal controller configuration data generation method described above can be referred to in correspondence with each other.
[0106] Figure 16 This is a schematic diagram of the signal controller configuration data generation device for the vehicle controller provided by the present invention, specifically including: The acquisition module 1601 is used to acquire image data of the signal plane diagram. For detailed explanations, please refer to the relevant descriptions in the above method embodiments; they will not be repeated here.
[0107] The recognition module 1602 is used to input the image data into an image recognition model, and to recognize the signal data in the image data through the image recognition model. The signal data includes the color of the signal lights and the shape of the signal lights. For detailed explanations, please refer to the relevant descriptions in the above method embodiments, which will not be repeated here.
[0108] The generation module 1603 is used to convert the signal controller data into signal controller structure data, and input the signal controller structure data into the integrated configuration tool to generate signal controller structure configuration data for the vehicle controller. This signal controller structure configuration data is used to generate a plan view of the signal equipment. For detailed explanations, please refer to the relevant descriptions in the above method embodiments; they will not be repeated here.
[0109] Figure 18 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 18As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830, and a communication bus 840, wherein the processor 810, the communication interface 820, and the memory 830 communicate with each other through the communication bus 840. The processor 810 can call logical instructions in the memory 830 to execute a method for generating signal controller structure configuration data for the vehicle controller. This method includes: acquiring image data of a signal plane diagram; inputting the image data into an image recognition model, and recognizing signal data in the image data through the image recognition model, wherein the image recognition model is trained based on a sample signal plane diagram, the signal light color features and signal shape features in the sample signal plane diagram, and the compressed image features of the sample signal plane diagram; converting the signal data into signal structure data, and inputting the signal structure data into an integrated configuration tool to generate signal controller structure configuration data, which is used to generate a signal equipment plane diagram.
[0110] Furthermore, the logical instructions in the aforementioned memory 830 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0111] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the signal controller structure configuration data generation method for the vehicle controller provided by the above methods. The method includes: acquiring image data of a signal plane; inputting the image data into an image recognition model, and recognizing the signal data in the image data through the image recognition model, wherein the image recognition model is trained based on a sample signal plane, the signal light color features and signal shape features in the sample signal plane, and the image compression features of the compressed sample signal plane; converting the signal data into signal structure data, and inputting the signal structure data into an integrated configuration tool to generate signal controller structure configuration data, wherein the signal structure configuration data is used to generate a signal equipment plane.
[0112] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements a method for generating signal device structure configuration data for a vehicle controller provided by the methods described above. This method includes: acquiring image data of a signal plane diagram; inputting the image data into an image recognition model, and identifying signal device data in the image data through the image recognition model, wherein the image recognition model is trained based on a sample signal plane diagram, signal light color features and signal device shape features in the sample signal plane diagram, and compressed image features of the compressed sample signal plane diagram; converting the signal device data into signal device structure data, and inputting the signal device structure data into an integrated configuration tool to generate signal device structure configuration data for a vehicle controller, wherein the signal device structure configuration data is used to generate a signal device plane diagram.
[0113] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0114] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0115] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for generating signal structure configuration data for an on-board controller, characterized in that, include: Acquire image data of the signal plane diagram; The image data is input into an image recognition model, which identifies the signal data in the image data. The image recognition model is trained based on a sample signal plane map, the color features of the traffic lights and the shape features of the signal in the sample signal plane map, and the compressed image features of the sample signal plane map. The signal controller data is converted into signal controller structure data, and the signal controller structure data is input into the integrated configuration tool to generate signal controller structure configuration data for the vehicle controller. The signal controller structure configuration data is used to generate a plan view of the signal equipment.
2. The method according to claim 1, characterized in that, The image recognition model is trained based on the following steps: Acquire a sample signal plane image and convert the color space of the sample signal plane image into a target color space; The first image features of the sample signal plane map of the target color space are extracted using a compression algorithm; Image compression is performed on the sample signal plane map of the target color space, and the compressed second image features are extracted; The self-learning model is trained based on the first image features and the second image features, and the signal equipment in the sample signal plane is classified and identified by the self-learning model. When the accuracy of the classification and recognition result is greater than the first preset threshold, it is determined that the self-learning model has been trained and the trained self-learning model is used as the image recognition model.
3. The method according to claim 1, characterized in that, The signal data includes the color of the signal lights and the shape of the signal; The step of converting the signal controller data into signal controller structure data and inputting the signal controller structure data into the integrated configuration tool to generate signal controller structure configuration data for the vehicle controller includes: The identified traffic light colors and traffic signal shapes are converted into structured data; Based on the structured data, signal structure data is generated, which includes the signal number, name, location, and line to which it belongs; The signal controller structure data is input into the integrated data configuration tool to generate signal controller structure configuration data; Generate standardized signal equipment plan diagrams based on signal machine structure configuration data.
4. The method according to claim 2, characterized in that, The target color space is the HSV color space; the first image feature includes traffic light color features and traffic signal shape features; The first image feature extracted from the sample signal plane map of the target color space using a compression algorithm includes: Determine the color segmentation threshold based on HSV component values; The color of the traffic light is determined based on the color segmentation threshold, and the color features of the traffic light are extracted. Identifying signal outline edges using Freeman neighborhood chain code technology; The shape features of the signal are extracted based on the outline edge of the signal.
5. The method according to claim 2, characterized in that, The step of compressing the sample signal plane map of the target color space and extracting the compressed second image features includes: Image compression technology is used to compress the sample signal plane image of the target color space; The compressed image is downsampled to extract the compressed second image features, which include traffic light color features and traffic signal shape features.
6. The method according to claim 4 or 5, characterized in that, The step of training a self-learning model based on the first image features and the second image features, and then using the self-learning model to classify and identify signal equipment in the sample signal plane, includes: Compare the similarity of the same type of features in the first image features and the second image features; Clustering sample signal plane images with similarity greater than a second preset threshold yields multiple types of sample signal plane images, where sample signal plane images of the same type have similar image features. Extract the third image features of the plane plot of the sample signal for each type; The self-learning model classifies and identifies signal equipment in the sample signal plane based on the third image features.
7. The method according to claim 1, characterized in that, The image data of the acquired signal plane includes: Image data of the signal plan is acquired by an image acquisition device installed on the front of the train. The image data includes the main line, side lines and signal markings on the signal plan.
8. A device for generating data on the configuration of a signal controller structure for a vehicle-mounted controller, characterized in that, include: The acquisition module is used to acquire image data of the signal plane diagram; The recognition module is used to input the image data into the image recognition model, and to recognize the signal data in the image data through the image recognition model. The image recognition model is trained based on the sample signal plane map, the signal light color features and signal shape features in the sample signal plane map, and the compressed image features of the sample signal plane map. The generation module is used to convert the signal controller data into signal controller structure data, and input the signal controller structure data into the integrated configuration tool to generate the signal controller structure configuration data of the vehicle controller. The signal controller structure configuration data is used to generate the signal equipment plan view.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the signal structure configuration data generation method for the vehicle controller as described in any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the signal structure configuration data generation method for the vehicle controller as described in any one of claims 1 to 7.