An Employee Identification and Filtering Method for Customer Flow Statistics in Commercial Venues
By utilizing the frequency of customer traffic during and outside working hours and the number of days meeting the target within a periodic window in the customer traffic statistics of commercial venues, combined with multi-condition judgment and database transaction processing, the problem of misjudgment by employee terminals was solved, and the accuracy and consistency of customer traffic statistics were improved.
Patent Information
- Application Number
- CN202611286847.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-24
- Publication Date
- 2026-11-17
AI Technical Summary
In customer flow statistics in commercial venues, the repeated appearance of employee terminals leads to deviations in customer numbers, repeat visit rates, dwell time, and heat map results. Furthermore, dwell records that cross the statistical day boundary affect the first appearance time and single-day span, making it difficult for existing methods to accurately identify and filter employee terminals.
By statistically analyzing the frequency, percentage, and daily span of terminal occurrences during working and non-working hours, combined with the number of days meeting the standards within different periodic windows, multi-condition judgment and database transaction processing are used to generate employee identification results, which are then filtered in passenger flow processing.
It improved the accuracy of passenger flow statistics, reduced misjudgments by employee terminals, maintained consistency in employee identification status, and ensured the accuracy of passenger flow filtering.
Smart Images

Figure CN123118142A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of commercial venue terminal dwell behavior analysis and customer flow data processing technology, specifically involving an employee identification and filtering method based on venue-level daily behavior statistics, different length period window determination, employee daily record maintenance, and employee removal before statistics. Background Technology
[0002] Shopping malls, stores, and commercial complexes can use terminal detection or positioning devices to collect terminal identifiers, appearance times, and dwell areas, and calculate indicators such as total number of customers, new customers, returning customers, dwell time, and heat maps based on the collected results.
[0003] The terminals carried by employees appear repeatedly during working hours and exhibit a relatively stable pattern of appearance across multiple statistical days. If employee terminals are included in the statistics as customer terminals, it will cause deviations in the number of customers, repeat visit rate, dwell time, and heat map results.
[0004] Identifying employees based solely on a single occurrence or a single daily threshold can easily lead to misclassification of short-term customers, fixed terminals that appear continuously throughout the day, and other abnormal terminals. Furthermore, failure to truncate records of visits spanning statistical day boundaries can also affect the time of first occurrence, the time of last occurrence, and the duration of the visit within a single day.
[0005] Furthermore, employee identification results need to be consistent across the master employee record, daily employee appearance records, cache status, and passenger flow filtering links. Therefore, a method is needed that can generate daily statistics based on target locations, identify employees using windows of varying lengths, maintain unique records for each day, and filter and activate employees based on target location identifiers during passenger flow processing. Summary of the Invention
[0006] The main objective of this invention is to provide an employee identification and filtering method for customer flow statistics in commercial establishments. By analyzing the frequency, percentage, and daily range of occurrence of statistical terminals during working and non-working hours, and combining this with the number of days meeting the target within different periodic windows, employee terminals can be identified, thereby excluding them from customer flow statistics and improving the accuracy of customer flow statistics results.
[0007] To achieve the above objectives, this invention provides a method for employee identification and filtering in commercial venues for customer flow statistics, characterized by the following steps: Step S1: Query the terminal stay records that intersect with the target statistics window according to the target statistics window, and read the terminal identifier, start time, end time, total stay time and target location identifier; Step S2: Determine the effective start time of the stay record as the later of the original start time and the statistical window start time, and determine the effective end time as the earlier of the original end time and the statistical window end boundary; form an identification dimension according to the target location identifier and the processed terminal identifier; Step S3: Accumulate the total number of records, the number of records during working hours, the number of records during non-working hours, and the total number of seconds spent according to the identification dimensions, and maintain the earliest valid start time and the latest valid end time; calculate the proportion of records during working hours, the proportion of records during non-working hours, and the span of occurrence in a single day; Step S4: Load the venue-level employee identification configuration corresponding to the target venue identifier. If no valid venue configuration is obtained, use the default configuration. When the percentage of records during working hours, the percentage of records during non-working hours, the number of records during working hours, and the span of records occurring in a single day all meet the venue-level employee identification configuration, mark the identification dimension as meeting the standard for the day. Step S5: Count the number of days that meet the target in the first period window and the second period window that is longer than the first period window respectively; when the number of days that meet the target in either period window reaches the corresponding threshold, the employee identification result is formed, and the first period rule, the second period rule or the dual period rule is determined according to the hit combination of the two period windows. Step S6: Create or update the employee master record and employee daily appearance record based on the employee identification results. Only one employee daily appearance record is retained for the same employee and the same record date, and the earliest first appearance time and the latest last appearance time are merged. Step S7: In the database transaction, create or update the employee master record and the employee daily appearance record in batches. After the database transaction is successful, update the final target cache. When processing passenger flow, load the set of employee terminals in the enabled state according to the target location identifier. Determine whether the terminal to be processed belongs to an employee based on the target location identifier and terminal identifier corresponding to the terminal to be processed, and perform employee removal or employee number statistics.
[0008] As a further preferred technical solution of the above technical solution, in step S4, when the proportion of records during working hours is not lower than the threshold of the proportion of records during working hours, the proportion of records during non-working hours is not higher than the upper limit of the proportion of records during non-working hours, the number of records during working hours reaches the minimum number of times, and the span of records occurring in a single day is within the allowable range, the identification dimension is marked as meeting the standard for that day. Furthermore, the daily statistics for all identified dimensions are written to a cache record that is distinguished by the statistical date and has an expiration time; when the same statistical date is reprocessed, the old statistical record for that date is cleared first and then the recalculated statistical result is written.
[0009] As a further preferred technical solution to the above technical solution, the effective end time for the daily statistics does not exceed the last second before the end boundary of the statistical window; when the original end time of the terminal dwell record is earlier than the original start time, or the effective end time after truncation is earlier than the effective start time, the terminal dwell record is filtered.
[0010] As a further preferred technical solution to the above technical solution, in step S4, the venue-level employee identification configuration includes the start position of the work period, the end position of the work period, the threshold for the proportion of work period records, the upper limit for the proportion of non-work period records, the minimum number of records for the work period, the threshold for the number of days meeting the standard in the first cycle, the threshold for the number of days meeting the standard in the second cycle, the minimum occurrence span in a single day, and the maximum occurrence span in a single day; when the configuration value is missing, the type is incorrect, or exceeds the allowed range, the default value is used.
[0011] As a further preferred technical solution to the above technical solution, in step S3, the working time period includes normal intraday time period, cross-midnight time period, or cross-day time period expressed as the next day's hour plus 24; the terminal dwell record is determined to be a working time period record or a non-working time period record based on the hour corresponding to the valid start time.
[0012] As a further preferred technical solution of the above technical solution, in step S5, the first period window is seven days and the second period window is thirty days; the default employee identification configuration has a working period percentage threshold of 0.5, a non-working period percentage upper limit of 0.2, a minimum number of working period records of 6, a first period compliance day threshold of 4, a second period compliance day threshold of 15, a minimum daily occurrence span of 2 hours and a maximum daily occurrence span of 14 hours.
[0013] As a further preferred technical solution of the above technical solution, in step S5, the first cycle rule is determined only when the number of days meeting the standard in the first cycle window reaches the threshold for the number of days meeting the standard in the first cycle; the second cycle rule is determined only when the number of days meeting the standard in the second cycle window reaches the threshold for the number of days meeting the standard in the second cycle; and the dual cycle rule is determined when both cycle windows reach the corresponding threshold.
[0014] As a further preferred technical solution of the above technical solution, in step S6, the daily occurrence record of the employee constitutes a joint unique constraint with the employee and the record date; when the same employee repeatedly appears on the same record date, the earlier of the existing first occurrence time and the newly added first occurrence time is taken as the merged first occurrence time, and the later of the existing last occurrence time and the newly added last occurrence time is taken as the merged last occurrence time.
[0015] As a further preferred technical solution to the above technical solution, in step S7, the employee master record and the employee daily appearance record are created or updated in the same database transaction; after new employees are inserted in batches, the employee primary key is queried again according to the terminal identifier, and then the employee daily appearance record is created again. The final achievement cache is updated after a database transaction succeeds, and is not updated if the database transaction fails. The final achievement cache stores the last achievement date. When the last achievement date is equal to the current statistical date, the cumulative achievement count remains unchanged; otherwise, the cumulative achievement count is increased by one.
[0016] As a further preferred technical solution of the above technical solution, in step S7, the passenger flow processing component writes the employee terminals in the enabled state in the employee master record into the employee set according to the target location identifier at a predetermined refresh interval, determines whether the terminal to be processed belongs to an employee based on the target location identifier and the terminal identifier corresponding to the terminal to be processed, and excludes the terminal to be processed from the customer flow statistics if it belongs to an employee; the target location identifier includes at least one of the following: building identifier, brand identifier, store identifier, or pre-divided commercial statistical area identifier.
[0017] The beneficial effects of this invention are as follows: First, by using intersection queries and statistical window truncation, the dwell records that cross the statistical day boundary are restricted to the target statistical window, which can improve the accuracy of cross-day record boundaries such as first occurrence time, last occurrence time, and single-day span.
[0018] Second, by simultaneously meeting multiple conditions on a single day (percentage of working hours, percentage of non-working hours, number of records during working hours, and span of occurrences on a single day) to determine whether the target has been met, and by combining the first and second period windows of different lengths to jointly count the number of days that have met the target, it is possible to avoid misjudgments caused by a single threshold on a single day and improve the stability of employee identification.
[0019] Third, by using the maximum daily occurrence span condition, we can reduce the number of abnormal terminals that continuously appear throughout the day from entering the employee list, and lower the probability of fixed terminals or other abnormal terminals being incorrectly classified as employees.
[0020] Fourth, by using the same-day unique record constraint, batch writing of database transactions, and updating the final qualified cache in the order of successful transactions, the consistency of employee identification status among the employee master record, the employee daily appearance record, and the cache can be maintained.
[0021] Fifth, by caching and enabling employee terminal sets according to target location identifiers, employee identification results can be directly involved in the passenger flow filtering process. During passenger flow processing, employee terminals are judged and removed according to location identifiers, thereby improving the accuracy of customer flow statistics results. Attached Figure Description
[0022] Figure 1 This is the overall flowchart of the employee identification and filtering method of the present invention.
[0023] Figure 2 This is a flowchart of the cross-day record truncation and identification dimension formation process of the present invention.
[0024] Figure 3 This is a flowchart of the daily behavior statistics and target determination process of this invention.
[0025] Figure 4 This is a flowchart of the employee determination process for the first and second cycle windows of this invention.
[0026] Figure 5 This is a flowchart of the employee master record and daily record maintenance process of the present invention.
[0027] Figure 6 This is a flowchart illustrating the connection between the database, final cache, and passenger flow filtering in this invention. Detailed Implementation
[0028] The following description is intended to disclose the present invention and enable those skilled in the art to implement it. The preferred embodiments described below are merely examples, and other obvious variations will occur to those skilled in the art. The basic principles of the invention defined in the following description can be applied to other embodiments, modifications, improvements, equivalents, and other technical solutions that do not depart from the spirit and scope of the invention.
[0029] In the preferred embodiments of the present invention, those skilled in the art should note that the commercial premises and other similar facilities involved in the present invention can be considered as prior art.
[0030] Preferred embodiment.
[0031] This invention discloses an employee identification and filtering method for customer flow statistics in commercial establishments, comprising the following steps: Step S1: Query the terminal stay records that intersect with the target statistics window according to the target statistics window, and read the terminal identifier, start time, end time, total stay time and target location identifier; remove leading and trailing whitespace and unify capitalization for the terminal identifier, and verify the target location identifier and timestamp.
[0032] It is worth noting that the target location in this invention refers to the statistical dimension of commercial venues used for terminal dwell behavior statistics and employee identification. The target location identifier is used to distinguish different commercial venue statistical dimensions, including building identifiers, brand identifiers, store identifiers, or pre-defined commercial statistical area identifiers. The following embodiments use buildings as target locations, and the venue-level employee identification configuration is correspondingly the building-level employee identification configuration, but this does not constitute a limitation on the type of target location.
[0033] like Figure 1 As shown, this embodiment uses a building as the target location and sequentially performs the following steps: stay record query, time boundary processing, building-level daily statistics, daily target determination, first cycle window and second cycle window determination, employee record writing, and passenger flow filtering.
[0034] The system receives the start and end timestamps of the target statistics window and converts the start timestamp into a statistics date. In this embodiment, the target location identifier is the building identifier; the daily statistics cache key consists of a fixed prefix and the statistics date; and the employee identification dimension key consists of the target location identifier and the terminal identifier after removing leading and trailing spaces and unifying them to lowercase.
[0035] Step S2: Determine the effective start time of the stay record as the later of the original start time and the statistical window start time, and determine the effective end time as the earlier of the original end time and the statistical window end boundary; form an identification dimension according to the target location identifier and the processed terminal identifier; the statistical date is determined by the daily statistical record corresponding to the target statistical window. The conditions for querying the terminal stay record include: the original start time is earlier than the statistical window end time, and the original end time is not earlier than the statistical window start time.
[0036] It is worth mentioning that, such as Figure 2 As shown, the query conditions for historical stay data are that the original start time is earlier than the end time of the statistical window and the original end time is not earlier than the start time of the statistical window. The query fields include terminal identifier, start time, end time, total stay time, and target location identifier; in this embodiment, the target location identifier is a building identifier.
[0037] The effective start time is the later of the original start time and the start time of the statistical window. The effective end time for daily employee records must not exceed the last second before the end boundary of the statistical window; the end position for accumulating total dwell seconds must not exceed the end time of the statistical window. Cross-day records that only touch the left boundary of the statistical window and have no effective intersection are not included in the statistics.
[0038] The system filters records with empty terminal identifiers, invalid building identifiers, start times earlier than the minimum valid time, start times exceeding the allowed future delay range, end times earlier than the start time, and records that have no valid intersection with the statistics window; instantaneous records with end times equal to start times are allowed to participate in processing.
[0039] Step S3: Accumulate the total number of records, the number of records during working hours, the number of records during non-working hours, and the total number of seconds spent according to the identification dimensions, and maintain the earliest valid start time and the latest valid end time; calculate the proportion of records during working hours, the proportion of records during non-working hours, and the span of occurrence in a single day; like Figure 3As shown, under the same target location identifier and terminal identifier, the total number of records increases for each valid record read, and the number of records during working hours or non-working hours is increased according to whether the valid start time of the record is within the configured working hours. At the same time, the effective dwell time is accumulated, and the earliest valid start time and the latest valid end time are updated. In this embodiment, the target location identifier is a building identifier.
[0040] In step S3, the working hours include normal daytime hours, midnight hours, or daytime hours expressed as the next day's hour plus 24; the terminal dwell record is determined to be a working hour record or a non-working hour record based on the hour corresponding to the valid start time.
[0041] Step S4: Load the venue-level employee identification configuration corresponding to the target venue identifier. If no valid venue configuration is obtained, use the default configuration. When the percentage of records during working hours, the percentage of records during non-working hours, the number of records during working hours, and the span of records occurring in a single day all meet the venue-level employee identification configuration, mark the identification dimension as meeting the standard for the day. In step S4, when the proportion of records recorded during working hours is not lower than the working hours proportion threshold, the proportion of records recorded outside working hours is not higher than the non-working hours proportion upper limit, the number of records recorded during working hours reaches the minimum, and the daily span is within the allowable range, the identification dimension is marked as meeting the standard for that day. Specifically, the proportion of records recorded during working hours is equal to the number of records recorded during working hours divided by the total number of records, and the proportion of records recorded outside working hours is equal to the number of records recorded outside working hours divided by the total number of records; when the total number of records is zero, both proportions are zero. The daily span is equal to the difference between the latest valid end time and the earliest valid start time.
[0042] Furthermore, the daily statistics for all identified dimensions are written to a cache record that is distinguished by the statistical date and has an expiration time; when the same statistical date is reprocessed, the old statistical record for that date is cleared first and then the recalculated statistical result is written.
[0043] Specifically, the effective end time for the daily statistics does not exceed the last second before the end boundary of the statistics window; if the original end time of the terminal dwell record is earlier than the original start time, or the effective end time after truncation is earlier than the effective start time, the terminal dwell record is filtered.
[0044] More specifically, in step S4, the venue-level employee identification configuration includes the start position of the work period, the end position of the work period, the threshold for the percentage of records during the work period, the upper limit for the percentage of records during non-work periods, the minimum number of records during the work period, the threshold for the number of days meeting the standard in the first cycle, the threshold for the number of days meeting the standard in the second cycle, the minimum span of occurrence per day, and the maximum span of occurrence per day; default values are used when configuration values are missing, of incorrect type, or exceed the allowed range. In this embodiment, the venue-level configuration is a building-level configuration. The system performs type and range verification item by item, and uses default values for illegal parameters; when the upper and lower limits of the span are invalid, the default span is restored simultaneously.
[0045] Step S5: Count the number of days that meet the target in the first period window and the second period window that is longer than the first period window respectively; when the number of days that meet the target in either period window reaches the corresponding threshold, the employee identification result is formed, and the first period rule, the second period rule or the dual period rule is determined according to the hit combination of the two period windows. In step S5, the first period window is seven days, and the second period window is thirty days. The default employee identification configuration sets the following thresholds: working hours percentage threshold to 0.5, non-working hours percentage to 0.2, minimum number of working hours records to 6, first period target days threshold to 4, second period target days threshold to 15, minimum daily occurrence span to 2 hours, and maximum daily occurrence span to 14 hours. Only when the percentage, frequency, and span conditions are simultaneously met will the daily target marker be set to 1.
[0046] Daily statistics are written to a date-specific cache key using a hash structure, with a 35-day expiration time set to cover the second periodic window in this embodiment and allow for task delay. When the same statistical date is executed repeatedly, the original hash for that date is deleted first, and then all recalculated identification dimensions are written to avoid the situation where the original data has disappeared but the old fields are still retained.
[0047] like Figure 4As shown, in this embodiment, the system reads the daily statistics for the current statistical date and the six days prior, calculates the number of days marked as 1 within the first periodic window, and reads the daily statistics for the current statistical date and the twenty-nine days prior, calculates the number of days that meet the standard within the second periodic window. Employee processing begins when either periodic window reaches the corresponding threshold in the location-level configuration. The first periodic rule is determined only when the number of days meeting the standard in the first periodic window reaches the first periodic standard-reaching day threshold; the second periodic rule is determined only when the number of days meeting the standard in the second periodic window reaches the second periodic standard-reaching day threshold; and the dual-period rule is determined when both periodic windows reach their corresponding thresholds. In the data records of this embodiment, the first periodic rule, the second periodic rule, and the dual-period rule correspond to the seven-day rule, the thirty-day rule, and the dual rule, respectively. When the same terminal hits two different periodic rules in different target location identification dimensions, they are merged into a dual-period rule; in this embodiment, different target location identification dimensions correspond to different buildings.
[0048] Step S6: As Figure 5 As shown, employee master records and daily occurrence records are created or updated based on employee identification results. The maximum daily occurrence span is used to prevent abnormal terminals that continuously occur throughout the day from passing the daily rules. Only one daily occurrence record is retained for the same employee and the same record date, and the earliest first occurrence time and the latest last occurrence time are merged. In step S6, the daily occurrence records of employees form a joint unique constraint with the employee and the record date; when the same employee has the same record date repeatedly, the earlier of the existing first occurrence time and the newly added first occurrence time is used as the merged first occurrence time, and the later of the existing last occurrence time and the newly added last occurrence time is used as the merged last occurrence time.
[0049] It is worth mentioning that the terminal identifier in the employee master record has a unique constraint and stores the target location affiliation, automatic rule source, identification rule, and activation status; the target location affiliation can be represented by building identifier, brand identifier, or store identifier. When a new employee matches multiple buildings in the same batch, a deterministic building selection rule is used; existing employees supplement the building affiliation when a building is empty.
[0050] The daily employee record saves the employee reference, record date, first appearance time, last appearance time, source, and identification rule. The same employee and the same record date constitute a joint unique constraint. When the same date is matched multiple times, the earlier first appearance time is used, and the later last appearance time is used, and the identification rules are combined.
[0051] Step S7: In the database transaction, create or update the employee master record and the employee daily appearance record in batches. After the database transaction is successful, update the final target cache. When processing passenger flow, load the set of employee terminals in the enabled state according to the target location identifier. Determine whether the terminal to be processed belongs to an employee based on the target location identifier and terminal identifier corresponding to the terminal to be processed, and perform employee removal or employee number statistics.
[0052] In step S7, as Figure 6 As shown, the employee master record and the employee daily appearance record are created or updated in the same database transaction; after a new employee is inserted in batches, the employee primary key is queried again based on the terminal identifier, and then the employee daily appearance record is created; when the database write fails, the transaction is rolled back, and the final target cache update is canceled.
[0053] After a database transaction succeeds, the final achievement cache is updated, storing the cumulative number of achievements, the last achievement date, the hours of the first and last occurrences in history, the rule type, the number of achievement days in the first and second cycles, and the configuration used. If the last achievement date for the same identification dimension is already equal to the current statistical date, the cumulative achievement count is not incremented again. If a database transaction fails, the final achievement cache is not updated; the final achievement cache stores the last achievement date; when the last achievement date equals the current statistical date, the cumulative achievement count remains unchanged; otherwise, the cumulative achievement count is incremented by one.
[0054] In step S7, the customer flow processing component writes the employee terminals in the enabled state in the employee master record into the employee set according to the target location identifier at a predetermined refresh interval. It determines whether the terminal to be processed belongs to an employee based on the target location identifier and the terminal identifier corresponding to the terminal to be processed, and excludes the terminal to be processed from the customer flow statistics if it belongs to an employee. The target location identifier includes at least one of the following: building identifier, brand identifier, store identifier, or pre-divided commercial statistical area identifier.
[0055] Specifically, the customer flow filtering component reads activated employees from the employee master record at predetermined refresh intervals and establishes an employee set according to the target location identifier. In this embodiment, the commercial complex scenario uses building identifiers, and the store scenario uses brand identifiers. When processing terminals, it determines whether the terminal is an employee based on the employee set corresponding to the target location identifier, thereby excluding the employee from the customer processing link, or deduplicating employee terminals in a set manner.
[0056] It is worth mentioning that the technical features such as commercial premises involved in this patent application should be regarded as prior art. The specific structure, working principle, and possible control methods and spatial arrangement of these technical features can be adopted using conventional choices in the field, and should not be regarded as the inventive point of this patent. This patent will not be further elaborated in detail.
[0057] For those skilled in the art, modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this invention should be included within the protection scope of this invention.
Claims
1. A method for employee identification and filtering for business premises customer flow statistics, characterized by, Includes the following steps: Step S1: Query the terminal stay records that intersect with the target statistics window according to the target statistics window, and read the terminal identifier, start time, end time, total stay time and target location identifier; Step S2: Determine the effective start time of the stay record as the later of the original start time and the start time of the statistical window, and determine the effective end time as the earlier of the original end time and the end boundary of the statistical window; Identification dimensions are formed based on the target location identification and the processed terminal identification. Step S3: Accumulate the total number of records, the number of records during working hours, the number of records during non-working hours, and the total number of seconds spent according to the identification dimensions, and maintain the earliest valid start time and the latest valid end time; calculate the proportion of records during working hours, the proportion of records during non-working hours, and the span of occurrence in a single day; Step S4: Load the venue-level employee identification configuration corresponding to the target venue identifier. If no valid venue configuration is obtained, use the default configuration. When the percentage of records during working hours, the percentage of records during non-working hours, the number of records during working hours, and the span of records occurring in a single day all meet the venue-level employee identification configuration, mark the identification dimension as meeting the standard for the day. Step S5: Count the number of days that meet the target in the first period window and the second period window that is longer than the first period window respectively; when the number of days that meet the target in either period window reaches the corresponding threshold, the employee identification result is formed, and the first period rule, the second period rule or the dual period rule is determined according to the hit combination of the two period windows. Step S6: Create or update the employee master record and employee daily appearance record based on the employee identification results. Only one employee daily appearance record is retained for the same employee and the same record date, and the earliest first appearance time and the latest last appearance time are merged. Step S7: In a database transaction, create or update the employee master record and the employee's daily appearance record in batches. After the database transaction is successful, update the final target cache. When processing passenger flow, the set of employee terminals in the active state is loaded according to the target location identifier. Based on the target location identifier and terminal identifier corresponding to the terminal to be processed, it is determined whether the terminal to be processed belongs to an employee, and employee removal or employee count is performed.
2. The employee identification and filtering method for commercial site customer flow statistics according to claim 1, characterized in that, In step S4, when the proportion of records during working hours is not lower than the threshold for the proportion of records during working hours, the proportion of records during non-working hours is not higher than the upper limit for the proportion of records during non-working hours, the number of records during working hours reaches the minimum number of times, and the span of records occurring in a single day is within the allowable range, the identification dimension is marked as meeting the standard for that day. Furthermore, the daily statistics for all identified dimensions are written to a cache record that is distinguished by the statistical date and has an expiration time; when the same statistical date is reprocessed, the old statistical record for that date is cleared first and then the recalculated statistical result is written.
3. The employee identification and filtering method for commercial site customer flow statistics according to claim 2, characterized in that, The effective end time for the daily statistics does not exceed the last second before the end boundary of the statistics window; if the original end time of the terminal dwell record is earlier than the original start time, or the effective end time after truncation is earlier than the effective start time, the terminal dwell record is filtered.
4. The employee identification and filtering method for commercial site customer flow statistics according to claim 3, characterized in that, In step S4, the venue-level employee identification configuration includes the start position of the work period, the end position of the work period, the threshold for the proportion of work period records, the upper limit for the proportion of non-work period records, the minimum number of records for the work period, the threshold for the number of days meeting the standard in the first cycle, the threshold for the number of days meeting the standard in the second cycle, the minimum occurrence span in a single day, and the maximum occurrence span in a single day. Use the default value when the configuration value is missing, of the wrong type, or outside the allowed range.
5. The employee identification and filtering method for customer flow statistics in commercial venues according to claim 1, characterized in that, In step S3, the working hours include normal daytime hours, midnight hours, or daytime hours expressed as the next day's hour plus 24; the terminal dwell record is determined to be a working hour record or a non-working hour record based on the hour corresponding to the valid start time.
6. The employee identification and filtering method for customer flow statistics in commercial establishments according to claim 1, characterized in that, In step S5, the first period window is seven days and the second period window is thirty days; the default employee identification configuration has the following thresholds: working hours percentage threshold is 0.5, non-working hours percentage upper limit is 0.2, minimum number of working hours records is 6, first period compliance days threshold is 4, second period compliance days threshold is 15, minimum daily occurrence span is 2 hours and maximum daily occurrence span is 14 hours.
7. The employee identification and filtering method for customer flow statistics in commercial venues according to claim 6, characterized in that, In step S5, the first cycle rule is determined only when the number of days meeting the standard in the first cycle window reaches the threshold for the number of days meeting the standard in the first cycle; the second cycle rule is determined only when the number of days meeting the standard in the second cycle window reaches the threshold for the number of days meeting the standard in the second cycle; and the dual cycle rule is determined when both cycle windows reach their corresponding thresholds.
8. The employee identification and filtering method for customer flow statistics in commercial venues according to claim 1, characterized in that, In step S6, the daily occurrence records of employees form a joint unique constraint with the employee and the record date; when the same employee has the same record date repeatedly, the earlier of the existing first occurrence time and the newly added first occurrence time is used as the merged first occurrence time, and the later of the existing last occurrence time and the newly added last occurrence time is used as the merged last occurrence time.
9. The employee identification and filtering method for customer flow statistics in commercial establishments according to claim 8, characterized in that, In step S7, the employee master record and the employee daily appearance record are created or updated in the same database transaction; after new employees are inserted in batches, the employee primary key is queried again according to the terminal identifier, and then the employee daily appearance record is created again. The final compliant cache is updated after a database transaction succeeds; the final compliant cache is not updated if a database transaction fails. The final achievement cache stores the last achievement date; when the last achievement date is equal to the current statistical date, the cumulative achievement count remains unchanged; otherwise, the cumulative achievement count is increased by one.
10. The employee identification and filtering method for customer flow statistics in commercial establishments according to claim 9, characterized in that, In step S7, the passenger flow processing component writes the employee terminals in the enabled state in the employee master record into the employee set according to the target location identifier at a predetermined refresh interval. It determines whether the terminal to be processed belongs to an employee based on the target location identifier and terminal identifier corresponding to the terminal to be processed, and excludes the terminal to be processed from the customer flow statistics if it belongs to an employee. The target location signage includes at least one of the following: building signage, brand signage, store signage, or pre-defined commercial statistical area signage.
