Weighing implementation method based on static rail weighbridge and electronic equipment

By installing a camera on a static track scale and using a recognition model to identify vehicle features, the problems of manual intervention and environmental influence in existing technologies are solved, achieving automated and accurate weighing results.

CN120635771APending Publication Date: 2025-09-12新余钢铁股份有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510734670.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-04
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

The existing static track scale weighing method requires manual intervention, and the proximity switch and infrared beam method are easily affected by vehicle obstructions and bad weather, resulting in inaccurate weighing results.

Method used

A camera is used to capture video frames, and a pre-trained recognition model is used to identify vehicle features, determine whether the vehicle position meets the preset requirements, and trigger the weighing operation.

Benefits of technology

It achieves automated and accurate weighing results, avoiding strict requirements on the order of vehicle weighing and the influence of obstructions and bad weather.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120635771A_ABST
    Figure CN120635771A_ABST
Patent Text Reader

Abstract

The invention provides a static rail weighbridge-based weighing implementation method and electronic equipment, and the method comprises the steps: obtaining a video frame which is collected by camera equipment installed on a static rail weighbridge and comprises a target object, importing the video frame into a recognition model obtained through pre-training, and recognizing the target features in the video frame. Whether the position of the target object meets a preset requirement or not is judged based on the recognized target features, and under the condition that the position of the target object meets the preset requirement, weighing operation is triggered to obtain weight information of the target object. According to the scheme, the image recognition mode based on the recognition model is adopted, the requirement for accurate positioning or strict weighing sequence is avoided, and the target object is ensured to be located at the correct position based on recognition of the target features, so that the accuracy of the weighing result is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of measurement technology, and in particular to a weighing implementation method and electronic equipment based on a static track scale. Background Art

[0002] With the development of weighing technology, automatic weighing can be achieved based on vehicle scales and dynamic track scales. However, static track weighing usually requires manual intervention to measure materials. Existing methods include using proximity switches and infrared beams to detect vehicle position on track scales, but these existing methods have shortcomings.

[0003] Among them, the proximity switch detection method has strict requirements on the order of vehicle weighing because it cannot know the actual situation of the train vehicle. If the reverse operation sequence of the vehicle is misplaced, the correct position of the train vehicle on the scale cannot be identified, which will cause the program logic to be disordered and automatic weighing cannot be performed. The infrared beam method, whether point, line, or surface, has application limitations. The positioning must be accurate and the adjustment range is small. Obstructions on the vehicle and bad weather can affect the operation of the grating, which can easily cause automatic weighing failure. Summary of the Invention

[0004] The purpose of the embodiments of the present invention is to provide a weighing implementation method and electronic equipment based on a static track scale, so as to ensure the accuracy of the weighing results.

[0005] In a first aspect, the present invention provides a weighing implementation method based on a static track scale, wherein the static track scale is equipped with a camera device, and the method comprises:

[0006] Obtaining a video frame containing a target object captured by the camera device;

[0007] Importing the video frame into a pre-trained recognition model to identify target features in the video frame;

[0008] Determining whether the position of the target object meets a preset requirement based on the target feature;

[0009] If the position of the target object meets the preset requirements, a weighing operation is triggered to obtain the weight information of the target object.

[0010] In an optional embodiment, the target object is a vehicle compartment;

[0011] The camera equipment includes a rail gap camera and a coupling camera respectively located on both sides of the static track scale, and a vehicle number camera located in the middle of the static track scale;

[0012] The recognition model includes a rail gap recognition model, a coupling recognition model and a vehicle number recognition model;

[0013] The step of importing the video frame into a pre-trained recognition model for recognition, and identifying target features in the video frame includes:

[0014] Importing the video frames captured by the rail gap camera into a pre-trained rail gap recognition model to identify the wheels on the vehicle carriage;

[0015] Importing the video frames captured by the coupling camera into a pre-trained coupling recognition model to identify coupling components on the vehicle compartment;

[0016] The video frames captured by the vehicle number camera are imported into a pre-trained vehicle number recognition model to recognize the vehicle number on the vehicle compartment.

[0017] In an optional embodiment, the step of determining whether the position of the target object meets a preset requirement based on the target feature includes:

[0018] Detecting whether the identified target features are complete;

[0019] If the target feature is complete, then check whether the position of the target feature meets the position requirement;

[0020] If the position of the target feature meets the position requirement, it is determined that the position of the target object meets the preset requirement.

[0021] In an optional embodiment, the step of detecting whether the identified target feature is complete includes:

[0022] Check whether the identified wheels, connecting parts and vehicle license plates are complete.

