Merchant pattern recognition method, device, storage medium and terminal device

By building an operation mode matrix and automatically identifying merchant modes using the pattern classification model, the problem of manual judgment dependence in the existing technology is solved, the accuracy and efficiency of merchant pattern recognition is improved, and the ability to identify malicious merchants is enhanced.

CN110210692BActive Publication Date: 2024-11-26TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201810510337.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-05-24
Publication Date
2024-11-26
Estimated Expiration
2038-05-24

AI Technical Summary

Technical Problem

The prior art relies on manual experience and rule judgment in merchant pattern recognition, resulting in inaccurate identification, making it difficult to effectively identify gray or malicious merchants, and there is a risk of omission.

Method used

By obtaining merchant operation data, building an operation model matrix, and using pre-set pattern classification models to automatically identify merchant model types, avoiding human rules and empirical intervention.

Benefits of technology

It improves the accuracy and efficiency of merchant pattern recognition, reduces the dependence on manual judgment, and enhances the ability to identify gray or malicious merchants.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110210692B_ABST
    Figure CN110210692B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses a merchant pattern recognition method, device, storage medium and terminal device, which are applied to the field of information processing technology. In the method of this embodiment, when the merchant pattern recognition device identifies the merchant pattern type of the merchant to be identified, it can determine the operation pattern matrix through the acquired merchant operation data, and further directly determine the merchant pattern type of the merchant to be identified based on the trained pattern classification model. The pattern classification model is a classifier that can be automatically trained based on certain training samples. In this way, in the whole process of classifying the merchant pattern of the merchant to be identified, no artificial rules and experience are required, so that the merchant pattern type finally determined is more accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information processing technology, and in particular to a merchant pattern recognition method, device, storage medium and terminal equipment. Background Art

[0002] Currently, the analysis of merchant operating models is limited to analysis based on the merchant's industrial and commercial registration information, which may include the merchant name, business category, and merchant operating data, etc. In this way, the merchant category can be inferred from the merchant name and business category, or some divisions can be made based on the merchant name and merchant operating data based on manual experience.

[0003] The existing method of characterizing merchant categories is obviously not accurate enough, and some cases have also shown that the business operations, business model and risks cannot be inferred from the merchant name alone. The business content cannot be reflected from the registration information of the business category alone. The current widespread practice is to use manual auxiliary rules to make judgments, such as paying special attention to merchants with high transaction volumes at night, especially in the early morning, or paying special attention to merchants with a high proportion of credit card payments, etc.

[0004] This kind of traditional experience + rule approach requires human experience and judgment. At the same time, the formulation of rules requires time to accumulate, and it will inevitably lead to some errors. It is not accurate enough to identify gray transactions (such as gambling cash-out, etc.) under the guise of normal merchants, and will inevitably miss some gray or malicious merchants. Summary of the invention

[0005] The embodiments of the present invention provide a merchant pattern recognition method, apparatus, storage medium and terminal device, which realize determining the merchant pattern type of a merchant to be recognized according to a preset pattern classification model.

[0006] An embodiment of the present invention provides a merchant pattern recognition method, comprising:

[0007] Obtaining merchant operation data of the merchant to be identified;

[0008] Determine an operation model matrix according to the merchant operation data, wherein the operation model matrix includes statistical data of multiple dimensional information;

[0009] The merchant model type of the merchant to be identified is determined according to the operation model matrix and the preset model classification model.

[0010] An embodiment of the present invention provides a merchant pattern recognition device, including:

[0011] An operation acquisition unit, used to acquire merchant operation data of the merchant to be identified;

[0012] A matrix acquisition unit, configured to determine an operation mode matrix according to the merchant operation data, wherein the operation mode matrix includes statistical data of multiple dimensional information;

[0013] The type determination unit is used to determine the merchant model type of the merchant to be identified according to the operation model matrix and the preset model classification model.

[0014] An embodiment of the present invention provides a storage medium on one hand, wherein the storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the merchant pattern recognition method as described in the first aspect of the embodiment of the present invention.

[0015] An embodiment of the present invention provides a terminal device, including a processor and a storage medium, wherein the processor is used to implement various instructions;

[0016] The storage medium is used to store a plurality of instructions, and the instructions are used to be loaded by a processor and execute the merchant pattern recognition method as described in the embodiment of the present invention.

[0017] It can be seen that in the method of this embodiment, when the merchant pattern recognition device identifies the merchant pattern type of the merchant to be identified, it can determine the operation pattern matrix through the acquired merchant operation data, and further directly determine the merchant pattern type of the merchant to be identified based on the trained pattern classification model. The pattern classification model is a classifier that can be automatically trained based on certain training samples. In this way, in the entire process of classifying the merchant pattern of the merchant to be identified, no artificial rules and experience are required, so that the merchant pattern type finally determined is more accurate. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the embodiments of the present invention 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 some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0019] Figure 1 is a schematic diagram of the structure of a system to which a merchant pattern recognition method provided by an embodiment of the present invention is applied;

[0020] Figure 2 is a flow chart of a merchant pattern recognition method provided by an embodiment of the present invention;

[0021] Figure 3 is a flow chart of a method for training a pattern classification model in one embodiment of the present invention;

[0022] Figure 4It is a structural diagram of a pattern classification model in an application embodiment of the present invention;

