CN113762300A - Order classification model training method and device and order detection method and device - Google Patents

Order classification model training method and device and order detection method and device Download PDF

Info

Publication number
CN113762300A
CN113762300A CN202010598365.4A CN202010598365A CN113762300A CN 113762300 A CN113762300 A CN 113762300A CN 202010598365 A CN202010598365 A CN 202010598365A CN 113762300 A CN113762300 A CN 113762300A
Authority
CN
China
Prior art keywords
order
user
classification model
abnormal
historical
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010598365.4A
Other languages
Chinese (zh)
Inventor
赵志辉
洪敬风
葛茂林
乔全胜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN202010598365.4A priority Critical patent/CN113762300A/en
Publication of CN113762300A publication Critical patent/CN113762300A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2413Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on distances to training or reference patterns
    • G06F18/24133Distances to prototypes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2413Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on distances to training or reference patterns
    • G06F18/24147Distances to closest patterns, e.g. nearest neighbour classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0609Buyer or seller confidence or verification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0633Lists, e.g. purchase orders, compilation or processing
    • G06Q30/0635Processing of requisition or of purchase orders

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Finance (AREA)
  • Accounting & Taxation (AREA)
  • General Physics & Mathematics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The disclosure provides an order classification model training method and device and an order detection method and device. The order classification model training device acquires order information of a specified user within a preset time range to generate a historical order library; adding an abnormal label for an abnormal order in a historical order library according to the history record of the abnormal order; extracting characteristic information of each order in a historical order library; converting the characteristic information of each order into corresponding characteristic vectors; and training the preset model by using the characteristic vectors of the abnormal orders and the characteristic vectors of the normal orders in the historical order library to obtain an abnormal order classification model. By detecting the user order by using the abnormal order classification model, whether the user order is an abnormal order can be accurately detected.

Description