[0023] In an optional embodiment, transition blocks are provided on both sides of the static track scale;

[0024] The step of detecting whether the position of the target feature meets the position requirement includes:

[0025] Locating position information of the transition block;

[0026] The position information of the transition block is combined to detect whether the position of the wheel and the position of the connecting component meet the position requirements.

[0027] In an optional embodiment, the step of detecting whether the position of the wheel and the position of the coupling component meet the position requirements in combination with the position information of the transition block includes:

[0028] Based on the position of the transition block, a transition block frame is drawn in the direction of the vehicle compartment;

[0029] Defining a wheel frame based on the identified wheel, and defining a coupling frame based on the identified coupling components;

[0030] Detecting whether there are overlapping parts between the wheel frame, the connecting frame and the transition block frame;

[0031] If there is no overlapping portion, it is determined that the position of the wheel and the position of the connecting component meet the position requirements.

[0032] In an optional embodiment, if the position of the target object meets a preset requirement, the step of triggering a weighing operation to obtain weight information of the target object includes:

[0033] If the position of the target object meets the preset requirements, detecting whether the target object maintains the same position for a preset period of time;

[0034] If the target object maintains a constant position for a preset period of time, a weighing operation is triggered to obtain the weight information of the target object.

[0035] In an optional embodiment, the method further includes a step of pre-training to obtain a recognition model, which step includes:

[0036] Acquire multiple sample frames, wherein each sample frame includes a sample feature framed by a real frame;

[0037] Importing each of the sample frames into the constructed deep learning model to obtain output features framed by the prediction frame;

[0038] The deep learning model is iteratively trained under the guidance of a loss function constructed based on the true frame and the predicted frame until an iterative stopping condition is met, thereby obtaining a trained recognition model.

[0039] In an optional embodiment, the loss function is constructed in the following manner:

[0040] Calculating the overlapping area between the real frame and the predicted frame;

[0041] Obtaining a first aspect ratio of the real frame and a second aspect ratio of the predicted frame, and calculating a difference between the first aspect ratio and the second aspect ratio;

[0042] Obtaining a displacement deviation between the center point of the real frame and the center point of the predicted frame;

[0043] A loss function is constructed based on the overlapping area, the difference and the displacement deviation.

[0044] In a second aspect, the present invention provides an electronic device comprising a processor and a memory, wherein the memory stores machine-executable instructions that can be executed by the processor, and the processor can execute the machine-executable instructions to implement any of the methods described in the foregoing embodiments.

[0045] The present invention provides a weighing implementation method and electronic equipment based on a static track scale. By obtaining a video frame containing a target object captured by a camera installed on the static track scale, the video frame is imported into a pre-trained recognition model to identify the target features in the video frame. Based on the identified target features, it is determined whether the position of the target object meets the preset requirements. When the position of the target object meets the preset requirements, a weighing operation is triggered to obtain the weight information of the target object. In this solution, an image recognition method based on a recognition model is adopted to avoid the need for precise positioning or strict weighing order, and recognition based on target features is used to ensure that the target object is in the correct position, thereby ensuring the accuracy of the weighing results. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments of the present invention. It should be understood that the following drawings only illustrate certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.

[0047] Figure 1 A structural block diagram of an electronic device provided by an embodiment of the present invention;

[0048] Figure 2 A flowchart of a weighing implementation method based on a static track scale provided in an embodiment of the present invention;

[0049] Figure 3 A flowchart of a training method provided by an embodiment of the present invention;

[0050] Figure 4 A flowchart of a method for constructing a loss function according to an embodiment of the present invention;

[0051] Figure 5 A schematic diagram of the arrangement positions of various camera devices in an embodiment of the present invention;

[0052] Figure 6 for Figure 2 Flowchart of the sub-steps included in S12;

[0053] Figure 7 for Figure 2 Flowchart of the sub-steps included in S13;

[0054] Figure 8 for Figure 7 Flowchart of the sub-steps included in S132;

[0055] Figure 9 for Figure 8 Flowchart of the sub-steps included in S1322;

[0056] Figure 10 Schematic diagram of various target features in an embodiment of the present invention;

[0057] Figure 11 A functional module block diagram of a weighing implementation device based on a static track scale provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0058] The technical solutions in the embodiments of the present invention will be described below with reference to the accompanying drawings in the embodiments of the present invention.

[0059] See also Figure 1 , is an electronic device provided in an embodiment of the present invention. The weighing implementation method based on a static railroad scale provided in an embodiment of the present invention can be applied to this electronic device. The electronic device includes a memory, a processor, and a communication module. The memory, processor, and communication module components are electrically connected to each other directly or indirectly to enable data transmission or interaction. For example, these components can be electrically connected to each other via one or more communication buses or signal lines.