[0023] Figure 5 is a flow chart of a merchant pattern recognition method provided by an application embodiment of the present invention;

[0024] Figure 6 is a structural schematic diagram of a merchant pattern recognition device provided by an embodiment of the present invention;

[0025] Figure 7 is a structural schematic diagram of another merchant pattern recognition device provided by an embodiment of the present invention;

[0026] Figure 8 It is a structural diagram of a terminal device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0027] The following will be combined with the 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.

[0028] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can, for example, be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0029] The embodiment of the present invention provides a merchant pattern recognition method, which can be mainly applied to Figure 1 In the system shown, the system includes a merchant pattern recognition device, and at least one integrated payment system (such as a WeChat payment system, etc.), and may also include a merchant operation system. In this embodiment, n integrated payment systems are used as an example. Among them:

[0030] The merchant mode recognition device can obtain merchant operation data from various integrated payment systems, and can also obtain merchant operation data of corresponding merchants from the above operation system; and recognize the merchant mode of any merchant based on the obtained merchant operation data, wherein the merchant mode generally refers to the type of merchant operation content, such as daily small retail type, Internet cafe type, or large catering type, etc. More broadly, the merchant mode can also refer to the type of operation behavior, such as gambling cash-out type, etc. Specifically, the merchant mode recognition device can recognize by the following method:

[0031] Obtain merchant operation data of the merchant to be identified; determine an operation mode matrix based on the merchant operation data, wherein the operation mode matrix includes statistical data of multiple dimensional information; determine the merchant mode type of the merchant to be identified based on the operation mode matrix and a preset mode classification model.

[0032] It should be noted that the above-mentioned merchant pattern recognition device can be a server deployed in the network, or can be a terminal device used by the user.

[0033] The pattern classification model in the embodiment of the present invention is a classifier, which can be automatically trained according to certain training samples. In this way, in the whole process of classifying the merchant pattern of the merchant to be identified, no artificial rules and experience are required, so that the merchant pattern type finally determined is more accurate.

[0034] An embodiment of the present invention provides a merchant pattern recognition method, which is mainly a method performed by a merchant pattern recognition device. The flow chart is as follows: Figure 2 As shown, including:

[0035] Step 101, obtaining merchant operation data of the merchant to be identified.

[0036] It can be understood that the merchant pattern recognition device can initiate the process of this embodiment according to a certain period. In this way, after initiating the process of this embodiment in a certain period, the merchant pattern recognition device can obtain the merchant operation data of the merchant to be identified between this period and the next period, and the merchant operation data is specifically information of multiple dimensions. Generally, 7 days is a period.

[0037] Merchant operation data refers to information related to the transfer of operation content during the process of the merchant to be identified transferring the operation content, which may include but is not limited to information in at least one of the following dimensions: collection time, payment amount, payment method and other information; commodity attribute information such as commodity type; and buyer user attribute information such as gender, age and region. The user's attribute information may not involve the specific information of a single buyer user, that is, the user's attribute information may be statistical information, the proportion of basic attributes such as gender and age in the user group, and does not involve the specific information of a single user at all.

[0038] When acquiring the merchant operation data, the merchant pattern recognition device can be connected to the merchant operation system to instantly acquire the merchant operation data from the merchant operation system.

[0039] Generally, the merchant model recognition device can connect to various integrated payment systems (such as WeChat payment system, etc.) and obtain the transaction information of each merchant in each integrated payment system, and the transaction information can be used as merchant operation data. Although the transaction information in each payment system may be part of the transaction information in the merchant operation process, if the merchant operation is relatively frequent, this part of the transaction information can also be used to analyze the merchant model type of the merchant.

[0040] Step 102: Determine an operation mode matrix based on the merchant operation data, where the operation mode matrix includes statistical data of multiple dimensions. The statistical data of each dimension is obtained based on the above merchant operation data.

[0041] Specifically, in one case, when executing the above step 101, the merchant pattern recognition device directly obtains the merchant operation data within a cycle, and then executes step 102 for the merchant operation data within this cycle. In this case, the merchant pattern recognition device can first divide the merchant operation data within this cycle (such as 7 days) into merchant operation data within multiple sub-cycles (one hour); then, based on the merchant operation data within multiple sub-cycles, respectively count the distribution values ​​of multiple dimensional information within each sub-cycle; respectively form a matrix with the distribution values ​​of multiple dimensional information within each sub-cycle as an operation pattern matrix; or respectively form a matrix with the distribution values ​​within multiple sub-cycles of each dimensional information as an operation pattern matrix.

[0042] The distribution value of a certain dimension information within a sub-period refers to the distribution value of each interval in the dimension information within a sub-period. Specifically, when the merchant pattern recognition device organizes the distribution values ​​of multiple dimensional information within each sub-period into a matrix as an operation mode matrix, the distribution values ​​of each dimensional information within a sub-period can be used as a row element or a column element of the operation mode matrix, so that one period can correspond to one operation mode matrix; when the distribution values ​​within multiple sub-periods of each dimensional information are organized into a matrix as an operation mode matrix, the distribution values ​​within each sub-period of a dimensional information can be used as a row element or a column element of the operation mode matrix, so that one dimensional information can correspond to one operation mode matrix.

[0043] For example, the merchant operation system of merchant A received 50 payments in the sub-period from 10:00 to 11:00 on Monday morning, with a total amount of 500 yuan, of which:

[0044] There are 32 transactions of 0-10 yuan, totaling 180 yuan;

[0045] There were 13 transactions of 10-20 yuan, totaling 147 yuan;

[0046] There are 4 transactions of 20-50 yuan, totaling 114 yuan;

[0047] There is one note for 50-100 yuan, which is 59 yuan;

[0048] There are 0 transactions between 100 yuan and 1000 yuan, totaling 0 yuan;

[0049] 0 transactions above 1,000 Yuan, totaling 0 Yuan.

[0050] In this sub-period, the distribution values ​​of user ages are:

[0051] 0 people aged 0-14 years;

[0052] 21 people aged 14-25;

[0053] 15 people aged 26-40;

[0054] 11 people aged 40-60;

[0055] 3 persons aged 60 and above.

[0056] Therefore, the distribution values ​​of the collection amount dimension in the sub-period from 10 to 11 o'clock form an array of [500, 180, 147, 114, 59, 0, 0];

[0057] The distribution values ​​of the number of receipts in the sub-period from 10:00 to 11:00 form an array of [50, 32, 13, 4, 4, 0, 0];

[0058] The distribution values ​​of the user age dimension in the sub-period from 10 o'clock to 11 o'clock form an array of [0, 21, 15, 11, 3].

[0059] In this way, the distribution values ​​of multiple dimensional information in this sub-period are respectively composed into a matrix: This is the operation mode matrix. The number of arrays s1 composed of the dimension of user age is different from the number of arrays s2 composed of other dimensions, and s1 is smaller than s2. When forming the operation mode matrix, the array composed of the dimension of user age can be padded to the same number as s2, that is, [0, 21, 15, 11, 3, 0, 0].

[0060] When the distribution values ​​in multiple sub-periods of each dimension information are combined into a matrix as the operation mode matrix, for the dimension of the amount of receipt, in addition to the distribution values ​​in the sub-period from 10 o'clock to 11 o'clock, the array composed of the distribution values ​​in sub-period 1 is obtained [a11, a12, a13, a14, a15, a16, a17], ..., and the array composed of the distribution values ​​in sub-period n is obtained [an1, an2, an3, an4, an5, an6, an7]. The operation mode matrix obtained in this way is:

[0061] In another case, when the merchant pattern recognition device executes the above-mentioned step 101, it first obtains the merchant operation data in a sub-period in a cycle, and then when executing step 102, it can first execute the step of counting the distribution values ​​of multiple dimensional information in the sub-period based on the merchant operation data in the sub-period. In this way, by repeatedly executing step 101 and the step of counting the distribution data, the distribution values ​​of multiple dimensional information in all sub-periods included in a cycle can be obtained; finally, the distribution values ​​of the multiple dimensional information in each sub-period are respectively combined into a matrix as the operation pattern matrix; or the distribution values ​​in multiple sub-periods of each dimensional information are respectively combined into a matrix as the operation pattern matrix.

[0062] In this case, each time the merchant pattern recognition device executes step 102, it can directly process the merchant operation data within a sub-period, without first obtaining the number of merchant operations in the entire period and then dividing the merchant operation data within each sub-period, thereby simplifying the method of determining the operation pattern matrix; and the statistics of distribution values ​​corresponding to multiple sub-periods can be executed in parallel, which improves the calculation speed of determining the operation pattern matrix.

[0063] It should be noted that for merchants with uniform business conditions, a cycle can be set to 7 days, and the corresponding sub-cycle can be set to every hour. For merchants with sparse business conditions, a cycle can be set to 5 working days, and the next cycle can be set to two weekends, and the next cycle can be set to 5 working days, and so on; when a cycle is 5 days, the corresponding sub-cycles can be sub-cycles for the early morning, morning, noon, afternoon and evening time periods, and when a later period is two days, the corresponding sub-cycle can be every hour. In practical applications, the intervals of each sub-cycle within a cycle can be set according to actual conditions, so that the data in the final operation mode matrix will not be too sparse. If the number of 0s in the operation mode matrix is ​​much greater than the non-zero items, the operation mode matrix is ​​a sparse matrix.

[0064] Among them, the uniform operating status of a merchant means that the merchant has corresponding transaction information every day, and the number of transactions per day is relatively average, such as 6 transactions on the first day and 10 transactions on the second day; while the sparse operating status of a merchant means that the merchant does not necessarily have corresponding transaction information every day. At some times (such as weekends), the average number of transactions per day S1 is more, and at other times, the average number of transactions per day S2 is less, and the difference between S1 and S2 is large.

[0065] Step 103: Determine the merchant model type of the merchant to be identified according to the operation model matrix and the preset model classification model.

[0066] The preset pattern classification model here can be pre-set by the user in the merchant pattern recognition device, and is mainly used to determine the merchant pattern type of the merchant corresponding to the matrix according to any matrix with a certain amount of information (i.e., the operation pattern matrix). Specifically, it can include but is not limited to any of the following algorithm structures: Convolutional Neural Network (CNN), K nearest neighbors (KNN), singular value decomposition (SVD) and non-negative matrix factorization (NMF), etc.