Order classification model training method and device and order detection method and device
Technical Field
The present disclosure relates to the field of information processing, and in particular, to a method and an apparatus for training an order classification model, and a method and an apparatus for order detection.
Background
In order to avoid the loss of legal users caused by ordering illegal numbers, the following processing modes are adopted in the related technology:
1) detection is made based on the account login. By comparing the city which is frequently logged in by the user with the city which is logged in this time, if the user logs in different places and carries out ordering operation, the account risk is considered to be higher, and then the verification link is increased. The location of the user login place is mainly obtained through an IP address.
2) And detecting based on a historical risk bank. By combining threat intelligence and accumulating and labeling ordering data of a large number of users in a certain time, black samples and white samples are formed, and the black samples and the white samples are further utilized for training to generate a risk identification model. The risk identification model is used for detection and is updated periodically.
3) Based on a particular rule. Such as an order for a certain class or an order addressed to a certain area.
4) And detecting abnormal account number based on the device fingerprint. The method comprises the steps of acquiring relevant characteristics of equipment used by the user in historical login as equipment fingerprints, detecting whether the equipment fingerprints used by the user in the current login are the same as the equipment fingerprints in a historical record, and when the equipment fingerprints do not appear in the historical record, determining that the login risk possibly exists in the account.
Disclosure of Invention
The inventors have found through research that the solutions adopted in the related art have the following drawbacks:
1) in a scenario where detection is performed based on an account login location, a user login location is generally determined based on an IP address. Because a broadband operator used by a user has nationwide NAT (Network Address Translation) outlets, or when the user uses a VPN (Virtual Private Network) and an agent service, the method is easy to generate false alarm.
2) In a scene detected based on a historical risk library, accuracy of threat intelligence is seriously depended, so that accuracy of a black sample of a model is insufficient, the false alarm rate of the model is high, and the model needs to be maintained and updated regularly.
3) In a scene based on a specific rule, the dimension of the rule is relatively single, the rule usually only acts on a certain specific stealing number ordering event, and the detection capability is insufficient for special or suddenly appearing stealing number ordering behaviors. In addition, the rule is a temporary rule for online after the occurrence of a security event of a single type under the condition of stealing a number, the time is relatively lagged, the passive loss stopping is achieved, and the active identification and detection capability is lacked.
4) In a scene of account abnormity detection based on the device fingerprint, the detection accuracy depends on the stability and coverage of the device fingerprint. The stability and coverage of device fingerprints may be affected by access restrictions of user software, numerous vendor devices and operating system versions. If the device fingerprint is unstable or the coverage is not enough, the user needs to be authenticated frequently, and the user experience is reduced. Meanwhile, different technical implementation manners of the device fingerprint also have the risk that the device fingerprint is tampered in network transmission, and injection causes generation of a pseudo device code.
Accordingly, the present disclosure provides an order classification model training scheme and a corresponding order detection scheme. Abnormal order detection is performed by using the difference between the abnormal order and the normal order.
According to a first aspect of the embodiments of the present disclosure, there is provided an order classification model training method, including: acquiring order information of a designated user within a preset time range to generate a historical order library; adding an abnormal label for an abnormal order in the historical order library according to the history record of the abnormal order; extracting characteristic information of each order in the historical order library; converting the characteristic information of each order into corresponding characteristic vectors; and training a preset model by using the characteristic vectors of the abnormal orders and the characteristic vectors of the normal orders in the historical order library to obtain an abnormal order classification model.
In some embodiments, the abnormal order classification model comprises a first classification model, and training the preset model by using the feature vector of each abnormal order and the feature vector of each normal order in the historical order library comprises: under the condition that the number of orders in the historical order library is smaller than a preset threshold, calculating the Euclidean distance average value of the characteristic vector of the abnormal order and the characteristic vector of the normal order in the historical order library; and taking the Euclidean distance average value as a classification parameter value of the first classification model.
In some embodiments, the abnormal order classification model further includes a second classification model, and training the preset model by using the feature vector of each abnormal order and the feature vector of each normal order in the historical order library includes: and under the condition that the number of orders in the historical order library is not less than a preset threshold, training the second classification model by using the characteristic vectors of all abnormal orders and the characteristic vectors of all normal orders in the historical order library to determine the classification parameter value of the second classification model.
In some embodiments, the second classification model is a K-nearest neighbor classification model; and the classification parameter value of the second classification model is a K value in a K nearest neighbor classification model.
In some embodiments, training a classification model using the feature vectors of the unusual orders and the feature vectors of the normal orders in the historical order library comprises: respectively carrying out dimension reduction processing on the characteristic vector of each abnormal order and the characteristic vector of each normal order; and training a classification model by using the feature vector after dimension reduction of each abnormal order and the feature vector after dimension reduction of each normal order.
In some embodiments, the characteristic information of each order is converted into a corresponding characteristic vector by using a Bert model.
In some embodiments, the characteristic information of the order includes at least one of a receiving address of the order, an item class attribution of the order, coupon usage information, and a payment method.
According to a second aspect of the embodiments of the present disclosure, there is provided an order classification model training apparatus, including: the system comprises a first order acquisition module, a second order acquisition module and a third order acquisition module, wherein the first order acquisition module is configured to acquire order information of a specified user within a preset time range to generate a historical order library; the order identification module is configured to add an abnormal label to an abnormal order in the historical order library according to the abnormal order historical record; the first characteristic information extraction module is configured to extract characteristic information of each order in the historical order library; a first feature vector conversion module configured to convert the feature information of each order into a corresponding feature vector; and the training module is configured to train a preset model by using the feature vectors of the abnormal orders and the feature vectors of the normal orders in the historical order library to obtain an abnormal order classification model.
According to a third aspect of the embodiments of the present disclosure, there is provided an order classification model training apparatus, including: a memory configured to store instructions; a processor coupled to the memory, the processor configured to perform a method implementing any of the embodiments described above based on instructions stored by the memory.
According to a fourth aspect of the embodiments of the present disclosure, there is provided an order detection method, including: acquiring a user order; extracting characteristic information of the user order; converting the characteristic information of the user order into corresponding characteristic vectors; detecting whether a historical order library associated with the user exists; if the historical order library associated with the user exists, detecting the feature vector by using the abnormal order classification model obtained by the order classification model training method in any embodiment to determine whether the user order is an abnormal order.
In some embodiments, detecting the feature vector comprises: if the number of orders in the historical order library is smaller than a preset threshold, calculating the Euclidean distance average value of the characteristic vector of the user order and the characteristic vector of the normal order in the historical order library; and if the Euclidean distance average value is larger than the classification parameter value of the first classification model obtained by using the order classification model training method in any embodiment, determining that the user order is an abnormal order.
In some embodiments, detecting the feature vector further comprises: if the number of the orders in the historical order library is not less than a preset threshold, classifying the feature vectors of the user orders and the feature vectors of the orders in the historical order library by using a second classification model obtained by the order classification model training method in any embodiment; judging whether the characteristic vectors belonging to the normal order account for the majority in K characteristic vectors nearest to the characteristic vectors of the user order, wherein the parameter K is determined by the classification parameter value of the second classification model; if the feature vectors belonging to the normal order account for most, judging that the user order is the normal order; and if the feature vectors belonging to the normal order account for a small number, judging the user order to be an abnormal order.
In some embodiments, after determining that the user order is an abnormal order, sending verification information to the user so as to verify the user order; if the verification is successful, setting the user order as a normal order; and if the verification fails, intercepting the user order.
In some embodiments, the user order is added to the historical order library, wherein an exception label is added to the user order when the user order is an exception order.
According to a fifth aspect of the embodiments of the present disclosure, there is provided an order detection apparatus including: a second order obtaining module configured to obtain a user order; the second characteristic information extraction module is configured to extract the characteristic information of the user order; a second feature vector conversion module configured to convert feature information of the user order into a corresponding feature vector; a detection module configured to detect whether there is a historical order library associated with the user, and if there is the historical order library associated with the user, detect the feature vector by using an abnormal order classification model obtained by the abnormal order classification model training method according to any of the embodiments above, so as to determine whether the user order is an abnormal order.
According to a sixth aspect of the embodiments of the present disclosure, there is provided an order detection apparatus including: a memory configured to store instructions; a processor coupled to the memory, the processor configured to perform a method implementing any of the embodiments described above based on instructions stored by the memory.
According to a seventh aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, in which computer instructions are stored, and when executed by a processor, the computer-readable storage medium implements the method according to any of the embodiments described above.
Other features of the present disclosure and advantages thereof will become apparent from the following detailed description of exemplary embodiments thereof, which proceeds with reference to the accompanying drawings.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only some embodiments of the present disclosure, and for those skilled in the art, other drawings can be obtained according to the drawings without inventive exercise.
FIG. 1 is a schematic flow chart diagram illustrating an order classification model training method according to an embodiment of the present disclosure;
FIG. 2 is a schematic structural diagram of an order classification model training apparatus according to an embodiment of the present disclosure;
FIG. 3 is a schematic structural diagram of an order classification model training apparatus according to another embodiment of the present disclosure;
FIG. 4 is a flowchart illustrating an order detection method according to an embodiment of the disclosure;
FIG. 5 is a schematic flow chart diagram illustrating an order detection method according to another embodiment of the present disclosure;
FIG. 6 is a schematic structural diagram of an order detection apparatus according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of an order detection apparatus according to another embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are only a part of the embodiments of the present disclosure, and not all of the embodiments. The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the disclosure, its application, or uses. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
The relative arrangement of the components and steps, the numerical expressions, and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless specifically stated otherwise.
Meanwhile, it should be understood that the sizes of the respective portions shown in the drawings are not drawn in an actual proportional relationship for the convenience of description.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.
In all examples shown and discussed herein, any particular value should be construed as merely illustrative, and not limiting. Thus, other examples of the exemplary embodiments may have different values.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
Fig. 1 is a schematic flowchart of an order classification model training method according to an embodiment of the present disclosure. In some embodiments, the following order classification model training method steps are performed by an order classification model training apparatus.
In step 101, order information of a specified user within a preset time range is acquired to generate a history order library.
For example, order information for the user in the last three months, the last half year, or other time frame is obtained.
In step 102, adding an abnormal label to the abnormal order in the historical order library according to the abnormal order history.
For example, abnormal orders such as number stealing orders are extracted from the customer service feedback system, and corresponding abnormal labels are added to the abnormal orders in the historical order library according to the abnormal orders.
In some embodiments, to avoid including noise, redundancy, and other unusable data in the historical order library, the historical order library is preprocessed to denoise the historical order library.
In step 103, feature information of each order in the historical order library is extracted.
In some embodiments, the characteristic information of the order includes at least one of a shipping address of the order, an item class attribution of the order, coupon usage information, and a payment method.
For example, the characteristic information may be constructed as follows.
1) Constructing characteristics based on shipping address
a. Constructing characteristics according to unique numbers respectively corresponding to provinces of consignees, cities of consignees and county-level regions of consignees
b. Construct features according to ship-to address change times
c. Constructing newly added address difference characteristics according to provinces and cities in delivery address management list
2) Building features based on purchased commodity categories
a. Constructing characteristics according to the commodity category of the user order, including first class names, second class names, third class names and combination construction characteristics thereof
b. Constructing characteristics according to attributes (virtual commodities, physical commodities) of commodities ordered by users
c. Build features according to labels (food, home appliances, etc.) of user ordered goods
3) Constructing features based on coupon usage information
a. Features are built according to the type of coupon used, including Beijing coupons, east coupons, fares coupons, syndication coupons, and the like.
b. The features are constructed according to the coupon use thresholds, including full-size coupons, limited-size coupons, restricted-size coupons, store restricted-size/sku coupons, and the like.
c. Build features by coupon whether to use overlapping
d. Constructing features according to coupon pickup time and user login time difference
4) Payment style based build feature
a. Features are built according to the payment mode selected by the user for ordering, including online payment, payment by delivery, and company transfer.
b. Constructing features according to whether virtual assets are used in payment mode selected by user order placing
5) Based on hot door article class framework characteristics
And constructing characteristics according to the top-ranked product types in the customer complaint data and the black production information data as hot product types.
6) Building features based on user level
And constructing user type characteristics according to the member types and levels, wherein the user type characteristics comprise plus members, registered members, gold medal members and the like.
In step 104, the feature information of each order is converted into a corresponding feature vector.
In some embodiments, the characteristic information of each order is converted into a corresponding characteristic vector using a Bert model.
By utilizing the general semantic representation model and the occlusion language model trained by the huge general corpus of Bert, the model can be forced to learn the context information as a whole. For example, the risk degree that the order is abnormally placed is calculated according to the degree of difference between the same information in the historical order, such as the commodity attribute, the address information, and the payment method of the order.
For example, in the process of converting the extracted features into word vectors by using the Bert model, the primary class name, the secondary class name, the tertiary class name and the commodity name are used as one combination, the payment method, the receiving address are changed, and the coupon use information is used as another combination, and the word vectors are converted into the word vectors by using the Bert model respectively and then are superposed.
In step 105, the feature vectors of the abnormal orders and the feature vectors of the normal orders in the historical order library are used for training a preset model to obtain an abnormal order classification model.
In some embodiments, in the case that the number of orders in the historical order library is smaller than a preset threshold, calculating a euclidean distance average value of the feature vectors of the abnormal orders and the feature vectors of the normal orders in the historical order library, and using the euclidean distance average value as a classification parameter value of a first classification model in the abnormal order classification model.
For example, after the user order is extracted from the real-time order message queue, the euclidean distance average value of the feature vector of the user order and the feature vector of the normal order in the history order library corresponding to the user is calculated, and if the euclidean distance average value is smaller than the classification parameter value of the first classification model, the user order can be determined to be the normal order.
In other embodiments, when the number of orders in the historical order library is not less than the preset threshold, the second classification model in the abnormal order classification model is trained by using the feature vectors of the abnormal orders and the feature vectors of the normal orders in the historical order library to determine the classification parameter value of the second classification model.
In some embodiments, the second classification model is a KNN (K-Near Neighbor) classification model, and the classification parameter value of the second classification model is a K value in the K-nearest Neighbor classification model.
For example, according to the classification result of the second classification model, if the normal orders account for a majority of the K orders that are nearest to the user order, it is determined that the user order is a normal order.
In some embodiments, in the process of training the classification model by using the feature vectors of the abnormal orders and the feature vectors of the normal orders in the historical order library, PCA (Principal component Analysis) dimension reduction processing is first performed on the feature vectors of the abnormal orders and the feature vectors of the normal orders, respectively, and then the classification model is trained by using the feature vectors after dimension reduction of the abnormal orders and the feature vectors after dimension reduction of the normal orders. Through dimension reduction processing, the dimension of the feature vector can be effectively reduced, so that the classification model can be trained subsequently.
Fig. 2 is a schematic structural diagram of an order classification model training apparatus according to an embodiment of the present disclosure. As shown in fig. 2, the order classification model training apparatus includes a first order obtaining module 21, an order recognition module 22, a first feature information extraction module 23, a first feature vector conversion module 24, and a training module 25.
The first order obtaining module 21 is configured to obtain order information of a specified user within a preset time range to generate a history order library.
The order identification module 22 is configured to add exception labels to the exception orders in the historical order repository based on the exception order history.
For example, abnormal orders such as number stealing orders are extracted from the customer service feedback system, and corresponding abnormal labels are added to the abnormal orders in the historical order library according to the abnormal orders.
The first feature information extraction module 23 is configured to extract feature information of each order in the historical order library.
In some embodiments, the characteristic information of the order includes at least one of a shipping address of the order, an item class attribution of the order, coupon usage information, and a payment method.
The first feature vector conversion module 24 is configured to convert the feature information of each order into a corresponding feature vector.
In some embodiments, the characteristic information of each order is converted into a corresponding characteristic vector by using a Bert model.
The training module 25 is configured to train the preset model by using the feature vectors of the abnormal orders and the feature vectors of the normal orders in the historical order library to obtain an abnormal order classification model.
In some embodiments, in the case that the number of orders in the historical order library is smaller than the preset threshold, the training module 25 is configured to calculate a euclidean distance average value of the feature vectors of the abnormal orders in the historical order library and the feature vectors of the normal orders, and use the euclidean distance average value as a classification parameter value of the first classification model in the abnormal order classification model.
In other embodiments, in the case that the number of orders in the historical order library is not less than the preset threshold, the training module 25 is configured to train the second classification model in the abnormal order classification model by using the feature vectors of the abnormal orders and the feature vectors of the normal orders in the historical order library to determine the classification parameter value of the second classification model.
In some embodiments, the second classification model is a KNN classification model, and the classification parameter value of the second classification model is a K value in a K nearest neighbor classification model.
In some embodiments, the training module 25 is configured to, during the training of the classification model by using the feature vectors of the abnormal orders and the feature vectors of the normal orders in the historical order library, perform PCA dimension reduction on the feature vectors of the abnormal orders and the feature vectors of the normal orders, respectively, and then train the classification model by using the feature vectors of the abnormal orders and the feature vectors of the normal orders after dimension reduction. Through dimension reduction processing, the dimension of the feature vector can be effectively reduced, so that the classification model can be trained subsequently.
Fig. 3 is a schematic structural diagram of an order classification model training apparatus according to another embodiment of the present disclosure. As shown in fig. 3, the training device comprises a memory 31 and a processor 32.
The memory 31 is used for storing instructions, the processor 32 is coupled to the memory 31, and the processor 32 is configured to execute the method according to any embodiment in fig. 1 based on the instructions stored in the memory.
As shown in fig. 3, the apparatus further includes a communication interface 33 for information interaction with other devices. Meanwhile, the device also comprises a bus 34, and the processor 32, the communication interface 33 and the memory 31 are communicated with each other through the bus 34.
The memory 31 may comprise a high-speed RAM memory, and may also include a non-volatile memory (e.g., at least one disk memory). The memory 31 may also be a memory array. The storage 31 may also be partitioned and the blocks may be combined into virtual volumes according to certain rules.
Further, the processor 32 may be a central processing unit CPU, or may be an application specific integrated circuit ASIC, or one or more integrated circuits configured to implement embodiments of the present disclosure.
The present disclosure also relates to a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the instructions, when executed by a processor, implement the method according to any one of the embodiments in fig. 1.
Fig. 4 is a flowchart illustrating an order detection method according to an embodiment of the disclosure. In some embodiments, the following order detection methods are performed by an order detection apparatus.
At step 401, a user order is obtained.
In some embodiments, the user order is obtained from a real-time order message queue.
In step 402, characteristic information of the user order is extracted.
In some embodiments, the characteristic information of the order includes at least one of a shipping address of the order, an item class attribution of the order, coupon usage information, and a payment method.
In step 403, the feature information of the user order is converted into a corresponding feature vector.
In some embodiments, the characteristic information of the user order is converted into corresponding characteristic vectors using a Bert model.
At step 404, it is detected whether there is a library of historical orders associated with the user.
In step 405, if there is a historical order library associated with the user, the feature vector is detected by using an abnormal order classification model obtained by the order classification model training method according to any embodiment in fig. 1, so as to determine whether the user order is an abnormal order.
In some embodiments, if there is no historical order repository associated with the user. It indicates that the user is a new user in which case the user order will not be processed.
In some embodiments, if the number of orders in the historical order library is less than a preset threshold, calculating an average euclidean distance between the feature vector of the user order and the feature vector of the normal order in the historical order library. And if the Euclidean distance average value is larger than the classification parameter value of the first classification model obtained by using the order classification model training method of FIG. 1, determining that the user order is an abnormal order.
If the Euclidean distance average value is larger than the classification parameter value of the first classification model, the fact that the distance between the feature vector of the user order and the feature vector of the abnormal order in the historical order library is closer is indicated, the user order is judged to be the abnormal order under the condition, and otherwise, the user order is judged to be the normal order.
In some embodiments, if the number of orders in the historical order library is not less than the preset threshold, the feature vector of the user order and the feature vectors of the orders in the historical order library are classified by using the second classification model obtained by the order classification model training method shown in fig. 1.
And judging whether the characteristic vectors belonging to the normal order are majority in the K characteristic vectors nearest to the characteristic vector of the user order, wherein the parameter K is determined by the classification parameter value of the second classification model. And if the characteristic vectors belonging to the normal order account for most, judging that the user order is the normal order. And if the feature vectors belonging to the normal order occupy a small number, judging that the user order is an abnormal order.
For example, the parameter K is 5. And 4 characteristic vectors are characteristic vectors of a normal order in the 5 characteristic vectors nearest to the characteristic vector of the user order, and 1 characteristic vector is a characteristic vector of an abnormal order, so that the user order is judged to be a normal order. For another example, if 3 feature vectors are feature vectors of an abnormal order and 2 feature vectors are feature vectors of a normal order among 5 feature vectors nearest to the feature vector of the user order, the user order is determined to be an abnormal order.
Fig. 5 is a flowchart illustrating an order detection method according to another embodiment of the disclosure. In some embodiments, the following order detection methods are performed by an order detection apparatus.
At step 501, a user order is obtained.
In some embodiments, the user order is obtained from a real-time order message queue.
In step 502, characteristic information of the user order is extracted.
In some embodiments, the characteristic information of the order includes at least one of a shipping address of the order, an item class attribution of the order, coupon usage information, and a payment method.
In step 503, the feature information of the user order is converted into a corresponding feature vector.
In some embodiments, the characteristic information of the user order is converted into corresponding characteristic vectors using a Bert model.
At step 504, it is detected whether a library of historical orders associated with the user exists.
In step 505, if there is a historical order library associated with the user, the feature vector is detected by using an abnormal order classification model obtained by the order classification model training method according to any embodiment in fig. 1, so as to determine whether the user order is an abnormal order.
In some embodiments, if there is no historical order repository associated with the user. It indicates that the user is a new user in which case the user order will not be processed.
In some embodiments, if the number of orders in the historical order library is less than a preset threshold, calculating an average euclidean distance between the feature vector of the user order and the feature vector of the normal order in the historical order library. And if the Euclidean distance average value is larger than the classification parameter value of the first classification model obtained by using the order classification model training method of FIG. 1, determining that the user order is an abnormal order.
In some embodiments, if the number of orders in the historical order library is not less than the preset threshold, the feature vector of the user order and the feature vectors of the orders in the historical order library are classified by using the second classification model obtained by the order classification model training method shown in fig. 1.
And judging whether the characteristic vectors belonging to the normal order are majority in the K characteristic vectors nearest to the characteristic vector of the user order, wherein the parameter K is determined by the classification parameter value of the second classification model. And if the characteristic vectors belonging to the normal order account for most, judging that the user order is the normal order. And if the feature vectors belonging to the normal order occupy a small number, judging that the user order is an abnormal order.
If the user order is a normal order, go to step 506; if the user order is an abnormal order, go to step 507.
At step 506, the user order is processed.
At step 507, authentication information is sent to the user to authenticate the user order.
For example, a short message is sent to the user for authentication. And if the user confirms that the user order is a normal order, replying the short message for confirmation.
At step 508, a determination is made whether the verification was successful.
If the verification is successful, go to step 506; if the verification fails, go to step 509.
If the verification is successful, the user order is indicated to be a normal order, and further the subsequent order processing is executed.
In step 509, the user order is intercepted.
For example, the interception process includes operations of canceling a user order, sending a warning message to the user, and ending a user login state.
In some embodiments, the user order is added to a historical order library, and an exception tag is added to the user order when the user order is an exception order.
In some embodiments, after a predetermined time, the exception label for the order in the historical order repository is modified based on feedback of customer complaints. And further re-performing model training by using the scheme shown in FIG. 1 to obtain updated model
Fig. 6 is a schematic structural diagram of an order detection apparatus according to an embodiment of the present disclosure. As shown in fig. 6, the order detection apparatus includes a second order obtaining module 61, a second feature information extraction module 62, a second feature vector conversion module 63, and a detection module 64.
The second order taking module 61 is configured to take a user order.
The second feature information extraction module 62 is configured to extract feature information of the user order.
The second feature vector conversion module 63 is configured to convert feature information of the user order into a corresponding feature vector.
The detection module 64 is configured to detect whether there is a historical order library associated with the user, and if there is a historical order library associated with the user, detect the feature vector by using an abnormal order classification model obtained by the abnormal order classification model training method of any embodiment in fig. 1 to determine whether the user order is an abnormal order.
In some embodiments, if there is no historical order repository associated with the user. It indicates that the user is a new user in which case the user order will not be processed.
In some embodiments, if the number of orders in the historical order base is less than the preset threshold, the detection module 64 calculates the euclidean distance average of the feature vector of the user order and the feature vector of the normal order in the historical order base. And if the Euclidean distance average value is larger than the classification parameter value of the first classification model obtained by using the order classification model training method of FIG. 1, determining that the user order is an abnormal order.
In some embodiments, if the number of orders in the historical order library is not less than the preset threshold, the detection module 64 classifies the feature vector of the user order and the feature vectors of the orders in the historical order library by using the second classification model obtained by the order classification model training method shown in fig. 1.
And judging whether the characteristic vectors belonging to the normal order are majority in the K characteristic vectors nearest to the characteristic vector of the user order, wherein the parameter K is determined by the classification parameter value of the second classification model. And if the characteristic vectors belonging to the normal order account for most, judging that the user order is the normal order. And if the feature vectors belonging to the normal order occupy a small number, judging that the user order is an abnormal order.
Fig. 7 is a schematic structural diagram of an order detection apparatus according to another embodiment of the present disclosure. As shown in fig. 7, the order detection apparatus includes a memory 701, a processor 702, a communication interface 703, and a bus 704. Fig. 7 differs from fig. 3 in that, in the embodiment shown in fig. 7, the processor 702 is configured to perform the method according to any of the embodiments of fig. 4 or fig. 5 based on instructions stored in the memory.
The present disclosure also relates to a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the instructions, when executed by a processor, implement a method according to any one of the embodiments shown in fig. 4 or fig. 5.
In some embodiments, the functional unit modules described above can be implemented as a general purpose Processor, a Programmable Logic Controller (PLC), a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable Logic device, discrete Gate or transistor Logic, discrete hardware components, or any suitable combination thereof for performing the functions described in this disclosure.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The description of the present disclosure has been presented for purposes of illustration and description, and is not intended to be exhaustive or limited to the disclosure in the form disclosed. Many modifications and variations will be apparent to practitioners skilled in this art. The embodiment was chosen and described in order to best explain the principles of the disclosure and the practical application, and to enable others of ordinary skill in the art to understand the disclosure for various embodiments with various modifications as are suited to the particular use contemplated.