[0060] Memory is used to store programs or data. Memory can be, but is not limited to, random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), and electrically erasable programmable read-only memory (EEPROM).

[0061] The processor is used to read / write data or programs stored in the memory and execute corresponding functions.

[0062] The communication module is used to establish a communication connection between the electronic device and other communication terminals through the network, and is used to send and receive data through the network.

[0063] It should be understood that Figure 1 The structure shown is only a schematic diagram of the structure of the electronic device. The electronic device may also include Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown. Figure 1 Each component shown in the figure can be implemented by hardware, software or a combination thereof.

[0064] In some embodiments, a static track scale is equipped with multiple imaging devices. The electronic device may be a terminal device that communicates with each imaging device, such as a computer or server. The electronic device may communicate with each imaging device to exchange data and may analyze and process the data obtained from the imaging devices. The electronic device may also communicate with other devices on the static track scale to exchange data and instructions with the other devices, such as issuing relevant control instructions to the devices to implement weighing operations.

[0065] The following, combined Figure 2 The weighing implementation method based on the static track scale provided by the embodiment of the present invention is described. Figure 2 The present invention provides a flow chart of a weighing method based on a static track scale, which includes the following steps:

[0066] S11, obtaining a video frame containing a target object captured by the camera device.

[0067] S12, importing the video frame into a pre-trained recognition model to identify target features in the video frame.

[0068] S13: Determine whether the position of the target object meets a preset requirement based on the target feature.

[0069] S14: If the position of the target object meets a preset requirement, a weighing operation is triggered to obtain weight information of the target object.

[0070] Static track scales are used to measure the weight of railway freight cars and are widely used in factories, mines, metallurgy, foreign trade, and railway sectors. They operate based on load cell technology. When a vehicle is stationary on the scale, the load cells collect gravity signals from the wheels or body of the vehicle. The circuitry converts these force signals into electrical signals, which are then displayed on a meter.

[0071] Before triggering a static track scale to perform weighing, the vehicle must be in the required position to ensure the stability and accuracy of the weighing results. The existing detection methods based on proximity switches and infrared beams have drawbacks such as strict requirements on the order in which vehicles are weighed or are easily affected by obstructions, bad weather, and other factors.

[0072] Based on this, in this embodiment, a camera device is installed on the static track scale, and the camera device can be used to capture images of a certain area on the static track scale. When a target object, such as a vehicle, appears within the shooting range of the camera device, the camera device can capture a video frame containing the target object.

[0073] To ensure accurate weighing results, the vehicle must be within the required position range on the static track scale. Vehicles typically have target features that can be used to locate their position, such as wheels and attachments. This allows the vehicle's position to be determined based on its wheels and attachments, and furthermore, whether the vehicle's position meets the requirements.

[0074] Target features such as wheels and connecting parts on a vehicle are relatively consistent among different vehicles, so the target features are easy to identify for different vehicles.

[0075] In this embodiment, a recognition model is pre-trained and can be used to recognize and identify target features in the target object, such as wheels, connecting parts, etc., when a video frame containing the target object is input.

[0076] Based on information such as the location of the target features identified by the recognition model, it can be determined whether the overall position of the target object meets preset requirements, such as whether it is in the middle of a static track scale or out of bounds. Only when the target object's position meets the preset requirements can the accuracy of the final weighing result be guaranteed. Therefore, if the target object's position is determined to meet the preset requirements, the weighing operation can be triggered to obtain the target object's weight information.

[0077] The weighing implementation method based on a static railroad scale provided in this embodiment uses image recognition to obtain a recognition model through pre-training. Based on the recognition model, the target features in the video frame can be quickly identified. Based on the target features, the position of the target object is then determined to meet the requirements, thereby triggering the weighing operation. This avoids the need for precise positioning or a strict weighing sequence, and is less susceptible to obstructions or inclement weather. Furthermore, the recognition of target features ensures that the target object is in the correct position, thereby ensuring the accuracy of the weighing results.

[0078] The following first describes how to implement the pre-trained recognition model.

[0079] See also Figure 3 The weighing implementation method based on the static track scale provided in this embodiment may further include the following steps:

[0080] S21 , acquiring a plurality of sample frames, wherein each of the sample frames includes a sample feature framed by a real frame.

[0081] S22, importing each of the sample frames into the constructed deep learning model to obtain output features framed by the prediction frame.