[0067] It can be seen that in the method of this embodiment, when the merchant pattern recognition device identifies the merchant pattern type of the merchant to be identified, it can determine the operation pattern matrix through the acquired merchant operation data, and further directly determine the merchant pattern type of the merchant to be identified based on the trained pattern classification model. The pattern classification model is a classifier that can be automatically trained based on certain training samples. In this way, in the entire process of classifying the merchant pattern of the merchant to be identified, no artificial rules and experience are required, so that the merchant pattern type finally determined is more accurate.

[0068] It should be noted that the above-mentioned preset pattern classification model can be trained based on certain training samples. Specifically, the pattern classification model can be trained by the following method. The flowchart is as follows: Figure 3 As shown, including:

[0069] Step 201, determining an initial pattern classification model.

[0070] Specifically, the merchant pattern recognition device determines the multi-layer structure of the initial pattern classification model and determines the initial values ​​of the fixed parameters in each layer structure. The multi-layer structure of the initial pattern classification model can be any of the following algorithm structures: CNN, KNN, SVD and NMF, etc., which generally include feature extraction layer and classification layer; and the fixed parameters refer to the fixed parameters used in the calculation process of each layer structure in the initial pattern classification model, which do not need to be assigned at any time, such as weights, angles and other parameters.

[0071] If the above-mentioned initial pattern classification model is a CNN algorithm structure, the multi-layer structure of the determined initial pattern classification model may include a convolution layer, a pooling layer, a fully connected layer and a normalization layer. Among them, the convolution layer is used to extract the characteristics of the merchant operation according to the operation mode matrix sample to obtain a feature matrix; the pooling layer is used to sample and calculate the feature matrix obtained by the convolution layer to obtain a sampled matrix; the fully connected layer is used to calculate the scores of a certain sample merchant belonging to multiple known merchant model types according to the sampled matrix; the normalization layer is used to output the probability of a certain merchant belonging to each known merchant model type according to the scores of a certain sample merchant belonging to multiple known merchant model types.

[0072] In this case, the corresponding fixed parameters may include: convolution kernels, pooling kernels, and probability calculation parameters in fully connected layers.

[0073] Step 202: determine training samples, where the training samples include operation model matrix samples corresponding to a plurality of sample merchants, and merchant model types to which the plurality of sample merchants belong.

[0074] The operation model matrix sample of each sample merchant in the training sample can be obtained according to the method after the above steps 101 and 102. In the training sample, the merchant model type of each sample merchant also needs to be marked.

[0075] Step 203: classify the merchant models of the multiple sample merchants respectively through the initial model classification model to obtain an initial classification result. The initial classification result includes merchant model models corresponding to the multiple sample merchants respectively.

[0076] Step 204, calculating the loss function value associated with the initial pattern classification model according to the initial classification result and the merchant pattern types to which the plurality of sample merchants in the training sample belong.

[0077] Here, the loss function associated with the initial pattern classification model is used to represent the difference between the merchant model type corresponding to each operation model matrix sample in the training sample determined according to the initial pattern classification model and the actual merchant model type of each sample merchant (obtained according to the merchant model type to which each sample merchant belongs, including the training sample), that is, the error. The mathematical expression of the error usually uses cross entropy to establish the loss function, and the training process of the pattern classification model is to minimize the value of this error. The training process is to continuously optimize the initial value of the fixed parameter determined in the above step 201 through a series of mathematical optimization means such as back propagation derivation and gradient descent, and minimize the calculated value of this function. Therefore, after executing this step 204, the merchant pattern recognition device needs to execute the adjustment step in step 205.

[0078] Step 205, adjusting the fixed parameter values ​​in the initial pattern classification model according to the loss function value to obtain the above preset pattern classification model. Here, the initial values ​​of the fixed parameters in each layer structure included in the initial pattern classification model are mainly adjusted.

[0079] Specifically, if the function value of the calculated loss function is large, such as greater than the preset value, it is necessary to change the fixed parameter value, such as increasing the weight value of a certain weight, or reducing the angle value of a certain angle, etc., so that the function value of the loss function calculated according to the adjusted fixed parameter value is reduced.

[0080] It should be noted that the above steps 203 to 205 are an adjustment of the fixed parameter values ​​in the initial pattern classification model according to the initial classification results after the merchant patterns of each sample merchant in the training sample are classified by the initial pattern classification model to obtain the initial classification results. In actual applications, it is necessary to continuously loop through the above steps 203 to 205 until the adjustment of the fixed parameter values ​​meets certain stop conditions.

[0081] Therefore, after executing steps 201 to 205 of the above embodiment, the merchant pattern recognition device still needs to determine whether the current adjustment of the fixed parameter value meets the preset stop condition. If so, the process ends; if not, the initial pattern classification model after adjusting the fixed parameter value is returned to execute steps 203 to 205 above.

[0082] Among them, the preset stop conditions include but are not limited to any one of the following conditions: the difference between the currently adjusted fixed parameter value and the last adjusted fixed parameter value is less than a threshold, that is, the adjusted fixed parameter value reaches convergence; and the number of adjustments to the fixed parameter value reaches a preset number, etc.

[0083] The following is a specific example to illustrate the merchant pattern recognition method of the present invention. The method of this embodiment can be applied to Figure 1 In the system shown, the merchant pattern recognition device in this embodiment can be a terminal device used by the user, and specifically performs the following two parts of the method:

[0084] 1. Training Pattern Classification Model

