A CPC card reading method, device, equipment and storage medium

The camera obtains video data to determine the position of the CPC card and moves it to the recognition area with the highest confidence for reading. This solves the problem of low CPC card reading success rate and improves vehicle traffic efficiency.

CN119323835BActive Publication Date: 2025-10-10HEBEI EXPRESSWAY GRP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411656663.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2024-09-13
Filing Date
2024-11-19
Publication Date
2025-10-10
Estimated Expiration
2044-11-19

AI Technical Summary

Technical Problem

Due to the randomness of the distance between the driver's parking position and the card dispenser, the CPC card easily falls on the edge area of ​​the antenna board, resulting in a low reading success rate and affecting vehicle traffic efficiency.

Method used

The camera acquires video data to determine whether a CPC card is on the antenna board. The CPC card's world coordinates are calculated and moved to the target recognition area with the highest confidence level for reading. The confidence level of the recognition area is updated to ensure that the area with the highest confidence level is used each time the card is read.

Benefits of technology

The reading success rate and efficiency of CPC cards are improved, and the vehicle traffic efficiency is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119323835B_ABST
    Figure CN119323835B_ABST
Patent Text Reader

Abstract

The application discloses a CPC card reading method, device, equipment and storage medium, wherein an antenna board is divided into multiple identification areas, after reading a CPC card each time, the confidence of the identification area reading data is updated, the confidence of the identification area of the antenna board is reordered, and the target identification area with the highest confidence is determined again. The internal and external factors of the card feeding machine are avoided, and it is ensured that the CPC card can be read by the identification area with the highest confidence each time, so that the reading success rate and reading efficiency of the CPC card are improved, and the vehicle passing efficiency is further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to information technology, and in particular to a CPC card reading method, device, equipment and storage medium. Background Art

[0002] The highway composite pass card is also called the CPC card. By reading the CPC card, it can identify the vehicle entering and exiting the toll station information, accurately record the vehicle's actual driving path, and provide an important basis for cross-provincial toll billing and settlement.

[0003] CPC cards are issued to drivers at the entrance of a highway toll booth. Drivers stop at the exit and insert their CPC cards into a card dispenser. The dispenser contains an antenna that reads the CPC card. After reading information such as the vehicle's entry, exit, and route, the card calculates the toll and is then retrieved.

[0004] Because drivers often park their cars some distance from the card dispenser, their CPC cards are randomly inserted. To prevent CPC cards from falling, antenna panels are typically larger. However, the edge areas of larger antenna panels have a lower read success rate. If a CPC card lands on the edge of the antenna panel, the data on the CPC card cannot be read or may be incorrectly read, impacting vehicle traffic efficiency. Summary of the Invention

[0005] The present invention provides a CPC card reading method, device, equipment and storage medium to improve the reading success rate and reading efficiency of CPC cards and improve the vehicle traffic efficiency.

[0006] In a first aspect, the present invention provides a CPC card reading method, comprising:

[0007] Obtaining video data collected by a camera, where the camera is arranged above the antenna plate and is used to capture an area including the antenna plate;

[0008] determining whether a CPC card is currently present on the antenna board based on the video data;

[0009] When a CPC card is currently present on the antenna board, timing begins, and if data in the CPC card is not read within a first preset time period, calculating the world coordinates of the CPC card from the video data;

[0010] Calculating the distance between the CPC card and the target recognition area with the highest current confidence on the antenna board based on the world coordinates of the CPC card, wherein the antenna board is divided into a plurality of recognition areas, and the confidence level is used to represent the success rate and reading efficiency of the recognition area in reading the CPC card;

[0011] Controlling the card moving mechanism to move the CPC card according to the distance between the CPC card and the target identification area, and moving the CPC card into the target identification area to read the data in the CPC card;

[0012] Updating the confidence level of the identification area read from the CPC card;

[0013] The confidence levels of the recognition areas of the antenna board are reordered, the target recognition area with the highest confidence level is re-determined, and the process returns to the step of acquiring the video data collected by the camera.

[0014] Optionally, determining whether a CPC card is currently present on the antenna board based on the video data includes:

[0015] Extracting a current frame image and a previous frame image before the current frame image from the video data;

[0016] Preprocessing the current frame image and the previous frame image respectively to obtain a preprocessed image of the current frame image and a preprocessed image of the previous frame image, wherein the preprocessing includes image correction, image enhancement and grayscale conversion;

[0017] Extracting image features from the preprocessed image of the current frame image and the preprocessed image of the previous frame image respectively to obtain image features of the current frame image and image features of the previous frame image;

[0018] Calculating the similarity between the image features of the current frame image and the image features of the previous frame image;

[0019] Comparing the similarity with a preset similarity threshold;

[0020] If the similarity is greater than or equal to the similarity threshold, it is determined that there is no CPC card currently on the antenna board;