[0082] S23, performing iterative training of the deep learning model under the guidance of a loss function constructed based on the real box and the predicted box, until an iterative stop condition is met, thereby obtaining a trained recognition model.

[0083] In this embodiment, a plurality of sample frames are collected in advance, and the sample frames are collected by a camera device. The number of collected sample frames should be large, for example, more than 3000 sample frames.

[0084] Each sample frame includes a target object, such as a vehicle compartment. A vehicle compartment has multiple sample features, such as wheels, attachments, and license plates. Sample features in a sample frame are bounded by a ground-truth box, which can be manually defined or identified and defined using other models. The ground-truth box is the smallest rectangular box that can enclose the sample features.

[0085] In addition, a deep learning model is pre-built, which can be a YOLO model, for example, a YOLOV11 model. In this embodiment, the detection target is mainly to extract image features in the video frame. By optimizing the target detection model configuration file based on the YOLO model, reducing the convolution layer, removing the residual connection, and strengthening the convolution mechanism of feature grouping and fusion. In this way, not only the model training time is reduced, the model file is also reduced from 200M to 18M in size, the loading time of the model file is accelerated, the memory and CPU usage are reduced, and the feature extraction capability of the model is enhanced, making the model call more convenient and the target detection in complex scenes more accurate.

[0086] The collected and labeled sample frames are fed into the constructed deep learning model. After performing feature extraction, feature recognition and classification on each sample frame, the model outputs the output features defined by the prediction frame. These output features also refer to features such as the wheels, attachments, and license plate numbers on the vehicle compartment.

[0087] The goal of training a deep learning model is to ensure that the output features and their predicted frames are as consistent as possible with the sample features and their true frames in the input sample frames. To achieve this training goal, in this embodiment, a loss function is constructed based on the true frames and predicted frames, and iterative training is performed using this loss function as a guide. When the iterative stopping condition is met, a recognition model trained by the deep learning model is obtained.

[0088] The iteration stopping condition may be when the loss function reaches convergence and no longer changes, when a preset maximum number of iterations is reached, or when a preset maximum iteration duration is reached.

[0089] The loss function is constructed from the true box and the predicted box. The goal of model training is to minimize the difference between the final true box and the predicted box, or even make them consistent. In order to ensure the consistency between the true box and the predicted box, the loss function can be constructed from multiple perspectives. Figure 4 In this embodiment, the loss function can be constructed in the following way:

[0090] S31, calculating the overlapping area between the real frame and the predicted frame.

[0091] S32: Obtain a first aspect ratio of the real frame and a second aspect ratio of the predicted frame, and calculate a difference between the first aspect ratio and the second aspect ratio.

[0092] S33: Obtain a displacement deviation between the center point of the real frame and the center point of the predicted frame.

[0093] S34: constructing a loss function based on the overlapping area, the difference and the displacement deviation.

[0094] In this embodiment, for each sample frame, an overlapping area between the two may be determined based on the position of the real frame on the sample frame and the position of the obtained predicted frame.

[0095] Furthermore, based on the length and width of the ground-truth box, the aspect ratio is calculated by dividing the length of the ground-truth box by its width. For ease of distinction, this is referred to as the first aspect ratio. Based on the length and width of the predicted box, the second aspect ratio is calculated by dividing the length of the predicted box by its width. The difference between the first aspect ratio and the second aspect ratio is obtained by subtracting the first aspect ratio from the second aspect ratio.

[0096] In addition, the center point of the real frame and the center point of the predicted frame can be determined. The distance between the two center points is calculated to obtain the displacement deviation.

[0097] The overlap area, difference, and displacement deviation obtained above are accumulated to obtain the final loss function. Since the training goal is to make the overlap area between the predicted box and the ground truth box as large as possible, and the loss function is trained in an iterative training process in a way to minimize it, a negative sign can be added before the overlap area, that is, the larger the overlap area, the smaller the value of the loss term constituted by the overlap area.

[0098] The loss terms composed of overlapping area, difference and displacement deviation are accumulated according to certain weights to form a loss function.

[0099] Through the above method, the model training can be carried out by combining the loss function composed of the overlapping area, aspect ratio and displacement deviation between the predicted box and the real box, so that the recognition model finally trained can accurately locate each feature in the target object.

[0100] The above is the process of pre-training to obtain the recognition model. In the actual application stage, the recognition model can be used to perform recognition processing on the real-time collected video frames to identify the target features therein.

[0101] Please refer to Figure 5 In this embodiment, a plurality of camera devices are provided on the static track scale for respectively capturing video frames containing different features on the vehicle compartment, mainly including features such as wheels, connecting parts, vehicle number (including vehicle model information and number) on the vehicle compartment.