[0085] Specifically, the user can operate the terminal device so that the terminal device initiates the training process of the training mode classification model. Figure 3 The process shown in FIG. 1 is used to train the pattern classification model, which will not be described in detail here. The training sample may be input into the terminal device by the user, and the determined initial pattern classification model may specifically include: Figure 4 The CNN algorithm structure shown includes:

[0086] (1) The convolution layer is used to extract the characteristics of the merchant operation based on the operation mode matrix samples to obtain the feature matrix. This layer is provided with multiple convolution kernels, which perform convolution calculations with the input operation mode matrix samples of each sample merchant respectively, so as to obtain the characteristics of each sample merchant based on the operation mode. The fixed parameters of this convolution layer include multiple convolution kernels.

[0087] Among them, the operation model matrix sample corresponding to a certain sample merchant can include the distribution value of at least one (for example, P) dimension information, that is, the elements in the operation model matrix sample can represent the distribution value of one dimension information in a period, so that the operation model matrix sample corresponding to a certain sample merchant can include P matrices, and each matrix can be convolved with multiple convolution kernels respectively. Assume that convolution is performed on P matrices respectively to obtain Q first matrices, that is, feature matrices, and the value of Q is much larger than P.

[0088] (2) The pooling layer is a downsampling layer, which is used to perform sampling calculations on the feature matrix obtained by the convolution layer to obtain a sampled matrix, which can reduce the amount of data to be calculated, thereby increasing the calculation speed. The fixed parameters of the pooling layer include multiple pooling kernels.

[0089] Specifically, the pooling kernel is used to downsample the Q first matrices respectively to obtain Q second matrices, that is, the sampled matrices.

[0090] (3) Fully connected layers (FCs) are used to calculate the scores of a sample merchant belonging to multiple known merchant model types based on the sampled matrix.

[0091] Specifically, the fully connected layer combines the Q second matrices after pooling to calculate the scores of the sample merchants belonging to multiple known merchant model types.

[0092] (4) The normalization layer is used to output the probability that a sample merchant belongs to each known merchant model type based on the scores of the sample merchant belonging to multiple known merchant model types.

[0093] The fixed parameters of the above-mentioned fully connected layer and normalization layer may include probability calculation parameters.

[0094] The sum of the probabilities that a sample merchant belongs to multiple known merchant model types is 1. Assume that the known merchant model types are: daily small retail type, high-end catering type, snack type, and Internet cafe type.

[0095] If after the convolution layer, pooling layer and fully connected layer in the initial pattern classification model, the score of a sample merchant belonging to the snack type is 90, the score of a sample merchant belonging to the daily small retail type is 80, the score of a sample merchant belonging to the Internet cafe type is 35, and the score of a sample merchant belonging to the high-end catering type is 5.

[0096] Therefore, after the normalization layer, we get: the probability that a certain sample merchant belongs to the snack type is 90 / (90+70+35+5)=0.45, the probability that a certain sample merchant belongs to the daily small retail type is 70 / (90+70+35+5)=0.35, the probability that a certain sample merchant belongs to the Internet cafe type is 35 / (90+70+35+5)=0.175, and the probability that a certain sample merchant belongs to the high-end catering type is 5 / (90+70+35+5)=0.025.

[0097] This probability is consistent with our daily experience. The operating models of daily small retail types are relatively close to those of snack types, so the probabilities obtained through the normalization layer are slightly close; and the operating model of the Internet cafe type usually also includes a certain amount of small retail, so the operating model of the Internet cafe type and the daily small retail type also have certain similarities; and the operating model of the high-end catering type is quite different from other types of operating models.

[0098] It should be noted that, in other specific embodiments, the initial pattern classification model determined by the terminal device may include multiple convolutional layers, and multiple convolutional layers enable the obtained feature matrix to more globally describe the characteristics of the merchant operation; and accordingly, each convolutional layer may be connected to a pooling layer. That is, the initial pattern classification model may include: multiple groups of convolutional layers and pooling layers, fully connected layers, and normalization layers.

[0099] In addition, after the terminal device has trained the pattern classification model, the specific information of the pattern classification model can be preset in the terminal device.

[0100] 2. Determine the merchant model type of the merchant to be identified. The flow chart is as follows Figure 5 As shown, including:

[0101] In step 301, the user can operate the terminal device to display a user interface, so that the user can select a merchant a in the user interface, and set the cycle (such as one week) and each sub-cycle (such as one hour) for collecting merchant operation data, and finally trigger the process of determining the merchant model type of the selected merchant a.

[0102] In this way, the terminal device will connect to various integrated payment systems, and can also connect to the merchant operation system of merchant a, and collect the merchant operation data of merchant a (i.e., the merchant to be identified) within one hour (a sub-cycle mentioned above) within a week (i.e., one cycle mentioned above), including information related to the transfer operation content, such as collection time, payment amount, payment method, etc., as well as the buyer's personal attribute information such as gender, age, etc.

[0103] After the terminal device obtains the merchant operation data within one hour, step 302 may be executed.

[0104] In step 302, the terminal device counts the distribution values ​​of multiple dimensional information within one hour, such as the distribution value of the collection amount, etc., based on the merchant operation data within one hour.

[0105] In step 303 , the terminal device determines whether the distribution values ​​of the multiple dimensional information in all hours within a week have been counted. If so, step 304 is executed; if not, the terminal device returns to step 301 .

