Order detection method and device and electronic equipment

The feature values ​​are extracted through vectorized EDI messages and principal component analysis methods, and the problem of low abnormal positioning efficiency of EDI messages in the prior art is solved, fast and accurate abnormal order positioning is achieved, and the dependence on operation and maintenance technicians is reduced.

CN119515505APending Publication Date: 2025-02-25LENOVO (BEIJING) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411658805.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-19
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

The prior art lacks efficient abnormal positioning methods when processing complex inter-enterprise data exchange (EDI) packets, which leads to a long positioning time for the problem and affects the actual operation of the business.

Method used

By vectorizing the EDI message vectors corresponding to the order, a numerical vector is obtained, and the eigenvalues ​​are extracted using principal component analysis method to filter out the target principal component, and then the order with abnormality is determined.

Benefits of technology

Without relying on human positioning by operation and maintenance technicians, it significantly reduces the time and cost of positioning abnormal orders and improves the positioning efficiency and accuracy of abnormal orders.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119515505A_ABST
    Figure CN119515505A_ABST
Patent Text Reader

Abstract

The invention discloses an order detection method and apparatus, and an electronic device. The order detection method comprises the steps of obtaining at least one order and an EDI message corresponding to each order; performing vector conversion on each EDI message to obtain a numeric vector corresponding to each order; performing feature extraction on the numeric vector, and determining a target principal component of each order; and determining an abnormal order at least based on the target principal component.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to an order detection method, device and electronic equipment. Background Art

[0002] As a mature inter-enterprise system integration technology, EDI standard message format is widely used by major multinational manufacturing companies.

[0003] However, the current EDI message information content of large enterprises is complex, and because the fields involved are numerous and irregular, the full life cycle operation and troubleshooting can only rely on the knowledge reserves and all-round experience accumulation of operation and maintenance technicians to handle and solve. For example, after the user reports the problem, the operation and maintenance technicians manually solve it, but the differences in the abnormal data of each dimension affect each other, which makes it take a long time to locate the cause of the problem. It usually takes at least a dozen hours, half a month or even several months from the user's abnormal feedback to the operation and maintenance technicians to the problem being solved, which seriously affects the actual business of the message. Therefore, accurate and timely location of abnormalities has become a technical problem that needs to be solved urgently. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide an order detection method, device and electronic device.

[0005] In a first aspect, an embodiment of the present application provides an order detection method, comprising:

[0006] Obtain at least one order and an EDI message corresponding to each of the orders;

[0007] Performing vector conversion on each of the EDI messages to obtain a numerical vector corresponding to each of the orders;

[0008] Performing feature extraction on the numerical vector to determine a target principal component for each of the orders;

[0009] Based at least on the target principal component, it is determined that there are abnormal orders.

[0010] In a possible implementation manner, performing vector conversion on each of the EDI messages to obtain a numerical vector corresponding to each of the orders includes:

[0011] Based on the message type and the consumption time corresponding to the message type, each of the EDI messages is respectively converted into a vector to obtain a message vector corresponding to each of the orders, wherein the message vector can represent the message type of each EDI message in the order and the consumption time corresponding to the message type;

[0012] The message vector is encoded to obtain a numerical vector corresponding to each of the orders, wherein the numerical vector can represent the sequence between the EDI messages in the order.

[0013] In a possible implementation manner, extracting features from the numerical vector to determine a target principal component for each order includes:

[0014] Using principal component analysis to extract features from the numerical vector to obtain eigenvalues;

[0015] According to the screening rules, the target principal component is screened out based on the characteristic value, wherein the screening rules include N principal components with contribution from high to low or M principal components with contribution from high to low and a total contribution greater than a preset threshold.

[0016] In a possible implementation, determining the abnormal orders based at least on the target principal component includes:

[0017] For each order, based at least on the target principal component of the order and the weight value of each target principal component, a first score of the target principal component in the order is calculated;

[0018] Based on all the first scores, a second score for each order is calculated, where the second score is used to characterize the degree of abnormality of the order;

[0019] Based on the second score, it is determined whether the order corresponding to the second score is an abnormal order.

[0020] In a possible implementation manner, the order detection method further includes:

[0021] Generate a two-dimensional scatter plot based on the first score of each order and display it; and / or

[0022] Generate a three-dimensional scatter plot based on the first score of each order and display it.