[0102] Therefore, multiple cameras are installed, including a track gap camera and a coupling camera located on either side of the static track scale, as well as a vehicle number camera located in the center of the scale. The track gap camera is located on the track gap camera pole, the coupling camera is located on the coupling camera pole, and the vehicle number camera is located on the vehicle number camera pole. The static track scale is also equipped with a transition block, which primarily defines the valid position on the scale.

[0103] The transition blocks are located on either side of the static track scale. The rail gap camera can be installed near the transition blocks on the static track scale. The attached camera can be installed on both sides of the static track scale at a certain distance from the outside of the transition blocks, for example, 1.5 meters. The vehicle number camera is installed in the center of the static track scale.

[0104] When the vehicle carriage is in a valid position on the static track scale, the track gap camera can capture video frames containing the wheels on the vehicle carriage, the coupling camera can capture video frames containing the coupling parts on the vehicle carriage, and the vehicle number camera can capture video frames containing the vehicle number on the vehicle carriage.

[0105] To specifically identify various features, pre-trained recognition models include a track gap recognition model, a coupling recognition model, and a vehicle number recognition model. The track gap recognition model is primarily trained based on video frames captured by the track gap camera, the coupling recognition model is trained based on video frames captured by the coupling camera, and the vehicle number recognition model is trained based on video frames captured by the vehicle number camera.

[0106] Based on this, see Figure 6 , importing the video frame into the recognition model for recognition, and identifying the target features in the video frame can be achieved by the following methods:

[0107] S121, importing the video frames captured by the rail gap camera into a pre-trained rail gap recognition model to recognize the wheels on the vehicle compartment.

[0108] S122: Import the video frames captured by the coupling camera into a pre-trained coupling recognition model to identify coupling components on the vehicle compartment.

[0109] S123, importing the video frames captured by the vehicle number camera into a pre-trained vehicle number recognition model to recognize the vehicle number on the vehicle compartment.

[0110] In this embodiment, the pre-trained rail gap recognition model, coupling recognition model, and vehicle number recognition model can be loaded into an electronic device, which then processes the video frames based on the loaded models. Alternatively, the rail gap recognition model, coupling recognition model, and vehicle number recognition model can be loaded into corresponding video cameras, which then process the video frames.

[0111] Since each camera device has a certain shooting range, when a vehicle compartment enters the shooting range, each camera device can generally capture relevant target features.

[0112] Therefore, by processing the video frames captured by the rail gap camera using the pre-trained rail gap recognition model, the wheels on the vehicle carriage can be identified. By processing the video frames captured by the coupling camera using the pre-trained coupling recognition model, the coupling components on the vehicle carriage can be identified. By processing the video frames captured by the vehicle number camera using the pre-trained vehicle number recognition model, the vehicle number on the vehicle carriage can be identified.

[0113] In this embodiment, based on the vehicle number on the vehicle compartment recognized by the vehicle number camera, the vehicle model information and number in the vehicle number can also be identified by cooperating with the vehicle number ground reading device to ensure the reliability of vehicle number recognition.

[0114] In this embodiment, each model can also introduce a confidence level when identifying and outputting target features. The confidence level reflects the model's degree of certainty about the presence of the target feature in the prediction frame and the probability of the target feature's category. Its calculation method is generally divided into two parts: the confidence level of the target feature and the category probability.

[0115] The target feature presence confidence indicates the probability that the target feature exists within the prediction box output by the model, as predicted by the model using the feature map. The class probability indicates the probability that the target feature belongs to a specific class. A normalized exponential function (Softmax) is applied to these two components to obtain the final confidence. For example, if the target feature presence probability is 0.9 and the maximum class probability is 0.8, the final confidence is 0.9*0.8=0.72.

[0116] Although each camera device can capture and identify the corresponding target features, the shooting range of each camera device is generally large. When the target features are identified, the position of the vehicle compartment may not be in the accurate and effective position. Therefore, please refer to Figure 7 In this embodiment, it is also necessary to determine whether the position of the target object meets the preset requirements based on the target features, which can be achieved by the following methods:

[0117] S131, detecting whether the identified target features are complete.

[0118] S132: If the target feature is complete, then check whether the position of the target feature meets the position requirement.

[0119] S133: If the position of the target feature meets the position requirement, determine that the position of the target object meets the preset requirement.

[0120] In this embodiment, the system first checks the integrity of the identified target features, including the integrity of the wheels, the integrity of the connecting components, and the integrity of the vehicle license plate. If any of the identified target features are incomplete, it indicates that the target object is not in a position that meets the preset requirements, and a prompt message is issued to prompt the system to adjust the target object's position.