[0021] If the similarity is less than the similarity threshold, it is determined that a CPC card is currently present on the antenna board.

[0022] Optionally, calculating the world coordinates of the CPC card from the video data includes:

[0023] Determine the pixel coordinates of a first reference point on the CPC card from the current frame image;

[0024] The pixel coordinates of the pixel coordinates of the first reference point are converted into world coordinates based on the intrinsic parameters and extrinsic parameters of the camera.

[0025] Optionally, the distance between the CPC card and the target identification area with the highest confidence on the antenna board is calculated based on the world coordinates of the CPC card, comprising:

[0026] The difference between the world coordinates of the first reference point and the world coordinates of the second reference point in the target identification area is calculated to obtain the offset distance of the CPC card relative to the target identification area on the world coordinate axis.

[0027] Optionally, the confidence of the identification area where the CPC card is read is updated, and the update formula is as follows:

[0028]

[0029] Wherein, is the updated confidence of the i th identification area after the j th successful reading of the data in the CPC card, is the ranking of the historical average card reading time of the i th identification area after the j th reading, and N is the total number of identification areas, is the number of historical card reading timeouts of the i th identification area after the j th reading, and T is the total number of historical card readings of the i th identification area after the j th reading, is the ranking of the historical shortest card reading time of the i th identification area after the j th reading.

[0030] Optionally, the CPC card reading method further comprises:

[0031] When it is determined that there is no CPC card on the antenna board at present, a prompt signal for re-feeding the card is sent to the driver through the prompting device;

[0032] If the data in the CPC card is read within the first preset time, the payment information is sent to the driver through the prompting device, the identification area where the CPC card is read and the reading time are recorded, and the step of updating the confidence of the identification area where the CPC card is read is returned.

[0033] Optionally, the CPC card reading method further comprises:

[0034] After the card moving mechanism moves the CPC card according to the distance between the CPC card and the target identification area, and the CPC card is moved into the target identification area, if the data in the CPC card is not read within the second preset time, the identification area with the second highest confidence on the antenna board at present is taken as the target identification area, and the step of controlling the card moving mechanism to move the CPC card according to the distance between the CPC card and the target identification area is returned.

[0035] In a second aspect, the present invention further provides a CPC card reading device, comprising:

[0036] a video data acquisition module, configured to acquire video data collected by a camera, the camera being disposed above the antenna plate and configured to capture an area including the antenna plate;

[0037] A card presence determination module, configured to determine whether a CPC card is currently on the antenna board based on the video data;

[0038] a world coordinate calculation module, configured to start timing when a CPC card is currently present on the antenna board, and calculate the world coordinates of the CPC card from the video data if no data in the CPC card is read within a first preset time period;

[0039] a moving distance calculation module, configured to calculate the distance between the CPC card and the target recognition area with the highest current confidence on the antenna board based on the world coordinates of the CPC card, wherein the antenna board is divided into a plurality of recognition areas, and the confidence level is used to indicate the success rate and reading efficiency of the recognition area in reading the CPC card;

[0040] a movement control module, configured to control a card movement mechanism to move the CPC card according to a distance between the CPC card and the target identification area, so as to move the CPC card into the target identification area and read data in the CPC card;

[0041] A confidence updating module, configured to update the confidence of the identification area read from the CPC card;

[0042] The confidence ranking module is used to re-rank the confidences of the recognition areas of the antenna board, re-determine the target recognition area with the highest confidence, and return to the step of obtaining the video data collected by the camera.

[0043] In a third aspect, the present invention further provides an electronic device, comprising:

[0044] one or more processors;

[0045] a storage device for storing one or more programs;

[0046] When the one or more programs are executed by the one or more processors, the one or more processors implement the CPC card reading method provided in the first aspect of the present invention.

[0047] In a fourth aspect, the present invention further provides a computer-readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the CPC card reading method provided in the first aspect of the present invention.

[0048] The CPC card reading method provided by the present invention includes: obtaining video data collected by a camera, the camera is set above the antenna board and is used to shoot the area including the antenna board, judging whether a CPC card is currently on the antenna board based on the video data, starting timing when a CPC card is currently present on the antenna board, and if the data in the CPC card is not read within a first preset time length, calculating the world coordinates of the CPC card from the video data, and calculating the distance between the CPC card and the target recognition area with the highest current confidence on the antenna board based on the world coordinates of the CPC card, the antenna board is divided into multiple recognition areas, and the confidence is used to characterize the success rate of the recognition area in being able to read the CPC card. Power and reading efficiency, control the card moving mechanism to move the CPC card according to the distance between the CPC card and the target recognition area, move the CPC card into the target recognition area to read the data in the CPC card, update the confidence of the recognition area where the CPC card is read, re-sort the confidence of the recognition area of ​​the antenna board, re-determine the target recognition area with the highest confidence, and return to execute the step of obtaining the video data collected by the camera to avoid the influence of internal and external factors of the card dispenser, ensure that each time the card is read, the CPC card can be read by the recognition area with the highest confidence, improve the reading success rate and reading efficiency of the CPC card, and thus improve the traffic efficiency of the vehicle.

