Passenger flow staying duration calculation method, device, equipment and medium

By detecting the customer flow change records generated by the inspectors entering and leaving the store, the customer stay time is calculated in segments based on the timestamp, and the information security problem in the existing technology that relies on facial recognition to calculate the average stay time is solved, achieving an accurate and safe average Calculate the duration of stay.

CN119415819APending Publication Date: 2025-02-11SUZHOU WANDIANZHANG NETWORK TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411433282.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-14
Publication Date
2025-02-11

AI Technical Summary

Technical Problem

When calculating the average length of stay of customers, the prior art needs to rely on facial recognition technology, which has information security problems and is difficult to commercially apply.

Method used

By detecting the customer flow change records generated by the personnel when entering and leaving the store, the customer staying time is determined according to time segments based on the generation time stamp, and the total customer staying time and average staying time in the target time period are then calculated.

Benefits of technology

While ensuring customer privacy, the average length of stay for customers is accurately determined, which avoids information security issues in facial recognition technology and reduces the requirements of hardware equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119415819A_ABST
    Figure CN119415819A_ABST
Patent Text Reader

Abstract

The invention discloses a passenger flow staying duration calculation method and device, equipment and a medium. The method comprises the steps that a target time period input by a user is acquired; time segments in a target time period are determined based on a generation timestamp of a passenger flow change record, the passenger flow change record is a record generated when passenger flow change is detected, the passenger flow change comprises entering and leaving of people, and the passenger flow change record records the number of people entering and / or leaving; the time segment is a time segment determined by two adjacent generated timestamps; the total customer staying duration corresponding to the target time period is determined based on the customer staying duration of the time segment, the customer staying duration is determined by the number of staying customers of the time segment and the duration of the time segment, and the number of staying customers is determined based on the customer change record; and determining the average staying duration of the customers by using the total customer staying duration and the total number of people entering the store in the target time period. In this way, the average staying duration of the customer can be accurately determined under the condition that the privacy of the customer is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of customer behavior analysis, and in particular to a method, device, equipment and medium for calculating the duration of customer flow. Background Art

[0002] Average dwell time refers to the average time that all people stay in a specific place (such as a store, exhibition hall, etc.). It is an important customer behavior information, usually used to measure the average length of time people stay in a specific place, and is of great significance for managing and optimizing the operation of the place. In commercial scenarios, average dwell time can help decision makers understand customer behavior patterns and preferences, thereby optimizing product placement, promotional strategies, or improving service quality. For example, if the average dwell time in a store is short, it may be necessary to adjust the product display or improve the shopping experience to extend customer stay time and increase the likelihood of purchase.

[0003] At present, the traditional method of determining the average length of stay requires the use of facial recognition technology to determine and calculate the time each person spends entering and leaving the store. This solution has high requirements on facial recognition technology and algorithms, and facial recognition technology faces many information security issues, making it difficult to apply commercially. Summary of the invention

[0004] In view of this, the purpose of this application is to provide a method, device, equipment and medium for calculating the length of stay of customer flow, which can accurately determine the average length of stay of customers while protecting the privacy of customers. The specific scheme is as follows:

[0005] In a first aspect, the present application discloses a method for calculating the duration of passenger flow, including:

[0006] Get the target time period entered by the user;

[0007] Determine the time segment within the target time period based on the generation timestamp of the customer flow change record, wherein the customer flow change record is a record generated when a customer flow change is detected, the customer flow change includes people entering the store and people leaving the store, and the customer flow change record records the number of people entering the store and / or the number of people leaving the store, and the time segment is the time segment determined by two adjacent generation timestamps;

[0008] Determining the total customer stay time corresponding to the target time period based on the customer stay time of the time segments, wherein the customer stay time is determined by the number of customers staying in the time segments and the time segment duration, and the number of customers staying is determined based on the customer change record;

[0009] The average length of stay of customers is determined by using the total length of stay of customers and the total number of people entering the store during the target time period.

[0010] Optionally, before determining the total customer stay time corresponding to the target time period based on the customer stay time of the time segments, the method further includes:

[0011] For any of the time segments, the number of customers staying in the time segment is determined based on the passenger flow change record from the start time of the target time segment to the end time of the time segment.

[0012] Optionally, determining the total customer stay time corresponding to the target time period based on the customer stay time of the time segments includes:

[0013] Determine the sum of the customer stay time of all the time segments within the target time period to obtain the target customer stay time;

[0014] The total customer stay time is determined based on the target customer stay time.

[0015] Optionally, determining the total customer stay time based on the target customer stay time includes:

[0016] When the interval between the generation timestamp of the last passenger flow change record within the target time period and the end time of the target time period is greater than a preset threshold, the customer stay time of the interval is determined;

[0017] A total customer stay time is determined based on the target customer stay time and the interval customer stay time.

[0018] Optionally, before determining the average length of stay of customers by using the total length of stay of customers and the total number of people entering the store during the target time period, the method further includes:

[0019] Selecting the customer flow change records that record the number of people entering the store from the customer flow change records within the target time period to obtain the target customer flow change records;

[0020] The number of people entering the store in the target customer flow change record is accumulated to obtain the total number of people entering the store during the target time period.

[0021] Optionally, also include:

[0022] Detecting a target video stream, wherein the target video stream is a collected video stream in a store;

[0023] When a person entering or leaving the store is detected, the customer flow change record is generated, and the generation timestamp of the customer flow change record is marked.

[0024] Optionally, the detecting the target video stream includes:

[0025] Using the target detection model to perform personnel detection on the image frames in the video stream to obtain the location information of the target person;

[0026] The target person is tracked based on the location information to determine whether the target person is a person entering the store or a person leaving the store.

[0027] In a second aspect, the present application discloses a passenger flow stop time calculation device, comprising:

[0028] A time period acquisition module is used to obtain the target time period input by the user;

[0029] A time segment determination module, configured to determine the time segment within the target time period based on the generation timestamp of the customer flow change record, wherein the customer flow change record is a record generated when a customer flow change is detected, the customer flow change includes people entering the store and people leaving the store, and the customer flow change record records the number of people entering the store and / or the number of people leaving the store, and the time segment is a time segment determined by two adjacent generation timestamps;

[0030] A total duration determination module, used to determine the total customer stay duration corresponding to the target time period based on the customer stay duration of the time segment, wherein the customer stay duration is determined by the number of customers staying in the time segment and the duration of the time segment, and the number of customers staying is determined based on the customer change record;

[0031] The average duration determination module is used to determine the average duration of customers' stay by using the total duration of customers' stay and the total number of people entering the store during the target time period.

[0032] In a third aspect, the present application discloses an electronic device, including a memory and a processor, wherein:

[0033] The memory is used to store the computer program;

[0034] The processor is used to execute the computer program to implement the aforementioned passenger flow stay time calculation method.

[0035] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the aforementioned passenger flow dwell time calculation method.

[0036] It can be seen from the above scheme that the present application provides a method for calculating the length of time that customer flow stays, including: obtaining a target time period input by a user; determining a time segment within the target time period based on a generation timestamp of a customer flow change record, wherein the customer flow change record is a record generated when a customer flow change is detected, and the customer flow change includes people entering the store and people leaving the store, and the customer flow change record records the number of people entering the store and / or leaving the store, and the time segment is two adjacent time segments determined by the generation timestamp; determining a total customer length of time corresponding to the target time period based on the length of time that customers stay in the time segments, wherein the customer length of time is determined by the number of customers staying in the time segment and the length of the time segment, and the number of customers staying is determined based on the customer change record; determining an average length of time that customers stay using the total customer length of time and the total number of people entering the store during the target time period.

[0037] It can be seen that the beneficial effects of the present application are as follows: by generating a record of customer flow changes when detecting people entering and leaving the store, and determining the customer's stay duration by time segment based on the generated timestamp, and then determining the total customer stay duration corresponding to the target time period, and determining the average customer stay duration based on the total number of people entering the store. In this way, a record of customer flow changes is generated by detecting people entering and leaving the store, as well as the number of people entering and leaving the store, and then the average stay duration of customers in the target time period can be determined based on the generated timestamp and the recorded number of people entering and leaving the store, and the average stay duration of customers can be accurately determined while protecting the privacy of customers.

[0038] Correspondingly, the passenger flow dwell time calculation device, equipment and readable storage medium provided in the present application also have the above-mentioned technical effects. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0040] Figure 1 A flow chart of a method for calculating the passenger flow dwelling time provided in an embodiment of the present application;

[0041] Figure 2 A schematic diagram of a passenger flow change table provided in an embodiment of the present application;

[0042] Figure 3 A schematic diagram of the structure of a passenger flow dwell time calculation device provided in an embodiment of the present application;

[0043] Figure 4 A structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0044] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0045] See also Figure 1 As shown, the embodiment of the present application discloses a method for calculating the duration of passenger flow stay, including:

[0046] Step S11: Obtain the target time period input by the user.

[0047] Among them, the target time period is the time period for which the user needs to obtain the average length of stay of customers. For example, it can be 1 day, or a certain time period in 1 day, such as 10 am to 10 pm. That is, the user can enter the target time period based on actual needs. In an optional embodiment, the target time period input by the user can be obtained through the user interaction interface in the user terminal, and the user terminal can install the corresponding client, and the user interaction interface is the interface of the client. User terminals include but are not limited to personal computers, tablet computers, and smart phones. Furthermore, the passenger flow residence time calculation method provided in this embodiment can be applied to the back-end server, that is, the target time period input by the user transmitted by the user terminal can be obtained.

[0048] Step S12: Determine the time segment within the target time period based on the generation timestamp of the customer flow change record, wherein the customer flow change record is a record generated when a customer flow change is detected, and the customer flow change includes people entering the store and people leaving the store, and the customer flow change record records the number of people entering the store and / or the number of people leaving the store, and the time segment is two adjacent time segments determined by the generation timestamps.

[0049] In an optional implementation, the target video stream may be detected, wherein the target video stream is a video stream collected within the store; when a person entering or leaving the store is detected, the customer flow change record is generated, and the generation timestamp of the customer flow change record is marked.

[0050] In this embodiment, a camera device can be installed in a store to collect video streams in the store. The installation position and angle of the camera device can be adjusted so that the collection range of the camera device covers a specified area, for example, the specified area is the store entrance and exit.

[0051] Furthermore, in a specific implementation, a target detection model can be used to detect people in the image frames in the video stream to obtain the location information of the target person; the target person can be tracked based on the location information to determine whether the target person is a person entering the store or leaving the store. It should be noted that the target detection model does not need to perform face recognition, and can detect whether the target is a human body based on general human features. Alternatively, without performing personnel detection, the moving target is determined through target detection and tracking, and then it is determined whether the moving target enters or leaves the store, and the number of moving targets is used as the number of people entering or leaving the store, because in the field of passenger flow observation, the moving targets entering and leaving the store are usually customers.

[0052] Among them, the target detection model can be a model obtained by training a preset deep learning network model using an image training sample set. The image training sample set includes image training samples and label information. The image training sample is an image containing a person, and the label information can be the location information of the person, such as the coordinates of the boundary of the person area, for example, the coordinates of the four vertices of the rectangular box. In addition, the present embodiment can set a preset range. For example, the aforementioned designated area is determined as the preset range, and the target person can be tracked based on a preset number of continuous image frames. If the distance between the area where the target person is located and the preset range continues to decrease, the direction is toward the inside of the store, and the target person enters the preset range, then the target person is a person entering the store. If the target person leaves the preset range, the distance between the preset range and the preset range continues to increase, and the direction is toward the outside of the store, then the target person is a person leaving the store.

[0053] In another optional implementation, a distance measuring device may be installed at the entrance of the store to detect the change in the distance between the moving target and the distance measuring device to determine whether a person is entering or leaving the store.

[0054] That is, in this embodiment, no matter whether people enter or leave the store, a customer flow change record will be generated; if people enter the store but no one leaves the store, a customer flow change record will be generated to record the number of people entering the store; if people leave the store but no one enters the store, a customer flow change record will be generated to record the number of people leaving the store; if people enter and leave the store, two customer flow change records may be generated, recording the number of people entering and leaving the store respectively, or one customer flow change record may be generated to record the number of people entering and leaving the store.

[0055] It can be understood that a time segment is a time segment determined by two adjacent generation timestamps, that is, the two adjacent generation timestamps are the start time and end time of the time segment, respectively. This embodiment can sort the generation timestamps within the target time period, and each two adjacent generation timestamps form a time segment. For example, if the target time period is 9:00 to 10:00, and the generation timestamps include 9:12, 9:40, and 9:55, then the time segments are 9:12 to 9:40 and 9:40 to 9:55.

[0056] Step S13: Determine the total customer stay time corresponding to the target time period based on the customer stay time of the time segments, wherein the customer stay time is determined by the number of customers staying in the time segments and the duration of the time segments, and the number of customers staying is determined based on the customer change records.

[0057] This embodiment can determine the number of customers staying in any of the time segments based on the customer flow change record from the start time of the target time segment to the end time of the time segment. It can be understood that the customer flow change record records the number of people entering the store and the number of people leaving the store, so the customer flow change record from the start time of the target time segment to the end time of the time segment is needed to determine the number of customers staying in the time segment. For example, 3 people entered the first time segment, and the number of customers staying in the first time segment is 3. The customer flow change record corresponding to the start timestamp of the second time segment is 1 person leaving, so the number of customers staying in the second time segment is 2. The customer flow change record corresponding to the start timestamp of the third time segment is 2 people entering, so the number of customers staying in the third time segment is 4.

[0058] Furthermore, the product of the number of customers staying and the time segment is the customer stay time of the time segment. For example, the number of customers staying in the third time segment is 4, the duration of the third time segment is 10 minutes, and the customer stay time of the third time segment is 40 minutes.

[0059] This embodiment can determine the sum of the customer stay time of all the time segments within the target time period to obtain the target customer stay time; and determine the total customer stay time based on the target customer stay time.

[0060] In an optional implementation, when the interval between the generation timestamp of the last passenger flow change record in the target time period and the end time of the target time period is greater than a preset threshold, the customer stay time of the interval can be determined; and the total customer stay time can be determined based on the target customer stay time and the customer stay time of the interval. Specifically, the target customer stay time can be added to the customer stay time of the interval to obtain the total customer stay time. When the interval between the generation timestamp of the last passenger flow change record in the target time period and the end time of the target time period is less than or equal to the preset threshold, the target customer stay time is determined as the total customer stay time. It can be understood that if the interval between the generation timestamp of the last passenger flow change record in the target time period and the end time of the target time period is too large, it indicates that the passenger flow in the store has not changed for a long time. Considering the customer stay time in the interval can improve the accuracy of the average customer stay time. If the interval is small, it can be ignored.

[0061] Step S14: Determine the average length of stay of customers using the total length of stay of customers and the total number of people entering the store during the target time period.

[0062] In an optional implementation, the customer flow change records that record the number of people entering the store can be selected from the customer flow change records within the target time period to obtain the target customer flow change records; the number of people entering the store in the target customer flow change records is accumulated to obtain the total number of people entering the store during the target time period. That is, the number of people entering the store is accumulated to obtain the total number of people entering the store during the target time period. In this embodiment, the average length of stay of customers can be obtained by dividing the total length of stay of customers by the total number of people entering the store during the target time period.

[0063] For example, see Figure 2 , Figure 2 A schematic diagram of a passenger flow change table provided in this embodiment. The target time period is from 9:00 to 10:00, with a total of 10 passenger flow change records, and the corresponding average stay time is calculated.

[0064] Furthermore, this embodiment can return the passenger flow change situation within the target time period to the user terminal for display.

[0065] In an optional embodiment, the passenger flow change is displayed in the form of a drawn change curve, the horizontal axis represents the target time period, the target time period can be a time granularity of 1 hour, 2 hours, etc., the vertical axis is the average stay time, and the change curve can be a change curve for 1 day, that is, every hour or every two hours or every half hour in 1 day is used as a target time period, and then as a point on the horizontal axis. Of course, in some embodiments, the vertical axis can also be the total customer stay time of the target time period. The change curve can also be other time ranges, such as weeks, months, quarters, holidays, years, etc., and accordingly, the target time period of the horizontal axis has a larger range. In addition, different change curves can be displayed in the same drawing to facilitate user comparison.