[0121] When all identified target features are complete, the positions of the target features are checked to see if they meet the position requirements. If they do, the overall position of the target object meets the preset requirements. Otherwise, the overall position of the target object does not meet the preset requirements, and a prompt message is issued to prompt the target object to adjust its position.

[0122] As can be seen from the above, the transition block on the static track scale can be used to identify the valid position on the static track scale, so please refer to Figure 8 In this embodiment, the following method can be used to detect whether the position of the target feature meets the preset requirements.

[0123] S1321: Locate the position information of the transition block.

[0124] S1322: Detect, in combination with the position information of the transition block, whether the position of the wheel and the position of the connecting component meet position requirements.

[0125] In this embodiment, when the rail gap camera captures a video frame containing a wheel, it also captures the transition block. That is, the video frame contains images of both the wheel and the transition block. Similarly, when the coupling camera captures a video frame containing a coupling component, it also captures the transition block.

[0126] Therefore, the video frames captured by the rail gap camera include images of the wheels and the transition block, and the video frames captured by the coupling camera include images of the coupling components and the transition block.

[0127] Based on this, the position information of the transition block can be located based on the transition block in the video frame, and then combined with the position information of the transition block to determine whether the positions of the wheel and the connecting component meet the position requirements.

[0128] Specifically, see Figure 9 The following methods can be used to check whether the position of the wheel and the position of the connecting parts meet the position requirements by combining the position of the transition block:

[0129] S13221: Draw a transition block frame in the direction of the vehicle compartment based on the position of the transition block.

[0130] S13222: setting a wheel frame based on the identified wheel, and setting a coupling frame based on the identified coupling components.

[0131] S13223, detecting whether there are overlapping parts between the wheel frame, the connecting frame and the transition block frame.

[0132] S13224: If there is no overlapping portion, determine whether the position of the wheel and the position of the connecting component meet the position requirements.

[0133] Please refer to Figure 10 , transition blocks are respectively set on both sides of the static track scale. Based on the position of the transition block in the video frame, a transition block frame is drawn in the direction of the vehicle carriage (i.e., the direction of the track), such as Figure 10 The rectangular frame around the middle transition block.

[0134] Similarly, a wheel frame surrounding the outer periphery of the identified wheel is defined, and a coupling frame surrounding the outer periphery of the coupling component is defined.

[0135] If wheel frame and transition block frame have overlapping part, then show that wheel pressure line, can send the warning message of wheel pressure line. In addition, if linking frame and transition block frame have overlapping part, then show that the position of vehicle compartment is not in valid position.

[0136] Based on this, it is possible to detect whether there are overlapping parts between the wheel frame, the connecting frame and the transition block frame. If there are no overlapping parts, it can be determined that the positions of the wheels and the connecting parts meet the position requirements. Further, it can be determined that the position of the target object meets the preset requirements.

[0137] Once the target object's position is determined to meet preset requirements, the system can also detect whether the target object maintains its position for a preset period of time to ensure the stability of the weighing results. If the target object maintains its position for a preset period of time, a weighing operation can be triggered to obtain the target object's weight information. The preset period can be any value, such as 3 seconds.

[0138] After triggering the weighing operation, if the weight information remains stable within the permitted fluctuation range within the specified time, the accurate weight information can be confirmed. At this point, the weight information of the vehicle carriage and its car number can be recorded and saved. A bell can then be rung to confirm the completion of the weighing of that vehicle carriage, and the next carriage can be weighed, until the entire train is weighed.

[0139] The weighing implementation method based on the static track scale provided in this embodiment adopts image recognition and realizes feature recognition and positioning through the deep learning model in artificial intelligence, thereby effectively ensuring that the weighed vehicle is in the effective position of the static track scale, realizing the function of automatically saving the weighing weight, and ensuring the effectiveness and accuracy of the measurement.

[0140] In this embodiment, during the pre-training of the recognition model, a loss function is constructed by combining the overlap area, width ratio, and center point offset of the predicted and true boxes. This loss function is used to guide model training. This significantly improves the feature recognition and positioning accuracy of the ultimately trained recognition model.

[0141] In order to execute the above-mentioned weighing implementation method embodiment based on static track scale and the corresponding steps in each possible method, the following is a method for implementing a weighing implementation device based on a static track scale. Optionally, the weighing implementation device based on a static track scale can adopt the above-mentioned Figure 1 The device structure of the electronic device shown.