[0023] In a possible implementation manner, the order detection method further includes:

[0024] For the abnormal order, the point corresponding to the first score is marked as abnormal.

[0025] In a possible implementation manner, the order detection method further includes:

[0026] Determine whether the order with the exception is in a completed state;

[0027] If yes, resend the order with the exception;

[0028] If not, the order with the abnormality is intercepted and processed, and the cause of the abnormality is determined and repaired accordingly.

[0029] In a second aspect, the embodiment of the present application further provides an order detection device, including:

[0030] An acquisition module configured to acquire at least one order and an EDI message corresponding to each of the orders;

[0031] A conversion module, configured to perform vector conversion on each of the EDI messages to obtain a numerical vector corresponding to each of the orders;

[0032] A first determination module is configured to perform feature extraction on the numerical vector to determine a target principal component of each of the orders;

[0033] The second determination module is configured to determine the existence of abnormal orders based at least on the target principal component.

[0034] In a possible implementation, the order detection device further includes an exception handling module, which is configured as follows:

[0035] Determine whether the order with the exception is in a completed state;

[0036] If yes, resend the order with the exception;

[0037] If not, the order with the abnormality is intercepted and processed, and the cause of the abnormality is determined and repaired accordingly.

[0038] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via a bus, and when the machine-readable instructions are executed by the processor, the steps of any one of the above-described order detection methods are performed.

[0039] The embodiment of the present application vectorizes the EDI message corresponding to the order to obtain a numerical vector corresponding to the order, and then performs feature extraction on the numerical vector to determine the target principal component of the order, and then determines the abnormal orders based on at least the target principal component. There is no need for operation and maintenance technicians to manually locate the abnormal orders, which greatly reduces the dependence on operation and maintenance technicians and effectively improves the efficiency and accuracy of locating abnormal orders. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solutions in the present application or 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 recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0041] Figure 1 A flow chart of an order detection method provided by the present application is shown;

[0042] Figure 2 A flowchart of performing vector conversion on each EDI message to obtain a numerical vector corresponding to each order in an order detection method provided by the present application is shown;

[0043] Figure 3 A schematic diagram of a message vector provided by the present application is shown;

[0044] Figure 4 A flowchart of determining abnormal orders based at least on a target principal component in an order detection method provided by the present application is shown;

[0045] Figure 5 A flow chart showing another order detection method provided by the present application is shown;

[0046] Figure 6 An overall flow chart of an order detection method provided by the present application is shown;

[0047] Figure 7 A schematic diagram of the structure of an order detection device provided by the present application is shown;

[0048] Figure 8 A schematic structural diagram of an electronic device provided by the present application is shown. DETAILED DESCRIPTION

[0049] Various aspects and features of the present application are described herein with reference to the accompanying drawings.

[0050] It should be understood that various modifications may be made to the embodiments of the present application. Therefore, the above description should not be considered as limiting, but only as an example of an embodiment. Other modifications within the scope and spirit of the present application will occur to those skilled in the art.

[0051] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present application and, together with the general description of the present application given above and the detailed description of the embodiments given below, serve to explain the principles of the present application.

[0052] These and other characteristics of the present application will become apparent from the following description of a preferred form of embodiment given as a non-limiting example with reference to the accompanying drawings.

[0053] It should also be understood that, although the present application has been described with reference to some specific examples, those skilled in the art will be able to realize many other equivalent forms of the present application that have the features described in the claims and are therefore within the scope of protection defined thereby.

[0054] The above and other aspects, features and advantages of the present application will become more apparent in view of the following detailed description when taken in conjunction with the accompanying drawings.

[0055] Specific embodiments of the present application are described hereinafter with reference to the accompanying drawings; however, it should be understood that the embodiments applied for are merely examples of the present application, which may be implemented in a variety of ways. Well-known and / or repeated functions and structures are not described in detail to avoid unnecessary or redundant details that obscure the present application. Therefore, the specific structural and functional details applied for herein are not intended to be limiting, but merely serve as a basis and representative basis for the claims to teach those skilled in the art to use the present application in a variety of ways with substantially any suitable detailed structure.

[0056] This specification may use the phrases "in one embodiment," "in another embodiment," "in yet another embodiment," or "in other embodiments," all of which may refer to one or more of the same or different embodiments according to the present application.