Claims (17)

1. An order classification model training method comprises the following steps:
acquiring order information of a designated user within a preset time range to generate a historical order library;
adding an abnormal label for an abnormal order in the historical order library according to the history record of the abnormal order;
extracting characteristic information of each order in the historical order library;
converting the characteristic information of each order into corresponding characteristic vectors;
and training a preset model by using the characteristic vectors of the abnormal orders and the characteristic vectors of the normal orders in the historical order library to obtain an abnormal order classification model.
2. The method of claim 1, wherein the exception order classification model comprises a first classification model, and training the pre-set model using the feature vectors of the exception orders and the feature vectors of the normal orders in the historical order library comprises:
under the condition that the number of orders in the historical order library is smaller than a preset threshold, calculating the Euclidean distance average value of the characteristic vector of the abnormal order and the characteristic vector of the normal order in the historical order library;
and taking the Euclidean distance average value as a classification parameter value of the first classification model.
3. The method of claim 2, wherein the exception order classification model further comprises a second classification model, and training the pre-set model using the feature vectors of the exception orders and the feature vectors of the normal orders in the historical order library comprises:
and under the condition that the number of orders in the historical order library is not less than a preset threshold, training the second classification model by using the characteristic vectors of all abnormal orders and the characteristic vectors of all normal orders in the historical order library to determine the classification parameter value of the second classification model.
4. The method of claim 3, wherein,
the second classification model is a K nearest neighbor classification model;
and the classification parameter value of the second classification model is a K value in a K nearest neighbor classification model.
5. The method of claim 3, wherein training a classification model using the feature vectors of the exception orders and the feature vectors of the normal orders in the historical order library comprises:
respectively carrying out dimension reduction processing on the characteristic vector of each abnormal order and the characteristic vector of each normal order;
and training a classification model by using the feature vector after dimension reduction of each abnormal order and the feature vector after dimension reduction of each normal order.
6. The method of claim 1, wherein converting the feature information of each order into a corresponding feature vector comprises:
and converting the characteristic information of each order into corresponding characteristic vectors by utilizing a Bert model.
7. The method of any one of claims 1-6,
the characteristic information of the order comprises at least one of a receiving address of the order, the item class attribution of the order, coupon use information and a payment mode.
8. An order classification model training device, comprising:
the system comprises a first order acquisition module, a second order acquisition module and a third order acquisition module, wherein the first order acquisition module is configured to acquire order information of a specified user within a preset time range to generate a historical order library;
the order identification module is configured to add an abnormal label to an abnormal order in the historical order library according to the abnormal order historical record;
the first characteristic information extraction module is configured to extract characteristic information of each order in the historical order library;
a first feature vector conversion module configured to convert the feature information of each order into a corresponding feature vector;
and the training module is configured to train a preset model by using the feature vectors of the abnormal orders and the feature vectors of the normal orders in the historical order library to obtain an abnormal order classification model.
9. An order classification model training device, comprising:
a memory configured to store instructions;
a processor coupled to the memory, the processor configured to perform implementing the method of any of claims 1-7 based on instructions stored by the memory.
10. An order detection method, comprising:
acquiring a user order;
extracting characteristic information of the user order;
converting the characteristic information of the user order into corresponding characteristic vectors;
detecting whether a historical order library associated with the user exists;
if a historical order library associated with the user exists, detecting the feature vector by using an abnormal order classification model obtained by the order classification model training method of any one of claims 1 to 7 to determine whether the user order is an abnormal order.
11. The method of claim 10, wherein detecting the feature vector comprises:
if the number of orders in the historical order library is smaller than a preset threshold, calculating the Euclidean distance average value of the characteristic vector of the user order and the characteristic vector of the normal order in the historical order library;
if the Euclidean distance average value is larger than the classification parameter value of the first classification model obtained by using the order classification model training method of claim 2, determining that the user order is an abnormal order.
12. The method of claim 11, wherein detecting the feature vector further comprises:
if the number of orders in the historical order library is not less than a preset threshold, classifying the feature vector of the user order and the feature vector of each order in the historical order library by using a second classification model obtained by the order classification model training method of claim 3;
judging whether the characteristic vectors belonging to the normal order account for the majority in K characteristic vectors nearest to the characteristic vectors of the user order, wherein the parameter K is determined by the classification parameter value of the second classification model;
if the feature vectors belonging to the normal order account for most, judging that the user order is the normal order;
and if the feature vectors belonging to the normal order account for a small number, judging the user order to be an abnormal order.
13. The method of claim 11 or 12, further comprising:
after the user order is judged to be an abnormal order, sending verification information to the user so as to verify the user order;
if the verification is successful, setting the user order as a normal order;
and if the verification fails, intercepting the user order.
14. The method of claim 13, further comprising:
adding the user order to the historical order library, wherein an abnormal label is added to the user order when the user order is an abnormal order.
15. An order detection apparatus comprising:
a second order obtaining module configured to obtain a user order;
the second characteristic information extraction module is configured to extract the characteristic information of the user order;
a second feature vector conversion module configured to convert feature information of the user order into a corresponding feature vector;
a detection module configured to detect whether there is a historical order library associated with the user, and if there is the historical order library associated with the user, detect the feature vector by using the abnormal order classification model obtained by the abnormal order classification model training method according to any one of claims 1 to 7 to determine whether the user order is an abnormal order.
16. An order detection apparatus comprising:
a memory configured to store instructions;
a processor coupled to the memory, the processor configured to perform implementing the method of any of claims 10-14 based on instructions stored by the memory.
17. A computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions which, when executed by a processor, implement the method of any one of claims 1-7, 10-14.
CN202010598365.4A 2020-06-28 2020-06-28 Order classification model training method and device and order detection method and device Pending CN113762300A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010598365.4A CN113762300A (en) 2020-06-28 2020-06-28 Order classification model training method and device and order detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010598365.4A CN113762300A (en) 2020-06-28 2020-06-28 Order classification model training method and device and order detection method and device

