Method and device for determining unit price of customer

By obtaining customer and bill information based on pedestrian re-identification algorithm, combining the conditional random airport model and confidence propagation algorithm, we automatically associate customers and bill nodes, solving the problems of low efficiency and low accuracy of customer unit price calculation in the existing technology, and achieving efficient and accurate customer unit price calculation.

CN113724013BActive Publication Date: 2025-03-11JIANGSU FUYAN INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111037135.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-06
Publication Date
2025-03-11
Estimated Expiration
2041-09-06

AI Technical Summary

Technical Problem

The prior art is inefficient and has low accuracy when calculating the unit price of customers. Especially when multiple people spend and one person checks out, manual statistics or relying on artificial filling in the number of people consumed can easily lead to errors.

Method used

The method of obtaining customer node information and bill settlement node information based on pedestrian re-identification algorithm is adopted. By matching the customer node's store entry and exit time and settlement time, a conditional random airport model is established and the information is transmitted using the confidence propagation algorithm, and the customer node and settlement node are automatically associated, and the customer unit price is calculated.

Benefits of technology

It realizes efficient and accurate calculation of customer unit prices, reduces manual intervention, improves calculation efficiency and accuracy, and is suitable for scenarios where multiple people consume and one person checkout.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113724013B_ABST
    Figure CN113724013B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and device for determining a customer unit price, comprising: obtaining customer node information and bill settlement node information based on a pedestrian re-identification algorithm; matching the store entry time and store exit time of each customer node with each settlement time respectively; counting the number of customer nodes that successfully match the same settlement time, and associating the same settlement time, the corresponding settlement amount, and the number of customer nodes and storing them in a first queue; for unsuccessfully matched customer nodes and settlement nodes, establishing a conditional random field model according to single customer characteristics and neighbor customer characteristics; using a confidence propagation algorithm to transfer information in the conditional random field model, and obtaining a target confidence that the unsuccessfully matched customer node belongs to the unsuccessfully matched settlement node; storing the association relationship between the settlement time, settlement amount, and the number of customer nodes obtained according to the target confidence in a second queue; and calculating the customer unit price according to the first queue and / or the second queue.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method and device for determining a customer unit price. Background Art

[0002] The average customer spending is an important indicator for evaluating and analyzing store performance. Its calculation formula is average customer spending = total settlement amount / total number of customers, that is, average customer spending refers to the average amount of goods purchased by each customer in the store. Therefore, if you want to calculate the average customer spending, you need to know the total settlement amount and the total number of customers. However, because many places often have multiple people consuming and one person paying the bill (such as restaurants), it is inaccurate to directly use the number of bills as the total number of customers.

[0003] There are currently two main methods for calculating the average customer price in stores where multiple people consume but one person pays: (1) manually monitoring and counting the correspondence between customers and bills in the store to calculate the average customer price; (2) placing an order on the ordering application and filling in the number of consumers, so that the backend can calculate the average customer price based on the correspondence between the number of consumers and the bill. However, the first manual counting method is time-consuming and labor-intensive, and inefficient; although the second method can improve efficiency, the number of consumers filled in manually may not match the actual situation, thus affecting the accuracy of the average customer price.

[0004] In summary, how to provide a method for determining average order value with relatively high efficiency and accuracy is an urgent problem to be solved. Summary of the invention

[0005] The present invention provides a method and device for determining the average customer price, which can efficiently and accurately determine the average customer price. The specific technical solution is as follows:

[0006] In a first aspect, an embodiment of the present invention provides a method for determining an average order value, the method comprising:

[0007] Acquire customer node information based on a pedestrian re-identification algorithm, and acquire bill settlement node information, wherein the customer node information includes the ID, store entry time, and store exit time of each customer node, and the bill settlement node information includes the settlement amount and settlement time of each settlement node;

[0008] Traverse all customer nodes and match the store entry time, store exit time and settlement time of each customer node respectively;

[0009] Counting the number of customer nodes that successfully match the same settlement time, and associating the same settlement time, the settlement amount corresponding to the same settlement time, and the number of customer nodes and storing them in a first queue;

[0010] For customer nodes and settlement nodes that have not been successfully matched, a conditional random field model is established based on single customer features and neighbor customer features, wherein the single customer features are used to characterize the confidence-related features that a single customer node belongs to a certain settlement node, and the neighbor customer features are used to characterize the confidence-related features that two adjacent customer nodes belong to the same settlement node and / or different settlement nodes;

[0011] Using a confidence propagation algorithm to transfer information in the conditional random field model, obtaining a target confidence that the unmatched customer node belongs to an unmatched settlement node;

[0012] storing the association relationship among the settlement time, the settlement amount and the number of customer nodes obtained according to the target confidence into a second queue;

[0013] The average order value is calculated according to the first queue and / or the second queue.

[0014] Optionally, before traversing all customers and matching the store entry time and store exit time of each customer node with each settlement time, the method further includes:

[0015] Determine whether the time difference between the store entry time and store exit time of each customer node is less than a preset time threshold;

[0016] If there are customer nodes whose time is less than the preset time threshold, the customer nodes whose time is less than the preset time threshold will be deleted.

[0017] Optionally, the store entry time and store exit time of each customer node are matched with each settlement time, including:

[0018] Determine whether each settlement time is within the time range determined by the store entry time and store exit time of the customer node;

[0019] If a certain settlement time is within the time range, it is determined that the customer node successfully matches the certain settlement time;

[0020] If all settlement times are not within the time range, it is determined that the customer node fails to match each settlement time.

[0021] Optionally, for unmatched customer nodes and settlement nodes, a conditional random field model is established based on single customer characteristics and neighbor customer characteristics, including:

[0022] Obtaining the settlement characteristics of the unmatched customer nodes;

[0023] Calculate the normalized first average value and first standard deviation of the settlement features of all customer nodes that have not been successfully matched;

[0024] Obtaining a single customer feature of the unsuccessfully matched customer node according to the settlement feature of the unsuccessfully matched customer node, the first average value, and the first standard deviation;

[0025] According to the store entry time difference and store exit time difference of two customer nodes among the unmatched customer nodes, determining whether the two customer nodes are neighboring customer nodes;

[0026] Calculating a ratio of settlement characteristics of two customer nodes that are neighbor customer nodes;

[0027] Calculate the second mean and second standard deviation of the normalized ratios of all settlement characteristics;

[0028] Obtaining neighbor customer characteristics according to the ratio of the settlement characteristics, the second mean value, and the second standard deviation;

[0029] The conditional random field model is established according to the single customer characteristics and the neighbor customer characteristics.

[0030] Optionally, obtain the settlement characteristics of the unmatched customer node, including:

[0031] Calculate the settlement feature x′ of the unmatched customer node according to the first formula;

[0032] The first formula includes:

[0033]

[0034] Among them, the t out represents the departure time, and t in represents the store entry time, and t pay Indicates the settlement time.

[0035] Optionally, obtaining the single customer feature of the unsuccessfully matched customer node according to the settlement feature of the unsuccessfully matched customer node, the first average value and the first standard deviation includes:

[0036] The single customer feature D(f i , c i );

[0037] The second formula includes:

[0038]

[0039] Among them, the f i represents the index of the i-th settlement node among the unmatched settlement nodes, the c i represents the i-th customer node among the unmatched customer nodes, and the μ1 represents the first mean value, the σ 1 represents the first standard deviation, and x represents the normalized settlement characteristic.

[0040] Optionally, obtaining neighbor customer characteristics according to the ratio of the settlement characteristics, the second mean value, and the second standard deviation includes:

[0041] According to the third formula, the neighbor customer feature W(f i , f j , c i , c j );

[0042] The third formula includes:

[0043] W(f i , f j , c i , c j )=-log(p(v))-log(1-p(v)

[0044]

[0045] Among them, the f i and the f j Respectively represent the indexes of the i-th and j-th settlement nodes among the settlement nodes that have not been successfully matched, and the c i and the c j represent the i-th and j-th customer nodes in the unmatched customer nodes respectively, v represents the normalized settlement feature ratio, and μ 2 represents the second average value, the δ 2 represents the second standard deviation.

[0046] Optionally, establishing the conditional random field model according to the single customer characteristics and the neighbor customer characteristics includes:

[0047] According to the single customer characteristics D(f i , c i ) and neighbor customer characteristics W(f i , f j , c i , c j ), establish the conditional random field model P(f / d);

[0048]

[0049] Among them, the f i and the f j Respectively represent the indexes of the i-th and j-th settlement nodes among the settlement nodes that have not been successfully matched, and the c iand the c j represent the i-th and j-th customer nodes among the unmatched customer nodes respectively, S represents the set of unmatched settlement nodes, and N i Indicates that the c i The set of all neighbor customer nodes of , d is a subset of S, and f represents the index of the settlement node that was not successfully matched.

[0050] Optionally, using a confidence propagation algorithm to transfer information in the conditional random field model to obtain a target confidence that the unmatched customer node belongs to an unmatched settlement node includes:

[0051] Iteratively calculating the conditional random field model using the confidence propagation algorithm to obtain the confidence that the unsuccessfully matched customer node belongs to an unsuccessfully matched settlement node;

[0052] When the difference between the sum of the confidences of the two most recent iterations is less than a preset difference threshold, the confidence obtained in the most recent iteration is determined as the target confidence, and the sum of the confidences is the sum of the confidences of all customer nodes that have not been successfully matched in one iteration;

[0053] The confidence calculation formula is:

[0054]

[0055]

[0056] The b i (f j ) indicates that the i-th customer node among the unmatched customer nodes belongs to the customer node with index f j The confidence of the settlement node, the D(f i , c i ) represents the single customer feature of the i-th customer node among the unmatched customer nodes, and the W(f i , f j , c i , c j ) represents the neighbor customer features of the i-th customer node and the j-th customer node among the unmatched customer nodes, and the f i and the f j Respectively represent the indexes of the i-th and j-th settlement nodes among the settlement nodes that have not been successfully matched, and the c i and the c i represent the i-th and j-th customer nodes in the unmatched customer nodes respectively, α represents the weight coefficient, N j represents the set of all neighboring customer nodes of the jth customer node, N irepresents the set of all neighboring customer nodes of the i-th customer node;

[0057] Said represents the amount of information transmitted from the i-th customer node to the j-th customer node during the t-th iteration. It represents the amount of information transmitted from the kth customer node to the ith customer node during the t-1th iteration.

[0058] Optionally, calculating the average order value according to the first queue and / or the second queue includes:

[0059] Calculating a first ratio of the sum of the settlement amounts in the first queue to the sum of the number of customer nodes, and using the first ratio as the average customer price;

[0060] Alternatively, a second ratio of the sum of the settlement amounts in the second queue to the sum of the number of customer nodes is calculated, and the second ratio is used as the average customer price;

[0061] Alternatively, a result of weighted processing of the first ratio and the second ratio is used as the average order value.

[0062] In a second aspect, an embodiment of the present invention provides a device for determining a unit price per customer, the device comprising:

[0063] an acquisition unit, configured to acquire customer node information based on a pedestrian re-identification algorithm, and acquire bill settlement node information, wherein the customer node information includes an ID, a store entry time, and a store exit time of each customer node, and the bill settlement node information includes a settlement amount and a settlement time of each settlement node;

[0064] A matching unit, used to traverse all customer nodes and match the store entry time and store exit time of each customer node with each settlement time;

[0065] A storage unit, used for counting the number of customer nodes that successfully match the same settlement time, and associating the same settlement time, the settlement amount corresponding to the same settlement time, and the number of customer nodes and storing them in a first queue;

[0066] An establishing unit, for establishing a conditional random field model for unmatched customer nodes and settlement nodes according to single customer features and neighbor customer features, wherein the single customer features are used to characterize features related to the confidence that a single customer node belongs to a certain settlement node, and the neighbor customer features are used to characterize features related to the confidence that two adjacent customer nodes belong to the same settlement node and / or different settlement nodes;

[0067] A propagation unit, configured to transfer information in the conditional random field model by using a confidence propagation algorithm, and obtain a target confidence that the unmatched customer node belongs to an unmatched settlement node;

[0068] The storage unit is further used to store the association relationship between the settlement time, the settlement amount and the number of customer nodes obtained according to the target confidence into the second queue;

[0069] A calculation unit is used to calculate the average order value according to the first queue and / or the second queue.

[0070] Optionally, the device further comprises:

[0071] A judgment unit, used to judge whether the time difference between the store entry time and the store exit time of each customer node is less than a preset time threshold before traversing all customers and matching the store entry time and store exit time of each customer node with each settlement time respectively;

[0072] The deleting unit is used to delete the customer nodes whose time is less than the preset time threshold if there are any customer nodes whose time is less than the preset time threshold.

[0073] Optionally, the matching unit is used to determine whether each settlement time is within the time range determined by the entry time and exit time of the customer node; if a settlement time is within the time range, it is determined that the customer node is successfully matched with the settlement time; if all settlement times are not within the time range, it is determined that the customer node fails to match each settlement time.

[0074] Optionally, build a unit including:

[0075] A first acquisition module is used to acquire the settlement characteristics of the customer node that has not been successfully matched;

[0076] A first calculation module is used to calculate a first average value and a first standard deviation of the normalized settlement characteristics of all unmatched customer nodes; and obtain a single customer characteristic of the unmatched customer node according to the settlement characteristics of the unmatched customer node, the first average value and the first standard deviation;

[0077] A judgment module, configured to judge whether the two customer nodes among the unmatched customer nodes are neighboring customer nodes according to a store entry time difference and a store exit time difference between the two customer nodes;

[0078] The second calculation module is used to calculate the ratio of settlement features of two customer nodes belonging to neighbor customer nodes; calculate the second average value and the second standard deviation of the normalized ratios of all settlement features; and obtain the neighbor customer feature according to the ratio of settlement features, the second average value and the second standard deviation;

[0079] An establishing module is used to establish the conditional random field model according to the single customer characteristics and the neighbor customer characteristics.

[0080] Optionally, a first acquisition module is used to calculate the settlement feature x′ of the unmatched customer node according to a first formula;

[0081] The first formula includes:

[0082]

[0083] Among them, the t out represents the departure time, and t in represents the store entry time, and t pay Indicates the settlement time.

[0084] Optionally, the first calculation module is used to calculate the single customer feature D (f i , c i );

[0085] The second formula includes:

[0086]

[0087] Among them, the f i represents the index of the i-th settlement node among the unmatched settlement nodes, the c i represents the i-th customer node among the unmatched customer nodes, and the μ 1 represents the first mean value, the σ 1 represents the first standard deviation, and x represents the normalized settlement characteristic.

[0088] Optionally, a second calculation module is used to calculate the neighbor customer feature W (f i , f j , c i , c j );

[0089] The third formula includes:

[0090] W(f i , f j , c i , c j)=-log(p(v))-log(1-p(v)

[0091] in,

[0092]

[0093] Among them, the f i and the f j Respectively represent the indexes of the i-th and j-th settlement nodes among the settlement nodes that have not been successfully matched, and the c i and the c j represent the i-th and j-th customer nodes in the unmatched customer nodes respectively, v represents the normalized settlement feature ratio, and μ 2 represents the second average value, the δ 2 represents the second standard deviation.

[0094] Optionally, a module is established for determining the characteristics of a single customer D(f i , c i ) and neighbor customer characteristics W(f i , f j , c i , c j ), establish the conditional random field model P(f / d);

[0095]

[0096] Among them, the f i and the f j Respectively represent the indexes of the i-th and j-th settlement nodes among the settlement nodes that have not been successfully matched, and the c i and the c j represent the i-th and j-th customer nodes among the unmatched customer nodes respectively, S represents the set of unmatched settlement nodes, and N i Indicates that the c i The set of all neighbor customer nodes of , d is a subset of S, and f represents the index of the settlement node that was not successfully matched.

[0097] Optionally, the propagation unit includes:

[0098] An iteration module, used for iteratively calculating the conditional random field model using the confidence propagation algorithm to obtain the confidence that the unmatched customer node belongs to an unmatched settlement node;

[0099] A second acquisition module is used to determine the confidence obtained in the most recent iteration as the target confidence when the difference between the sums of the confidences of the most recent two iterations is less than a preset difference threshold; the sum of the confidences is the sum of the confidences of all customer nodes that have not been successfully matched in one iteration;

[0100] The confidence calculation formula is:

[0101]

[0102]

[0103] The b i (f j ) indicates that the i-th customer node among the unmatched customer nodes belongs to the customer node with index f j The confidence of the settlement node, the D(f i , c i ) represents the single customer feature of the i-th customer node among the unmatched customer nodes, and the W(f i , f j , c i , c j ) represents the neighbor customer features of the i-th customer node and the j-th customer node among the unmatched customer nodes, and the f i and the f j Respectively represent the indexes of the i-th and j-th settlement nodes among the settlement nodes that have not been successfully matched, and the c i and the c j represent the i-th and j-th customer nodes in the unmatched customer nodes respectively, α represents the weight coefficient, N j represents the set of all neighboring customer nodes of the jth customer node, N i represents the set of all neighboring customer nodes of the i-th customer node;

[0104] Said represents the amount of information transmitted from the i-th customer node to the j-th customer node during the t-th iteration. It represents the amount of information transmitted from the kth customer node to the ith customer node during the t-1th iteration.

[0105] Optionally, a computing unit, including:

[0106] The third calculation module is used to calculate a first ratio of the sum of the settlement amounts in the first queue to the sum of the number of customer nodes, and use the first ratio as the average customer price; or, calculate a second ratio of the sum of the settlement amounts in the second queue to the sum of the number of customer nodes, and use the second ratio as the average customer price; or, use the result of weighted processing of the first ratio and the second ratio as the average customer price.

[0107] In a third aspect, an embodiment of the present invention provides a storage medium having executable instructions stored thereon, which, when executed by a processor, enables the processor to implement the method described in the first aspect.

[0108] In a fourth aspect, an embodiment of the present invention provides an electronic device, including:

[0109] one or more processors;

[0110] a storage device for storing one or more programs,

[0111] When the one or more programs are executed by the one or more processors, the one or more processors implement the method described in the first aspect.

[0112] From the above content, it can be seen that the method and device for determining the customer unit price provided by the embodiment of the present invention can first obtain the ID, store entry time and store exit time of each customer node based on the pedestrian re-identification algorithm, and obtain the settlement amount and settlement time of each settlement node; then traverse all customer nodes, and match the store entry time and store exit time of each customer node with each settlement time respectively; save the successfully matched customer nodes and settlement nodes as a set of high-confidence data (including settlement time, settlement amount and number of customer nodes) in the first queue, establish a conditional random field model for the customer nodes and settlement nodes that failed to match, and use the confidence propagation algorithm to calculate the conditional random field model, obtain the result of the secondary matching of the customer nodes and settlement nodes and save it in the second queue; finally, calculate the customer unit price according to the first queue and / or the second queue. It can be seen that the embodiment of the present invention can not only automatically associate the relationship between the customer node and the settlement node to realize automatic statistics, but also associate the customer node and the settlement node in different association methods according to different association degrees, so as to efficiently and accurately determine the customer unit price. Of course, any product or method implementing the present invention does not necessarily need to achieve all the advantages described above at the same time.

[0113] The innovative features of the embodiments of the present invention include:

[0114] 1. First, customer node information is obtained based on the pedestrian re-identification algorithm, and then divided into two layers to obtain the mapping relationship between customer nodes and settlement nodes with different confidence levels. Finally, different customer unit price calculation methods are selected using the first queue and / or the second queue according to actual needs, providing users with a variety of options.

[0115] Among them, the first queue is obtained by directly matching the store entry time, store exit time and settlement time. The second queue is obtained by establishing a conditional random field model for customer nodes and settlement settlement except the first queue, and using the belief propagation algorithm to calculate the optimal solution of the conditional random field model, and finally based on the optimal solution.

[0116] 2. Delete customer nodes whose time difference between store entry time and store exit time is less than the preset time threshold in advance, so as to reduce noise data and improve the calculation efficiency of subsequent customer unit price. BRIEF DESCRIPTION OF THE DRAWINGS

[0117] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without creative work.

[0118] Figure 1 A schematic diagram of a flow chart of a method for determining a customer unit price provided by an embodiment of the present invention;

[0119] Figure 2 A block diagram of a device for determining average order value provided by an embodiment of the present invention. DETAILED DESCRIPTION

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

[0121] It should be noted that the terms "including" and "having" and any variations thereof in the embodiments of the present invention and the accompanying drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.

[0122] The present invention provides a method and device for determining the average customer price, which can efficiently and accurately determine the average customer price. The method provided in the embodiment of the present invention can be applied to any electronic device with computing capabilities, and the electronic device can be a terminal or a server. In one implementation, the functional software implementing the method can exist in the form of a separate client software, or in the form of a plug-in for currently related client software. The embodiments of the present invention are described in detail below.

[0123] Figure 1 A flow chart of a method for determining the average order value provided by an embodiment of the present invention. The method may include the following steps:

[0124] S100: Acquire customer node information based on pedestrian re-identification algorithm, and acquire bill settlement node information.

[0125] The customer node information includes the ID, store entry time and store exit time of each customer node; the bill settlement node information includes the settlement amount and settlement time of each settlement node.

[0126] The bill settlement node information can be obtained directly from the checkout machine, while the customer node information can be obtained through the pedestrian re-identification algorithm. Pedestrian re-identification, also known as pedestrian re-identification, is a very popular research topic in the field of computer vision in recent years. It can be regarded as a sub-problem of image retrieval. It is a technology that uses computer vision technology to determine whether there is a specific pedestrian in an image or video sequence. That is, pedestrian re-identification can analyze images or videos to determine whether the pedestrian to be tested is the target pedestrian. By installing a camera at the door of the store to collect customer images, and using pedestrian re-identification technology to identify whether at least two customers collected at different times are the same customer, and adding the same ID to the same customer, and determining the customer's store entry time and exit time based on the image acquisition time, the ID, store entry time and store exit time are associated and stored.

[0127] S110: Traverse all customer nodes, and match the store entry time and store exit time of each customer node with each settlement time.

[0128] Specifically, it is possible to determine whether each settlement time is within the time range determined by the store entry time and store exit time of the customer node, that is, to determine whether the settlement time t pay Whether the conditions are met Respectively represent the store exit time and store entry time of the customer node with the same ID; if a certain settlement time is within the time range, it is determined that the customer node is successfully matched with the certain settlement time; if all settlement times are not within the time range, it is determined that the customer node fails to match each settlement time. Among them, multiple customer nodes may be successfully matched with different settlement nodes respectively, or they may be successfully matched with the same settlement node.

[0129] It takes a certain amount of time to consume in a store. If some customers only stay in the store or at the door for a short while and then leave, then these customers have not made any purchases. At this time, if the information of these customers is included in the calculation, it will not only reduce the calculation efficiency, but may also reduce the calculation accuracy. Therefore, in order to avoid the above problems, you can traverse all customers and match the store entry time and exit time of each customer node with each settlement time. Before, determine whether the time difference between the store entry time and the store exit time of each customer node is less than the preset time threshold; delete the customer nodes that are less than the preset time threshold. In other words, when , the customer node is invalid and can be deleted. th Indicates the preset time threshold.

[0130] S120: Count the number of customer nodes that successfully match the same settlement time, and associate the same settlement time, the settlement amount corresponding to the same settlement time, and the number of customer nodes and store them in the first queue.

[0131] Each queue element in the first queue contains three pieces of information, which can be expressed as P i = {sum,paytime,num}, where P i represents the i-th queue element, sum represents the settlement amount, paytime represents the settlement time, and num represents the number of customer nodes.

[0132] S130: For unmatched customer nodes and settlement nodes, a conditional random field model is established based on single customer characteristics and neighbor customer characteristics.

[0133] The single customer feature is used to characterize the confidence-related features of a single customer node belonging to a certain settlement node, and the neighbor customer feature is used to characterize the confidence-related features of two adjacent customer nodes belonging to the same settlement node and / or different settlement nodes. The conditional random field is a conditional probability distribution model P(Y|X), which represents the Markov random field of another set of output random variables Y under the condition of a given set of input random variables X.

[0134] The specific implementation of this step can be as follows A1-A8:

[0135] A1. Obtain the settlement characteristics of the customer nodes that have not been successfully matched.

[0136] Specifically, the settlement feature x′ of the unmatched customer node is calculated according to the first formula;

[0137] The first formula includes:

[0138]

[0139] Among them, the t out represents the departure time, and t in represents the store entry time, and t pay Indicates the settlement time.

[0140] A2. Calculate the normalized first average value and first standard deviation of the settlement features of all customer nodes that have not been successfully matched.

[0141] For the convenience of subsequent calculations, all settlement features x′ may be normalized first so that the sum of all normalized settlement features is 1, and then the first average value and the first standard deviation of all normalized settlement features may be calculated.

[0142] A3. Obtain single customer characteristics of the unsuccessfully matched customer node according to the settlement characteristics of the unsuccessfully matched customer node, the first average value, and the first standard deviation.

[0143] Specifically, the single customer feature D(f i , c i );

[0144] The second formula includes:

[0145]

[0146] Among them, the f i represents the index of the i-th settlement node among the unmatched settlement nodes, the c i represents the i-th customer node among the unmatched customer nodes, and the μ 1 represents the first mean value, the σ 1 represents the first standard deviation, and x is the normalized settlement characteristic.

[0147] A4. Determine whether the two customer nodes are neighboring customer nodes based on the store entry time difference and store exit time difference between the two customer nodes among the unmatched customer nodes.

[0148] Specifically, determine whether the difference between the time when the i-th customer node enters the store and the time when the j-th customer node enters the store, and the difference between the time when the i-th customer node enters the store and the time when the j-th customer node enters the store, meets the condition and Among them, t th Indicates the preset time difference threshold, They represent the time when the i-th customer node enters the store and the time when the j-th customer node enters the store, respectively. They represent the time when the i-th customer node enters the store and the time when the j-th customer node leaves the store respectively; if they meet, the two customer nodes are determined to be neighbor customer nodes, otherwise they are not neighbor customer nodes.

[0149] A5. Calculate the ratio of the settlement characteristics of two customer nodes that are neighbor customer nodes.

[0150] Among them, assuming that the i-th customer node and the j-th customer node are neighbor customer nodes, then when calculating the ratio of settlement characteristics, the ratio of the i-th customer node to the j-th customer node can be calculated, or the ratio of the j-th customer node to the i-th customer node can be calculated, which can be determined according to needs.

[0151] A6. Calculate the second mean value and the second standard deviation of the normalized ratios of all settlement characteristics.

[0152] For the convenience of subsequent calculations, the ratios of all settlement features may be normalized first so that the sum of all normalized settlement features is 1, and then the second mean value and the second standard deviation of all normalized settlement features may be calculated.

[0153] A7. Obtain neighbor customer characteristics based on the ratio of the settlement characteristics, the second mean value and the second standard deviation.

[0154] For neighbor customer characteristics W(f i , f j , c i , c j ), f i can be equal to f j , which may not be equal to f j When f i =f j When , the i-th and j-th customer nodes correspond to the same settlement node, and they often show the characteristics of entering and leaving the store at the same time. Therefore, the characteristics x corresponding to these customers should be relatively close, so that the ratio of settlement characteristics is close to 1. When f i ≠f j , the i-th and j-th customer nodes correspond to different settlement nodes, but P(f i =f j )+P(f i ≠fj )=1, so W(f i , f j , c i , c j ) can be calculated as:

[0155] W(f i , f j , c i , c j )=-log(p(v))-log(1-p(v)

[0156] in,

[0157]

[0158] Among them, the f i and the f j Respectively represent the indexes of the i-th and j-th settlement nodes among the settlement nodes that have not been successfully matched, and the c i and the c j represent the i-th and j-th customer nodes in the unmatched customer nodes respectively, v represents the settlement feature ratio, and μ 2 represents the second average value, the δ 2 represents the second standard deviation.

[0159] A8. Establishing the conditional random field model according to the single customer characteristics and the neighbor customer characteristics.

[0160] Specifically, we can use the single customer feature D(f i , c i ) and neighbor customer characteristics W(f i , f j , c i , c j ), establish the conditional random field model P(f / d);

[0161]

[0162] Among them, the f i and the f j Respectively represent the indexes of the i-th and j-th settlement nodes among the settlement nodes that have not been successfully matched, and the c i and the c j represent the i-th and j-th customer nodes among the unmatched customer nodes respectively, S represents the set of unmatched settlement nodes, and N i Indicates that the c i The set of all neighboring customer nodes of , d is a subset of S, and f represents the index of the settlement node that has not been successfully matched. i, c i ) and W(f i , f j , c i , c j ) can be called the energy function.

[0163] S140: Using a confidence propagation algorithm to transfer information in the conditional random field model, obtain a target confidence that the unmatched customer node belongs to an unmatched settlement node.

[0164] Specifically, the confidence propagation algorithm can be used to iteratively calculate the conditional random field model to obtain the confidence that the unmatched customer node belongs to the unmatched settlement node; when the difference between the sum of the confidences of the two most recent iterations is less than a preset difference threshold, the confidence obtained in the most recent iteration is determined as the target confidence; the sum of the confidences is the sum of the confidences of all customer nodes that were not successfully matched in one iteration.

[0165] Among them, belief propagation is a message passing algorithm for inference on a graph model. The main idea is: for each node in the Markov random field, the probability distribution state of the node is passed to the adjacent nodes through message propagation, thereby affecting the probability distribution state of the adjacent nodes. After a certain number of iterations, the probability distribution of each node will converge to a steady state.

[0166] The confidence calculation formula of the embodiment of the present invention is:

[0167]

[0168]

[0169] The b i (f j ) indicates that the i-th customer node among the unmatched customer nodes belongs to the customer node with index f j The confidence of the settlement node, the D(f i , c i ) represents the single customer feature of the i-th customer node among the unmatched customer nodes, and the (f i , f j , c i , c j ) represents the neighbor customer features of the i-th customer node and the j-th customer node among the unmatched customer nodes, and the f i and the f j Respectively represent the indexes of the i-th and j-th settlement nodes among the settlement nodes that have not been successfully matched, and the c i and the c jrepresent the i-th and j-th customer nodes in the unmatched customer nodes respectively, α represents the weight coefficient, N j represents the set of all neighboring customer nodes of the jth customer node, N i represents the set of all neighboring customer nodes of the i-th customer node;

[0170] Said represents the amount of information transmitted from the i-th customer node to the j-th customer node during the t-th iteration. It represents the amount of information transmitted from the kth customer node to the ith customer node during the t-1th iteration.

[0171] The initial amount of information transmitted between all customer nodes can be set to 0, and the optimal solution is obtained through t iterations.

[0172] S150: The association relationship among the settlement time, the settlement amount and the number of customer nodes obtained according to the target confidence is stored in the second queue.

[0173] Due to b i (f j ) indicates that the i-th customer node among the unmatched customer nodes belongs to the customer node with index f j Therefore, after obtaining the target confidence of each customer node, the corresponding relationship between the customer node represented by the target confidence and the settlement node can be determined according to the target confidence, so that the number of customer nodes for the same settlement node can be counted, and the relationship between the settlement time, settlement amount and the number of customer nodes can be stored in the second queue. Similarly, each queue element in the second queue contains three pieces of information, which can be expressed as Q j = {sum, paytime, num}, where Q j represents the jth queue element, sum represents the settlement amount, paytime represents the settlement time, and num represents the number of customer nodes.

[0174] S160: Calculate the average order value according to the first queue and / or the second queue.

[0175] After obtaining the first queue and the second queue, you can determine which queue to use to calculate the average order value based on actual needs. That is, the average order value calculation methods include the following three methods:

[0176] (1) Calculate a first ratio of the sum of the settlement amounts in the first queue to the sum of the number of customer nodes, and use the first ratio as the average customer price.

[0177] (2) Calculate a second ratio of the sum of the settlement amounts in the second queue to the sum of the number of customer nodes, and use the second ratio as the average customer price.

[0178] (3) The result of weighted processing of the first ratio and the second ratio is used as the average customer price. The calculation formula can be as follows:

[0179] pct 0 =βpct 1 +(1-β)pct 2

[0180] Among them, pct 0 is the average order value, pct 1 is the first ratio, pct 2 is the second ratio, and β is the preset weight. The preset weight can be set according to actual needs. For example, due to pct 1 The accuracy is relatively high, then pct 1 The weight β is set larger.

[0181] Corresponding to the above-mentioned method embodiment for determining the average order value, the present invention provides a device for determining the average order value, such as Figure 2 As shown, the device may include:

[0182] An acquisition unit 20 is used to acquire customer node information based on a pedestrian re-identification algorithm, and acquire bill settlement node information, wherein the customer node information includes an ID, a store entry time, and a store exit time of each customer node, and the bill settlement node information includes a settlement amount and a settlement time of each settlement node;

[0183] A matching unit 22 is used to traverse all customer nodes and match the store entry time and store exit time of each customer node with each settlement time respectively;

[0184] The storage unit 24 is used to count the number of customer nodes that successfully match the same settlement time, and associate the same settlement time, the settlement amount corresponding to the same settlement time, and the number of customer nodes and store them in the first queue;

[0185] An establishing unit 26 is used to establish a conditional random field model for the customer nodes and settlement nodes that have not been successfully matched according to the single customer characteristics and the neighbor customer characteristics, wherein the single customer characteristics are used to characterize the confidence-related characteristics that a single customer node belongs to a certain settlement node, and the neighbor customer characteristics are used to characterize the confidence-related characteristics that two adjacent customer nodes belong to the same settlement node and / or different settlement nodes;

[0186] A propagation unit 28, configured to transfer information in the conditional random field model by using a confidence propagation algorithm, and obtain a target confidence that the unmatched customer node belongs to an unmatched settlement node;

[0187] The storage unit 24 is further used to store the association relationship between the settlement time, the settlement amount and the number of customer nodes obtained according to the target confidence into the second queue;

[0188] The calculation unit 210 is used to calculate the average order value according to the first queue and / or the second queue.

[0189] Optionally, the device further comprises:

[0190] A judgment unit, used to judge whether the time difference between the store entry time and the store exit time of each customer node is less than a preset time threshold before traversing all customers and matching the store entry time and store exit time of each customer node with each settlement time respectively;

[0191] The deleting unit is used to delete the customer nodes whose time is less than the preset time threshold.

[0192] Optionally, the matching unit 22 is used to determine whether each settlement time is within the time range determined by the entry time and exit time of the customer node; if a settlement time is within the time range, it is determined that the customer node is successfully matched with the settlement time; if all settlement times are not within the time range, it is determined that the customer node fails to match each settlement time.

[0193] Optional, build a single 26 yuan, including:

[0194] A first acquisition module is used to acquire the settlement characteristics of the customer node that has not been successfully matched;

[0195] A first calculation module is used to calculate a first average value and a first standard deviation of the normalized settlement characteristics of all unmatched customer nodes; and obtain a single customer characteristic of the unmatched customer node according to the settlement characteristics of the unmatched customer node, the first average value and the first standard deviation;

[0196] A judgment module, configured to judge whether the two customer nodes among the unmatched customer nodes are neighboring customer nodes according to a store entry time difference and a store exit time difference between the two customer nodes;

[0197] The second calculation module is used to calculate the ratio of settlement features of two customer nodes belonging to neighbor customer nodes; calculate the second average value and the second standard deviation of the normalized ratios of all settlement features; and obtain the neighbor customer feature according to the ratio of settlement features, the second average value and the second standard deviation;

[0198] An establishing module is used to establish the conditional random field model according to the single customer characteristics and the neighbor customer characteristics.

[0199] Optionally, a first acquisition module is used to calculate the settlement feature x′ of the unmatched customer node according to a first formula;

[0200] The first formula includes:

[0201]

[0202] Among them, the t out represents the departure time, and t in represents the store entry time, and t pay Indicates the settlement time.

[0203] Optionally, the first calculation module is used to calculate the single customer feature D (f i , c i );

[0204] The second formula includes:

[0205]

[0206] Among them, the f i represents the index of the i-th settlement node among the unmatched settlement nodes, the c i represents the i-th customer node among the unmatched customer nodes, and the μ 1 represents the first mean value, the σ 1 represents the first standard deviation, and x represents the normalized settlement characteristic.

[0207] Optionally, a second calculation module is used to calculate the neighbor customer feature W (f i , f j , c i , c j );

[0208] The third formula includes:

[0209] W(f i , f j , c i , c j )=-log(p(v))-log(1-p(v)

[0210] in,

[0211]

[0212] Among them, the f i and the f j Respectively represent the indexes of the i-th and j-th settlement nodes among the settlement nodes that have not been successfully matched, and the ci and the c j represent the i-th and j-th customer nodes in the unmatched customer nodes respectively, v represents the normalized settlement feature ratio, and μ 2 represents the second average value, the δ 2 represents the second standard deviation.

[0213] Optionally, a module is established for determining the characteristics of a single customer D(f i , c i ) and neighbor customer characteristics W(f i , f j , c i , c j ), establish the conditional random field model P(f / d);

[0214]

[0215] Among them, the f i and the f j Respectively represent the indexes of the i-th and j-th settlement nodes among the settlement nodes that have not been successfully matched, and the c i and the c j represent the i-th and j-th customer nodes among the unmatched customer nodes respectively, S represents the set of unmatched settlement nodes, and N i Indicates that the c i The set of all neighbor customer nodes of , d is a subset of S, and f represents the index of the settlement node that was not successfully matched.

[0216] Optionally, the propagation unit 28 includes:

[0217] An iteration module, used for iteratively calculating the conditional random field model using the confidence propagation algorithm to obtain the confidence that the unmatched customer node belongs to an unmatched settlement node;

[0218] A second acquisition module is used to obtain the target confidence that the unmatched customer node belongs to the unmatched settlement node when the difference between the sums of the confidences of the two most recent iterations is less than a preset difference threshold; the sum of the confidences is the sum of the confidences of all the unmatched customer nodes in one iteration;

[0219] The confidence calculation formula is:

[0220]

[0221]

[0222] The b i (fj ) indicates that the i-th customer node among the unmatched customer nodes belongs to the customer node with index f j The confidence of the settlement node, the D(f i , c i ) represents the single customer feature of the i-th customer node among the unmatched customer nodes, and the W(f i , f j , c i , c j ) represents the neighbor customer features of the i-th customer node and the j-th customer node among the unmatched customer nodes, and the f i and the f j Respectively represent the indexes of the i-th and j-th settlement nodes among the settlement nodes that have not been successfully matched, and the c i and the c j represent the i-th and j-th customer nodes in the unmatched customer nodes respectively, α represents the weight coefficient, N j represents the set of all neighboring customer nodes of the jth customer node, N i represents the set of all neighboring customer nodes of the i-th customer node;

[0223] Said represents the amount of information transmitted from the i-th customer node to the j-th customer node during the t-th iteration. It represents the amount of information transmitted from the kth customer node to the ith customer node during the t-1th iteration.

[0224] Optionally, the computing unit 210 includes:

[0225] The third calculation module is used to calculate a first ratio of the sum of the settlement amounts in the first queue to the sum of the number of customer nodes, and use the first ratio as the average customer price; or, calculate a second ratio of the sum of the settlement amounts in the second queue to the sum of the number of customer nodes, and use the second ratio as the average customer price; or, use the result of weighted processing of the first ratio and the second ratio as the average customer price.

[0226] The device for determining the average customer price provided by the embodiment of the present invention can first obtain the ID, store entry time and store exit time of each customer node based on the pedestrian re-identification algorithm, and obtain the settlement amount and settlement time of each settlement node; then traverse all customer nodes, and match the store entry time and store exit time of each customer node with each settlement time respectively; save the successfully matched customer nodes and settlement nodes as a group of high-confidence data (including settlement time, settlement amount and number of customer nodes) in the first queue, establish a conditional random field model for the customer nodes and settlement nodes that failed to match, and use the confidence propagation algorithm to calculate the conditional random field model, obtain the result of the secondary matching of the customer nodes and settlement nodes and save it in the second queue; finally calculate the average customer price according to the first queue and / or the second queue. It can be seen from this that the embodiment of the present invention can not only automatically associate the relationship between the customer node and the settlement node to realize automatic statistics, but also associate the customer node and the settlement node in different association methods according to different association degrees, so as to efficiently and accurately determine the average customer price.

[0227] Based on the above method embodiment, an embodiment of the present invention provides a storage medium on which executable instructions are stored. When the instructions are executed by a processor, the processor implements the above method.

[0228] Based on the above method embodiment, an embodiment of the present invention provides an electronic device, including:

[0229] one or more processors;

[0230] a storage device for storing one or more programs,

[0231] When the one or more programs are executed by the one or more processors, the one or more processors implement the above method.

[0232] The above-mentioned system and device embodiments correspond to the method embodiments and have the same technical effects as the method embodiments. For specific descriptions, please refer to the method embodiments. The device embodiments are obtained based on the method embodiments. For specific descriptions, please refer to the method embodiment part, which will not be repeated here. It can be understood by those of ordinary skill in the art that the accompanying drawings are only schematic diagrams of one embodiment, and the modules or processes in the accompanying drawings are not necessarily necessary for implementing the present invention.

[0233] Those skilled in the art can understand that the modules in the device in the embodiment can be distributed in the device in the embodiment according to the description of the embodiment, or can be changed accordingly and located in one or more devices different from the embodiment. The modules in the above embodiment can be combined into one module, or can be further divided into multiple sub-modules.

[0234] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for determining the average order value, characterized in that: The method comprises: Acquire customer node information based on a pedestrian re-identification algorithm, and acquire bill settlement node information, wherein the customer node information includes the ID, store entry time, and store exit time of each customer node, and the bill settlement node information includes the settlement amount and settlement time of each settlement node; Traverse all customer nodes and match the store entry time, store exit time and settlement time of each customer node respectively; Counting the number of customer nodes that successfully match the same settlement time, and associating the same settlement time, the settlement amount corresponding to the same settlement time, and the number of customer nodes and storing them in a first queue; For customer nodes and settlement nodes that have not been successfully matched, a conditional random field model is established based on single customer features and neighbor customer features, wherein the single customer features are used to characterize the confidence-related features that a single customer node belongs to a certain settlement node, and the neighbor customer features are used to characterize the confidence-related features that two adjacent customer nodes belong to the same settlement node and / or different settlement nodes; Using a confidence propagation algorithm to transfer information in the conditional random field model, obtaining a target confidence that the unmatched customer node belongs to an unmatched settlement node; storing the association relationship among the settlement time, the settlement amount and the number of customer nodes obtained according to the target confidence into a second queue; Calculating the average order value according to the first queue and / or the second queue; For unmatched customer nodes and settlement nodes, a conditional random field model is established based on the characteristics of single customers and neighboring customers, including: Obtaining the settlement characteristics of the unmatched customer nodes; Calculate the normalized first average value and first standard deviation of the settlement features of all customer nodes that have not been successfully matched; Obtaining a single customer feature of the unsuccessfully matched customer node according to the settlement feature of the unsuccessfully matched customer node, the first average value, and the first standard deviation; According to the store entry time difference and store exit time difference of two customer nodes among the unmatched customer nodes, determining whether the two customer nodes are neighboring customer nodes; Calculating a ratio of settlement characteristics of two customer nodes that are neighbor customer nodes; Calculate the second mean and second standard deviation of the normalized ratios of all settlement characteristics; Obtaining neighbor customer characteristics according to the ratio of the settlement characteristics, the second mean value, and the second standard deviation; According to the single customer characteristics D(f i ,c i ) and neighbor customer characteristics W(f i ,f j ,c i ,c j ), establish the conditional random field model P(f / d); Among them, the f i and the f j Respectively represent the indexes of the i-th and j-th settlement nodes among the settlement nodes that have not been successfully matched, and the c i and the c j represent the i-th and j-th customer nodes among the unmatched customer nodes respectively, S represents the set of unmatched settlement nodes, and N i Indicates that the c i The set of all neighbor customer nodes of , d is a subset of S, and f represents the index of the settlement node that has not been successfully matched; Using a confidence propagation algorithm to transfer information in the conditional random field model, obtaining a target confidence that the unmatched customer node belongs to an unmatched settlement node, including: Iteratively calculating the conditional random field model using the confidence propagation algorithm to obtain the confidence that the unsuccessfully matched customer node belongs to an unsuccessfully matched settlement node; When the difference between the sum of the confidences of the two most recent iterations is less than a preset difference threshold, the confidence obtained in the most recent iteration is determined as the target confidence, and the sum of the confidences is the sum of the confidences of all customer nodes that have not been successfully matched in one iteration; The confidence calculation formula is: The b i (f j ) indicates that the i-th customer node among the unmatched customer nodes belongs to the customer node with index f j The confidence of the settlement node, the D(f i ,c i ) represents the single customer feature of the i-th customer node among the unmatched customer nodes, and the W(f i ,f j ,c i ,c j ) represents the neighbor customer features of the i-th customer node and the j-th customer node among the unmatched customer nodes, and the f i and the f j Respectively represent the indexes of the i-th and j-th settlement nodes among the settlement nodes that have not been successfully matched, and the c i and the c j represent the i-th and j-th customer nodes in the unmatched customer nodes respectively, α represents the weight coefficient, N j represents the set of all neighboring customer nodes of the jth customer node, N i represents the set of all neighboring customer nodes of the i-th customer node; Said represents the amount of information transmitted from the i-th customer node to the j-th customer node during the t-th iteration. It represents the amount of information transmitted from the kth customer node to the ith customer node during the t-1th iteration.

2. The method according to claim 1, characterized in that Before traversing all customer nodes and matching the store entry time and store exit time of each customer node with each settlement time respectively, the method further includes: Determine whether the time difference between the store entry time and store exit time of each customer node is less than a preset time threshold; If there are customer nodes whose time is less than the preset time threshold, the customer nodes whose time is less than the preset time threshold will be deleted.

3. The method according to claim 1, characterized in that Get the settlement characteristics of the unmatched customer node, including: Calculate the settlement feature x′ of the unmatched customer node according to the first formula; The first formula includes: Among them, the t out represents the departure time, and t in represents the store entry time, and t pay Indicates the settlement time.

4. The method according to claim 3, characterized in that Obtaining a single customer feature of the unsuccessfully matched customer node according to the settlement feature of the unsuccessfully matched customer node, the first average value, and the first standard deviation, includes: The single customer feature D(f i ,c i ); The second formula includes: Among them, the f i represents the index of the i-th settlement node among the unmatched settlement nodes, the c i represents the i-th customer node among the unmatched customer nodes, μ1 represents the first average value, σ1 represents the first standard deviation, and x represents the normalized settlement feature.

5. The method according to claim 3, characterized in that Obtaining neighbor customer characteristics according to the ratio of the settlement characteristics, the second mean value, and the second standard deviation includes: According to the third formula, the neighbor customer feature W(f i ,f j ,c i ,c j ); The third formula includes: W(f i ,f j ,c i ,c j )=-log(p(v))-log(1-p(v)) in, Among them, the f i and the f j Respectively represent the indexes of the i-th and j-th settlement nodes among the settlement nodes that have not been successfully matched, and the c i and the c j They respectively represent the i-th and j-th customer nodes among the unmatched customer nodes, v represents the normalized settlement feature ratio, μ2 represents the second mean value, and δ2 represents the second standard deviation.

6. The method according to any one of claims 1 to 5, characterized in that Calculating the average order value according to the first queue and / or the second queue includes: Calculating a first ratio of the sum of the settlement amounts in the first queue to the sum of the number of customer nodes, and using the first ratio as the average customer price; Alternatively, a second ratio of the sum of the settlement amounts in the second queue to the sum of the number of customer nodes is calculated, and the second ratio is used as the average customer price; Alternatively, a result of weighted processing of the first ratio and the second ratio is used as the average order value.

7. A device for determining the average order value, characterized in that: The device comprises: an acquisition unit, configured to acquire customer node information based on a pedestrian re-identification algorithm, and acquire bill settlement node information, wherein the customer node information includes an ID, a store entry time, and a store exit time of each customer node, and the bill settlement node information includes a settlement amount and a settlement time of each settlement node; A matching unit, used to traverse all customer nodes and match the store entry time and store exit time of each customer node with each settlement time; A storage unit, used for counting the number of customer nodes that successfully match the same settlement time, and associating the same settlement time, the settlement amount corresponding to the same settlement time, and the number of customer nodes and storing them in a first queue; An establishing unit, for establishing a conditional random field model for unmatched customer nodes and settlement nodes according to single customer features and neighbor customer features, wherein the single customer features are used to characterize features related to the confidence that a single customer node belongs to a certain settlement node, and the neighbor customer features are used to characterize features related to the confidence that two adjacent customer nodes belong to the same settlement node and / or different settlement nodes; A propagation unit, configured to transfer information in the conditional random field model by using a confidence propagation algorithm, and obtain a target confidence that the unmatched customer node belongs to an unmatched settlement node; The storage unit is further used to store the association relationship between the settlement time, the settlement amount and the number of customer nodes obtained according to the target confidence into the second queue; a calculation unit, configured to calculate the average order value according to the first queue and / or the second queue; The establishing unit comprises: A first acquisition module is used to acquire the settlement characteristics of the customer node that has not been successfully matched; A first calculation module is used to calculate a first average value and a first standard deviation of the normalized settlement characteristics of all unmatched customer nodes; and obtain a single customer characteristic of the unmatched customer node according to the settlement characteristics of the unmatched customer node, the first average value and the first standard deviation; A judgment module, configured to judge whether the two customer nodes among the unmatched customer nodes are neighboring customer nodes according to a store entry time difference and a store exit time difference between the two customer nodes; The second calculation module is used to calculate the ratio of settlement features of two customer nodes belonging to neighbor customer nodes; calculate the second average value and the second standard deviation of the normalized ratios of all settlement features; and obtain the neighbor customer feature according to the ratio of settlement features, the second average value and the second standard deviation; Establish a module for i ,c i ) and neighbor customer characteristics W(f i ,f j ,c i ,c j ), establish the conditional random field model P(f / d); Among them, the f i and the f j Respectively represent the indexes of the i-th and j-th settlement nodes among the settlement nodes that have not been successfully matched, and the c i and the c j represent the i-th and j-th customer nodes among the unmatched customer nodes respectively, S represents the set of unmatched settlement nodes, and N i Indicates that the c i The set of all neighbor customer nodes of , d is a subset of S, and f represents the index of the settlement node that has not been successfully matched; The transmission unit comprises: An iteration module, used for iteratively calculating the conditional random field model using the confidence propagation algorithm to obtain the confidence that the unmatched customer node belongs to an unmatched settlement node; A second acquisition module is used to determine the confidence obtained in the most recent iteration as the target confidence when the difference between the sums of the confidences of the most recent two iterations is less than a preset difference threshold; the sum of the confidences is the sum of the confidences of all customer nodes that have not been successfully matched in one iteration; The confidence calculation formula is: The b i (f j ) indicates that the i-th customer node among the unmatched customer nodes belongs to the customer node with index f j The confidence of the settlement node, the D(f i ,c i ) represents the single customer feature of the i-th customer node among the unmatched customer nodes, and the W(f i ,f j ,c i ,c j ) represents the neighbor customer features of the i-th customer node and the j-th customer node among the unmatched customer nodes, and the f i and the f j Respectively represent the indexes of the i-th and j-th settlement nodes among the settlement nodes that have not been successfully matched, and the c i and the c j represent the i-th and j-th customer nodes in the unmatched customer nodes respectively, α represents the weight coefficient, N j represents the set of all neighboring customer nodes of the jth customer node, N i represents the set of all neighboring customer nodes of the i-th customer node; Said represents the amount of information transmitted from the i-th customer node to the j-th customer node during the t-th iteration. It represents the amount of information transmitted from the kth customer node to the ith customer node during the t-1th iteration.

Citation Information

Patent Citations

  • Improvement method and apparatus used for per customer transaction and repurchase rate

    CN108171530A

  • Pedestrian flow prediction method, device and system

    CN111275479A