[0057] To facilitate understanding of this application, firstly, an order detection method provided by this application is introduced in detail. Here, Figure 1 A flow chart of an order detection method provided in an embodiment of the present application is shown, wherein specific steps include S101-S104.

[0058] S101, obtaining at least one order and the EDI message corresponding to each order.

[0059] The Electronic Data Interchange (EDI) system is the hub of the entire supply chain system. Its purpose is to connect the business systems of both trading parties and transmit electronic trade documents, such as quotations, invoices, inventory orders, etc. Each order corresponds to at least one EDI message.

[0060] Among them, EDI messages include strings of multiple data structures, such as price, product model number, etc. One or more EDI messages are restricted by the header and the footer to obtain a transaction set, which corresponds to an order. There are differences in the metadata included in orders in different business scenarios. Generally, metadata includes the following 7 dimensions: message type, business primary key (such as quotation, invoice, etc.), sender, receiver, sending time, receiving time and sending direction. The following Table 1 shows the metadata included in an order. Of course, Table 1 shows only one example. The dimensions of metadata in different scenarios are determined by the actual business.

[0061] Message Type Date and Time Order 2024-01-01 09:00 Order Receipt 2024-01-01 09:05 Pre-shipment 2024-01-07 12:30 bill 2024-01-08 20:00

[0062] Table 1

[0063] In actual applications, two different business systems will interact with each other in a predetermined interaction mode. The interaction process will follow the standard definition process, such as "select the message type to send" - "relevant message receipt" - "message content (such as price list / inventory count / order modification / pre-shipment, etc.)" - "invoice" and other message processes. In addition, the message process of each interaction mode obeys the normal distribution.

[0064] In the process of business flow for each business within the business system and between different business systems, a large number of orders will be generated. Based on this, at least one order and the EDI message corresponding to each order can be obtained in real time to detect the order. Of course, the at least one order obtained can correspond to the same business or different businesses.

[0065] S102, performing vector conversion on each EDI message to obtain a numerical vector corresponding to each order.

[0066] After obtaining at least one order and the EDI message corresponding to each order, each EDI message is vectorized to obtain a numerical vector corresponding to each order. There may be incomplete EDI messages, such as incomplete order transaction processes corresponding to the EDI messages, so before vectorizing the EDI messages, it is determined whether the orders corresponding to the EDI messages are complete, and data is supplemented for incomplete orders.

[0067] For example, if the transaction process of an order is not completed, that is, the missing data of the order is the consumption time corresponding to the message type included in the EDI message, then the missing data is supplemented in order starting from the last step of the order, wherein each step of the order corresponds to an EDI message, and when supplementing the missing data for each step, that is, the consumption time corresponding to the message type included in the EDI message corresponding to the step is supplemented. Specifically, for the EDI message corresponding to the unfinished step, the consumption time corresponding to the message type included is supplemented to 0, and for the EDI message corresponding to the current step, the consumption time corresponding to the message type included is supplemented to [current time - time of the last step].

[0068] The following Table 2 shows the metadata included in an incomplete order. The order shown in Table 2 only includes metadata of two dimensions: "order" and "order receipt". It can be seen from Table 1 that the order in this scenario includes metadata of four dimensions. Therefore, it is determined that the order corresponding to Table 2 is an incomplete order, and the missing data is the consumption time corresponding to the two message types "pre-shipment" and "invoice".

[0069] Message Type Date and Time Order 2024-01-20 09:00 Order Receipt 2024-01-20 09:05

[0070] Table 2

[0071] According to the above missing data supplement rules, if the current time is 2024-01-30 12:00:00, the data that needs to be supplemented is "pre-shipment, 0, invoice".

[0072] After completing the data supplement for the incomplete order, each EDI message is then vectorized. Here, the purpose of vectorization is to convert the vector of multiple data structures into a numerical vector for subsequent processing.

[0073] S103, extracting features from the numerical vector to determine the target principal component of each order.

[0074] After obtaining the numerical vector corresponding to each order, feature extraction is further performed on all the numerical vectors. Specifically, the feature extraction is performed on the numerical vectors using the principal component analysis method to determine the target principal component of each order.

[0075] As one of the examples, when extracting features from numerical vectors to determine the target principal component of each order, principal component analysis is used to extract features from numerical vectors to obtain eigenvalues, where there are multiple eigenvalues. Then, according to the screening rules, the target principal component is screened out from multiple candidate principal components based on the eigenvalues. Each candidate principal component corresponds to an eigenvalue, and the dimension of the target principal component is lower than that of the candidate principal component. Here, the target principal component with a lower dimension can more comprehensively express the characteristics of the metadata, and then when determining abnormal orders based on the principal components, it can achieve the purpose of reducing the amount of calculation and ensuring accuracy.

[0076] The screening rules of the embodiment of the present application include N principal components with contribution from high to low or M principal components with contribution from high to low and a total contribution greater than a preset threshold. For example, after extracting the features of the numerical vector to obtain the eigenvalues, the corresponding contribution is calculated for each eigenvalue, and all the contributions are arranged in order from high to low. If the value of N is 3, the candidate principal components corresponding to the first three contributions from high to low are determined as the target principal components; if the preset threshold is 85%, and the total contribution of the two contributions from high to low is greater than 85%, then the value of M is 2, that is, the candidate principal components corresponding to the first two contributions from high to low are determined as the target principal components.

[0077] S104, determining abnormal orders based at least on the target principal component.

[0078] After determining the target principal component of each order, an abnormal order is determined based at least on the target principal component. Optionally, the abnormal order may be an unfinished order, an order with missing steps, an order with delayed execution of steps, an order with erroneous data, etc.

[0079] The embodiment of the present application vectorizes the EDI message corresponding to the order to obtain a numerical vector corresponding to the order, and then performs feature extraction on the numerical vector to determine the target principal component of the order, and then determines the abnormal orders based on at least the target principal component. There is no need for operation and maintenance technicians to manually locate the abnormal orders, which greatly reduces the dependence on operation and maintenance technicians and effectively improves the efficiency and accuracy of locating abnormal orders.

[0080] Optionally, Figure 2 A flow chart of a method for performing vector conversion on each EDI message to obtain a numerical vector corresponding to each order is shown, wherein the specific steps include S201 and S202.

[0081] S201, based on the message type and the consumption time corresponding to the message type, each EDI message is respectively converted into a vector to obtain a message vector corresponding to each order. The message vector can represent the message type of each EDI message in the order and the consumption time corresponding to the message type.

[0082] S202, encode the message vector to obtain a numerical vector corresponding to each order, where the numerical vector can represent the sequence between EDI messages in the order.

[0083] When each EDI message is vectorized, based on the message type and the corresponding consumption time of the message type, each EDI message is vectorized to obtain the message vector corresponding to each order. The message vector can be expressed as X i =[A 1 ,T i1 ,A 2 ,T i2 ,…,A j ,T ij ,…,A N-1 ,T iN-1 ,A N ]. Among them, X i A represents the message vector corresponding to the i-th order, j represents the jth step in the complete transaction process of an order, T ij It represents the time consumed from step j to step j+1 of the i-th order. In other words, the message vector can represent the message type of each EDI message in the order and the corresponding consumption time of the message type.

[0084] Figure 3 Schematic diagram of a message vector is shown. Figure 3 M represents the number of orders, N represents the number of message types, and A j represents the jth step in the complete transaction process of an order, T ij It represents the time taken for the i-th order from step j to step j+1, that is, Figure 3 The multi-dimensional vector matrix in is formed by the message vectors corresponding to multiple orders.

[0085] After obtaining the message vector corresponding to each order, the Stochastic Gradient Treeboost (SGT) algorithm is used to encode the message vector to obtain the numerical vector corresponding to each order. The numerical vector can represent the order between the EDI messages in the order. For example, the SGT algorithm can be used to encode the message vector. Figure 3 The numerical vector obtained by encoding the message vector in is X i =[x i1 ,xi2 ,…,x iL ].

[0086] The embodiment of the present application uses the SGT algorithm to vectorize each EDI message, thereby effectively solving the problem of how to uniformly vectorize structural data such as different types of messages, different message types, different business primary keys, different senders, different receivers, different sending times, different receiving times, and different sending directions.

[0087] It is worth noting that the data of the incomplete order can be supplemented before "based on the message type and the consumption time corresponding to the message type, each EDI message is converted into a vector to obtain the message vector corresponding to each order", or the data of the incomplete order can be supplemented before "encoding the message vector to obtain the numerical vector corresponding to each order". The embodiment of the present application does not make specific limitations on this.

[0088] As an example, Figure 4 A flow chart of a method for determining abnormal orders based at least on a target principal component is shown, wherein specific steps include S401-S403.

[0089] S401, for each order, based at least on the target principal component of the order and the weight value of each target principal component, calculate a first score of the target principal component in the order.

[0090] S402: Based on all the first scores, a second score for each order is calculated, where the second score is used to characterize the degree of abnormality of the order.

[0091] S403: Based on the second score, determine whether the order corresponding to the second score is an abnormal order.

[0092] In a specific implementation, after obtaining the target principal component of each order, for each order, at least based on the target principal component of the order and the weight value of each target principal component, a first score of the target principal component in the order is calculated. Optionally, the first score is calculated by the following formula (1).

[0093] F i =u i1 × i1 +u i2 × i2 +…+u iL × iL (1)

[0094] Among them, F i represents the first score of the target principal component in the i-th order, u i1 Represents x i1 The corresponding weight value, xi1 Indicates the value of the first dimension of the i-th order.

[0095] Here, if the target principal components are two, then F i is a two-dimensional vector.

[0096] After obtaining the first score of the target principal component in each order, the second score of each order is calculated based on all the first scores, and the second score is used to characterize the degree of abnormality of the order. Optionally, the second score of each order is calculated using an isolation forest algorithm, wherein the following formula (2) can be referred to.

[0097]

[0098] Among them, s(x,n) represents the second score of the order, x represents the order, and c(n) represents the average path length of the order tree, that is, c(n) is the harmonic number, which can be estimated as ln(i)+0.5772; E(h(x)) represents the expected value of the path length of order x in a batch of isolated trees.

[0099] After obtaining the second score of each order, determine whether the order corresponding to the second score is an abnormal order based on the second score. Specifically, compare the second score with the preset score. If the second score is greater than the preset score, determine that the order corresponding to the second score is an abnormal order. The value range of the second score is (0, 1).

[0100] Optionally, after obtaining the first score of the target principal component in the order, a two-dimensional scatter plot can be generated based on the first score of each order and displayed; and / or a three-dimensional scatter plot can be generated based on the first score of each order and displayed. Here, the embodiment of the present application uses principal component analysis to extract the principal components of the message vector corresponding to the order, and achieves the purpose of dimensionality reduction in this way, that is, to filter out the low-dimensional target principal component from the high-dimensional candidate principal component, and then at least when determining the existence of abnormal orders based on the target principal component, it can effectively save computing resources.

[0101] In addition, a two-dimensional scatter plot and / or a three-dimensional scatter plot is generated based on the first score of each order, and the two-dimensional scatter plot and / or the three-dimensional scatter plot is displayed using a display screen provided on the electronic device, thereby realizing visualization of the target principal component score of each order, so that the user can intuitively obtain the target principal component score of each order.

[0102] After determining the abnormal orders, the first scores of the target principal components in the orders are visualized, and for the abnormal orders, the points corresponding to the first scores are marked as abnormal, such as setting the points corresponding to the first scores of the abnormal orders to have different colors and sizes from other points. The abnormal mark is used to indicate that the orders corresponding to the first scores of the points are abnormal, so that the user can intuitively obtain the abnormal orders and can perform targeted maintenance on the abnormal orders.

[0103] The order detection method of the embodiment of the present application can be applied to different orders in different scenarios and different businesses, effectively saving the time of troubleshooting EDI message jams between different business systems (such as EDI e-commerce sales team and IT operation and maintenance team). In addition, the order detection method of the embodiment of the present application can be applied to EDI messages with metadata of different dimensions, reducing the impact of technology decay on the detection results and the related continuous operation and maintenance volume.

[0104] The embodiment of the present application automatically processes the EDI message corresponding to the order to determine whether the order is abnormal. This process does not require operation and maintenance technicians to manually locate abnormal orders, thereby realizing the automation of order detection, greatly reducing labor costs, and effectively reducing user access and usage thresholds as well as the difficulty and cost of operation and maintenance management, that is, improving the quality and efficiency of operation and maintenance without increasing operation and maintenance costs.

[0105] Further, Figure 5 A flow chart of another order detection method provided in an embodiment of the present application is shown, wherein the specific steps include S501-S503.

[0106] S501, determining whether the order with the exception is in a completed state.

[0107] S502: If yes, resend the order with the exception.

[0108] S503: If not, intercept and process the order with the exception, determine the cause of the exception, and repair it accordingly.

[0109] After determining the abnormal orders, the abnormal orders are maintained according to the above steps S501-S503. Specifically, for each abnormal order, it is determined whether the abnormal order is in a completed state, that is, whether the last step of the abnormal order has been completed.

[0110] If the order with the exception is in the completed state, that is, the last step of the order with the exception has been completed, at this time, since each step in the order with the exception has been completed, that is, the execution of any step cannot be interfered with, therefore, the order with the exception is resent, that is, it is re-executed from the first step of the order with the exception. Here, the operation and maintenance technicians can perform preset operations on the order with the exception to achieve the purpose of resending the order with the exception; or a resending mechanism can be set to achieve the purpose of resending the order with the exception based on the resending mechanism. The resending mechanism can be set to resend all orders with exceptions in the completed state.

[0111] If the order with the exception is not in the completed state, that is, the last step of the order with the exception is not completed, or the last step of the order with the exception and several other steps are not completed, then you can intervene in the unfinished steps, specifically intercept the order with the exception, determine the cause of the exception, and repair the cause of the exception. Optionally, if the cause of the exception is determined to be an error in the metadata of the order, then the order with the exception will be resent; if the cause of the exception is determined to be a network failure, device freeze, etc., then the current step will be resent, and then the subsequent steps of the current step will continue.

[0112] The embodiment of the present application can perform different maintenance processes for different orders with abnormalities, and has high flexibility. In addition, the determined abnormal orders and their abnormal causes can be traced by operation and maintenance technicians, providing operation and maintenance technicians with full-process and multi-angle message abnormality location and maintenance, greatly reducing or even avoiding the situation where business flow stagnation caused by the inability to locate and eliminate order abnormalities.

[0113] As an example, Figure 6 The overall flow chart of order detection provided by this application is shown, referring to Figure 6 After an order is generated within a business system or between different business systems and an EDI message is formed, at least one order and the EDI message corresponding to each order are obtained, and then the EDI message of each order is converted into a message vector, which is an ordered vector, that is, it can represent the sequence between the EDI messages in the order. After obtaining the message vector, the incomplete order is supplemented with data to obtain complete order data, that is, to obtain the complete message vector corresponding to the order. Then, the message vector is encoded using the SGT algorithm to obtain the numerical vector corresponding to each order, so as to extract features from the numerical vector and determine the target principal component of each order. The score of the target principal component in each order is further calculated, and then the order with abnormalities is determined using the isolation forest algorithm.

[0114] Afterwards, for the order with the exception, it is further determined whether the order with the exception is in a completed state. If so, the order with the exception is resent; if not, the order with the exception is intercepted, the cause of the exception is determined, and repaired accordingly.

[0115] The second aspect of the present application also provides an order detection device corresponding to an order detection method. Since the principle of solving the problem by the order detection device in the present application is similar to that of the above-mentioned order detection method in the present application, the implementation of the electronic device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0116] Figure 7 A schematic diagram of an order detection device provided in an embodiment of the present application is shown, which specifically includes:

[0117] An acquisition module 701 is configured to acquire at least one order and an EDI message corresponding to each order;

[0118] A conversion module 702, configured to perform vector conversion on each of the EDI messages to obtain a numerical vector corresponding to each of the orders;

[0119] A first determination module 703 is configured to perform feature extraction on the numerical vector to determine a target principal component of each of the orders;

[0120] The second determination module 704 is configured to determine the existence of abnormal orders based at least on the target principal component.

[0121] In another embodiment, the conversion module 702 is specifically configured as follows:

[0122] Based on the message type and the consumption time corresponding to the message type, each of the EDI messages is respectively converted into a vector to obtain a message vector corresponding to each of the orders, wherein the message vector can represent the message type of each EDI message in the order and the consumption time corresponding to the message type;

[0123] The message vector is encoded to obtain a numerical vector corresponding to each of the orders, wherein the numerical vector can represent the sequence between the EDI messages in the order.

[0124] In yet another embodiment, the first determining module 703 is specifically configured as follows:

[0125] Using principal component analysis to extract features from the numerical vector to obtain eigenvalues;

[0126] According to the screening rules, the target principal component is screened out based on the characteristic value, wherein the screening rules include N principal components with contribution from high to low or M principal components with contribution from high to low and a total contribution greater than a preset threshold.