[0066] In another optional implementation, the customer flow changes can be displayed in a table format, where the columns can include the total customer stay time and / or the average stay time and / or the total number of people entering the store, etc., and the rows can include each time period. For example, XX year XX month XX day, the time period is divided into hourly granularity, starting from 9:00, and the first row is data from 9:00 to 10:00, which can include the total customer stay time, average stay time, total number of people entering the store, etc.

[0067] It can be seen that the embodiments of the present application can generate customer flow change records when detecting people entering and leaving the store, and determine the customer's stay duration according to time segments based on the generated timestamp, and then determine the total customer stay duration corresponding to the target time period, and determine the average customer stay duration based on the total number of people entering the store. In this way, by detecting people entering the store, people leaving the store, and the number of people entering and leaving the store, a customer flow change record is generated, and then the average stay duration of customers in the target time period can be determined based on the generated timestamp and the recorded number of people entering and leaving the store, and the average stay duration of customers can be accurately determined while protecting the privacy of customers.

[0068] Below, taking the calculation of the average daily stay time of customers in a store as an example, the method for calculating the customer flow stay time provided in the embodiment of the present application is further explained.

[0069] Count the timestamps of customers entering / leaving the store. If there are n records in total, the number of people entering / leaving the store corresponding to each record is a. n , the corresponding timestamp is t n In this embodiment, whenever a moving object entering / leaving the store is detected, the corresponding timestamp is recorded to form a corresponding customer flow change record. The number of people entering / leaving the store corresponding to each record is a n , the corresponding timestamp is t n .

[0070] Arrange in ascending order of time, the duration between two adjacent timestamps is B n, then the time interval B corresponding to the n-1th time segment n-1 =t n -t n-1 .

[0071] Furthermore, the total number of people in the store corresponding to the n-1th timestamp is A n-1 =∑(a1+a2+……+a n-1 ). If two records with the same timestamp record the number of people entering the store and the number of people leaving the store respectively, they can be numbered based on preset rules, for example, the number corresponding to the number of people entering the store is in the front, and the number corresponding to the number of people leaving the store is in the back, which are a2 and a3 respectively.

[0072] Calculate the dwell time X=A*B of each adjacent timestamp segment, and the dwell time X corresponding to the n-1th time period n-1 =A n-1 *B n-1 .

[0073] The total stay time T is calculated by summing up the stay time of each segment. 总 =Σ(X1+X2+…+X n-1 ).

[0074] Calculate the total number of people entering the store during the start and end time periods, A 进店 =∑(a1+a3+……+a n-1 ) Only count a n >0 number of people entering the store, a n <0 indicates that the customer has left the hotel and is not included in the summation calculation.

[0075] Calculate the average daily stay time of customers in the store, T 均值 =T 总 / A 进店 .

[0076] This embodiment can receive the start and end time periods input by the user, calculate and pull the total number of people entering the store within the start and end time periods; and output the calculated average stay time.

[0077] In this way, based on the time record of passenger flow changes in the space, the average length of stay of customers can be accurately calculated without collecting faces. The average length of stay at different time granularities can be calculated, such as daily, per time period, etc. In theory, the accuracy of the data can reach 100% if the record is accurate. The hardware equipment requirements of the store are low, which reduces the cost investment of the store, allowing more stores to apply the length of stay indicator to actual store management. It does not rely on complex face recognition technology, can better protect customer privacy, and comply with laws and regulations. The width of the custom segmented duration can achieve the average length of stay statistics at different time granularities, which can help stores achieve accurate time period operation management.

[0078] See also Figure 3 As shown, the embodiment of the present application discloses a passenger flow stay time calculation device, comprising:

[0079] The time period acquisition module 11 is used to acquire the target time period input by the user;

[0080] A time segment determination module 12 is used to determine the time segment within the target time period based on the generation timestamp of the customer flow change record, wherein the customer flow change record is a record generated when a customer flow change is detected, the customer flow change includes people entering the store and people leaving the store, and the customer flow change record records the number of people entering the store and / or the number of people leaving the store, and the time segment is a time segment determined by two adjacent generation timestamps;