[0106] In step 304, the terminal device organizes the distribution values ​​in multiple sub-periods (hours) of each dimension information into a matrix as the operation mode matrix of merchant a, so that each dimension information can correspond to an operation mode matrix.

[0107] Step 305: The terminal device determines the merchant model type of merchant a according to the operation model matrix obtained in step 304 and the model classification model obtained through the training.

[0108] Specifically, the operation mode matrix obtained in the above step 304 is input into the mode classification model, and then passes through the convolution layer, the pooling layer, the fully connected layer and the normalization layer, so that the merchant mode type of merchant a can be output.

[0109] In other specific embodiments, the merchant pattern recognition device may be a server deployed in a network. In this case, a user may initiate a process of training a pattern classification model on the server through a client corresponding to the server, and initiate a process of determining a merchant pattern type of a merchant to be identified on the server, which will not be elaborated here.

[0110] The embodiment of the present invention also provides a merchant pattern recognition device, the structural diagram of which is shown in FIG. Figure 6 As shown, it may specifically include:

[0111] An operation acquisition unit 10, used to acquire merchant operation data of the merchant to be identified;

[0112] The matrix acquisition unit 11 is used to determine the operation mode matrix according to the merchant operation data acquired by the operation acquisition unit 10, and the operation mode matrix includes statistical data of multiple dimensional information.

[0113] In one case, the matrix acquisition unit 11 is specifically used to divide the merchant operation data within one cycle into merchant operation data within multiple sub-cycles if the merchant operation data is merchant operation data within one cycle; according to the merchant operation data within the multiple sub-cycles, respectively count the distribution values ​​of multiple dimensional information within each sub-cycle; respectively form a matrix with the distribution values ​​of the multiple dimensional information within each sub-cycle as the operation mode matrix; or respectively form a matrix with the distribution values ​​within multiple sub-cycles of each dimensional information as the operation mode matrix.

[0114] In another case, if the operation acquisition unit 10 respectively acquires the merchant operation data in a sub-period in a cycle, then the matrix acquisition unit 11 is specifically used to count the distribution values ​​of multiple dimensional information in a sub-period according to the merchant operation data in the sub-period; the distribution values ​​of the multiple dimensional information in each sub-period are respectively formed into a matrix as the operation mode matrix; or the distribution values ​​in multiple sub-periods of each dimensional information are respectively formed into a matrix as the operation mode matrix.

[0115] Among them: multiple dimensional information includes any of the following information: the number of merchant payments, amount range, user age, user gender, number of people using credit cards and number of people using cash payments, etc.

[0116] The type determination unit 12 is used to determine the merchant model type of the merchant to be identified according to the operation model matrix determined by the matrix acquisition unit 11 and the preset model classification model.

[0117] It can be seen that when the merchant pattern recognition device of this embodiment recognizes the merchant pattern type of the merchant to be recognized, the matrix acquisition unit 11 can determine the operation pattern matrix through the acquired merchant operation data, and further, the type determination unit 12 directly determines the merchant pattern type of the merchant to be recognized based on the trained pattern classification model. The pattern classification model is a classifier that can be automatically trained based on certain training samples. In this way, in the entire process of classifying the merchant pattern of the merchant to be recognized, no artificial rules and experience are required, so that the merchant pattern type finally determined is more accurate.

[0118] refer to Figure 7 As shown, in a specific embodiment, the merchant pattern recognition device may include the following Figure 6 In addition to the structure shown, it can also include a training determination unit 13, a classification unit 14 and an adjustment unit 15, wherein:

[0119] The training determination unit 13 is used to determine an initial mode classification model; determine training samples, wherein the training samples include operation mode matrix samples corresponding to a plurality of sample merchants, and merchant mode types to which the plurality of sample merchants belong.

[0120] The classification unit 14 is used to classify the merchant models of the plurality of sample merchants respectively through the initial model classification model determined by the training determination unit 13 to obtain an initial classification result.

[0121] The adjustment unit 15 is used to calculate the loss function value related to the initial pattern classification model according to the initial classification result obtained by the classification unit 14 and the merchant model type to which the multiple sample merchants belong; and adjust the fixed parameter values ​​in the initial pattern classification model according to the loss function value to obtain the preset pattern classification model.

[0122] It should be noted that, when determining the initial pattern classification model, the training determination unit 13 is specifically used to determine the multi-layer structure of the initial pattern classification model and to determine the initial values ​​of the fixed parameters in each layer structure; the adjustment unit 15 will adjust the initial values ​​of the fixed parameters according to the loss function value.

[0123] Among them, the multi-layer structure of the initial pattern classification model includes: a convolutional layer, a pooling layer, a fully connected layer and a normalization layer, wherein: the convolutional layer is used to extract the characteristics of the merchant operation according to the operation mode matrix sample to obtain a feature matrix; the pooling layer is used to sample and calculate the feature matrix obtained by the convolutional layer to obtain a sampled matrix; the fully connected layer is used to calculate the scores of a certain sample merchant belonging to multiple known merchant model types according to the sampled matrix; the normalization layer is used to output the probability that the certain sample merchant belongs to each known merchant model type according to the scores of the certain sample merchant belonging to multiple known merchant model types.