[0142] Further, see Figure 11 , Figure 11 This is a functional module diagram of a weighing device based on a static track scale provided by an embodiment of the present invention. It should be noted that the basic principle and technical effects of the weighing device based on a static track scale provided by this embodiment are the same as those of the corresponding method embodiments described above. For the sake of brief description, for any parts not mentioned in this embodiment, reference may be made to the corresponding contents of the corresponding method embodiments described above. The weighing device based on a static track scale includes:

[0143] An acquisition module, configured to acquire a video frame containing a target object captured by the camera device;

[0144] A recognition module, configured to import the video frame into a pre-trained recognition model to identify target features in the video frame;

[0145] A judgment module, configured to judge whether the position of the target object meets a preset requirement based on the target feature;

[0146] The weighing module is used to trigger a weighing operation to obtain weight information of the target object if the position of the target object meets a preset requirement.

[0147] As a possible implementation, the target object is a vehicle compartment;

[0148] The camera equipment includes a rail gap camera and a coupling camera respectively located on both sides of the static track scale, and a vehicle number camera located in the middle of the static track scale;

[0149] The recognition model includes a rail gap recognition model, a coupling recognition model and a vehicle number recognition model;

[0150] The above identification module can be used to:

[0151] Importing the video frames captured by the rail gap camera into a pre-trained rail gap recognition model to identify the wheels on the vehicle carriage;

[0152] Importing the video frames captured by the coupling camera into a pre-trained coupling recognition model to identify coupling components on the vehicle compartment;

[0153] The video frames captured by the vehicle number camera are imported into a pre-trained vehicle number recognition model to recognize the vehicle number on the vehicle compartment.

[0154] As a possible implementation, the above-mentioned judgment module can be used to:

[0155] Detecting whether the identified target features are complete;

[0156] If the target feature is complete, then check whether the position of the target feature meets the position requirement;

[0157] If the position of the target feature meets the position requirement, it is determined that the position of the target object meets the preset requirement.

[0158] As a possible implementation, the above-mentioned judgment module can be used to:

[0159] Check whether the identified wheels, connecting parts and vehicle license plates are complete.

[0160] As a possible implementation, transition blocks are provided on both sides of the static track scale; the above-mentioned judgment module can be used to:

[0161] Locating position information of the transition block;

[0162] The position information of the transition block is combined to detect whether the position of the wheel and the position of the connecting component meet the position requirements.

[0163] As a possible implementation, the above-mentioned judgment module can be used to:

[0164] Based on the position of the transition block, a transition block frame is drawn in the direction of the vehicle compartment;

[0165] Defining a wheel frame based on the identified wheel, and defining a coupling frame based on the identified coupling components;

[0166] Detecting whether there are overlapping parts between the wheel frame, the connecting frame and the transition block frame;

[0167] If there is no overlapping portion, it is determined that the position of the wheel and the position of the connecting component meet the position requirements.

[0168] As a possible implementation, the weighing module can be used for:

[0169] If the position of the target object meets the preset requirements, detecting whether the target object maintains the same position for a preset period of time;

[0170] If the target object maintains a constant position for a preset period of time, a weighing operation is triggered to obtain the weight information of the target object.

[0171] As a possible implementation, the weighing implementation device based on the static track scale further includes a training module, which can be used to:

[0172] Acquire multiple sample frames, wherein each sample frame includes a sample feature framed by a real frame;

[0173] Importing each of the sample frames into the constructed deep learning model to obtain output features framed by the prediction frame;

[0174] The deep learning model is iteratively trained under the guidance of a loss function constructed based on the true frame and the predicted frame until an iterative stopping condition is met, thereby obtaining a trained recognition model.

[0175] As a possible implementation, the training module may be used to:

[0176] Calculating the overlapping area between the real frame and the predicted frame;

[0177] Obtaining a first aspect ratio of the real frame and a second aspect ratio of the predicted frame, and calculating a difference between the first aspect ratio and the second aspect ratio;

[0178] Obtaining a displacement deviation between the center point of the real frame and the center point of the predicted frame;

[0179] A loss function is constructed based on the overlapping area, the difference and the displacement deviation.

[0180] Optionally, the above modules can be stored in the form of software or firmware. Figure 1 The memory shown in FIG. 1 or the operating system (OS) of the electronic device may be fixed and may be Figure 1 Meanwhile, the data and program codes required to execute the above modules may be stored in the memory.

[0181] In the embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed may be through some communication interface, the indirect coupling or communication connection of the device or unit may be electrical, mechanical or other forms.

[0182] In addition, the units described as separate components may or may not be physically separate, and 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 units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0183] Furthermore, the functional modules in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.

[0184] It should be noted that if the function is implemented in the form of a software function module and sold or used as an independent product, it 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 the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0185] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any actual relationship or order between these entities or operations.

[0186] The foregoing description is merely an embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Those skilled in the art will readily appreciate that the present invention is susceptible to various modifications and variations. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention shall be included within the scope of protection of the present invention.

Claims

1. A weighing method based on a static track scale, characterized in that: The static track scale is equipped with a camera device, and the method includes: Obtaining a video frame containing a target object captured by the camera device; Importing the video frame into a pre-trained recognition model to identify target features in the video frame; Determining whether the position of the target object meets a preset requirement based on the target feature; If the position of the target object meets the preset requirements, a weighing operation is triggered to obtain the weight information of the target object.

2. The weighing method based on a static rail scale according to claim 1, characterized in that: The target object is a vehicle compartment; The camera equipment includes a rail gap camera and a coupling camera respectively located on both sides of the static track scale, and a vehicle number camera located in the middle of the static track scale; The recognition model includes a rail gap recognition model, a coupling recognition model and a vehicle number recognition model; The step of importing the video frame into a pre-trained recognition model for recognition, and identifying target features in the video frame includes: Importing the video frames captured by the rail gap camera into a pre-trained rail gap recognition model to identify the wheels on the vehicle carriage; Importing the video frames captured by the coupling camera into a pre-trained coupling recognition model to identify coupling components on the vehicle compartment; The video frames captured by the vehicle number camera are imported into a pre-trained vehicle number recognition model to recognize the vehicle number on the vehicle compartment.

3. The weighing method based on a static rail scale according to claim 2, characterized in that: The step of determining whether the position of the target object meets a preset requirement based on the target feature includes: Detecting whether the identified target features are complete; If the target feature is complete, then check whether the position of the target feature meets the position requirement; If the position of the target feature meets the position requirement, it is determined that the position of the target object meets the preset requirement.

4. The weighing method based on a static rail scale according to claim 3, characterized in that: The step of detecting whether the identified target features are complete includes: Check whether the identified wheels, connecting parts and vehicle license plates are complete.

5. The weighing method based on a static rail scale according to claim 3, characterized in that: Transition blocks are provided on both sides of the static track scale; The step of detecting whether the position of the target feature meets the position requirement includes: Locating position information of the transition block; The position information of the transition block is combined to detect whether the position of the wheel and the position of the connecting component meet the position requirements.

6. The weighing method based on a static rail scale according to claim 5, characterized in that: The step of detecting whether the position of the wheel and the position of the connecting component meet the position requirements in combination with the position information of the transition block includes: Based on the position of the transition block, a transition block frame is drawn in the direction of the vehicle compartment; Defining a wheel frame based on the identified wheel, and defining a coupling frame based on the identified coupling components; Detecting whether there are overlapping parts between the wheel frame, the connecting frame and the transition block frame; If there is no overlapping portion, it is determined that the position of the wheel and the position of the connecting component meet the position requirements.

7. The weighing method based on a static rail scale according to claim 1, characterized in that: The step of triggering a weighing operation to obtain weight information of the target object if the position of the target object meets a preset requirement includes: If the position of the target object meets the preset requirements, detecting whether the target object maintains the same position for a preset period of time; If the target object maintains a constant position for a preset period of time, a weighing operation is triggered to obtain the weight information of the target object.

8. The weighing method based on a static rail scale according to claim 1, characterized in that: The method further includes a step of pre-training to obtain a recognition model, which step includes: Acquire multiple sample frames, wherein each sample frame includes a sample feature framed by a real frame; Importing each of the sample frames into the constructed deep learning model to obtain output features framed by the prediction frame; The deep learning model is iteratively trained under the guidance of a loss function constructed based on the true frame and the predicted frame until an iterative stopping condition is met, thereby obtaining a trained recognition model.

9. The weighing method based on a static rail scale according to claim 8, characterized in that: The loss function is constructed as follows: Calculating the overlapping area between the real frame and the predicted frame; Obtaining a first aspect ratio of the real frame and a second aspect ratio of the predicted frame, and calculating a difference between the first aspect ratio and the second aspect ratio; Obtaining a displacement deviation between the center point of the real frame and the center point of the predicted frame; A loss function is constructed based on the overlapping area, the difference and the displacement deviation.

10. An electronic device, characterized in that: The invention comprises a processor and a memory, wherein the memory stores machine-executable instructions that can be executed by the processor, and the processor can execute the machine-executable instructions to implement the method according to any one of claims 1 to 9.