[0081] A total duration determination module 13 is used to determine the total customer stay time corresponding to the target time period based on the customer stay time of the time segment, wherein the customer stay time is determined by the number of customers staying in the time segment and the duration of the time segment, and the number of customers staying is determined based on the customer change record;

[0082] The average duration determination module 14 is used to determine the average duration of customers' stay by using the total duration of customers' stay and the total number of people entering the store during the target time period.

[0083] It can be seen that the embodiments of the present application can generate customer flow change records when detecting people entering and leaving the store, and determine the customer's stay duration according to time segments based on the generated timestamp, and then determine the total customer stay duration corresponding to the target time period, and determine the average customer stay duration based on the total number of people entering the store. In this way, by detecting people entering the store, people leaving the store, and the number of people entering and leaving the store, a customer flow change record is generated, and then the average stay duration of customers in the target time period can be determined based on the generated timestamp and the recorded number of people entering and leaving the store, and the average stay duration of customers can be accurately determined while protecting the privacy of customers.

[0084] Furthermore, the device may also include:

[0085] The module for determining the number of customers staying in any of the time segments is used to determine the number of customers staying in the time segment based on the passenger flow change record from the start time of the target time segment to the end time of the time segment.

[0086] In an optional implementation, the total duration determination module 13 may specifically include:

[0087] A target duration determination submodule is used to determine the sum of the customer stay durations of all the time segments within the target time period to obtain the target customer stay duration;

[0088] The total duration determination submodule is used to determine the total customer stay duration based on the target customer stay duration.

[0089] In an optional embodiment, the total duration determination submodule can be specifically used to: when the interval between the generation timestamp of the last passenger flow change record within the target time period and the end time of the target time period is greater than a preset threshold, determine the customer stay duration of the interval; determine the total customer stay duration based on the target customer stay duration and the customer stay duration of the interval.

[0090] Furthermore, the device also includes:

[0091] A target customer flow change record screening module is used to screen the customer flow change records that record the number of people entering the store from the customer flow change records within the target time period to obtain the target customer flow change records;

[0092] The total number of people entering the store is determined by the module, which is used to accumulate the number of people entering the store in the target customer flow change record to obtain the total number of people entering the store in the target time period.

[0093] Furthermore, the device may also include:

[0094] A video stream detection module, used to detect a target video stream, wherein the target video stream is a collected video stream in a store;

[0095] The record generation module is used to generate the customer flow change record when a person entering or leaving the store is detected, and mark the generation timestamp of the customer flow change record.

[0096] Among them, the video stream detection module can be specifically used to use the target detection model to perform personnel detection on the image frames in the video stream to obtain the location information of the target person; track the target person based on the location information to determine whether the target person is a person entering or leaving the store.

[0097] See also Figure 4 As shown, an embodiment of the present application discloses an electronic device 20, including a processor 21 and a memory 22; wherein the memory 22 is used to store a computer program; the processor 21 is used to execute the computer program, the passenger flow stay duration calculation method disclosed in the above embodiment.

[0098] For the specific process of the above-mentioned passenger flow residence time calculation method, reference may be made to the corresponding contents disclosed in the aforementioned embodiments, which will not be repeated here.

[0099] Furthermore, the memory 22 as a carrier for storing resources may be a read-only memory, a random access memory, a magnetic disk or an optical disk, etc., and the storage method may be temporary storage or permanent storage.

[0100] In addition, the electronic device 20 also includes a power supply 23, a communication interface 24, an input / output interface 25 and a communication bus 26; wherein the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and an external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input / output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0101] Furthermore, an embodiment of the present application also discloses a computer-readable storage medium for storing a computer program, wherein when the computer program is executed by a processor, the method for calculating the passenger flow dwelling duration disclosed in the aforementioned embodiment is implemented.

[0102] For the specific process of the above-mentioned passenger flow residence time calculation method, reference may be made to the corresponding contents disclosed in the aforementioned embodiments, which will not be repeated here.