[0049] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0051] Figure 1 A flowchart of a CPC card reading method provided by an embodiment of the present invention;

[0052] Figure 2 A schematic diagram of a portion of the structure of a card dispenser provided in an embodiment of the present invention;

[0053] Figure 3 for Figure 2 Schematic diagram of the structure of the moving mechanism;

[0054] Figure 4 A schematic structural diagram of a CPC card reading device provided in an embodiment of the present invention;

[0055] Figure 5A schematic structural diagram of an electronic device provided by an embodiment of the present invention.

[0056] The above drawings illustrate specific embodiments of the present application, which will be described in more detail below. These drawings and the textual description are not intended to limit the scope of the present application in any way, but rather to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION

[0057] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0058] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0059] Figure 1 This is a flowchart of a CPC card reading method provided by an embodiment of the present invention. This embodiment is applicable to quickly identifying the CPC card inserted by the driver into the card machine. The method can be performed by the CPC card reading device improved by the embodiment of the present invention. The device can be implemented by software and / or hardware and is usually configured in an electronic device, such as Figure 1 As shown, the CPC card reading method specifically includes the following steps:

[0060] S101. Obtain video data collected by a camera, where the camera is disposed above the antenna board and is used to capture an area including the antenna board.

[0061] In an embodiment of the present invention, the card ejector includes an antenna plate, a movable mechanism, a camera, and a card receiving box. Exemplarily, the antenna plate is arranged horizontally, and the camera is arranged above the antenna plate for photographing the area including the antenna plate. The movable mechanism can be controlled to move to move the CPC card inserted into the card ejector to a specific area. The card receiving box is arranged below the antenna plate. After successfully reading the data in the CPC card, the movable mechanism is controlled to move to push the CPC card into the card receiving box.

[0062] Figure 2 This is a partial structural diagram of a card slot machine provided by an embodiment of the present invention. Figure 3 for Figure 2 The structural diagram of the mobile mechanism is shown in FIG. Figure 2 and Figure 3 As shown, the card dispenser includes an antenna plate (not shown), a moving mechanism, a camera 1, and a card receiving hopper 5. The moving mechanism includes a transmission belt 4 positioned above the antenna plate, baffles 10 positioned at opposite ends of the transmission belt 4, and a push plate 9 positioned at the other end of the transmission belt 5. The transmission belt 4 is movable along a first axis X in the figure, the two baffles 10 are movable relative to each other along a second axis Y in the figure, and the push plate 9 is movable along the first axis X in the figure, wherein the first axis X and the second axis Y are perpendicular within a horizontal plane. For example, the ends of the baffles 10 are connected to a slider 8, which is positioned on a slide rail 7, which is positioned along the second axis Y. The slider 8 is driven by a motor to move along the slide rail 7, thereby causing the two baffles 10 to move relative to each other along the second axis Y. The transmission belt 4 and baffles 10 cooperate to move CPC cards that have fallen onto the transmission belt 4 to a specific area. After successfully reading the data within the CPC card, the push plate 9 is controlled to move, pushing the CPC card from the transmission belt 4 into the card receiving hopper 5. Exemplarily, the card dispenser further includes a guide housing 3, with the antenna plate and movable mechanism disposed at the bottom of the guide housing 3. The sidewalls of the guide housing 3 are inclined at a certain angle, serving as a guide to collect CPC cards inserted by the driver onto the conveyor belt 4. The card dispenser further includes a card insertion wall 6, which is disposed along the second axis Y and perpendicular to the horizontal plane. When the driver throws a card into the card dispenser with sufficient force, the CPC card strikes the card insertion wall 6 and rebounds onto the conveyor belt 4 within the guide housing 3. A camera 1 is disposed at the top of the card insertion wall 6 for capturing images of the interior of the guide housing 3. Exemplarily, the card dispenser further includes a fill light 2 for providing additional lighting for filming.

[0063] In the embodiment of the present invention, for the card slot machine to operate, the video data collected by the camera is obtained in real time.

[0064] S102: Determine whether a CPC card is currently on the antenna board based on the video data.

[0065] In this embodiment of the present invention, a target recognition algorithm can be used to determine whether a CPC card is currently on the antenna board in the video data, or changes in consecutive frames of the video data can be used to determine whether a CPC card is currently on the antenna board. This is not limited in this embodiment of the present invention. If a CPC card is currently on the antenna board, step S103 is executed. If no CPC card is currently on the antenna board, step S109 is executed.

[0066] For example, in some embodiments of the present invention, in order to improve recognition efficiency, the change of consecutive frames in the video data is used to determine whether a CPC card is currently on the antenna board. For example, determining whether a CPC card is currently on the antenna board based on the video data includes the following sub-steps:

[0067] S1021. Extract the current frame image and the previous frame image before the current frame image from the video data.

[0068] In this embodiment of the present invention, a current frame image and a previous frame image preceding the current frame image are extracted from the video data. For example, the image frames described in this embodiment of the present invention may be ordinary image frames or key frames, which are not limited in this embodiment of the present invention. A key frame refers to a frame in the video data that contains a key action in the motion change of an object.

[0069] S1022 , preprocessing the current frame image and the previous frame image respectively to obtain a preprocessed image of the current frame image and a preprocessed image of the previous frame image, wherein the preprocessing includes image correction, image enhancement, and grayscale conversion.

[0070] In the embodiment of the present application, the current frame image and the previous frame image are respectively preprocessed to obtain a preprocessed image of the current frame image and a preprocessed image of the previous frame image. The preprocessing includes image correction, image enhancement and gray scale conversion. The image correction refers to the recovery processing of the distorted image, and generally includes geometric correction and gray scale correction. The geometric correction fits the unknown coefficients in the mapping relationship through some known reference points, i.e. the corresponding relationship between the coordinates of some pixel points of the non-distorted image and the corresponding pixels of the distorted image, and serves as the basis for restoring other pixels. The gray scale correction is mainly aimed at the uneven distribution of the gray scale levels in the image, such as uneven exposure, and adjusts the gray scale levels of different degrees point by point to make the gray scale distribution of the whole image more uniform. The image enhancement refers to the purposeful emphasis of the overall or local characteristics of the image, which makes the originally unclear image clear or emphasizes some features of interest, expands the differences between the features of different objects in the image, suppresses the features of no interest, improves the image quality, enriches the information amount, strengthens the image interpretation and recognition effect, and meets the needs of some special analysis. The gray scale conversion is the process of converting the color image into a gray scale image, in which the color information of each pixel is converted into a single gray scale value. Of course, in other embodiments of the present application, the preprocessing process can also include other processing processes, such as filtering, denoising, contrast enhancement, etc., which are not limited in the embodiment of the present application.

[0071] In the embodiment of the present application, the image features of the current frame image and the previous frame image are respectively extracted from the preprocessed image of the current frame image and the preprocessed image of the previous frame image.

[0072] In the embodiment of the present application, the image features of the current frame image and the previous frame image are respectively extracted from the preprocessed image of the current frame image and the preprocessed image of the previous frame image. For example, the feature extraction algorithm is used to extract the features of the preprocessed image of the current frame image and the preprocessed image of the previous frame image to obtain the image features of the current frame image and the previous frame image. For example, in the embodiment of the present application, since the CPC card has obvious edge features, the edge detection algorithm such as Sobel operator and Canny algorithm can be used to extract the edge features of the preprocessed image as the image features.

[0073] In the embodiment of the present application, the similarity of the image features of the current frame image and the previous frame image is calculated.

[0074] In the embodiment of the present application, the similarity of the image features of the current frame image and the previous frame image is calculated. For example, the similarity described in the present application can be the cosine similarity.

[0075] In the embodiment of the present application, the similarity of the image features of the current frame image and the previous frame image is calculated. For example, the similarity described in the present application can be the cosine similarity.

[0076] The similarity of the image features of the current frame image and the image features of the previous frame image is compared with a preset similarity threshold, and a size relationship between the two is compared.

[0077] S1026, if the similarity is greater than or equal to the similarity threshold, it is determined that there is no CPC card on the antenna board at present.

[0078] If the similarity is greater than or equal to the similarity threshold, it means that the difference between the current frame image and the previous frame image is small, and it can be considered that there is no CPC card on the antenna board at present.

[0079] S1027, if the similarity is less than the similarity threshold, it is determined that there is a CPC card on the antenna board at present.

[0080] If the similarity is less than the similarity threshold, it means that the difference between the current frame image and the previous frame image is large, and it can be considered that there is a CPC card on the antenna board at present.

[0081] S103, it is judged whether the data in the CPC card can be read within a first preset time length.

[0082] In the embodiment of the application, the timing starts when it is determined that there is a CPC card on the antenna board at present, and it is judged whether the data in the CPC card can be read within a first preset time length.

[0083] If the data in the CPC card is not read within the first preset time length, step S104 is executed, and if the data in the CPC card is read within the first preset time length, step S110 is executed.

[0084] S104, the world coordinates of the CPC card are calculated from the video data.

[0085] If the data in the CPC card is not read within the first preset time length, it can be considered that the CPC card is not placed well (for example, at the edge of the antenna board), and the CPC card needs to be moved, so the world coordinates of the CPC card need to be calculated from the video data to provide a basis for the moving displacement.

[0086] For example, in some embodiments of the application, the pixel coordinates of the first reference point on the CPC card are first determined from the current frame image, and for example, the first reference point can be the center point of the CPC card. Then, the pixel coordinates of the first reference point are converted into world coordinates based on the internal parameters and external parameters of the camera. Specifically, the conversion relationship of the pixel coordinates of the pixel coordinates of the first reference point is as follows:

[0087]

[0088] Where s is the scale factor, (u, v) is the pixel coordinate of the reference point, K is the intrinsic parameter matrix of the camera, [R, t] is the extrinsic parameter matrix of the camera, and (X, Y, Z) is the world coordinate of the reference point.

[0089] S105 : Calculate the distance between the CPC card and the target recognition area with the highest current confidence on the antenna board based on the world coordinates of the CPC card.

[0090] In an embodiment of the present invention, the antenna board is divided into multiple recognition areas, and a confidence level is set for each recognition area. The confidence level is used to characterize the success rate and reading efficiency of the recognition area in reading the CPC card. The higher the confidence level, the higher the success rate and reading efficiency of the CPC card. In an embodiment of the present invention, the distance between the CPC card and the target recognition area with the highest current confidence level on the antenna board is calculated based on the world coordinates of the CPC card, so that the CPC card can be moved to the target recognition area for data reading in subsequent steps. It should be noted that the confidence level of the recognition area is not fixed, but is updated based on the previous recognition result. Please refer to the following text for a detailed introduction.

[0091] For example, in some embodiments of the present invention, the difference between the world coordinates of the first reference point and the world coordinates of the second reference point within the target recognition area is calculated to obtain the offset distance of the CPC card relative to the target recognition area on the world coordinate axis. For example, the second reference point can be the center point of the target recognition area. By calculating the difference between the world coordinates of the first reference point and the world coordinates of the second reference point within the target recognition area, the offset distance of the CPC card relative to the target recognition area in the first axis X direction and the offset distance in the second axis Y direction can be obtained.

[0092] S106: Control the card moving mechanism to move the CPC card according to the distance between the CPC card and the target identification area, and move the CPC card into the target identification area to read the data in the CPC card.

[0093] After determining the distance between the CPC card and the target recognition area, the card movement mechanism is controlled to move the CPC card according to the distance between the CPC card and the target recognition area, moving the CPC card into the target recognition area to read the data on the CPC card. Because the target recognition area has the highest confidence, the target recognition area has a higher reading success rate and reading efficiency for CPC cards. This improves the reading success rate and reading efficiency of CPC cards, thereby improving vehicle traffic efficiency.

[0094] S107: Update the confidence level of the recognition area read from the CPC card.

[0095] In an embodiment of the present invention, the confidence level of the identification area (i.e., the target identification area) read from the CPC card is updated. For example, in an embodiment of the present invention, when data from the CPC card is successfully read, the card reading duration is recorded, and the confidence level of the target identification area is updated based on the card reading duration.

[0096] Exemplarily, in some embodiments of the present invention, the confidence update formula is as follows:

[0097]

[0098] in, is the updated confidence of the i-th recognition area after the j-th successful reading of the data in the CPC card, is the ranking of the historical average card reading time of the i-th recognition area after the j-th reading, N is the total number of recognition areas, is the number of historical card reading timeouts after the jth reading of the i-th identification area, T is the total number of historical card readings after the jth reading of the i-th identification area, The ranking of the shortest card read times in the history of the i-th identification zone after the j-th read. The ranking of the historical average card read time refers to the ranking of the historical average card read time of a recognition zone among all recognition zones. The ranking of the historical shortest card read time refers to the ranking of the historical shortest card read time of a recognition zone among all recognition zones.

[0099] S108 : Re-rank the confidence levels of the recognition areas of the antenna board and re-determine the target recognition area with the highest confidence level.

[0100] During operation, the antenna board's highest confidence recognition area may not remain fixed due to the influence of internal current and external environmental factors, but may change. In an embodiment of the present invention, after updating the confidence of the target recognition area, the confidence of the antenna board's recognition areas is re-ranked, the target recognition area with the highest confidence is re-determined, and the process returns to the step of acquiring video data captured by the camera to begin the next round of card reading tasks. This ensures that each card reading is performed by the CPC card recognition area with the highest confidence, thereby improving the CPC card reading success rate and efficiency, and thus improving vehicle traffic efficiency. For example, if the target recognition area has a long reading time, the confidence will decrease according to the above formula, while the confidence of other recognition areas remains unchanged, resulting in a lower confidence ranking for the target recognition area. Similarly, if the target recognition area has a short reading time, the confidence will increase according to the above formula, while the confidence of other recognition areas remains unchanged, resulting in the target recognition area's confidence ranking remaining unchanged. In short, the confidence levels of the antenna board's recognition areas are reordered, and the target recognition area with the highest confidence level is re-determined to ensure that the CPC card can be read by the recognition area with the highest confidence level each time the card is read, thereby improving the CPC card's reading success rate and efficiency, and thereby improving vehicle traffic efficiency.

[0101] S109: Send a prompt signal to the driver to re-insert the card through the prompt device.

[0102] In the above step S102, if it is determined that there is currently no CPC card on the antenna board, it means that the driver may have inserted the wrong card. A prompt signal for re-inserting the card is sent to the driver through the prompt device, prompting the driver to take the card and re-insert the card. Exemplarily, the prompt device may include a display and a speaker, which is not limited in this embodiment of the present invention.

[0103] S110: Send payment information to the driver through the prompt device, record the identification area and reading time of the CPC card, and return to execute the step of updating the confidence level of the identification area read from the CPC card.

[0104] In step S103, if the CPC card data is read within the first preset time, the prompt device sends payment information to the driver, guiding the driver to pay. Simultaneously, the identification area where the data was read and the reading duration can be recorded, and the process returns to update the confidence level of the CPC card identification area. Specifically, the confidence level update formula is as described above and will not be further described in detail in this embodiment of the present invention.

[0105] Due to the influence of the internal current and external environment of the card dispenser, there may be a special situation where the CPC card cannot be read even if it is moved to the target area with the highest confidence. In this case, after controlling the card moving mechanism to move the CPC card according to the distance between the CPC card and the target identification area and moving the CPC card into the target identification area, if the data in the CPC card is not read within the second preset time period, the identification area with the second highest confidence on the antenna board is used as the target identification area, and the process returns to execute the step of controlling the card moving mechanism to move the CPC card according to the distance between the CPC card and the target identification area and moving the CPC card into the target identification area, and repeats the above card moving and reading process until the data in the CPC card is successfully read.

[0106] The CPC card reading method provided by an embodiment of the present invention includes: obtaining video data collected by a camera, the camera is set above the antenna board and is used to shoot the area including the antenna board, judging whether a CPC card is currently on the antenna board based on the video data, starting timing when a CPC card is currently present on the antenna board, and if the data in the CPC card is not read within a first preset time length, calculating the world coordinates of the CPC card from the video data, and calculating the distance between the CPC card and the target recognition area with the highest current confidence on the antenna board based on the world coordinates of the CPC card, the antenna board is divided into multiple recognition areas, and the confidence is used to characterize whether the recognition area can read the CPC card. The success rate and reading efficiency of the CPC card are improved by controlling the card moving mechanism to move the CPC card according to the distance between the CPC card and the target recognition area, moving the CPC card into the target recognition area to read the data in the CPC card, updating the confidence of the recognition area where the CPC card is read, re-sorting the confidence of the recognition area of ​​the antenna board, re-determining the target recognition area with the highest confidence, and returning to execute the step of obtaining the video data collected by the camera to avoid the influence of internal and external factors of the card dispenser, ensuring that the CPC card can be read by the recognition area with the highest confidence each time the card is read, thereby improving the reading success rate and reading efficiency of the CPC card, and thus improving the traffic efficiency of the vehicle.

[0107] The embodiment of the present invention also provides a CPC card reading device, Figure 4 A structural diagram of a CPC card reading device provided by an embodiment of the present invention is shown as follows: Figure 4 As shown, the CPC card reading device includes:

[0108] A video data acquisition module 101 is configured to acquire video data collected by a camera, the camera being disposed above the antenna plate and configured to capture an area including the antenna plate;

[0109] A card existence determination module 102 is configured to determine whether a CPC card is currently on the antenna board based on the video data;

[0110] The world coordinate calculation module 103 is configured to start timing when the CPC card currently exists on the antenna board, and calculate the world coordinate of the CPC card from the video data if the data in the CPC card is not read within a first preset time length.

[0111] The moving distance calculation module 104 is configured to calculate the distance between the CPC card and a target recognition area with the highest confidence on the antenna board based on the world coordinate of the CPC card, the antenna board being divided into a plurality of recognition areas, and the confidence being used to represent the success rate and reading efficiency of the recognition area in reading the CPC card.

[0112] The moving control module 105 is configured to control the card moving mechanism to move the CPC card according to the distance between the CPC card and the target recognition area, and move the CPC card into the target recognition area to read the data in the CPC card.

[0113] The confidence updating module 106 is configured to update the confidence of the recognition area in reading the CPC card.

[0114] The confidence sorting module 107 is configured to re-sort the confidence of the recognition area of the antenna board, re-determine the target recognition area with the highest confidence, and return to execute the step of acquiring the video data collected by the camera.

[0115] In some embodiments of the present application, the card existence judgment module 102 comprises:

[0116] The image frame extraction sub-module is configured to extract a current frame image and a previous frame image before the current frame image from the video data.

[0117] The preprocessing sub-module is configured to pre-process the current frame image and the previous frame image respectively to obtain a pre-processed image of the current frame image and a pre-processed image of the previous frame image, the pre-processing including image correction, image enhancement and grayscale.

[0118] The feature extraction sub-module is configured to extract image features from the pre-processed image of the current frame image and the pre-processed image of the previous frame image respectively to obtain image features of the current frame image and image features of the previous frame image.

[0119] The similarity calculation sub-module is configured to calculate the similarity between the image features of the current frame image and the image features of the previous frame image.

[0120] The comparison sub-module is configured to compare the similarity with a preset similarity threshold.

[0121] a first determination submodule, configured to determine that no CPC card currently exists on the antenna board if the similarity is greater than or equal to the similarity threshold;

[0122] The second determination submodule is configured to determine that a CPC card is currently present on the antenna board if the similarity is less than the similarity threshold.

[0123] In some embodiments of the present invention, the world coordinate calculation module 103 includes:

[0124] A pixel coordinate determination submodule, configured to determine the pixel coordinates of a first reference point on the CPC card from a current frame image;

[0125] The coordinate conversion submodule is configured to convert the pixel coordinates of the first reference point into world coordinates based on the internal parameters and external parameters of the camera.

[0126] In some embodiments of the present invention, the moving distance calculation module 104 includes:

[0127] The distance calculation submodule is used to calculate the difference between the world coordinates of the first reference point and the world coordinates of the second reference point in the target recognition area to obtain the offset distance of the CPC card relative to the target recognition area on the world coordinate axis.

[0128] In some embodiments of the present invention, the updating formula of the confidence updating module 106 is as follows:

[0129]

[0130] in, is the updated confidence of the i-th identification area after the data in the CPC card is successfully read for the jth time, is the ranking of the historical average card reading time of the i-th recognition area after the j-th reading, N is the total number of recognition areas, is the number of historical card reading timeouts after the jth reading of the i-th identification area, T is the total number of historical card readings after the jth reading of the i-th identification area, It is the ranking of the shortest historical card reading time of the i-th recognition area after the j-th reading.

[0131] In some embodiments of the present invention, the CPC card reading device further comprises:

[0132] A prompt module, configured to send a prompt signal to the driver to insert a new card through a prompt device when it is determined that no CPC card is currently on the antenna board;

[0133] The record update module is used to send payment information to the driver through the prompt device if the data in the CPC card is read within the first preset time, record the identification area and reading time of the CPC card, and return to execute the step of updating the confidence of the identification area read from the CPC card.

[0134] In some embodiments of the present invention, the CPC card reading device further comprises:

[0135] The return execution module is used to control the card moving mechanism to move the CPC card according to the distance between the CPC card and the target identification area, and after the CPC card is moved to the target identification area, if the data in the CPC card is not read within the second preset time length, then the identification area with the second highest confidence on the antenna board is used as the target identification area, and return to the execution step of controlling the card moving mechanism to move the CPC card according to the distance between the CPC card and the target identification area, and move the CPC card into the target identification area.

[0136] The CPC card reading device can execute the CPC card reading method provided in the embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the CPC card reading method.

[0137] Figure 5 A schematic diagram of the structure of an electronic device provided for an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0138] like Figure 5As shown, the electronic device includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0139] Multiple components in the electronic device are connected to the I / O interface 15, including an input unit 16, such as a keyboard, mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, optical disk, etc.; and a communication unit 19, such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0140] The processor 11 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the CPC card reading method.

[0141] In some embodiments, the CPC card reading method can be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the CPC card reading method described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the CPC card reading method in any other suitable manner (e.g., via firmware).

[0142] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0143] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0144] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0145] To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.

[0146] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), blockchain network, and the Internet.

[0147] The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. A server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system, to solve the defects of large management difficulty and weak business scalability in traditional physical host and VPS service.

[0148] The embodiments of the present application further provide a computer program product, comprising a computer program which, when executed by a processor, implements the CPC card reading method provided by any of the embodiments of the present application.

[0149] The computer program product may be implemented by writing computer program code for performing the operations of the present invention in one or more programming languages, or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0150] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.

[0151] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.

Claims

1. A CPC card reading method, characterized in that: include: Obtaining video data collected by a camera, where the camera is disposed above the antenna plate and is used to capture an area including the antenna plate; determining whether a CPC card is currently present on the antenna board based on the video data; When a CPC card is currently present on the antenna board, timing begins, and if data in the CPC card is not read within a first preset time period, calculating the world coordinates of the CPC card from the video data; Calculating the distance between the CPC card and the target recognition area with the highest current confidence on the antenna board based on the world coordinates of the CPC card, wherein the antenna board is divided into a plurality of recognition areas, and the confidence level is used to represent the success rate and reading efficiency of the recognition area in reading the CPC card; Controlling the card moving mechanism to move the CPC card according to the distance between the CPC card and the target identification area, and moving the CPC card into the target identification area to read the data in the CPC card; Updating the confidence level of the identification area read from the CPC card; The confidence levels of the recognition areas of the antenna board are reordered, the target recognition area with the highest confidence level is re-determined, and the process returns to the step of acquiring the video data collected by the camera.

2. The CPC card reading method according to claim 1, wherein: Determining whether a CPC card is currently present on the antenna board based on the video data includes: Extracting a current frame image and a previous frame image before the current frame image from the video data; Preprocessing the current frame image and the previous frame image respectively to obtain a preprocessed image of the current frame image and a preprocessed image of the previous frame image, wherein the preprocessing includes image correction, image enhancement and grayscale conversion; Extracting image features from the preprocessed image of the current frame image and the preprocessed image of the previous frame image respectively to obtain image features of the current frame image and image features of the previous frame image; Calculating the similarity between the image features of the current frame image and the image features of the previous frame image; Comparing the similarity with a preset similarity threshold; If the similarity is greater than or equal to the similarity threshold, it is determined that there is no CPC card currently on the antenna board; If the similarity is less than the similarity threshold, it is determined that a CPC card is currently present on the antenna board.

3. The CPC card reading method according to claim 1, wherein: Calculating the world coordinates of the CPC card from the video data includes: Determine the pixel coordinates of a first reference point on the CPC card from the current frame image; The pixel coordinates of the first reference point are converted into world coordinates based on the intrinsic parameters and extrinsic parameters of the camera.

4. The CPC card reading method according to claim 3, wherein: Calculating the distance between the CPC card and the target recognition area with the highest current confidence on the antenna board based on the world coordinates of the CPC card includes: The difference between the world coordinates of the first reference point and the world coordinates of the second reference point in the target recognition area is calculated to obtain an offset distance of the CPC card relative to the target recognition area on the world coordinate axis.

5. The CPC card reading method according to any one of claims 1 to 4, characterized in that: The confidence level of the identification area read from the CPC card is updated, and the update formula is as follows: in, is the updated confidence of the i-th identification area after the data in the CPC card is successfully read for the jth time, is the ranking of the historical average card reading time of the i-th recognition area after the j-th reading, N is the total number of recognition areas, is the number of historical card reading timeouts after the jth reading of the i-th identification area, T is the total number of historical card readings after the jth reading of the i-th identification area, It is the ranking of the shortest historical card reading time of the i-th recognition area after the j-th reading.

6. The CPC card reading method according to any one of claims 1 to 4, characterized in that: Also includes: When it is determined that there is no CPC card on the antenna board, a prompt signal to the driver to insert the card again is sent through the prompt device; If the data in the CPC card is read within the first preset time period, the payment information is sent to the driver through the prompt device, the identification area and reading time of the CPC card are recorded, and the step of updating the confidence of the identification area read from the CPC card is returned.

7. The CPC card reading method according to any one of claims 1 to 4, characterized in that: Also includes: After controlling the card moving mechanism to move the CPC card according to the distance between the CPC card and the target identification area, and moving the CPC card into the target identification area, if the data in the CPC card is not read within the second preset time period, the identification area currently ranked second in confidence on the antenna board is used as the target identification area, and the process returns to executing the step of controlling the card moving mechanism to move the CPC card according to the distance between the CPC card and the target identification area, and moving the CPC card into the target identification area.

8. A CPC card reading device, characterized in that: include: a video data acquisition module, configured to acquire video data collected by a camera, the camera being disposed above the antenna plate and configured to capture an area including the antenna plate; A card presence determination module, configured to determine whether a CPC card is currently on the antenna board based on the video data; a world coordinate calculation module, configured to start timing when a CPC card is currently present on the antenna board, and calculate the world coordinates of the CPC card from the video data if no data in the CPC card is read within a first preset time period; a moving distance calculation module, configured to calculate the distance between the CPC card and the target recognition area with the highest current confidence on the antenna board based on the world coordinates of the CPC card, wherein the antenna board is divided into a plurality of recognition areas, and the confidence level is used to indicate the success rate and reading efficiency of the recognition area in reading the CPC card; a movement control module, configured to control a card movement mechanism to move the CPC card according to a distance between the CPC card and the target identification area, so as to move the CPC card into the target identification area and read data in the CPC card; A confidence updating module, configured to update the confidence of the identification area read from the CPC card; The confidence ranking module is used to re-rank the confidences of the recognition areas of the antenna board, re-determine the target recognition area with the highest confidence, and return to the step of obtaining the video data collected by the camera.

9. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the CPC card reading method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the CPC card reading method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Card-pushing mechanism for card sending machine

    CN102194258A

  • Radio frequency identification reader card reading method and device and computer readable storage medium

    CN109614832A