Publications (1)

Publication Number Publication Date
CN113762300A true CN113762300A (en) 2021-12-07

Family

ID=78785436

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010598365.4A Pending CN113762300A (en) 2020-06-28 2020-06-28 Order classification model training method and device and order detection method and device

Country Status (1)

Country Link
CN (1) CN113762300A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110874778A (en) * 2018-08-31 2020-03-10 阿里巴巴集团控股有限公司 Abnormal order detection method and device
CN110992072A (en) * 2018-11-30 2020-04-10 北京嘀嘀无限科技发展有限公司 Abnormal order prediction method and system
CN111126629A (en) * 2019-12-25 2020-05-08 上海携程国际旅行社有限公司 Model generation method, system, device and medium for identifying brushing behavior

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110874778A (en) * 2018-08-31 2020-03-10 阿里巴巴集团控股有限公司 Abnormal order detection method and device
CN110992072A (en) * 2018-11-30 2020-04-10 北京嘀嘀无限科技发展有限公司 Abnormal order prediction method and system
CN111126629A (en) * 2019-12-25 2020-05-08 上海携程国际旅行社有限公司 Model generation method, system, device and medium for identifying brushing behavior

Similar Documents

Publication Publication Date Title
US10467664B2 (en) Method for detecting spam reviews written on websites
CN107341716B (en) Malicious order identification method and device and electronic equipment
US9785989B2 (en) Determining a characteristic group
US20210142337A1 (en) Product Authenticity Verification Based on Environment
US20190188732A1 (en) System and method for ensuring credibility of items in a supply chain management
CN110874778A (en) Abnormal order detection method and device
US20140351109A1 (en) Method and apparatus for automatically identifying a fraudulent order
CN106022900B (en) User risk data mining method and device
CN110737881B (en) Fingerprint verification method and device for intelligent equipment
CN107341384A (en) A kind of service verification method and system
CN107180064A (en) A kind of logistics information processing method, device and logistic information systems
CN110598070A (en) Application type identification method and device, server and storage medium
CN109858919A (en) Determination method and device, online ordering method and the device of abnormal account
CN110737818A (en) Network release data processing method and device, computer equipment and storage medium
CN111523348A (en) Information generation method and device and equipment for man-machine interaction
CN113762300A (en) Order classification model training method and device and order detection method and device
CN107578250B (en) Two-dimensional code anti-counterfeiting method and system
CN112995256A (en) Behavior data processing method and related equipment
CN112686732B (en) Abnormal address data identification method, device, equipment and medium
CN112686676A (en) Industrial Internet identification chain processing method, device and equipment
CN113420789A (en) Method, device, storage medium and computer equipment for predicting risk account
CN112966504A (en) Name identification and association recommendation method and device, computer equipment and storage medium
CN104021494A (en) Operation system and method for ordering real-name products through internet
CN110990810A (en) User operation data processing method, device, equipment and storage medium
CN115941347B (en) User big data security analysis method and system for artificial intelligent platform

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination