A method and device for detecting information carrier
Through automatic detection of information carriers in the video stream and the detection model is used to identify the categories of information carriers, the problem of travel card verification depends on manual, and efficient automatic detection is achieved.
Patent Information
- Application Number
- CN202210386628.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-13
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2042-04-13
AI Technical Summary
In the prior art, the inspection of itinerary cards relies on manual labor, is low in efficiency, and it is difficult to achieve automated inspection.
By obtaining a video stream containing the information carrier, using the trained detection model for detection, and outputting the category of the information carrier, thereby determining the geographical area classification information of the geographical location where the user passes.
Automatic detection and identification of the information carrier displayed by users is realized, reducing labor costs and improving detection efficiency.
Smart Images

Figure CN115033741B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of video image processing, and in particular to a method and device for detecting an information carrier. Background Art
[0002] The itinerary card was launched by the China Academy of Information and Communications Technology in conjunction with China Telecom, China Mobile and China Unicom, three basic telecommunications companies. It is a service that obtains the base station location of the user's mobile phone when receiving data, and queries the information of all cities and counties that the user has visited in the past 14 days. However, the inspection of itinerary cards is currently done manually, which is inefficient. Summary of the invention
[0003] The present invention provides a method and device for detecting an information carrier, which utilizes a detection model to automatically detect a video stream containing an information carrier and intelligently evaluates the geographical area classification information of the geographical location passed by a user.
[0004] In a first aspect, an embodiment of the present invention provides a method for detecting an information carrier, comprising:
[0005] Acquire a video stream containing an information carrier, wherein the information carrier is displayed through an electronic display device, and the information carrier is used to represent geographic location information of a user bound to the electronic display device;
[0006] The video stream is input into a trained detection model for detection, and the category of the information carrier contained in the video stream is output, wherein the detection model is trained using video stream samples containing information carriers with labeled categories, and the category of the information carrier is used to characterize the geographic area classification information of the geographic location passed by the user bound to the electronic display device.
[0007] This embodiment can detect the information carrier displayed by the user based on the electronic display device through the detection model to obtain the category of the information carrier, thereby determining the geographical area classification information of the geographical location passed by the user bound to the electronic display device according to the category of the information carrier. It can be applied to the automatic detection of itinerary cards, and can detect and identify itinerary cards presented by pedestrians, effectively reducing manpower expenses.
[0008] As an optional implementation manner, the information carrier is displayed in any one or more of the following ways:
[0009] Presented in text form;
[0010] Presented in the form of images;
[0011] Presented in the form of an image containing an icon;
[0012] Displayed in the form of an image containing text.
[0013] As an optional implementation manner, the information carrier represents different categories in any one or more of the following ways:
[0014] The information carrier indicates different categories by using different colors;
[0015] The information carrier indicates different categories through different patterns;
[0016] The information carrier represents different categories through different icon styles;
[0017] The information carrier represents different categories through different text contents.
[0018] As an optional implementation manner, the step of inputting the video stream into a trained detection model for detection and outputting the category of the information carrier contained in the video stream further includes:
[0019] Outputting the carrier position of the information carrier contained in each video frame in the video stream; wherein the detection model is trained using video stream samples containing information carriers with marked categories and positions.
[0020] As an optional implementation, if the information carrier is displayed in the form of an image containing an icon, it also includes:
[0021] Output the icon position of the icon of the information carrier contained in each video frame in the video stream; wherein the icon of the information carrier is dynamically updated according to a preset period, and the preset period is less than the duration of the video stream containing the information carrier; the detection model is trained using video stream samples of information carriers containing labeled categories and icon positions.
[0022] As an optional implementation manner, after outputting the icon position of the icon of the information carrier contained in each video frame in the video stream, the method further includes:
[0023] Determining an icon area of an icon of an information carrier contained in each video frame according to an icon position of the icon of the information carrier contained in each video frame in the video stream;
[0024] Determining a dynamic feature sequence of the information carrier included in the video stream according to the icon area of the icon of the information carrier included in each video frame;
[0025] The authenticity of the information carrier contained in the video stream is determined based on the dynamic feature sequence.
[0026] As an optional implementation manner, determining the dynamic feature sequence of the information carrier included in the video stream according to the icon area of the icon of the information carrier included in each video frame includes:
[0027] Determine the dynamic feature sequence of the information carrier contained in the video stream according to the relative area relationship between the icon area of the information carrier contained in each video frame and the image area of the video frame itself; or,
[0028] Based on the icon area of the icon of the information carrier contained in each video frame and the relative area relationship of the carrier area of the information carrier contained in the corresponding video frame, the dynamic feature sequence of the information carrier contained in the video stream is determined, wherein the carrier area is determined based on the output carrier position of the information carrier.
[0029] As an optional implementation manner, determining the authenticity of the information carrier included in the video stream according to the dynamic feature sequence includes:
[0030] Performing discrete Fourier transform on the dynamic feature sequence to obtain a frequency spectrum;
[0031] The spectrum graph and the preset spectrum graph are matched in the frequency domain, and the authenticity of the information carrier contained in the video stream is determined based on the matching result, wherein the preset spectrum graph is obtained by discrete Fourier transforming a static feature sequence of a static information carrier contained in the video stream, and the static information carrier represents a non-real information carrier.
[0032] In a second aspect, an embodiment of the present invention provides an information carrier detection device, comprising a processor and a memory, wherein the memory is used to store a program executable by the processor, and the processor is used to read the program in the memory and perform the following steps:
[0033] Acquire a video stream containing an information carrier, wherein the information carrier is displayed through an electronic display device, and the information carrier is used to represent geographic location information of a user bound to the electronic display device;
[0034] The video stream is input into a trained detection model for detection, and the category of the information carrier contained in the video stream is output, wherein the detection model is trained using video stream samples containing information carriers with labeled categories, and the category of the information carrier is used to characterize the geographic area classification information of the geographic location passed by the user bound to the electronic display device.
[0035] As an optional implementation manner, the information carrier is displayed in any one or more of the following ways:
[0036] Presented in text form;
[0037] Presented in the form of images;
[0038] Presented in the form of an image containing an icon;
[0039] Displayed in the form of an image containing text.
[0040] As an optional implementation manner, the information carrier represents different categories in any one or more of the following ways:
[0041] The information carrier indicates different categories by using different colors;
[0042] The information carrier indicates different categories through different patterns;
[0043] The information carrier represents different categories through different icon styles;
[0044] The information carrier represents different categories through different text contents.
[0045] As an optional implementation, the processor is further configured to execute:
[0046] Outputting the carrier position of the information carrier contained in each video frame in the video stream; wherein the detection model is trained using video stream samples containing information carriers with marked categories and positions.
[0047] As an optional implementation manner, if the information carrier is displayed in the form of an image including an icon, the processor is further configured to execute:
[0048] Output the icon position of the icon of the information carrier contained in each video frame in the video stream; wherein the icon of the information carrier is dynamically updated according to a preset period, and the preset period is less than the duration of the video stream containing the information carrier; the detection model is trained using video stream samples of information carriers containing labeled categories and icon positions.
[0049] As an optional implementation manner, after outputting the icon position of the icon of the information carrier contained in each video frame in the video stream, the processor is further configured to execute:
[0050] Determining an icon area of an icon of an information carrier contained in each video frame according to an icon position of the icon of the information carrier contained in each video frame in the video stream;
[0051] Determining a dynamic feature sequence of the information carrier included in the video stream according to the icon area of the icon of the information carrier included in each video frame;
[0052] The authenticity of the information carrier contained in the video stream is determined based on the dynamic feature sequence.
[0053] As an optional implementation, the processor is further configured to execute:
[0054] Determine the dynamic feature sequence of the information carrier contained in the video stream according to the relative area relationship between the icon area of the information carrier contained in each video frame and the image area of the video frame itself; or,
[0055] Based on the icon area of the icon of the information carrier contained in each video frame and the relative area relationship of the carrier area of the information carrier contained in the corresponding video frame, the dynamic feature sequence of the information carrier contained in the video stream is determined, wherein the carrier area is determined based on the output carrier position of the information carrier.
[0056] As an optional implementation, the processor is further configured to execute:
[0057] Performing discrete Fourier transform on the dynamic feature sequence to obtain a frequency spectrum;
[0058] The spectrum graph and the preset spectrum graph are matched in the frequency domain, and the authenticity of the information carrier contained in the video stream is determined based on the matching result, wherein the preset spectrum graph is obtained by discrete Fourier transforming a static feature sequence of a static information carrier contained in the video stream, and the static information carrier represents a non-real information carrier.
[0059] In a third aspect, an embodiment of the present invention further provides a detection device for an information carrier, comprising:
[0060] A video acquisition unit is used to acquire a video stream containing an information carrier, wherein the information carrier is displayed through an electronic display device, and the information carrier is used to represent the geographical location information of the user bound to the electronic display device;
[0061] A detection category unit is used to input the video stream into a trained detection model for detection, and output the category of the information carrier contained in the video stream, wherein the detection model is trained using video stream samples containing information carriers with labeled categories, and the category of the information carrier is used to characterize the geographic area classification information of the geographic location passed by the user bound to the electronic display device.
[0062] As an optional implementation manner, the information carrier is displayed in any one or more of the following ways:
[0063] Presented in text form;
[0064] Presented in the form of images;
[0065] Presented in the form of an image containing an icon;
[0066] Displayed in the form of an image containing text.
[0067] As an optional implementation manner, the information carrier represents different categories in any one or more of the following ways:
[0068] The information carrier indicates different categories by using different colors;
[0069] The information carrier indicates different categories through different patterns;
[0070] The information carrier represents different categories through different icon styles;
[0071] The information carrier represents different categories through different text contents.
[0072] As an optional implementation manner, the detection category unit is further configured to:
[0073] Outputting the carrier position of the information carrier contained in each video frame in the video stream; wherein the detection model is trained using video stream samples containing information carriers with marked categories and positions.
[0074] As an optional implementation manner, if the information carrier is displayed in the form of an image including an icon, the detection category unit is further configured to:
[0075] Output the icon position of the icon of the information carrier contained in each video frame in the video stream; wherein the icon of the information carrier is dynamically updated according to a preset period, and the preset period is less than the duration of the video stream containing the information carrier; the detection model is trained using video stream samples of information carriers containing labeled categories and icon positions.
[0076] As an optional implementation manner, after outputting the icon position of the icon of the information carrier contained in each video frame in the video stream, detecting the living unit is specifically used for:
[0077] Determining an icon area of an icon of an information carrier contained in each video frame according to an icon position of the icon of the information carrier contained in each video frame in the video stream;
[0078] Determining a dynamic feature sequence of the information carrier included in the video stream according to the icon area of the icon of the information carrier included in each video frame;
[0079] The authenticity of the information carrier contained in the video stream is determined based on the dynamic feature sequence.
[0080] As an optional implementation manner, the living body detection unit is specifically used for:
[0081] Determine the dynamic feature sequence of the information carrier contained in the video stream according to the relative area relationship between the icon area of the information carrier contained in each video frame and the image area of the video frame itself; or,
[0082] Based on the icon area of the icon of the information carrier contained in each video frame and the relative area relationship of the carrier area of the information carrier contained in the corresponding video frame, the dynamic feature sequence of the information carrier contained in the video stream is determined, wherein the carrier area is determined based on the output carrier position of the information carrier.
[0083] As an optional implementation manner, the living body detection unit is specifically used for:
[0084] Performing discrete Fourier transform on the dynamic feature sequence to obtain a frequency spectrum;
[0085] The spectrum graph and the preset spectrum graph are matched in the frequency domain, and the authenticity of the information carrier contained in the video stream is determined based on the matching result, wherein the preset spectrum graph is obtained by discrete Fourier transforming a static feature sequence of a static information carrier contained in the video stream, and the static information carrier represents a non-real information carrier.
[0086] In a fourth aspect, an embodiment of the present invention further provides a computer storage medium on which a computer program is stored, and when the program is executed by a processor, it is used to implement the steps of the method described in the first aspect above.
[0087] These and other aspects of the present application will be more clearly understood in the description of the following embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0088] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. 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 paying creative labor.
[0089] Figure 1 A flowchart of a detection method for an information carrier provided by an embodiment of the present invention;
[0090] Figure 2A A schematic diagram of a display method of an information carrier provided by an embodiment of the present invention;
[0091] Figure 2BA schematic diagram of a display method of an information carrier provided by an embodiment of the present invention;
[0092] Figure 3 A schematic diagram of a display method of an information carrier provided by an embodiment of the present invention;
[0093] Figure 4A A schematic diagram of a display method of an information carrier provided by an embodiment of the present invention;
[0094] Figure 4B A schematic diagram of a display method of an information carrier provided by an embodiment of the present invention;
[0095] Figure 4C A schematic diagram of a display method of an information carrier provided by an embodiment of the present invention;
[0096] Figure 4D A schematic diagram of a display method of an information carrier provided by an embodiment of the present invention;
[0097] Figure 5A A schematic diagram of a display method of an information carrier provided by an embodiment of the present invention;
[0098] Figure 5B A schematic diagram of a display method of an information carrier provided by an embodiment of the present invention;
[0099] Figure 6 A spectrum diagram corresponding to a real information carrier provided by an embodiment of the present invention;
[0100] Figure 7 A spectrum diagram corresponding to a non-real information carrier provided by an embodiment of the present invention;
[0101] Figure 8 A flowchart of a specific detection method for an information carrier provided by an embodiment of the present invention;
[0102] Fig. 9 A schematic diagram of a detection device for an information carrier provided by an embodiment of the present invention;
[0103] Fig.10 A schematic diagram of a detection device for an information carrier provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0104] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0105] In the embodiments of the present invention, the term "and / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent three situations: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.
[0106] The application scenarios described in the embodiments of the present invention are intended to more clearly illustrate the technical solutions of the embodiments of the present invention, and do not constitute a limitation on the technical solutions provided by the embodiments of the present invention. It is known to those skilled in the art that with the emergence of new application scenarios, the technical solutions provided by the embodiments of the present invention are also applicable to similar technical problems. In the description of the present invention, unless otherwise specified, "multiple" means two or more.
[0107] Embodiment 1: The itinerary card is launched by the China Academy of Information and Communications Technology in conjunction with China Telecom, China Mobile and China Unicom, three basic telecommunications companies. It is a service that obtains the base station location of the user's mobile phone when receiving data, and queries the information of all cities and prefectures that the user has visited in the past 14 days. The current itinerary card is mainly divided into four types: green code, yellow code, red code and orange code. Among them, the green code has an "arrow" symbol in the middle, the yellow code has a "shield" symbol in the middle, the red code has a "heart" symbol in the middle, and the orange code has a "half-length portrait" symbol in the middle.
[0108] This embodiment provides a method and device for detecting an information carrier. The core idea is to use a detection model to detect the information carrier displayed by the user based on the electronic display device to obtain the category of the information carrier, thereby determining the geographical area classification information of the geographical location passed by the user bound to the electronic display device according to the category of the information carrier. It can be applied to the automatic detection of itinerary cards, and can detect and identify itinerary cards presented by pedestrians, effectively reducing manpower expenses.
[0109] As an embodiment, this embodiment provides a method for detecting an information carrier, which can be applied to a terminal device; the above-mentioned terminal device can be a security gate device, and then a video stream containing the information carrier is obtained through the camera device of the security gate, and the detection method in this embodiment can be installed in the security gate to realize automatic detection of the type of information carrier by the security gate; the above-mentioned terminal device can also be a designated device other than the above-mentioned button gate that can obtain the video stream, and then the detection method in this embodiment can be carried on other designated devices that can obtain the video stream for use, wherein the above-mentioned designated device is placed in supermarkets, hospitals and other places for use, etc.
[0110] As an embodiment, the information carrier detection method provided in this embodiment can also be applied to the server side. The video stream containing the information carrier can be obtained by a camera device and uploaded to the above-mentioned server side, and then the information carrier is detected by the server side; wherein the above-mentioned server side can be an independent server or a server side system composed of multiple servers (such as a distributed server side, a cloud server side, etc.).
[0111] like Figure 1 As shown, the implementation process of the information carrier detection method provided in this embodiment is as follows:
[0112] Step 100: obtaining a video stream containing an information carrier, wherein the information carrier is displayed through an electronic display device, and the information carrier is used to represent geographical location information of a user bound to the electronic display device;
[0113] In some embodiments, the information carrier in this embodiment represents the geographic location information passed by the user bound to the electronic display device within a preset time period. For example, the information carrier represents the cities, regions, and other information passed by the user bound to the electronic display device within N days, where the above N is a positive integer. The specific value of N is not limited in the embodiments of the present application, and technicians in this field can set it according to actual needs. For example, N can be but is not limited to 3, 5, 6, 7, 10, 14 or 30, etc.
[0114] In some embodiments, the electronic display device in this embodiment includes but is not limited to a mobile phone terminal, a tablet, a computer and other intelligent communication devices with a display screen. The electronic display device in this embodiment can have a binding relationship with the user, and the binding relationship can be determined by user identification information that can uniquely identify the user, wherein the user identification information can include but is not limited to SIM card, mobile phone number, registered account and other personal information, and then the binding relationship can be bound by SIM card, mobile phone number, registered account and other personal information, and optionally, the binding relationship between the electronic display device and the user is unique.
[0115] In some embodiments, this embodiment determines the geographical location information of the user bound to the electronic display device according to the base station location where the electronic display device is located when receiving data.
[0116] In some embodiments, the information carrier contained in each video stream obtained in this embodiment is the same. For example, by shooting the information carrier displayed on the electronic display device through a camera device, a 3-second video stream is obtained, and the information carrier contained in each video frame in the video stream is the same. This embodiment does not impose too many restrictions on the duration of the obtained video stream. In implementation, taking the gate scene as an example, when pedestrians pass through the gate, they will show the information carrier displayed on the mobile phone, such as the itinerary card, to the gate camera, and the display time is usually more than 2 seconds.
[0117] In some embodiments, the video stream in this embodiment includes but is not limited to one frame of video image, or multiple frames of video images.
[0118] In some embodiments, the information carrier in this embodiment is displayed in any one or more of the following ways:
[0119] Display method 1) The information carrier is displayed in the form of text;
[0120] In implementation, such as Figure 2A As shown, this embodiment provides a display method of an information carrier, displaying a piece of text on the display interface of an electronic display device, and the text content or text color is used to represent the geographical area classification information of the geographical location passed by the user bound to the electronic display device.
[0121] In some embodiments, the geographical area classification information in this embodiment is used to represent the prevention and control risk level of infectious diseases in the geographical area where the user passes by, such as Figure 2B As shown, this embodiment provides a display method of an information carrier, which uses text content to indicate the prevention and control risk level of the geographical location passed by the user bound to the electronic display device.
[0122] Optionally, if the prevention and control risk levels of multiple geographical locations passed by the user are different, the category of the information carrier is determined according to the highest prevention and control risk level.
[0123] Display method 2) The information carrier is displayed in the form of images;
[0124] In implementation, such as Figure 3 As shown, this embodiment provides a display method of an information carrier, displaying an image on the display interface of an electronic display device, and the color or content of the image is used to represent the geographical area classification information of the geographical location passed by the user bound to the electronic display device.
[0125] Display method 3) The information carrier is displayed in the form of an image containing an icon;
[0126] In practice, this embodiment can also be displayed in the form of an image containing an icon. Figure 4A Figure 4B , Figure 4C , Figure 4D As shown, this embodiment provides a display method of an information carrier. An image containing icons is displayed on the display interface of an electronic display device, and the image color and icon style are used to represent the geographical area classification information of the geographical location passed by the user bound to the electronic display device.
[0127] Display method 4) The information carrier is displayed in the form of an image containing text.
[0128] In implementation, such as Figure 5A As shown, this embodiment provides a display method of an information carrier. An image containing text is displayed on the display interface of an electronic display device, and the image color and text content are used to represent the geographical area classification information of the geographical location passed by the user bound to the electronic display device.
[0129] When the geographic area classification information represents the prevention and control risk level of infectious diseases in the geographic area where the user passes through, such as Figure 5B As shown, this embodiment provides a display method of an information carrier, which indicates the prevention and control risk level of the geographical location passed by the user bound to the electronic display device through image color and text content.
[0130] Optionally, the above-mentioned display methods of the information carrier in this embodiment may be combined with each other, which may be specifically determined according to actual needs, and this embodiment does not impose too many restrictions on this.
[0131] In some embodiments, the information carrier in this embodiment represents different categories in any one or more of the following ways:
[0132] Representation method 1) The information carrier represents different categories by different colors;
[0133] During implementation, when the information carrier is displayed in the form of an image, different categories of information carriers are represented by images of different colors; when the information carrier is displayed in the form of text, different categories of information carriers are represented by text of different colors; when the information carrier is displayed in the form of an image and text, different categories of information carriers are represented by images and text of different colors.
[0134] Representation method 2) The information carrier represents different categories through different patterns;
[0135] In implementation, when the information carrier is displayed in the form of an image, different types of information carriers are represented by images with different patterns.
[0136] Representation method 3) The information carrier represents different categories through different icon styles;
[0137] In implementation, when the information carrier is displayed in the form of an image, different categories of information carriers are represented by images containing different icon styles.
[0138] Representation method 4) The information carrier represents different categories through different text contents.
[0139] In implementation, when the information carrier is displayed in the form of text, different types of information carriers are represented by texts with different contents.
[0140] It should be noted that, in this embodiment, several ways of representing different categories can be combined with each other, and any way of representing different categories can also be combined with any way of displaying information carriers. The specific method can be determined according to actual needs, and this embodiment does not impose too many restrictions.
[0141] Step 101: input the video stream into the trained detection model for detection, and output the category of the information carrier contained in the video stream, wherein the detection model is trained using video stream samples containing information carriers with labeled categories, and the category of the information carrier is used to characterize the geographic area classification information of the geographic location passed by the user bound to the electronic display device.
[0142] In some embodiments, the geographical area classification information in this embodiment is used to characterize the prevention and control risk level for infectious diseases in the geographical area where the geographical location passed by the user is located; wherein, the division of the prevention and control risk level can be determined according to demand, for example, M prevention and control risk levels are defined, and M represents a positive integer. The geographical area can be divided according to longitude and latitude or administrative areas, etc., and this embodiment does not impose too many restrictions on the division of geographical areas. For example, different categories of information carriers can be used to indicate that the prevention and control risk level of the geographical location passed by the user bound to the electronic display device is different. For example, the first category of information carriers indicates that the prevention and control risk level is high, the second category of information carriers indicate that the prevention and control risk level is medium, and the third category of information carriers indicate that the prevention and control risk level is low.
[0143] In some embodiments, the geographic area classification information in this embodiment can also be used to characterize the prevention and control risk level of the geographic area where the user passes by for other application scenarios, and this embodiment does not impose too many limitations.
[0144] In some embodiments, if the user bound to the electronic display device passes through multiple geographic locations, and the geographic area classification information of the multiple geographic locations is different, then the category of the information carrier is determined according to the geographic area classification information with the highest level among the multiple different geographic area classification information. For example, when the geographic area classification information represents the prevention and control risk level of the geographic area where the geographic location passed by the user is located for infectious diseases, if the prevention and control risk levels of the multiple geographic locations passed by the user are different, the category of the information carrier is determined according to the highest prevention and control risk level.
[0145] In this embodiment, the category of the information carrier includes the category of the information carrier itself; when the information carrier is displayed in the form of an image containing an icon, the category of the information carrier may also include the category of the icon, that is, the category of the output information carrier includes the category of the information carrier itself and the category of the icon. If the information carrier is an itinerary card, for example, the category of the output information carrier includes (the color category of the itinerary card and the category of the icon in the center of the itinerary card).
[0146] In some embodiments, the initial model can be trained in advance using video stream samples containing information carriers with labeled categories to obtain the final detection model, wherein the initial model in this embodiment is a lightweight neural network structure (such as yolov3-tiny), and the output is the category of the information carrier, wherein the output category includes one or more. The training set in this embodiment includes multiple video stream samples containing information carriers with labeled categories. If the information carrier is an itinerary card as an example, this embodiment can pre-collect video materials of different people showing different itinerary cards in many different scenes, sample the video materials and convert them into picture materials, annotate the itinerary card position (including the entire itinerary card position and the position of the itinerary card center mark) and category in the material, and use 90% of the materials for the model training set and 10% of the materials for the test set.
[0147] In some embodiments, this embodiment inputs the video stream into a trained detection model for detection, and when outputting the category of the information carrier contained in the video stream, the carrier position of the information carrier contained in each video frame in the video stream can also be output. In implementation, the category of the information carrier contained in the video stream and the position of the information carrier in each video frame contained in the video stream are output. When the video stream contains multiple video frames, the position of the information carrier corresponding to each video frame in the video stream is output. This can be understood as outputting a position sequence, and the order of each position in the position sequence corresponds one-to-one to the order of each video frame in the video stream. In this case, the detection model is trained using video stream samples containing information carriers with labeled categories and positions.
[0148] In some embodiments, if the information carrier in this embodiment is displayed in the form of an image containing an icon, then while outputting the category of the information carrier contained in the video stream, the icon position of the icon of the information carrier contained in each video frame in the video stream is also output. In implementation, the category of the information carrier contained in the video stream and the position of the icon of the information carrier in each video frame contained in the video stream are output. When the video stream contains multiple video frames, the icon position corresponding to each video frame in the video stream is output. This can be understood as outputting an icon position sequence, and the order of each icon position in the icon position sequence corresponds one-to-one to the order of each video frame in the video stream. In this case, the detection model is trained using video stream samples of information carriers containing labeled categories and icon positions.
[0149] In some implementations, the icon of the information carrier in this embodiment is dynamically updated at a preset period, for example, the icon of the information carrier is scaled at a preset period, with a dynamic scaling feature; or the icon of the information carrier is moved at a preset period, etc. Dynamic changes. In implementation, the dynamic update in this embodiment does not change the content of the icon itself. The preset period in this embodiment is less than the duration of the video stream containing the information carrier.
[0150] During implementation, after outputting the icon position of the icon of the information carrier contained in each video frame in the video stream, since the icon of the information carrier has dynamic characteristics, the authenticity of the information carrier contained in the video stream can be determined based on the dynamic characteristics analysis of the icon of the information carrier, thereby preventing someone from impersonating an information carrier with a static picture.
[0151] In some embodiments, after outputting the icon position of the icon of the information carrier contained in each video frame in the video stream, the following steps are performed:
[0152] Step 1) determining the icon area of the icon of the information carrier contained in each video frame according to the icon position of the icon of the information carrier contained in each video frame in the video stream;
[0153] Step 2) determining a dynamic feature sequence of the information carrier contained in the video stream according to the icon area of the icon of the information carrier contained in each video frame;
[0154] In some embodiments, the method for determining a dynamic feature sequence includes any of the following:
[0155] Method 1) determining a dynamic feature sequence of the information carrier contained in the video stream according to the icon area of the icon of the information carrier contained in each video frame and the relative area relationship of the image area of the video frame itself;
[0156] In implementation, the dynamic feature sequence is determined by the following formula:
[0157] F[i]=s[i] / (w×h) formula (1);
[0158] Among them, i represents the number of video frames contained in the video stream, F[i] represents the dynamic feature sequence, s[i] represents the icon area of the icon of the information carrier contained in the video frame, and w×h represents the image area (width×height) of the video frame itself.
[0159] It should be noted that the image area of each video frame is the same, and the size of the image area depends on the camera device.
[0160] Method 2) Determine the dynamic feature sequence of the information carrier contained in the video stream based on the icon area of the icon of the information carrier contained in each video frame and the relative area relationship of the carrier area of the information carrier contained in the corresponding video frame, wherein the carrier area is determined based on the output carrier position of the information carrier.
[0161] In implementation, the dynamic feature sequence is determined by the following formula:
[0162] F[i]=s[i] / t[i] Formula (1);
[0163] Among them, i represents the number of video frames contained in the video stream, F[i] represents the dynamic feature sequence, s[i] represents the icon area of the icon of the information carrier contained in the video frame, and t[i] represents the carrier area of the information carrier contained in the video frame.
[0164] Step 3) Determine the authenticity of the information carrier contained in the video stream based on the dynamic feature sequence.
[0165] In some embodiments, the authenticity of the information carrier is determined specifically in the following manner.
[0166] (1) performing discrete Fourier transform on the dynamic feature sequence to obtain a spectrum diagram;
[0167] In the implementation, the dynamic feature sequence is regarded as a discrete sequence, and a discrete Fourier transform is performed on it. In order to facilitate detection, the spectrum obtained by the discrete Fourier transform can also be translated to obtain a translated spectrum. Figure 6 As shown, this embodiment provides a spectrum diagram corresponding to a real information carrier.
[0168] (2) performing frequency domain matching between the spectrum graph and a preset spectrum graph, and determining the authenticity of the information carrier contained in the video stream according to the matching result;
[0169] The preset spectrum diagram is obtained by performing discrete Fourier transform on a static feature sequence of a static information carrier contained in a video stream, wherein the static information carrier represents a non-real information carrier.
[0170] In some embodiments, Figure 7 As shown, this embodiment provides a spectrum diagram corresponding to a non-real information carrier. Since the non-real information carrier may be a static image and does not have dynamic characteristics, there is a big difference between the spectrum diagram corresponding to the real information carrier and the preset spectrum diagram. Through frequency domain matching, if there is a match, it is determined that the information carrier contained in the video stream is non-real. If there is no match, it is determined that the information carrier contained in the video stream is real.
[0171] In some embodiments, the method for performing frequency domain matching in this embodiment includes but is not limited to calculating spectrum correlation, such as calculating spectrum mean square error MSE or root mean square error. If the obtained correlation value is greater than a threshold, it is determined that the information carrier contained in the video stream is not real. If the obtained correlation value is less than or equal to the threshold, it is determined that the information carrier contained in the video stream is real.
[0172] In some embodiments, when it is determined that the information carrier included in the video stream is not authentic, an alarm may be issued by sending an alarm signal, for example, by voice prompting, etc., to prompt the user to present the authentic and valid information carrier.
[0173] This embodiment uses the target detection neural network model to achieve real-time detection of the location and category of the itinerary card in the monitoring screen, which is lower in cost, more flexible, and easier to deploy to various entrance and exit scenes. Spectrum matching can also be used to perform correlation analysis between the actual itinerary card spectrum and the theoretical spectrum to verify the authenticity of the itinerary card in the picture.
[0174] like Figure 8 As shown, this embodiment provides a specific detection method for an information carrier, and the specific implementation process of the method is as follows:
[0175] Step 800: Using a lightweight neural network structure as an initial model, and using a video stream sample containing information carriers of labeled categories and icon positions to train the initial model, thereby obtaining a trained detection model;
[0176] Step 801: obtaining a video stream containing an information carrier, wherein the information carrier is displayed on a terminal in the form of an image containing an icon, and different categories are represented by images of different colors and icons of different styles;
[0177] The information carrier is displayed by an electronic display device, and the information carrier is used to represent the geographical location information of the user bound to the electronic display device;
[0178] Step 802: Input the video stream into the trained detection model for detection, and output the category of the information carrier contained in the video stream and the icon position of the icon of the information carrier contained in each video frame;
[0179] Step 803: Determine the icon area of the icon of the information carrier contained in each video frame according to the icon position of the icon of the information carrier contained in each video frame in the video stream;
[0180] Step 804: determining a dynamic feature sequence of the information carrier contained in the video stream according to the icon area of the icon of the information carrier contained in each video frame and the relative area relationship of the image area of the video frame itself;
[0181] Step 805, performing discrete Fourier transform on the dynamic feature sequence to obtain a spectrum diagram;
[0182] Step 806: Perform frequency domain matching between the spectrum graph and the preset spectrum graph, and determine the authenticity of the information carrier contained in the video stream based on the matching result.
[0183] The preset spectrum diagram is obtained by performing discrete Fourier transform on a static feature sequence of a static information carrier contained in a video stream, wherein the static information carrier represents a non-real information carrier.
[0184] Example 2: Based on the same inventive concept, the embodiment of the present invention also provides a detection device for an information carrier. Since the device is the device in the method in the embodiment of the present invention, and the principle of solving the problem by the device is similar to that of the method, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0185] like Fig. 9 As shown, the device includes a processor 900 and a memory 901, wherein the memory 901 is used to store a program executable by the processor 900, and the processor 900 is used to read the program in the memory 901 and perform the following steps:
[0186] Acquire a video stream containing an information carrier, wherein the information carrier is displayed through an electronic display device, and the information carrier is used to represent geographic location information of a user bound to the electronic display device;
[0187] The video stream is input into a trained detection model for detection, and the category of the information carrier contained in the video stream is output, wherein the detection model is trained using video stream samples containing information carriers with labeled categories, and the category of the information carrier is used to characterize the geographic area classification information of the geographic location passed by the user bound to the electronic display device.
[0188] As an optional implementation manner, the information carrier is displayed in any one or more of the following ways:
[0189] Presented in text form;
[0190] Presented in the form of images;
[0191] Presented in the form of an image containing an icon;
[0192] Displayed in the form of an image containing text.
[0193] As an optional implementation manner, the information carrier represents different categories in any one or more of the following ways:
[0194] The information carrier indicates different categories by using different colors;
[0195] The information carrier indicates different categories through different patterns;
[0196] The information carrier represents different categories through different icon styles;
[0197] The information carrier represents different categories through different text contents.
[0198] As an optional implementation manner, the processor 900 is further configured to execute:
[0199] Outputting the carrier position of the information carrier contained in each video frame in the video stream; wherein the detection model is trained using video stream samples containing information carriers with marked categories and positions.
[0200] As an optional implementation manner, if the information carrier is displayed in the form of an image including an icon, the processor 900 is further configured to execute:
[0201] Output the icon position of the icon of the information carrier contained in each video frame in the video stream; wherein the icon of the information carrier is dynamically updated according to a preset period, and the preset period is less than the duration of the video stream containing the information carrier; the detection model is trained using video stream samples of information carriers containing labeled categories and icon positions.
[0202] As an optional implementation manner, after outputting the icon position of the icon of the information carrier contained in each video frame in the video stream, the processor 900 is further configured to execute:
[0203] Determining an icon area of an icon of an information carrier contained in each video frame according to an icon position of the icon of the information carrier contained in each video frame in the video stream;
[0204] Determining a dynamic feature sequence of the information carrier included in the video stream according to the icon area of the icon of the information carrier included in each video frame;
[0205] The authenticity of the information carrier contained in the video stream is determined based on the dynamic feature sequence.
[0206] As an optional implementation manner, the processor 900 is further configured to execute:
[0207] Determine the dynamic feature sequence of the information carrier contained in the video stream according to the relative area relationship between the icon area of the information carrier contained in each video frame and the image area of the video frame itself; or,
[0208] Based on the icon area of the icon of the information carrier contained in each video frame and the relative area relationship of the carrier area of the information carrier contained in the corresponding video frame, the dynamic feature sequence of the information carrier contained in the video stream is determined, wherein the carrier area is determined based on the output carrier position of the information carrier.
[0209] As an optional implementation manner, the processor 900 is further configured to execute:
[0210] Performing discrete Fourier transform on the dynamic feature sequence to obtain a frequency spectrum;
[0211] The spectrum graph and the preset spectrum graph are matched in the frequency domain, and the authenticity of the information carrier contained in the video stream is determined based on the matching result, wherein the preset spectrum graph is obtained by discrete Fourier transforming a static feature sequence of a static information carrier contained in the video stream, and the static information carrier represents a non-real information carrier.
[0212] Example 3: Based on the same inventive concept, the embodiment of the present invention also provides a detection device for an information carrier. Since the device is the device in the method in the embodiment of the present invention, and the principle of solving the problem by the device is similar to that of the method, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0213] like Fig.10 As shown, the device comprises:
[0214] The video acquisition unit 1000 is used to acquire a video stream containing an information carrier, wherein the information carrier is displayed through an electronic display device, and the information carrier is used to represent the geographical location information of the user bound to the electronic display device;
[0215] The detection category unit 1001 is used to input the video stream into the trained detection model for detection, and output the category of the information carrier contained in the video stream, wherein the detection model is trained using video stream samples containing information carriers with labeled categories, and the category of the information carrier is used to characterize the geographic area classification information of the geographic location passed by the user bound to the electronic display device.
[0216] As an optional implementation manner, the information carrier is displayed in any one or more of the following ways:
[0217] Presented in text form;
[0218] Presented in the form of images;
[0219] Presented in the form of an image containing an icon;
[0220] Displayed in the form of an image containing text.
[0221] As an optional implementation manner, the information carrier represents different categories in any one or more of the following ways:
[0222] The information carrier indicates different categories by using different colors;
[0223] The information carrier indicates different categories through different patterns;
[0224] The information carrier represents different categories through different icon styles;
[0225] The information carrier represents different categories through different text contents.
[0226] As an optional implementation manner, the detection category unit 1001 is further configured to:
[0227] Outputting the carrier position of the information carrier contained in each video frame in the video stream; wherein the detection model is trained using video stream samples containing information carriers with marked categories and positions.
[0228] As an optional implementation, if the information carrier is displayed in the form of an image including an icon, the detection category unit 1001 is further configured to:
[0229] Output the icon position of the icon of the information carrier contained in each video frame in the video stream; wherein the icon of the information carrier is dynamically updated according to a preset period, and the preset period is less than the duration of the video stream containing the information carrier; the detection model is trained using video stream samples of information carriers containing labeled categories and icon positions.
[0230] As an optional implementation manner, after outputting the icon position of the icon of the information carrier contained in each video frame in the video stream, detecting the living unit is specifically used for:
[0231] Determining an icon area of an icon of an information carrier contained in each video frame according to an icon position of the icon of the information carrier contained in each video frame in the video stream;
[0232] Determining a dynamic feature sequence of the information carrier included in the video stream according to the icon area of the icon of the information carrier included in each video frame;
[0233] The authenticity of the information carrier contained in the video stream is determined based on the dynamic feature sequence.
[0234] As an optional implementation manner, the living body detection unit is specifically used for:
[0235] Determine the dynamic feature sequence of the information carrier contained in the video stream according to the relative area relationship between the icon area of the information carrier contained in each video frame and the image area of the video frame itself; or,
[0236] Based on the icon area of the icon of the information carrier contained in each video frame and the relative area relationship of the carrier area of the information carrier contained in the corresponding video frame, the dynamic feature sequence of the information carrier contained in the video stream is determined, wherein the carrier area is determined based on the output carrier position of the information carrier.
[0237] As an optional implementation manner, the living body detection unit is specifically used for:
[0238] Performing discrete Fourier transform on the dynamic feature sequence to obtain a frequency spectrum;
[0239] The spectrum graph and the preset spectrum graph are matched in the frequency domain, and the authenticity of the information carrier contained in the video stream is determined based on the matching result, wherein the preset spectrum graph is obtained by discrete Fourier transforming a static feature sequence of a static information carrier contained in the video stream, and the static information carrier represents a non-real information carrier.
[0240] Based on the same inventive concept, an embodiment of the present invention further provides a computer storage medium on which a computer program is stored. When the program is executed by a processor, the following steps are implemented:
[0241] Acquire a video stream containing an information carrier, wherein the information carrier is displayed through an electronic display device, and the information carrier is used to represent geographic location information of a user bound to the electronic display device;
[0242] The video stream is input into a trained detection model for detection, and the category of the information carrier contained in the video stream is output, wherein the detection model is trained using video stream samples containing information carriers with labeled categories, and the category of the information carrier is used to characterize the geographic area classification information of the geographic location passed by the user bound to the electronic display device.
[0243] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage 901 and optical storage 901, etc.) containing computer-usable program codes.
[0244] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that has the functions specified in one or more boxes.
[0245] These computer program instructions may also be stored in a computer readable memory 901 that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory 901 produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0246] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0247] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A method for detecting an information carrier, characterized in that: The method includes: Acquire a video stream containing an information carrier, wherein the information carrier is displayed through an electronic display device, and the information carrier is used to represent geographic location information of a user bound to the electronic display device; Inputting the video stream into a trained detection model for detection, and outputting the category of the information carrier contained in the video stream, wherein the detection model is trained using a video stream sample containing information carriers with labeled categories, and the category of the information carrier is used to characterize the geographical area classification information of the geographical location passed by the user bound to the electronic display device; If the information carrier is displayed in the form of an image containing an icon, it also includes: outputting the icon position of the icon of the information carrier contained in each video frame in the video stream; wherein the icon of the information carrier is dynamically updated at a preset period, and the preset period is less than the duration of the video stream containing the information carrier; the detection model is trained using a video stream sample of the information carrier containing the labeled category and the icon position, and the dynamic update does not change the content of the icon itself; the icon of the information carrier is dynamically updated at a preset period, including: the icon of the information carrier is scaled at a preset period, and has a dynamic scaling feature; After outputting the icon position of the icon of the information carrier contained in each video frame in the video stream, the method further includes: determining the icon area of the icon of the information carrier contained in each video frame according to the icon position of the icon of the information carrier contained in each video frame in the video stream; determining the dynamic feature sequence of the information carrier contained in the video stream according to the icon area of the icon of the information carrier contained in each video frame; and determining the authenticity of the information carrier contained in the video stream according to the dynamic feature sequence; Determining the dynamic feature sequence of the information carrier contained in the video stream according to the icon area of the icon of the information carrier contained in each video frame includes: determining the dynamic feature sequence of the information carrier contained in the video stream according to the icon area of the icon of the information carrier contained in each video frame and the relative area relationship of the image area of the video frame itself; or determining the dynamic feature sequence of the information carrier contained in the video stream according to the icon area of the icon of the information carrier contained in each video frame and the relative area relationship of the carrier area of the information carrier contained in the corresponding video frame, wherein the carrier area is determined according to the output carrier position of the information carrier; Determining the authenticity of the information carrier contained in the video stream based on the dynamic feature sequence includes: performing discrete Fourier transform on the dynamic feature sequence to obtain a spectrum diagram; matching the spectrum diagram with a preset spectrum diagram in the frequency domain, and determining the authenticity of the information carrier contained in the video stream based on the matching result, wherein the preset spectrum diagram is obtained by performing discrete Fourier transform on a static feature sequence of a static information carrier contained in the video stream, and the static information carrier represents a non-authentic information carrier.
2. The method according to claim 1, characterized in that The information carrier is displayed in any one or more of the following ways: Presented in text form; Presented in the form of images; Presented in the form of an image containing an icon; Displayed in the form of an image containing text.
3. The method according to claim 1, characterized in that The information carrier represents different categories in any one or more of the following ways: The information carrier indicates different categories by using different colors; The information carrier indicates different categories through different patterns; The information carrier represents different categories through different icon styles; The information carrier represents different categories through different text contents.
4. The method according to claim 1, characterized in that: The step of inputting the video stream into a trained detection model for detection and outputting the category of the information carrier contained in the video stream further includes: Outputting the carrier position of the information carrier contained in each video frame in the video stream; wherein the detection model is trained using video stream samples containing information carriers with marked categories and positions.
5. A detection device for an information carrier, characterized in that: The device comprises a processor and a memory, wherein the memory is used to store a program executable by the processor, and the processor is used to read the program in the memory and execute the steps of any one of the methods of claims 1 to 4.
6. A computer storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Multi-video-frame black smoke diesel vehicle detection method and system based on space-time optical flow network
CN113221976A
Travel card identification method applied to prevention and control of infectious diseases and method for prevention and control of infectious diseases
CN114283279A