[0127] In yet another embodiment, the second determining module 704 is specifically configured as follows:

[0128] For each order, based at least on the target principal component of the order and the weight value of each target principal component, a first score of the target principal component in the order is calculated;

[0129] Based on all the first scores, a second score for each order is calculated, where the second score is used to characterize the degree of abnormality of the order;

[0130] Based on the second score, it is determined whether the order corresponding to the second score is an abnormal order.

[0131] In yet another embodiment, the order detection device further includes a display module 705, which is configured as follows:

[0132] Generate a two-dimensional scatter plot based on the first score of each order and display it; and / or

[0133] Generate a three-dimensional scatter plot based on the first score of each order and display it.

[0134] In yet another embodiment, the order detection device further includes a marking module 706, which is configured to:

[0135] For the abnormal order, the point corresponding to the first score is marked as abnormal.

[0136] In another embodiment, the order detection device further includes an exception handling module 707, which is configured to:

[0137] Determine whether the order with the exception is in a completed state;

[0138] If yes, resend the order with the exception;

[0139] If not, the order with the abnormality is intercepted and processed, and the cause of the abnormality is determined and repaired accordingly.

[0140] The embodiment of the present application vectorizes the EDI message corresponding to the order to obtain a numerical vector corresponding to the order, and then performs feature extraction on the numerical vector to determine the target principal component of the order, and then determines the abnormal orders based on at least the target principal component. There is no need for operation and maintenance technicians to manually locate the abnormal orders, which greatly reduces the dependence on operation and maintenance technicians and effectively improves the efficiency and accuracy of locating abnormal orders.

[0141] The present application also provides another electronic device. The structural diagram of the electronic device can be as follows: Figure 8 As shown, at least a memory 801 and a processor 802 are included, the memory 801 stores a computer program, and the processor 802 implements the method provided by any embodiment of the present application when executing the computer program on the memory 801. Exemplarily, the steps of the electronic device computer program are as follows S11-S14:

[0142] S11, obtaining at least one order and an EDI message corresponding to each order;

[0143] S12, performing vector conversion on each of the EDI messages to obtain a numerical vector corresponding to each of the orders;

[0144] S13, performing feature extraction on the numerical vector to determine a target principal component for each of the orders;

[0145] S14, determining abnormal orders based at least on the target principal component.

[0146] An embodiment of the present application provides a storage medium, which is a computer-readable medium and stores a computer program. When the computer program is executed by a processor, the method provided in any embodiment of the present application is implemented, including the following steps S21-S24:

[0147] S21, obtaining at least one order and an EDI message corresponding to each order;

[0148] S22, performing vector conversion on each of the EDI messages to obtain a numerical vector corresponding to each of the orders;

[0149] S23, performing feature extraction on the numerical vector to determine a target principal component for each of the orders;

[0150] S24, determining abnormal orders based at least on the target principal component.

[0151] The embodiment of the present application vectorizes the EDI message corresponding to the order to obtain a numerical vector corresponding to the order, and then performs feature extraction on the numerical vector to determine the target principal component of the order, and then determines the abnormal orders based on at least the target principal component. There is no need for operation and maintenance technicians to manually locate the abnormal orders, which greatly reduces the dependence on operation and maintenance technicians and effectively improves the efficiency and accuracy of locating abnormal orders.

[0152] Optionally, in this embodiment, the above-mentioned storage medium may include, but is not limited to, various media that can store program codes, such as a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk. Optionally, in this embodiment, the processor executes the method steps recorded in the above-mentioned embodiment according to the program code stored in the storage medium. Optionally, the specific examples in this embodiment can refer to the examples described in the above-mentioned embodiment and the optional implementation mode, and this embodiment is not repeated here. Obviously, those skilled in the art should understand that the above-mentioned modules or steps of the present application can be implemented with a general computing device, which can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices. Optionally, they can be implemented with executable program codes of computing devices, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from here, or they can be made into individual integrated circuit modules respectively, or multiple modules or steps in them can be made into a single integrated circuit module to implement. In this way, the present application is not limited to any specific combination of hardware and software.

[0153] In addition, although exemplary embodiments have been described herein, the scope includes any and all embodiments based on the present application with equivalent elements, modifications, omissions, combinations (e.g., various embodiments intersecting schemes), adaptations or changes. The elements in the claims will be interpreted broadly based on the language adopted in the claims, and are not limited to the examples described in this specification or during the implementation of the application, and the examples will be interpreted as non-exclusive. Therefore, this specification and examples are intended to be considered as examples only, and the true scope and spirit are indicated by the following claims and the full scope of their equivalents.

[0154] The above description is intended to be illustrative rather than restrictive. For example, the above examples (or one or more of them) can be used in combination with each other. For example, those of ordinary skill in the art can use other embodiments when reading the above description. In addition, in the above-mentioned specific embodiments, various features can be grouped together to simplify the application. This should not be interpreted as an intention that a disclosed feature that does not require protection is necessary for any claim. On the contrary, the subject matter of the present application may be less than all the features of a specific disclosed embodiment. Thus, the following claims are incorporated into the specific embodiments as examples or embodiments, wherein each claim is independently used as a separate embodiment, and it is considered that these embodiments can be combined with each other in various combinations or arrangements. The scope of the present application should be determined with reference to the attached claims and the full scope of equivalent forms granted by these claims.

[0155] Multiple embodiments of the present application are described in detail above, but the present application is not limited to these specific embodiments. Those skilled in the art can make various variations and modifications to the embodiments based on the concept of the present application, and these variations and modifications should all fall within the scope of protection required by the present application.

Claims

1. An order detection method, comprising: Obtain at least one order and an EDI message corresponding to each of the orders; Performing vector conversion on each of the EDI messages to obtain a numerical vector corresponding to each of the orders; Performing feature extraction on the numerical vector to determine a target principal component for each of the orders; Based at least on the target principal component, it is determined that there are abnormal orders.

2. The order detection method according to claim 1, wherein the step of performing vector conversion on each of the EDI messages to obtain a numerical vector corresponding to each of the orders comprises: Based on the message type and the consumption time corresponding to the message type, each of the EDI messages is respectively converted into a vector to obtain a message vector corresponding to each of the orders, wherein the message vector can represent the message type of each EDI message in the order and the consumption time corresponding to the message type; The message vector is encoded to obtain a numerical vector corresponding to each of the orders, wherein the numerical vector can represent the sequence between the EDI messages in the order.

3. The order detection method according to claim 1, wherein the step of extracting features from the numerical vector to determine a target principal component of each order comprises: Using principal component analysis to extract features from the numerical vector to obtain eigenvalues; According to the screening rules, the target principal component is screened out based on the characteristic value, wherein the screening rules include N principal components with contribution from high to low or M principal components with contribution from high to low and a total contribution greater than a preset threshold.

4. The order detection method according to claim 1, wherein determining the order with abnormality based on at least the target principal component comprises: For each order, based at least on the target principal component of the order and the weight value of each target principal component, a first score of the target principal component in the order is calculated; Based on all the first scores, a second score for each order is calculated, where the second score is used to characterize the degree of abnormality of the order; Based on the second score, it is determined whether the order corresponding to the second score is an abnormal order.

5. The order detection method according to claim 4, further comprising: Generate a two-dimensional scatter plot based on the first score of each order and display it; and / or Generate a three-dimensional scatter plot based on the first score of each order and display it.

6. The order detection method according to claim 5, further comprising: For the abnormal order, the point corresponding to the first score is marked as abnormal.

7. The order detection method according to any one of claims 1 to 6, further comprising: Determine whether the order with the exception is in a completed state; If yes, resend the order with the exception; If not, the order with the abnormality is intercepted and processed, and the cause of the abnormality is determined and repaired accordingly.

8. An order detection device, comprising: An acquisition module configured to acquire at least one order and an EDI message corresponding to each order; A conversion module, configured to perform vector conversion on each of the EDI messages to obtain a numerical vector corresponding to each of the orders; A first determination module is configured to perform feature extraction on the numerical vector to determine a target principal component of each of the orders; The second determination module is configured to determine the existence of abnormal orders based at least on the target principal component.

9. The order detection device according to claim 8, further comprising an exception handling module, which is configured as follows: Determine whether the order with the exception is in a completed state; If yes, resend the order with the exception; If not, the order with the abnormality is intercepted and processed, and the cause of the abnormality is determined and repaired accordingly.

10. An electronic device, comprising: A processor and a memory, wherein the memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor and the memory communicate via a bus. When the machine-readable instructions are executed by the processor, the steps of the order detection method as described in any one of claims 1 to 7 are performed.