Method, device, equipment, medium and product for identifying state of entering and exiting attendance gate
By installing readers on both sides of the entrance to the campus attendance system, a relative coordinate system is established, and the tag angle and movement trajectory are calculated. This solves the problem of inaccurate entry and exit judgment in traditional RFID attendance systems and achieves higher attendance accuracy.
Patent Information
- Application Number
- CN202511215564.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-28
- Publication Date
- 2025-12-16
AI Technical Summary
Traditional campus RFID attendance systems cannot accurately identify whether a student is leaving or entering the school, especially when two readers are installed on the same side, the chaotic signal sensing sequence leads to incorrect judgments.
By adjusting the installation position of the readers and deploying them on both sides of the attendance entrance, a relative coordinate system is established. The position coordinates and angles of the tags are calculated using signal data. Combined with preset angle thresholds, the user's entry and exit status is determined, and the user's behavior is recorded through motion trajectory and status matrix.
It improves the accuracy of attendance judgment, can accurately identify the user's entry and exit status, reduces misjudgments caused by signal interference, and is suitable for smart campus entry and exit attendance scenarios.
Smart Images

Figure CN121145901A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of label identification, and in particular to a state identification method and device for an access control gate, equipment, medium and product. BACKGROUND
[0002] Radio Frequency Identification (RFID) is a non-contact automatic identification technology that can automatically identify targets and obtain target information through radio frequency signals. Due to its non-contact, long-distance and fast identification characteristics, RFID has been widely used in campus safety management, especially in student access control.
[0003] The traditional campus RFID attendance system usually adopts a scheme of deploying a single or multiple independent RFID readers at the school gate. When a student wearing an RFID tag (such as a campus card, bracelet, etc.) passes through the school gate, the reader senses the tag signal, and the system records the student's identity information and the current time, thereby realizing automatic attendance.
[0004] However, the working principle of the traditional single-reader or multiple-independent-reader system is mainly to determine whether the RFID tag has entered the signal coverage range of the reader. Although it can be known that who appears at the school gate at what time, it is difficult to accurately determine whether the student is "on campus" or "off campus".
[0005] Some improved schemes will install two readers at the school gate, respectively on the inside and outside of the school. When a student enters the school from outside, the reader outside the school first senses it, and the reader inside the school senses it after entering the school, so it is judged that the student enters the school, and vice versa. However, in actual situations, the two readers are installed on the same side, close to each other and have no shielding between them, so they cannot isolate the signal influence between the two readers. When a student wearing a tag passes by, the signal may be sensed by both readers at the same time, or the order of sensing becomes random and chaotic, completely losing its logic, so there may be errors in the judgment of entering or leaving the school. SUMMARY
[0006] The present application provides a state identification method and device for an access control gate, equipment, medium and product to solve the technical problem that the existing technology cannot accurately identify whether a student is on or off campus.
[0007] The application provides a state recognition method for an access attendance gate, comprising: acquiring signal data of a tag worn by a user relative to a first reader and a second reader, and determining position coordinates of the tag in a relative coordinate system according to the signal data; wherein the relative coordinate system is determined based on the position relationship of the first reader, the second reader and the attendance gate, the first reader is arranged on a first side along the transverse direction of the attendance gate, and the second reader is arranged on a second side along the transverse direction of the attendance gate; determining a first angle between the tag and the first reader according to the position coordinates; and determining the access state of the user relative to the attendance gate according to the comparison result of the first angle and a preset angle threshold.
[0008] According to the state recognition method for the access attendance gate provided by the application, the access state of the user relative to the attendance gate is determined according to the comparison result of the first angle and the preset angle threshold, comprising: when the first angle is greater than the preset angle threshold, it is determined that the user is outside the attendance gate.
[0009] According to the state recognition method for the access attendance gate provided by the application, the access state of the user relative to the attendance gate is determined according to the comparison result of the first angle and the preset angle threshold, comprising: when the first angle is less than or equal to the preset angle threshold, it is determined that the user is inside the attendance gate.
[0010] According to the state recognition method for the access attendance gate provided by the application, the access state of the user relative to the attendance gate is determined according to the comparison result of the first angle and the preset angle threshold, comprising: when the first angle is less than or equal to the preset angle threshold, the difference between the first angle and the preset angle threshold is determined; and the access state of the user relative to the attendance gate is determined according to the difference and the boundary of the internal range of the attendance gate.
[0011] According to the state recognition method for the access attendance gate provided by the application, the access state of the user relative to the attendance gate is determined according to the comparison result of the first angle and the preset angle threshold, comprising: when the first angle is less than or equal to the preset angle threshold, the difference between the first angle and the preset angle threshold is determined; and the access state of the user relative to the attendance gate is determined according to the difference and the boundary of the internal range of the attendance gate.
[0012] According to the state recognition method for the access attendance gate provided by the application, the access state of the user relative to the attendance gate is determined according to the comparison result of the first angle and the preset angle threshold, comprising: when the first angle is less than or equal to the preset angle threshold, the difference between the first angle and the preset angle threshold is determined; and the access state of the user relative to the attendance gate is determined according to the difference and the boundary of the internal range of the attendance gate.
[0013] According to a state recognition method of an access attendance gate provided in the application, a state queue is determined according to a motion trajectory, including: sequentially obtaining a time and a data state of a tag from the state queue; if the data state obtained from the state queue is inconsistent with a state type of a latest column in a state matrix, a new column is added in the state matrix to record new state information; if the data state obtained from the state queue is consistent with the state type of the latest column in the state matrix, a sensing frequency of the state is updated.
[0014] The application further provides a state recognition device of an access attendance gate, including: a tag signal data module, configured to obtain signal data of a tag worn by a user relative to a first reader and a second reader, and determine a position coordinate of the tag in a relative coordinate system according to the signal data; wherein the relative coordinate system is determined based on a position relationship of the first reader, the second reader and the access attendance gate, the first reader is disposed on a first side along a transverse direction of the access attendance gate, and the second reader is disposed on a second side along the transverse direction of the access attendance gate; a first angle module, configured to determine a first angle between the tag and the first reader according to the position coordinate; and an access state module, configured to determine an access state of the user relative to the access attendance gate according to a comparison result of the first angle and a preset angle threshold.
[0015] The application further provides an electronic device, including a memory, a processor and a computer program stored in the memory and executable on the processor, and the processor implements the state recognition method of the access attendance gate as described above when executing the program.
[0016] The application further provides a non-transitory computer readable storage medium, having a computer program stored thereon, and the computer program is executable on a processor to implement the state recognition method of the access attendance gate as described above.
[0017] The application further provides a computer program product, including a computer program, and the computer program is executable on a processor to implement the state recognition method of the access attendance gate as described above.
[0018] The application provides a state recognition method, device, equipment, medium and product of an access attendance gate, the state recognition method of the access attendance gate comprises the following steps: acquiring signal data of a label worn by a user relative to a first reader and a second reader, and determining position coordinates of the label in a relative coordinate system according to the signal data; wherein the relative coordinate system is determined based on the position relationship of the first reader, the second reader and the access attendance gate, the first reader is arranged on a first side along the transverse direction of the access attendance gate, and the second reader is arranged on a second side along the transverse direction of the access attendance gate; determining a first angle between the label and the first reader according to the position coordinates; and determining the access state of the user relative to the access attendance gate according to the comparison result of the first angle and a preset angle threshold. In the foregoing manner, the installation positions of the two readers are adjusted, the first reader and the second reader are arranged on the first side and the second side along the transverse direction of the access attendance gate respectively, and an adaptive recognition algorithm is provided, so that the access state of the user can be accurately recognized according to the comparison result of the first angle between the label and the first reader and the preset angle threshold, the accuracy of attendance judgment is improved, and the access attendance scene of the smart campus is especially suitable. BRIEF DESCRIPTION OF DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description are some embodiments of the application, and other drawings can also be obtained by those skilled in the art without creative labor.
[0020] Figure 1 The schematic diagram of the installation positions of the two readers in the related art.
[0021] Figure 2 The schematic diagram of the state recognition method of the access attendance gate provided by the embodiments of the application.
[0022] Figure 3 The schematic diagram of the setting mode of each school gate provided by the embodiments of the application.
[0023] Figure 4 The schematic diagram of the installation positions of the two readers and the monitoring area provided by the embodiments of the application.
[0024] Figure 5 The schematic diagram of the relative coordinate system provided by the embodiments of the application.
[0025] Figure 6 The schematic diagram of the process of judging whether the label is in the school or outside the school provided by the embodiments of the application.
[0026] Figure 7 The schematic diagram of the maximum angle in different school gates provided by the embodiments of the application.
[0027] Figure 8 is a schematic diagram of relative positions of two readers and tags provided by an embodiment of the present application.
[0028] Figure 9 is a schematic diagram of student coordinates and campus range provided by an embodiment of the present application.
[0029] Figure 10 is a flowchart of a process for judging a campus access scenario provided by an embodiment of the present application.
[0030] Figure 11 is a structural diagram of a state recognition device for a campus access gate provided by an embodiment of the present application.
[0031] Figure 12 is a structural diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0032] In order to make the objectives, technical solutions and advantages of the present application clearer, the technical solutions in the present application will be described in detail below with reference to the drawings in the present application. Obviously, the described embodiments are some, but not all, of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present application.
[0033] In the description of the present specification, the description of the terms "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In the present specification, the illustrative description of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any appropriate manner in any one or more embodiments or examples. In addition, those skilled in the art can combine and combine the different embodiments or examples described in the present specification and the features of the different embodiments or examples without contradiction.
[0034] In the smart campus scenario, an RFID reader is usually installed at the campus access gate, and the wireless transmission distance is adjustable between 2 to 80 meters. When a student wearing a campus card (active tag) passes through the identification area, the reader reads the tag information and transmits it to the background for processing and recording, completing the student access attendance.
[0035] RFID system can include reader (Reader) and electronic tags (transponders) and application software system, its working principle is that the reader transmits a specific frequency of radio wave energy, to drive the circuit to send out the internal data, when the tag into the reader, receive the reader issued radio frequency signal, by the inductive current to obtain the energy to send out the product information stored in the chip (Passive Tag, passive tag or passive tag), or by the tag active sending a frequency signal (Active Tag, active tag or active tag), the reader reads information and decodes, sent to the central information system for related data processing.
[0036] In the smart campus scene, it is necessary to install an RFID reader at the school entrance. The influencing factors here include the type of reader, signal strength, installation location, and number of installations, which will affect the coverage of the signal. Within the effective identification range of the card reader, the RFID electronic tag can transmit this ID identification number through a 2.45GHz wireless carrier. After being received, decoded, and identified by the card reader, it is used for further data processing. When a student wearing a campus card (active tag) passes through the identification area, the campus card information will be collected. The student information collected mainly includes the unique identification of the campus card, which corresponds to the basic information of a student in the background system. When entering and leaving school, it is necessary to determine whether the student is entering or leaving school, and to inform the parents of the student's school attendance status in combination with the background processing logic.
[0037] Further analysis of the current school entry and exit problem in terms of the influencing parameters of the reader. Due to various factors, the size, location, and shape of school gates are not the same. For various types of school entrances, it is necessary to accurately determine the student's school entry and exit status. Related solutions for schools with large gates will install two readers on the school gate, one on the inside and one on the outside.
[0038] Please refer to Figure 1 , Figure 1 The schematic diagram of the installation position of the two readers in the related art.
[0039] Figure 1 A point and B point in the figure represent the first reader and the second reader, respectively. When entering the school from outside, the first reader A outside the school senses first, and the second reader B inside the school senses after entering the school, so it is judged as entering the school, and vice versa. However, in actual situations, since the two readers are installed on the same side, they are close to each other and have no obstruction between them, so there may be errors in the judgment of entering and leaving school.
[0040] Therefore, the prior art has the following disadvantages: when the student is in the out-of-school or in-school scene, the specific state of the student cannot be accurately identified. At present, multiple readers are installed at different positions, and the order in which the readers sense the tags is used to determine whether the student is out of school or in school. However, due to the difference in the actual installation positions of the multiple readers, the order in which the tags are sensed by the readers may be reversed in actual operation, thereby leading to inaccurate out-of-school or in-school determination results. In addition, when the student lingers near the school gate, the problem of inaccurate determination is further aggravated, making it difficult for the system to accurately identify the true out-of-school or in-school state of the student.
[0041] Based on this, the application provides a state identification method for an out-of-school or in-school attendance gate. By adjusting the installation positions of two readers and providing an adaptive identification algorithm, the out-of-school or in-school state of a user can be accurately identified, and the accuracy of attendance determination is improved, which is particularly suitable for the out-of-school or in-school attendance scene of a smart campus.
[0042] Please refer to Figure 2 , Figure 2 is a flowchart of the state identification method for an out-of-school or in-school attendance gate provided by the embodiments of the application. In this embodiment, the state identification method for an out-of-school or in-school attendance gate can include steps S210 to S230, and each step is as follows: S210: Obtain the signal data of the tag worn by the user relative to the first reader and the second reader, and determine the position coordinates of the tag in the relative coordinate system according to the signal data.
[0043] The relative coordinate system is determined based on the relative positions of the first reader, the second reader, and the attendance gate, the first reader is disposed on the first side along the transverse direction of the attendance gate, and the second reader is disposed on the second side along the transverse direction of the attendance gate.
[0044] In this embodiment, the first reader and the second reader are respectively disposed on the two sides along the transverse direction of the attendance gate. Based on the relative positions of the first reader, the second reader, and the attendance gate, a relative coordinate system can be established, which provides a reference framework for subsequent determination of the position coordinates of the tag.
[0045] For example, the first reader can be installed on the left door frame of the gate, and the second reader can be installed on the right door frame of the gate. Such a layout enables the two readers to detect the signals of the tags passing through the gate from different angles.
[0046] The installation height of the first reader and the second reader can be adjusted according to actual conditions, and the installation height of the first reader and the second reader can be the same or different.
[0047] Optionally, the first and second readers are installed at the same height, approximately 1.5-2 meters above the ground. This height can cover students of most heights, ensuring that the tag is within its signal sensing range.
[0048] In this embodiment, the reader and the tag worn by the user can interact via wireless communication technology. This wireless communication technology can employ radio frequency identification (RFID), Wi-Fi, Bluetooth, or other technologies. For ease of explanation, this application focuses on RFID technology. However, those skilled in the art will understand that this solution is universal and applicable to other wireless communication technologies as well.
[0049] When a user with a tag passes through the attendance gate, the first and second readers send wireless signals to the tag. Upon receiving the signal, the tag reflects back a signal containing its own identification information and some possible status information. After receiving these reflected signals, the readers can extract the signal data, including key parameters such as signal strength and arrival time.
[0050] Signal strength reflects the distance between the tag and the reader. In an accessible environment, signal strength is inversely proportional to distance; the closer the distance, the stronger the signal. Signal arrival time (TAT) can be used to more accurately calculate the distance between the tag and the reader. By measuring the time difference between the signal being emitted from the reader and reflected back by the tag, and combining this with the signal propagation speed, an approximate distance can be calculated.
[0051] In this step, based on the signal data obtained from the first and second readers, a positioning algorithm can be used to determine the tag's position coordinates in a relative coordinate system. Accurately determining the tag's position in the coordinate system of the attendance gate provides crucial location information for subsequent judgment of user entry and exit status.
[0052] For example, triangulation can be used to determine the tag's position coordinates in a relative coordinate system. In triangulation, if the distance from the tag to the first and second readers (calculated using signal strength or signal arrival time) is known, and the positions of the first and second readers in the coordinate system are known, a circle can be drawn with each reader as the center and the calculated distance as the radius. The tag's position is the intersection of these two circles.
[0053] S220: Determine the first angle between the label and the first reader based on the position coordinates.
[0054] In this embodiment, the first angle can be calculated based on the position of the first reader as a reference point and the position coordinates of the tag in the relative coordinate system. The first angle reflects the direction information of the tag relative to the first reader, which can help understand whether the tag is biased towards the inside or outside of the doorway, or in other directions.
[0055] S230: Determine the entry and exit state of the user relative to the attendance doorway according to the comparison result of the first angle and the preset angle threshold.
[0056] Optionally, the preset angle threshold is the maximum angle of the inside range of the attendance doorway.
[0057] Specifically, the first angle and the preset angle threshold are compared, and the entry and exit state of the user relative to the attendance doorway can be determined according to the comparison result. The preset angle threshold is determined according to the geometric shape of the attendance doorway and the actual application scenario, which represents the maximum angle of the inside range of the attendance doorway.
[0058] Optionally, the preset angle threshold can be determined according to the width, height and installation position of the reader of the attendance doorway and other factors. For example, a reasonable preset angle threshold can be determined through field measurement and simulation test to ensure that the user can be accurately distinguished as being inside or outside the doorway.
[0059] According to the comparison result of the first angle and the preset angle threshold, the entry and exit state of the user relative to the attendance doorway can be determined, which can specifically include the following ways: ① When the first angle is greater than the preset angle threshold, it is determined that the user is outside the attendance doorway.
[0060] ② When the first angle is less than or equal to the preset angle threshold, it is determined that the user is inside the attendance doorway.
[0061] This embodiment can be based on the positioning principle of the Angle of Arrival (AOA) to calculate the first angle between the tag and the first reader based on the first reader as a reference, and to judge whether the user is inside or outside the door by comparing with the preset angle threshold.
[0062] When the first angle is greater than the preset angle threshold, it indicates that the tag (user) is located outside the attendance doorway. This is because in this case, the direction of the tag relative to the first reader exceeds the preset inside range of the door; when the first angle is less than or equal to the preset angle threshold, it indicates that the tag (user) is located inside the attendance doorway, and its direction is within the preset inside range of the door, Exemplarily, assuming that the preset angle threshold is 30°, when the first angle of the tag is 20°, it is considered that the user is inside the doorway; when the first angle is 40°, it is considered that the user is outside the doorway.
[0063] In the above embodiment, by deploying the readers on both sides of the attendance gate in the transverse direction, the arrival angle of the AOA is determined according to the signals sensed by the two readers, and the entry and exit state of the user relative to the attendance gate can be accurately determined. Compared with the time sequence judgment method in the related scheme, the signal interference between the readers on the same side is reduced, and the accuracy of the entry and exit state determination of the user is significantly improved.
[0064] In some embodiments, according to the comparison result of the first angle and the preset angle threshold, the entry and exit state of the user relative to the attendance gate can also include the following manner: When the first angle is less than or equal to the preset angle threshold, the difference between the first angle and the preset angle threshold is determined; and according to the difference and the boundary of the internal range of the attendance gate, the entry and exit state of the user relative to the attendance gate is determined.
[0065] In the embodiment, the angle judgment is further refined. When the first angle is greater than the preset angle threshold, it can be determined that the user is in the external range of the attendance gate. However, when the first angle is greater than the preset angle threshold, it can be preliminarily determined that the user is in the internal range of the attendance gate, but further judgment needs to be made in combination with the boundary of the internal range of the attendance gate.
[0066] Specifically, the difference between the first angle and the preset angle threshold is determined, and the difference can reflect how far the current direction angle of the tag is from the "boundary of the internal range of the gate" (i.e. the preset angle threshold). If the difference is zero or very small, it means that the tag is just on the boundary or just enters. If the difference is large (within the effective range), it means that the tag has entered the "internal range of the gate" more deeply.
[0067] Therefore, when the difference is greater than or equal to the preset difference threshold, it can be determined that the user is in the internal range of the attendance gate; when the difference is less than the preset difference threshold, it needs to be further determined whether the user is really in the internal range of the attendance gate in combination with the boundary of the internal range of the attendance gate.
[0068] In some embodiments, the entry and exit state identification method of the attendance gate further includes the following steps: According to the signal data, the motion trajectory of the tag in the relative coordinate system is determined; and according to the motion trajectory, any one or more combinations of the entry and exit state, direction and stay time of the user relative to the attendance gate are determined.
[0069] In the embodiment, by continuously obtaining the signal data of the tag, the motion trajectory of the user can be obtained. According to the motion trajectory, any one or more combinations of the entry and exit state, direction and stay time of the user relative to the attendance gate can be further determined.
[0070] Entry / exit state determination: analyze the position change of the motion trajectory at the attendance gate. If the motion trajectory moves from the outside area to the inside area of the gate, it is determined to be entering; if the motion trajectory moves from the inside area to the outside area of the gate, it is determined to be leaving.
[0071] Direction determination: use the direction information of the coordinate system to calculate the heading angle of the trajectory and determine the direction in which the user moves relative to the gate, such as directly facing the gate or diagonally moving towards the gate.
[0072] Stay time calculation: record the stay time of the tag near the gate, which is the time difference from entering the gate area to leaving the gate area.
[0073] In the above manner, the present embodiment can comprehensively analyze user behavior, not only determining entry / exit state, but also determining direction and stay time, any one or combination of multiple, providing more information for attendance management. Optionally, if the user stays for a long time, a warning can be triggered to remind the manager to pay attention and handle the abnormal situation in time, such as the student staying at the school gate may have safety hazards or truancy behavior.
[0074] In some embodiments, the step of determining any one or combination of multiple of the entry / exit state, direction, and stay time of the user relative to the attendance gate based on the motion trajectory can specifically include: initializing a state matrix, the state matrix being used to record the time, state type, and state sensing frequency of the state; determining a state queue based on the motion trajectory; processing the state matrix based on the state queue to obtain a target state matrix; and determining any one or combination of multiple of the entry / exit state, direction, and stay time of the user relative to the attendance gate based on the target state trajectory.
[0075] In the present embodiment, the state matrix is initialized, and the state matrix is used to record the time, state type, and state sensing frequency of the state. The initial value of the state matrix can be set according to the actual situation, for example, the initial time is the time when the user starts to approach the attendance gate, the initial state type is “unknown”, and the initial state sensing frequency is zero.
[0076] The state queue is determined based on the motion trajectory, and the state queue contains different states of the user at the attendance gate, such as “approaching the gate”, “entering the gate”, “leaving the gate”, etc. For example, when the motion trajectory shows that the user moves from a distance to the gate, the state is “approaching the gate”; when the user enters the gate area, the state is “entering the gate”; when the user leaves the gate area, the state is “leaving the gate”.
[0077] The state matrix is processed based on the state queue to obtain a target state matrix. The specific processing process includes updating the time, state type and state sensing frequency in the state matrix. For example, when the user enters the door area, the time in the state matrix is updated, the state type is changed to "enter the door", and the state sensing frequency is increased by one.
[0078] Finally, any one or more combinations of the entry and exit state, direction and stay time of the user relative to the attendance door are determined based on the target state matrix and the motion trajectory. For example, according to the start and end positions of the motion trajectory, it is judged whether the user is entering or leaving the school; according to the direction change of the motion trajectory, it is determined which direction the user moves along the door; and according to the stay time of the user in the door area, the stay time is calculated.
[0079] In the above, in the present embodiment, the state matrix is introduced, so that each state change of the user at the attendance door can be accurately recorded and quantified. This not only helps to master the dynamic of the user in real time, but also can deeply mine the historical data, for example, analyzes the stay behavior mode of the user at the door, and provides data support for optimizing the attendance process. In addition, by setting reasonable state sensing frequency threshold and stay time threshold, abnormal situations can be found in time.
[0080] In some embodiments, the step of determining the state queue according to the motion trajectory can specifically include: The time and data state of the tag are obtained from the state queue in sequence; if the data state obtained from the state queue is inconsistent with the state type of the latest column in the state matrix, a new column is added in the state matrix to record the new state information; if the data state obtained from the state queue is consistent with the state type of the latest column in the state matrix, the sensing frequency of the state is updated.
[0081] In the present embodiment, the time and data state of the tag are obtained from the state queue in sequence. The state queue is an ordered data structure which contains the state information of the tag at different time points. For example, the state queue can contain multiple elements, each element corresponding to a time point and a data state.
[0082] If the data state obtained from the state queue is inconsistent with the state type of the latest column in the state matrix, a new column is added in the state matrix to record the new state information. For example, the state type of the latest column in the state matrix is "enter the door", and the data state obtained from the state queue is "leave the door", a new column is added in the state matrix to record the "leave the door" state and the corresponding time information.
[0083] If the data state obtained in the state queue is consistent with the state type of the latest column in the state matrix, the sensing frequency of the state is updated. For example, the state type of the latest column in the state matrix is “entering the doorway”, and the state sensing frequency is 1. When the “entering the doorway” state is obtained again in the state queue, the state sensing frequency is updated to 2.
[0084] The processed state matrix can more accurately record the state change of the user at the attendance doorway, including the state type, the time when the state occurs, and the number of state sensing, etc. These information can be used for further analysis of the user's access behavior, such as determining whether the user repeatedly enters and exits the doorway, the stay time, etc.
[0085] The embodiment can accurately record each state change of the user at the attendance doorway, including different states such as entering and leaving, as well as the time when each state occurs and the sensing frequency, by comparing the state type of the state queue and the state matrix. The updating and maintenance method of the state matrix makes the data management more efficient. The operation of adding a new column to record the new state and updating the sensing frequency is simple and clear, which is convenient for subsequent data query and analysis.
[0086] In order to further illustrate the access attendance doorway state recognition method provided by the embodiment of the present application, the following will be further described in combination with the access school attendance scene of the smart campus. The embodiment will be described from three parts of scene modeling, student belonging area judgment, and access school direction state judgment: 1. Access school scene modeling In a plurality of schools without induction attendance, the design styles of the school gates of each school are different, and the positions and speeds of the students accessing the school are also different.
[0087] Please refer to Figure 3 , Figure 3 is a schematic diagram of the setting mode of each school gate provided by the embodiment of the present application.
[0088] The students access the school through the school gate, Figure 3 (a) in the figure is a common school gate; Figure 3 (b) in the figure is usually a side door of the school, and there are two faces of the school outside environment; Figure 3 (c) in the figure is a channel type school gate, and the walls on both sides of the channel block the students from entering the school through the channel. The common elements related to the scene are extracted, and each school has a school gate (i.e. the attendance gate mentioned above), and the students enter the school through the school gate.
[0089] In the student access school scene, it is not necessary to pay attention to the specific coordinates of each student, but only to pay attention to whether the student is outside or inside the school gate, and the position coordinates relative to the school gate can be used to determine whether the student is inside or outside the school. On this basis, it is also necessary to pay attention to the displacement of the student in a period of time to determine the access direction of the student.
[0090] Please refer to Figures 4-5 , Figure 4 is a schematic diagram of two reader installation positions and monitoring areas provided by the embodiment of the application, Figure 5 is a schematic diagram of a relative coordinate system provided by the embodiment of the application.
[0091] Based on the characteristics of the school gate and the key points of the scene concerned, a coordinate system can be established based on the school gate. First, the first reader R1 and the second reader R2 are installed on the two sides of the school gate along the width direction of the school gate, and the distance between the first reader R1 and the second reader R2 can be measured as DR when installation.
[0092] Wherein A is the monitored school area, for example, including position points A1, A2, A3 and A4. C is the monitored school area, for example, including position points C1 and C2. The first reader R1 and the second reader R2 can be RFID readers.
[0093] A relative coordinate system based on the school gate is established, taking the direction of the width of the school gate as the x-axis, and the direction perpendicular to the width of the school gate as the y-axis, taking R1 as the origin (0, 0), R2 as (0, DR), and P as the position of the tag.
[0094] 2、Student area judgment Based on the coordinate system generated by the above scene modeling, the area to which a coordinate point belongs at a certain time can be judged. The RFID reader sends and receives signals, can sense the tag in the electronic student card, receives the information in the tag, and in the method of positioning by using RFID technology, the signal arrival time positioning method can be used to calculate the distance between the tag and the reader through the time difference.
[0095] Please refer to Figure 6 , Figure 6 is a flowchart for judging whether the tag is in the school or not provided by the embodiment of the application. Specifically, it can include the following steps: Step one: determine the maximum angle in the school range: according to the position of the school gate, the boundary tag of the school judgment area is pre-set, and the maximum angle in the school range is determined according to the boundary position .
[0096] Step two: calculate the tag bit quantity information: calculate the angle of the student tag position P based on the coordinate system.
[0097] Calculate whether the position information in the queue exceeds the maximum angle in the school, if yes, execute step three, if not, execute step four.
[0098] Step three: determine that the current tag position is outside the school, and then execute step five.
[0099] Step four: determine whether in school according to the boundary: further determine whether in school according to the boundary position determined by the preset label of the school gate, and then execute step five.
[0100] Step five: store position information: obtain time, angle, calculated coordinate position, and state information, and store key information into the cache queue.
[0101] In the embodiment, the boundary label of the school judgment area is preset according to the position of the school gate, and the maximum angle in the school range is determined according to the boundary position . Since the campus buildings of each school are different, the boundaries of the buildings of each school are not uniform and fixed, and for the building characteristics of different schools, the label can be preset at the boundary position of the school, the angle from the origin to the preset label is calculated, and the maximum angle in the school is determined .
[0102] Please refer to Figure 7 , Figure 7 , which is a schematic diagram of the maximum angle in different school gates provided by the embodiment of the present application.
[0103] As shown in Figure 7 (a), if the school gate is large, the maximum angle may be 180°. As shown in Figure 7 (b), if it is a channel type school, the maximum angle is only 90°, and the label is usually set at the edge side position point closest to the campus that the student can reach after entering the school, and the maximum angle reached by the edge path to the origin is taken, and the angle is .
[0104] Please refer to Figure 8 , Figure 8 , which is a schematic diagram of the relative position of two readers and labels provided by the embodiment of the present application.
[0105] Suppose the position of the target student label is P, the distances between the target student label P and the first reader R1 and the second reader R2 are D1 and D2 respectively, and according to the angle of arrival method (AOA), the direction angle of P can be calculated.
[0106] Wherein, D1 is the distance between the first reader R1 and the target student label P, D2 is the distance between the second reader R2 and the target student label P, DR is the distance between the first reader R1 and the second reader R2, is the angle between the first reader R1 and the target student label P, is the angle between the second reader R2 and the target student label P.
[0107] The second reader R2 can be used for auxiliary positioning, when the angle is not in (0, ) range, it can be determined that it is outside the school, and whether it is inside the school also needs to be further judged in combination with the boundary. When the position is near the boundary inside the school, the position far from the origin may be outside the school, so when the first angle is in the school range, the distance between the position and the origin is further judged. - The range of about 45° needs further judgment of whether it is inside the school.
[0108] It should be noted that in the present embodiment, the preset difference threshold is 45°, because it is judged by experience that 45° is already a range with a large deviation from the maximum angle, and according to the characteristics of the building, the corner is usually 90°, and half of it is used for judgment. In actual scenarios, the value can be adjusted by the building conditions of different schools.
[0109] Due to the limited area of some schools due to reasons such as land area, the area inside the school cannot be determined only by the angle, and after the angle is in the school range, the boundary is further judged.
[0110] Please refer to Figure 9 , Figure 9 is a schematic diagram of the student coordinates and the school range provided by the present embodiment.
[0111] Among them, the first reader R1 and the second reader R2 are installed on both sides of the school gate along the width direction of the school gate, and P1 and P2 are different position points obtained through the tag. It can be seen that although the position points P1 and P2 have the same first angle with the first reader R1, due to the boundary of the school land, the position point P1 is inside the school, and the position point P2 is essentially outside the school.
[0112] After the angle is in the school range, the boundary is further judged, and the specific method is as follows: the boundary coordinate points (square points) in the RFID sensing range are obtained by pre-setting the tag, the coordinate points of each boundary point are obtained, and whether the current motion coordinates are in the boundary is calculated, that is, whether it is inside the school.
[0113] When entering and leaving the school, the entering and leaving the school is judged according to the motion trajectory of the student, and the trajectory coordinate points in a certain time range can also be recorded. The walking speed of young people is about 1.5m / s, and the short-distance running speed can reach 8~9m / s. The non-inductive attendance adopts microwave, and its coverage range can reach 100m, and the range of entering and leaving the school is according to the actual size of the school, and the motion trajectory within 12 meters, so at least the displacement points within a certain time are collected for calculation. The information of each displacement point i can include the collection time , coordinate , first angle . Based on the collection time , coordinate , first angle The state can be calculated , the key information is stored into the bidirectional cache queue with the unique identification of the tag as the key, the single node element in the queue includes 、 .
[0114] When approaching the late time, the student enters the school at a high speed, according to the running speed, within 1000 ms, the fastest can move 9 m. Therefore, multiple displacement points need to be selected for judgment.
[0115] Please refer to Figure 10 , Figure 10 is the flowchart of the in-and-out school scene judgment provided by the embodiment of the application. Specifically, it can include the following steps: Step one: initialize a 3-row n-column matrix.
[0116] Initialize a 3-row n-column matrix, as follows: ; Among them, is the time of taking a state for the first time, is the state, is the number of times the state is sensed.
[0117] Step two: sequentially obtain data from the queue.
[0118] Determine whether the data is complete, if so, execute step five; if not, determine whether the data is consistent with the state of the last column of data in the matrix. If the data is consistent with the state of the last column of data in the matrix, execute step three, if the data is not consistent with the state of the last column of data in the matrix, execute step four.
[0119] Specifically, the time and state data of the tag are sequentially obtained from the queue, if the data in the queue is empty, end, go to step five; if the data state in the queue is not empty, continue to determine whether it is consistent with the state of the latest column in the matrix. If the state is consistent, go to step three, if the state is not consistent, execute step four.
[0120] Step three: modify the value of the last column in the matrix , then return to step two.
[0121] If the data state obtained from the queue is consistent with the state of the latest column in the matrix, modify to .
[0122] Step four: add a column in the matrix, wherein 、 is consistent with the data, the initial value is 1.
[0123] If the data state obtained in the queue is inconsistent with the state of the latest column in the matrix, a new column is added in the matrix, wherein the time , state is consistent with the queue data, The initial value is 1.
[0124] Step five: complete data analysis, and generate a state matrix.
[0125] The data in the queue is analyzed to generate a student state matrix.
[0126] Step six: determine the state trajectory at different times according to the state matrix.
[0127] According to the matrix, the time of loitering at the school gate can be calculated , combined with the position state , the position trajectory of the student in each time period can be generated. And the trajectory state calls the system short message, notification function and timely informs the parents.
[0128] The above is a technical solution for judging the student's school, including modeling, pre-labeling, angle-based, boundary-based judgment method, trajectory judgment method based on collected position information, and finally comprehensive accurate judgment of the student's school state and direction.
[0129] Parents are concerned about whether their children leave home on time and when they leave school after school. Using the technical solution of the present application, the student's school, school, and loitering can be monitored. When the non-inductive attendance detects the student's school, the parent will be notified by short message that the student's school time and the loitering near the school.
[0130] The related technical solution is for a school, which will install two readers at the school gate, respectively on the inside and outside of the school. When entering the school from outside the school, the reader outside the school will first sense it, and the reader inside the school will sense it after entering the school, so it is judged that the student enters the school, and vice versa. However, in actual situations, the readers are usually installed on the same side and there is no shielding between them, so the signal influence between the two readers cannot be isolated, resulting in incorrect school and school judgment.
[0131] The application embodiment based on RFID technology in the application of the intelligent campus school scene, proposes a general solution based on the school problem, which contains the school coordinate model established according to the common characteristics of the school, based on the coordinate model, according to the angle, position information, pre-labeling and other factors, the region and the movement direction are judged, and finally the school situation is determined.
[0132] The embodiment proposes a general solution based on the in-out school judgment. RFID readers are arranged on the left and right sides of the school gate, corresponding to R1 and R2 respectively. When installed, the distance between R1 and R2 is measured as DR. A coordinate system is established, with the direction of the school gate as the x-axis and the direction perpendicular to the school gate as the y-axis. R1 is the origin (0, 0) and R2 is (0, DR). The boundary tags of the in-school judgment area are pre-set according to the position of the school gate. The maximum angle in the in-school range is determined according to the boundary position. For the corresponding tag P of the student, the distances of P from R1 and R2 are D1 and D2 respectively through R1 and R2 sensing. Based on the angle of arrival (AOA) method, the direction angle of P is calculated as , the angle between the reader R1 and P. When the angle of P is not within the range of (0, ), it can be determined that P is outside the school, and within the range, it can be determined that P is in the school.
[0133] Based on the construction characteristics of the school and the in-out school scene, a coordinate model for in-out school based on the scene is established. The in-out school state can be calculated and the range can be determined based on the model. Based on the coordinate model, a calculation method of the angle in the school combined with the boundary area is proposed. In combination with different school gate environments, the angle range near the school gate is set. When the AOA reaches the angle range near the school gate, the in-school or out-of-school can be further determined in combination with the trajectory of the tag P.
[0134] According to the collected in-out school coordinates, time and other data, the calculation and judgment method of the in-school state, frequency and motion trajectory is proposed. The state matrix is constructed. According to the state matrix, the in-out school state and in-out school trajectory and school gate lingering situation are finally determined, and safety prompting and control are carried out accordingly.
[0135] The application also provides a state recognition device for an in-out attendance gate. The state recognition device for an in-out attendance gate provided by the application is described below. The state recognition device for an in-out attendance gate described below can be mutually corresponding and referenced with the state recognition method for an in-out attendance gate described above.
[0136] Please refer to Figure 11 , Figure 11 is a structural schematic diagram of the state recognition device for an in-out attendance gate provided by the embodiment of the application. In the embodiment, the structure of the state recognition device for an in-out attendance gate can include a tag signal data module 1110, a first angle module 1120 and an in-out state module 1130.
[0137] The tag signal data module 1110 is used to acquire the signal data of the tag worn by the user relative to the first reader and the second reader, and to determine the position coordinates of the tag in the relative coordinate system according to the signal data.
[0138] wherein the relative coordinate system is determined based on a position relationship of the first reader, the second reader and the attendance gate, the first reader is disposed at a first side along a transverse direction of the attendance gate, and the second reader is disposed at a second side along the transverse direction of the attendance gate.
[0139] The first angle module 1120 is configured to determine a first angle between the tag and the first reader according to the position coordinates.
[0140] The access state module 1130 is configured to determine an access state of the user relative to the attendance gate according to a comparison result of the first angle and the preset angle threshold.
[0141] Optionally, the preset angle threshold is a maximum angle of an internal range of the attendance gate.
[0142] In some embodiments, the access state module 1130 is specifically configured to determine that the user is outside the attendance gate when the first angle is greater than the preset angle threshold.
[0143] In some embodiments, the access state module 1130 is specifically configured to determine that the user is inside the attendance gate when the first angle is less than or equal to the preset angle threshold.
[0144] In some embodiments, the access state module 1130 is specifically configured to determine a difference between the first angle and the preset angle threshold when the first angle is less than or equal to the preset angle threshold, and determine the access state of the user relative to the attendance gate according to the difference and a boundary of the internal range of the attendance gate.
[0145] In some embodiments, the state recognition device for accessing the attendance gate further comprises a motion trajectory analysis module, which can be specifically configured to determine a motion trajectory of the tag in the relative coordinate system according to the signal data, and determine any one or more combinations of the access state, the direction and the loitering time of the user relative to the attendance gate according to the motion trajectory.
[0146] In some embodiments, the motion trajectory analysis module can be specifically configured to initialize a state matrix, the state matrix being used to record a time of a state, a state type and a state sensing number; determine a state queue according to the motion trajectory; process the state matrix based on the state queue to obtain a target state matrix; and determine any one or more combinations of the access state, the direction and the loitering time of the user relative to the attendance gate based on the target state trajectory.
[0147] In some embodiments, the motion trajectory analysis module can be specifically configured to: sequentially obtain the time and data state of the tag from the state queue; if the data state obtained from the state queue is inconsistent with the state type of the latest column in the state matrix, a new column is added to the state matrix to record the new state information; if the data state obtained from the state queue is consistent with the state type of the latest column in the state matrix, the sensing frequency of the state is updated.
[0148] In another aspect, the embodiments of the present application also provide an electronic device, please refer to Figure 12 , Figure 12 is the schematic diagram of the physical structure of the electronic device provided by the embodiments of the present application, as shown in Figure 12 , the electronic device can include a memory 1220, a processor 1210, and a computer program stored in the memory 1220 and executable on the processor 1210. The processor 1210 can implement the state recognition method of the access control entrance when executing the program, and the method can include: obtaining the signal data of the tag worn by the user relative to the first reader and the second reader, and determining the position coordinates of the tag in the relative coordinate system according to the signal data; wherein the relative coordinate system is determined based on the positional relationship of the first reader, the second reader and the access control entrance, the first reader is disposed on the first side along the transverse direction of the access control entrance, and the second reader is disposed on the second side along the transverse direction of the access control entrance; determining the first angle between the tag and the first reader according to the position coordinates; determining the access state of the user relative to the access control entrance according to the comparison result of the first angle and the preset angle threshold.
[0149] Optionally, the electronic device can also include a communication bus 1230 and a communication interface 1240, wherein the processor 1210, the communication interface 1240, and the memory 1220 can complete mutual communication through the communication bus 1230. The processor 1210 can call the computer program in the memory 1220 to execute the state recognition method of the access control entrance provided by the above-mentioned methods.
[0150] In addition, the logic instructions in the memory 1220 described above can be implemented in the form of a software function unit and sold or used as an independent product, and can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the parts that contribute to the prior art or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0151] In another aspect, the present application also provides a computer program product, which comprises a computer program, the computer program can be stored on a non-transitory computer readable storage medium, and the computer program can be executed by a processor to enable a computer to execute the state recognition method of the access control entrance provided by the above-mentioned methods, the steps and principles of which have been described in detail in the above-mentioned methods, and will not be repeated here.
[0152] In another aspect, the present application also provides a non-transitory computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the state recognition method of the access control entrance provided by the above-mentioned methods, the steps and principles of which have been described in detail in the above-mentioned methods, and will not be repeated here.
[0153] The non-transitory computer readable storage medium can be any available medium or data storage device accessible by the processor, including but not limited to magnetic storage (such as floppy disk, hard disk, magnetic tape, magneto-optical disk (MO), etc.), optical storage (such as CD, DVD, BD, HVD, etc.), and semiconductor memory (such as ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid state disk (SSD), etc.).
[0154] The device embodiments described above are only schematic, wherein the units described as separate components can or can not be physically separated, and the components displayed as units can or can not be physical units, that is, they can be located in one place, or distributed on multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the present embodiment. Those skilled in the art can understand and implement without creative labor.
[0155] Those skilled in the art can clearly understand the implementation of the various embodiments by means of software and the necessary general hardware platform from the above description of the embodiments, and of course, the embodiments can also be implemented by hardware. Based on such understanding, the above technical solutions, essentially or in other words, the part of the prior art that contributes to the technical solutions can be embodied in the form of a software product. The computer software product can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, and the like, and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0156] Finally, it should be noted that: the above examples are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing examples, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing examples, or make equivalent replacement for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for recognizing a state of an access attendance gate, characterized by, The method comprises: acquiring signal data of a tag worn by a user relative to a first reader and a second reader, and determining a position coordinate of the tag in a relative coordinate system based on the signal data; wherein the relative coordinate system is determined based on a positional relationship of the first reader, the second reader and an attendance gate, the first reader is disposed on a first side transverse to the attendance gate, and the second reader is disposed on a second side transverse to the attendance gate; determining a first angle between the tag and the first reader based on the position coordinate; determining an entry / exit state of the user relative to the attendance gate based on a comparison result of the first angle and a preset angle threshold.
2. The method of claim 1, wherein The determining of the entry / exit state of the user relative to the attendance gate based on the comparison result of the first angle and the preset angle threshold comprises: when the first angle is greater than the preset angle threshold, determining that the user is outside the attendance gate.
3. The method of claim 1, wherein The determining of the entry / exit state of the user relative to the attendance gate based on the comparison result of the first angle and the preset angle threshold comprises: when the first angle is less than or equal to the preset angle threshold, determining that the user is inside the attendance gate.
4. The method of claim 1, wherein The determining of the entry / exit state of the user relative to the attendance gate based on the comparison result of the first angle and the preset angle threshold comprises: when the first angle is less than or equal to the preset angle threshold, determining a difference between the first angle and the preset angle threshold; determining the entry / exit state of the user relative to the attendance gate based on the difference and a boundary of an internal range of the attendance gate.
5. The method of claim 1, wherein The method further comprises: determining a motion trajectory of the tag in the relative coordinate system based on the signal data; determining any one or more combinations of an entry / exit state, a direction and a stay time of the user relative to the attendance gate based on the motion trajectory.
6. The access control gate state recognition method according to claim 5, wherein The determining of any one or more combinations of the entry / exit state, the direction and the stay time of the user relative to the attendance gate based on the motion trajectory comprises: initializing a state matrix, the state matrix being used to record a time of a state, a state type and a state sensing number; determining a state queue based on the motion trajectory; processing the state matrix based on the state queue to obtain a target state matrix; determining any one or more combinations of the entry / exit state, the direction and the stay time of the user relative to the attendance gate based on the target state trajectory.
7. The access control gate state recognition method according to claim 6, wherein The determining of the state queue based on the motion trajectory comprises: sequentially acquiring a time and a data state of the tag from the state queue; if the data state acquired from the state queue is inconsistent with a state type of a latest column in the state matrix, adding a new column in the state matrix to record new state information; if the data state acquired from the state queue is consistent with the state type of the latest column in the state matrix, updating the sensing number of the state.
8. A status recognition device for entering and exiting an attendance gate, characterized in that, The method comprises: A tag signal data module is configured to acquire signal data of a tag worn by a user relative to a first reader and a second reader, and determine position coordinates of the tag in a relative coordinate system based on the signal data; wherein the relative coordinate system is determined based on a positional relationship among the first reader, the second reader and an attendance doorway, the first reader is disposed on a first side along a transverse direction of the attendance doorway, and the second reader is disposed on a second side along the transverse direction of the attendance doorway; A first angle module is configured to determine a first angle between the tag and the first reader based on the position coordinates; An entry / exit state module is configured to determine an entry / exit state of the user relative to the attendance doorway based on a comparison result of the first angle and a preset angle threshold.
9. An electronic device comprising a memory, a processor, and a computer program stored on the memory and running on the processor, characterized in that, The processor executes the computer program to implement the state recognition method of the attendance doorway according to any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the state recognition method of the attendance doorway according to any one of claims 1 to 7.
11. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the state recognition method of the attendance doorway according to any one of claims 1 to 7.