[0124] The adjustment unit 15 is further used to stop adjusting the fixed parameter value if the adjustment of the fixed parameter value meets any of the following stop conditions: the number of adjustments to the fixed parameter value reaches a preset number, and the difference between the currently adjusted fixed parameter value and the last adjusted fixed parameter value is less than a threshold.

[0125] In this way, after the adjustment unit 15 adjusts the fixed parameter values ​​in the initial pattern classification model determined by the training determination unit 13, the type determination unit 12 can identify the merchant pattern type according to the pattern classification model finally obtained after the adjustment unit 15 adjusts the fixed parameter values.

[0126] The embodiment of the present invention further provides a terminal device, the structural diagram of which is shown in FIG. Figure 8 As shown, the terminal device may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 20 (for example, one or more processors) and memory 21, and one or more storage media 22 (for example, one or more mass storage devices) storing application programs 221 or data 222. Among them, the memory 21 and the storage medium 22 can be short-term storage or permanent storage. The program stored in the storage medium 22 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the terminal device. Furthermore, the central processing unit 20 can be configured to communicate with the storage medium 22 to execute a series of instruction operations in the storage medium 22 on the terminal device.

[0127] Specifically, the application 221 stored in the storage medium 22 includes an application for merchant pattern recognition, and the program may include the operation acquisition unit 10, the matrix acquisition unit 11, the type determination unit 12, the training determination unit 13, the classification unit 14 and the adjustment unit 15 in the above-mentioned merchant pattern recognition device, which are not described in detail here. Furthermore, the central processor 20 can be configured to communicate with the storage medium 22 and execute a series of operations corresponding to the application for merchant pattern recognition stored in the storage medium 22 on the terminal device.

[0128] The terminal device may also include one or more power supplies 23, one or more wired or wireless network interfaces 24, one or more input and output interfaces 25, and / or one or more operating systems 223, such as Windows Server TM, Mac OS X TM, Unix TM, Linux TM, FreeBSD TM, etc.

[0129] The steps performed by the merchant pattern recognition device in the above method embodiment can be based on the Figure 8 The structure of the terminal device shown.

[0130] An embodiment of the present invention further provides a storage medium, wherein the storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the merchant pattern recognition method executed by the merchant pattern recognition device as described above.

[0131] An embodiment of the present invention further provides a terminal device, including a processor and a storage medium, wherein the processor is used to implement various instructions;

[0132] The storage medium is used to store a plurality of instructions, and the instructions are used to be loaded by a processor and execute the merchant pattern recognition method executed by the merchant pattern recognition device as described above.

[0133] A person skilled in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing the relevant hardware through a program, and the program may be stored in a computer-readable storage medium, which may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0134] The merchant pattern recognition method, device, storage medium and terminal device provided in the embodiments of the present invention are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present invention, 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 invention.

Claims

1. A merchant pattern recognition method, It is characterized in that include: Obtaining merchant operation data of the merchant to be identified; Determine an operation mode matrix according to the merchant operation data, wherein the operation mode matrix includes statistical data of multiple dimensional information; the multiple dimensional information includes attribute information of the buyer user and payment information of the merchant; Determining the merchant model type of the merchant to be identified according to the operation model matrix and the preset model classification model; The merchant operation data is merchant operation data within a period, and determining the operation mode matrix according to the merchant operation data includes: Dividing the merchant operation data within the one cycle into merchant operation data within a plurality of sub-cycles; According to the merchant operation data in the multiple sub-periods, respectively counting the distribution values ​​of the multiple dimensional information in each sub-period; The distribution values ​​of multiple dimensional information in each sub-period are respectively composed into a matrix as the operation mode matrix, wherein the distribution values ​​of each interval in any dimensional information in any sub-period are a row of elements or a column of elements in the operation mode matrix; or the distribution values ​​in multiple sub-periods of each dimensional information are respectively composed into a matrix as the operation mode matrix, wherein the distribution values ​​in any sub-period of any dimensional information are a row of elements or a column of elements in the operation mode matrix; If the number of arrays composed of the distribution values ​​of any dimension is different from the number of arrays composed of the distribution values ​​of other dimensions, the array composed of the distribution values ​​of any dimension with the smaller number of arrays is padded so that the number of arrays composed of the distribution values ​​of any dimension is the same; The pattern classification model is obtained by training based on the initial pattern classification model. The multi-layer structure of the initial pattern classification model includes: a convolution layer, a pooling layer, a fully connected layer and a normalization layer, wherein: The convolution layer is used to extract the characteristics of merchant operations according to the operation mode matrix sample to obtain a feature matrix; The pooling layer is used to perform sampling calculation on the feature matrix obtained by the convolution layer to obtain a sampled matrix; The fully connected layer is used to calculate the scores of a certain sample merchant belonging to multiple known merchant model types according to the sampled matrix; The normalization layer is used to output the probability that the certain sample merchant belongs to each known merchant model type according to the scores of the certain sample merchant belonging to multiple known merchant model types.

2. The method according to claim 1, It is characterized in that The obtaining of merchant operation data of the merchant to be identified includes: obtaining merchant operation data in each sub-period in a period respectively; Determining the operation mode matrix according to the merchant operation data specifically includes: counting distribution values ​​of multiple dimensional information in each sub-period according to the merchant operation data in each sub-period; The distribution values ​​of multiple dimensional information in each sub-period are respectively composed into a matrix as the operation mode matrix; or the distribution values ​​of multiple sub-periods of each dimensional information are respectively composed into a matrix as the operation mode matrix.

3. The method according to claim 2, It is characterized in that The multiple dimensional information includes any multiple of the following information: the number of merchant's receipts, the amount range, the user's age, the user's gender, the number of people using credit cards and the number of people using cash to pay.

4. The method according to any one of claims 1 to 3, It is characterized in that Before determining the merchant model type of the merchant to be identified according to the operation model matrix and the preset model classification model, the method further includes: determining an initial pattern classification model; Determine a training sample, wherein the training sample includes operation mode matrix samples corresponding to a plurality of sample merchants, and merchant mode types to which the plurality of sample merchants belong; Classifying the merchant models of the plurality of sample merchants respectively by using the initial model classification model to obtain an initial classification result; Calculating a loss function value associated with the initial model classification model according to the initial classification result and the merchant model types to which the multiple sample merchants belong; The fixed parameter values ​​in the initial pattern classification model are adjusted according to the loss function value to obtain the preset pattern classification model.

5. The method according to claim 4, It is characterized in that The determining of the initial pattern classification model specifically includes: Determining the multi-layer structure of the initial pattern classification model and determining the initial values ​​of the fixed parameters in each layer structure; The adjusting the fixed parameter values ​​in the initial pattern classification model according to the loss function value specifically includes: adjusting the initial values ​​of the fixed parameters according to the loss function value.

6. The method according to claim 4, It is characterized in that If the adjustment of the fixed parameter value satisfies any of the following stop conditions, the adjustment of the fixed parameter value is stopped: The number of adjustments to the fixed parameter value reaches a preset number, and the difference between the currently adjusted fixed parameter value and the last adjusted fixed parameter value is less than a threshold.

7. A merchant pattern recognition device, It is characterized in that include: An operation acquisition unit, used to acquire merchant operation data of the merchant to be identified; A matrix acquisition unit, used to determine an operation mode matrix according to the merchant operation data, wherein the operation mode matrix includes statistical data of multiple dimensional information; the multiple dimensional information includes attribute information of the buyer user and payment information of the merchant; A type determination unit, configured to determine the merchant model type of the merchant to be identified according to the operation model matrix and a preset model classification model; The matrix acquisition unit is specifically used to divide the merchant operation data within one cycle into merchant operation data within multiple sub-cycles if the merchant operation data is the merchant operation data within one cycle; according to the merchant operation data within the multiple sub-cycles, respectively count the distribution values ​​of multiple dimensional information within each sub-cycle; respectively form a matrix with the distribution values ​​of the multiple dimensional information within each sub-cycle as the operation mode matrix, wherein the distribution values ​​of each interval in any dimensional information within any sub-cycle are a row of elements or a column of elements in the operation mode matrix; or respectively form a matrix with the distribution values ​​within multiple sub-cycles of each dimensional information as the operation mode matrix, wherein the distribution values ​​within any sub-cycle of any dimensional information are a row of elements or a column of elements in the operation mode matrix; If the number of arrays composed of the distribution values ​​of any dimension is different from the number of arrays composed of the distribution values ​​of other dimensions, the array composed of the distribution values ​​of any dimension with the smaller number of arrays is padded so that the number of arrays composed of the distribution values ​​of any dimension is the same; The pattern classification model is obtained by training based on the initial pattern classification model. The multi-layer structure of the initial pattern classification model includes: a convolutional layer, a pooling layer, a fully connected layer and a normalization layer, wherein: The convolution layer is used to extract the characteristics of merchant operations according to the operation mode matrix sample to obtain a feature matrix; The pooling layer is used to perform sampling calculation on the feature matrix obtained by the convolution layer to obtain a sampled matrix; The fully connected layer is used to calculate the scores of a certain sample merchant belonging to multiple known merchant model types according to the sampled matrix; The normalization layer is used to output the probability that the certain sample merchant belongs to each known merchant model type according to the scores of the certain sample merchant belonging to multiple known merchant model types.

8. The device according to claim 7, It is characterized in that Also includes: A training determination unit, used for determining an initial pattern classification model; Determine a training sample, wherein the training sample includes operation mode matrix samples corresponding to a plurality of sample merchants, and merchant mode types to which the plurality of sample merchants belong; A classification unit, used to classify the merchant models of the plurality of sample merchants respectively by using the initial model classification model to obtain an initial classification result; An adjustment unit is used to calculate the loss function value related to the initial pattern classification model according to the initial classification result and the merchant model type to which the multiple sample merchants belong; and adjust the fixed parameter values ​​in the initial pattern classification model according to the loss function value to obtain the preset pattern classification model.

9. The device as claimed in claim 8, It is characterized in that The adjustment unit is further configured to stop adjusting the fixed parameter value if the adjustment of the fixed parameter value meets any of the following stop conditions: the number of adjustments to the fixed parameter value reaches a preset number, and the difference between the currently adjusted fixed parameter value and the last adjusted fixed parameter value is less than a threshold.

10. A storage medium, It is characterized in that The storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the merchant pattern recognition method according to any one of claims 1 to 6.

11. A terminal device, It is characterized in that It includes a processor and a storage medium, wherein the processor is used to implement various instructions; The storage medium is used to store a plurality of instructions, and the instructions are used to be loaded by a processor and execute the merchant pattern recognition method according to any one of claims 1 to 6.