[0103] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0104] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0105] The above is a detailed introduction to a passenger flow stop time calculation method, device, equipment and medium provided by the present application. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for calculating the duration of passenger flow, characterized in that: include: Get the target time period entered by the user; Determine the time segment within the target time period based on the generation timestamp of the customer flow change record, wherein the customer flow change record is a record generated when a customer flow change is detected, the customer flow change includes people entering the store and people leaving the store, and the customer flow change record records the number of people entering the store and / or the number of people leaving the store, and the time segment is the time segment determined by two adjacent generation timestamps; Determining the total customer stay time corresponding to the target time period based on the customer stay time of the time segments, wherein the customer stay time is determined by the number of customers staying in the time segments and the time segment duration, and the number of customers staying is determined based on the customer change record; The average length of stay of customers is determined by using the total length of stay of customers and the total number of people entering the store during the target time period.

2. The method for calculating the passenger flow dwelling time according to claim 1, characterized in that: Before determining the total customer stay time corresponding to the target time period based on the customer stay time of the time segments, the method further includes: For any of the time segments, the number of customers staying in the time segment is determined based on the passenger flow change record from the start time of the target time segment to the end time of the time segment.

3. The method for calculating the passenger flow dwelling time according to claim 1, characterized in that: The determining the total customer stay time corresponding to the target time period based on the customer stay time of the time segments includes: Determine the sum of the customer stay time of all the time segments within the target time period to obtain the target customer stay time; The total customer stay time is determined based on the target customer stay time.

4. The method for calculating the passenger flow dwelling time according to claim 3, characterized in that: The determining of the total customer stay time based on the target customer stay time includes: When the interval between the generation timestamp of the last passenger flow change record within the target time period and the end time of the target time period is greater than a preset threshold, the customer stay time of the interval is determined; A total customer stay time is determined based on the target customer stay time and the interval customer stay time.

5. The method for calculating the passenger flow dwelling time according to claim 1, characterized in that: Before determining the average length of stay of customers by using the total length of stay of customers and the total number of people entering the store during the target time period, the method further includes: Selecting the customer flow change records that record the number of people entering the store from the customer flow change records within the target time period to obtain the target customer flow change records; The number of people entering the store in the target customer flow change record is accumulated to obtain the total number of people entering the store during the target time period.

6. The method for calculating the passenger flow dwelling time according to any one of claims 1 to 5, characterized in that: Also includes: Detecting a target video stream, wherein the target video stream is a collected video stream in a store; When a person entering or leaving the store is detected, the customer flow change record is generated, and the generation timestamp of the customer flow change record is marked.

7. The method for calculating the passenger flow dwelling time according to claim 6, characterized in that: The detecting of the target video stream comprises: Using the target detection model to perform personnel detection on the image frames in the video stream to obtain the location information of the target person; The target person is tracked based on the location information to determine whether the target person is a person entering the store or a person leaving the store.

8. A passenger flow dwell time calculation device, characterized in that: include: A time period acquisition module is used to obtain the target time period input by the user; A time segment determination module, configured to determine the time segment within the target time period based on the generation timestamp of the customer flow change record, wherein the customer flow change record is a record generated when a customer flow change is detected, the customer flow change includes people entering the store and people leaving the store, and the customer flow change record records the number of people entering the store and / or the number of people leaving the store, and the time segment is a time segment determined by two adjacent generation timestamps; A total duration determination module, used to determine the total customer stay duration corresponding to the target time period based on the customer stay duration of the time segment, wherein the customer stay duration is determined by the number of customers staying in the time segment and the duration of the time segment, and the number of customers staying is determined based on the customer change record; The average duration determination module is used to determine the average duration of customers' stay by using the total duration of customers' stay and the total number of people entering the store during the target time period.

9. An electronic device, characterized in that: comprising a memory and a processor, wherein: The memory is used to store the computer program; The processor is used to execute the computer program to implement the passenger flow residence time calculation method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: Used to store a computer program, wherein when the computer program is executed by a processor, the method for calculating the passenger flow dwelling time as described in any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Passenger flow data visualization method and system based on mulberry-based graph

    CN120525574A

  • Scenic area passenger flow real-time monitoring method and system based on operator position service data

    CN120857075A