Abnormal data processing method, device and system and storage medium
Through clustering algorithms and feature extraction technology, identify and process abnormal data of open-coffee vending machines, select suitable processing strategies, solve the problem of low abnormal data processing efficiency in the existing technology, and achieve more efficient and intelligent abnormal data processing.
Patent Information
- Application Number
- CN202510284273.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-11
- Publication Date
- 2025-05-27
AI Technical Summary
The existing technology lacks an efficient and intelligent abnormal data processing mechanism, which makes it difficult to effectively process abnormal data that occurs during operation of open-coffee vending machines, affecting normal operation and user experience.
The clustering algorithm is used to process multiple types of detection data of open-coffee vending machines, identify abnormal data in each type of data, and select processing strategies that match the abnormal severity level for processing through feature extraction and working mode determination.
It improves the accuracy and efficiency of abnormal data processing, can solve abnormal problems in a timely and effective manner, and improves the operating stability and reliability of vending machines.
Smart Images

Figure CN120048037A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure belongs to the technical field of data processing, and more specifically, relates to an abnormal data processing method, device, system, and storage medium. Background Art
[0002] With the intelligent development of the retail industry, open-cabinet vending machines have been widely deployed in various places such as shopping malls, schools, office buildings, etc. due to their convenience, efficiency, and unique shopping experience. However, a large amount of data will be generated during their operation, including sales records, cabinet door opening and closing status, product inventory, etc. The emergence of abnormal data, such as incorrect records of sales data, unauthorized pick-up due to abnormal opening and closing of the cabinet door, and inconsistent inventory data with the actual situation, seriously affects the normal operation of the vending machine, and easily causes the decline of user experience and the chaos of operation and management. Currently, there is a lack of an efficient and intelligent abnormal data processing mechanism. Summary of the Invention
[0003] The purpose of the present disclosure is to provide an abnormal data processing method, device, system, and storage medium to improve the efficiency of abnormal data processing.
[0004] In the first aspect of the embodiments of the present disclosure, an abnormal data processing method is provided, including: Processing multiple types of data based on a clustering algorithm to obtain abnormal data for each type of data; the multiple types of data are detection data of an open-cabinet vending machine; Extracting abnormal features from the abnormal data of each type of data to obtain abnormal features for each type of data, and determining a working mode based on the abnormal features, where there are multiple processing strategies for the same working mode; Selecting a processing strategy that matches the abnormal severity level of the open-cabinet vending machine from multiple processing strategies as the target processing strategy.
[0005] In the second aspect of the embodiments of the present disclosure, an abnormal data processing device is provided, including: An abnormal data determination module, configured to process multiple types of data based on a clustering algorithm to obtain abnormal data for each type of data; the multiple types of data are detection data of an open-cabinet vending machine; An abnormal feature extraction module, configured to extract abnormal features from the abnormal data of each type of data to obtain abnormal features for each type of data, and determine a working mode based on the abnormal features, where there are multiple processing strategies for the same working mode; A processing strategy selection module, configured to select a processing strategy that matches the abnormal severity level of the open-cabinet vending machine from multiple processing strategies as the target processing strategy.
[0006] In a third aspect of the embodiments of the present disclosure, an abnormal data processing system is provided, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, the steps of the above-mentioned abnormal data processing method are implemented.
[0007] In a fourth aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned abnormal data processing method are implemented.
[0008] The beneficial effects of an abnormal data processing method, device, system, and storage medium provided by the embodiments of the present disclosure are as follows: The present disclosure processes various types of detection data of a cabinet-type vending machine through a clustering algorithm, can efficiently and accurately identify abnormal data in each type of data, and improves the accuracy and efficiency of abnormal detection. Subsequently, the present disclosure extracts features from the abnormal data and determines the working mode based on the abnormal features, and can quickly determine corresponding processing measures according to different types of abnormal data. At the same time, by selecting a target processing strategy that matches the abnormal severity level from multiple processing strategies, the present disclosure can not only solve the abnormal problem in a timely and effective manner, but also improve the operation stability and reliability of the cabinet-type vending machine. Therefore, the present disclosure can improve the efficiency of abnormal data processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings in the following description are only some embodiments of the present disclosure. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0010] Figure 1 It is a schematic flowchart of an abnormal data processing method provided by an embodiment of the present disclosure; Figure 2 It is a structural block diagram of an abnormal data processing device provided by an embodiment of the present disclosure; Figure 3 It is a schematic block diagram of an abnormal data processing system provided by an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0011] In the following description, specific details such as specific system architectures and technologies are presented for the purpose of illustration rather than limitation, so as to thoroughly understand the embodiments of the present disclosure. However, those skilled in the art should clearly understand that the present disclosure can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from interfering with the description of the present disclosure.
[0012] To make the objectives, technical solutions, and advantages of the present disclosure clearer, the following will be described through specific embodiments in conjunction with the accompanying drawings.
[0013] Please refer to Figure 1 , Figure 1 which is a schematic flowchart of an abnormal data processing method provided for an embodiment of the present disclosure. The method includes: S101: Process multiple types of data based on a clustering algorithm to obtain abnormal data for each type of data; the multiple types of data are detection data of an open cabinet vending machine.
[0014] In this embodiment, the clustering algorithm is an unsupervised learning algorithm used to group similar data points in a dataset into the same class (cluster), while dividing dissimilar data points into different classes. The clustering algorithm adopted in this embodiment can be a density-based clustering algorithm, which can determine clusters according to the density of data points. If the density of data points in a region reaches the first density threshold, these points are divided into a cluster, and those data points with lower density (density less than the first density value) and outside the cluster can be identified as abnormal points.
[0015] The multiple types of data are multiple different types of data sets, and the multiple types of data are detection data of an open cabinet vending machine, which can be collected through sensors, recording systems, etc. In the scenario of an open cabinet vending machine, the data types include but are not limited to transaction data, device status data, inventory data, etc.
[0016] Exemplarily, for transaction data, it may include information such as transaction amount, transaction time, payment method, etc.; device status data may include the number of times the cabinet door is opened and closed, etc.; inventory data includes the types of goods, inventory quantity, replenishment time, etc.
[0017] After the multiple types of data are processed by the clustering algorithm in this embodiment, according to the clustering results, those data points that do not conform to the characteristics of the normal cluster are identified as abnormal data. Such a judgment is made separately for each category of data, so as to obtain the abnormal data corresponding to each category of data.
[0018] S102: Extract features from the abnormal data of each type of data to obtain abnormal features of each type of data, and determine a working mode based on the abnormal features. There are multiple processing strategies for the same working mode.
[0019] In this embodiment, feature extraction is to extract key information that can reflect the essence of anomalies from the abnormal data of each type of data. An abnormal feature is a feature value or pattern that is significantly different from normal data obtained by analyzing abnormal data. The working mode is a processing mode divided according to the type or severity of abnormal features. The extracted abnormal features can be mapped to a preset working mode for subsequent selection of processing strategies. The processing strategy is a countermeasure designed for a specific working mode, which can include multiple priorities or operation methods. Multiple processing methods are predefined for each working mode, and the optimal solution is selected according to the actual situation.
[0020] S103: Select a processing strategy that matches the abnormal severity level of the open cabinet vending machine from multiple processing strategies as the target processing strategy.
[0021] Each abnormal severity level corresponds to a standard processing strategy; Selecting a processing strategy that matches the abnormal severity level from multiple processing strategies as the target processing strategy includes: Determine the target standard processing strategy corresponding to the abnormal severity level of the open cabinet vending machine, and calculate the similarities between each processing strategy in the multiple processing strategies and the target standard processing strategy; Determine the target processing strategy based on the comparison results of the multiple similarities and the first similarity threshold.
[0022] In this embodiment, the abnormal severity level is the degree of influence on the operation of the vending machine and the user experience according to the abnormal situation. The abnormal severity level can be divided into a first level, a second level, and a third level. The first level is a minor anomaly, the second level is a medium anomaly, and the third level is a severe anomaly. Each abnormal severity level corresponds to a standard processing strategy. The standard processing strategy is a relatively fixed processing method or measure formulated in advance for each abnormal severity level.
[0023] The target standard processing strategy is the preset standard processing strategy corresponding to the current abnormal severity level of the vending machine.
[0024] Similarity is a numerical index used to measure the similarity degree between two processing strategies, and the similarity can be calculated from multiple different perspectives. When selecting a suitable target processing strategy from multiple processing strategies, first, it is necessary to clarify what the target standard processing strategy corresponding to the current abnormal situation is. Then, for the existing multiple processing strategies, calculate their similarities with the target standard processing strategy in multiple aspects to evaluate the closeness of each processing strategy to the standard strategy.
[0025] The first similarity threshold is a preset standard value used to determine whether the similarity is high enough. If the similarity between a certain processing strategy and the target standard processing strategy is greater than or equal to this threshold, it is considered that the processing strategy is appropriate; if it is less than this threshold, it is considered inappropriate. After calculating the multiple similarities between each processing strategy and the target standard processing strategy, these similarities are respectively compared with the preset first similarity threshold, and according to the comparison results, it is determined which processing strategy is the most appropriate target processing strategy.
[0026] Determining the target processing strategy based on the comparison results of multiple similarities and the first similarity threshold includes: Calculating the average value of multiple similarities and taking the average value as the first similarity threshold; each similarity corresponds to a processing strategy; In response to each similarity being greater than or equal to the first similarity threshold, taking the corresponding processing strategy as the target processing strategy; If the corresponding processing strategy is one, directly taking this processing strategy as the target processing strategy; If the corresponding processing strategies are multiple, screening out the target processing strategy from the multiple corresponding processing strategies based on the processing efficiency. For example, selecting the processing strategy with the fastest processing efficiency as the target processing strategy.
[0027] Or, in response to the absolute value difference between each similarity and the first similarity threshold being the smallest, taking the processing strategy corresponding to this similarity as the target processing strategy.
[0028] Or, determining the maximum similarity among multiple similarities and taking the processing strategy corresponding to the maximum similarity as the target processing strategy.
[0029] In this embodiment, calculating the multiple similarities between each processing strategy among multiple processing strategies and the target standard processing strategy includes: Determining the operation action similarity of each processing strategy ; The operation action similarity of each processing strategy The calculation formula is:
[0030] Wherein, is the operation action set of each processing strategy, is the operation action set of the target standard processing strategy; Determining the completion time similarity of each processing strategy ; The completion time similarity of each processing strategy The calculation formula is:
[0031] Among them, is the completion time of each processing strategy, is the completion time of the target standard processing strategy, is an adjustable parameter; among them, the adjustable parameter is used to control the influence degree of time difference on similarity, the larger it is, the more sensitive the influence of time difference on similarity is; Perform weighted calculation on the operation action similarity of each processing strategy and the completion time similarity of each processing strategy to determine the similarity of each processing strategy, and aggregate the similarities of each processing strategy to obtain multiple similarities; The similarity of each processing strategy The calculation formula of is:
[0032]
[0033] Among them, , is the weight of the operation action similarity of each processing strategy, is the weight of the completion time similarity of each processing strategy.
[0034] It can be concluded from the above that the present disclosure processes various types of detection data of the open cabinet vending machine through a clustering algorithm, and can efficiently and accurately identify abnormal data in each type of data, improving the accuracy and efficiency of anomaly detection. After that, the present disclosure extracts features from the abnormal data and determines the working mode based on the abnormal features, and can quickly determine corresponding processing measures according to different types of abnormal data. At the same time, the present disclosure selects a target processing strategy that matches the abnormal severity level from multiple processing strategies, which can not only solve the abnormal problem in a timely and effective manner, but also improve the operation stability and reliability of the open cabinet vending machine. Therefore, the present disclosure can improve the efficiency of abnormal data processing.
[0035] In an embodiment of the present disclosure, each type of data includes multiple data points; Processing various types of data based on a clustering algorithm to obtain abnormal data of each type of data, including: Determine the distance metric value between each data point and sort them to obtain a first distance list; determine the k-distance value of each data point based on the first distance list, where k is the minimum number of points threshold; Plot the k-distance value of each data point to obtain a first distance graph; determine the neighborhood radius based on the change trend of the first distance graph; Determine the number of data points whose distance metric value is less than or equal to the neighborhood radius, denoted as the first quantity; determine the abnormal data of each type of data based on the first quantity.
[0036] Determining the neighborhood radius based on the changing trend of the first distance graph, including: Determining the inflection points of the first distance graph; Selecting the k-th distance value corresponding to the inflection point as the neighborhood radius.
[0037] In this embodiment, the data points are the detection data of a vending machine at a certain moment, such as the transaction amount and the number of times the cabinet door is opened and closed at a certain moment. The distance metric value is a numerical value used to measure the degree of difference between two data points.
[0038] The first distance list is a list obtained by sorting the distance metric values between all pairs of data points. The k-th distance value is, for each data point, the distance value at the k-th position in the sorting of its distances to all other data points. The minimum number of points threshold (k) is a preset parameter used to determine the minimum number of data points required in the neighborhood when judging whether a data point is a core point or an outlier. The first distance graph is a graph plotted with the data points as the horizontal axis and the k-th distance value of each data point as the vertical axis. The neighborhood radius is, in the clustering algorithm, a circle is drawn with a certain data point as the center, and the data points within the circle form the neighborhood of this data point. An inflection point is a point in the first distance graph where the slope of the curve changes significantly.
[0039] Each type of data is composed of multiple basic data units. For example, in the detection data of a cabinet-opening vending machine, the transaction data class may include data points such as the transaction amount and transaction time at multiple different transaction moments.
[0040] Specifically, the steps of this embodiment are as follows: First, calculate the distance between each pair of data points, and calculate the distance metric value based on the first formula. Sort these distance metric values from smallest to largest to form the first distance list. For each data point, find the k-th distance value from its corresponding distance list, and this value is the k-th distance value of this data point.
[0041] Secondly, use the k-th distance value of each data point as the vertical coordinate and the data point number as the horizontal coordinate to draw the first distance graph.
[0042] Then, in the first distance graph, find the point where the slope of the curve changes significantly, that is, the inflection point. The k-th distance value corresponding to this inflection point is selected as the neighborhood radius. This inflection point is the point where the sudden drop occurs. The inflection point can be obtained based on the first neural network, and the first neural network is trained with a large number of distance graphs and their corresponding inflection point data, or a curve slope change rate threshold is preset to determine it.
[0043] Finally, for each data point, count the number of data points within its neighborhood (i.e., the distance metric value from this data point is less than or equal to the neighborhood radius), and this number is the first quantity. If the first quantity of a certain data point is less than the minimum point threshold k, then this data point is considered an outlier.
[0044] The first formula is:
[0045]
[0046] Wherein, is the distance metric value, is the first weight, is the second weight, is the th data point, is the th data point, is the th data point and the th data point's standard deviation, is the distance after DTW path matching, is the time of the th data point, is the time of the th data point, is the maximum DTW distance of all time series pairs in the dataset.
[0047] It can be concluded from the above that in this embodiment, by accurately calculating the k-distance value of each data point and drawing the first distance graph, the distribution characteristics of the data points can be intuitively displayed. Determining the neighborhood radius based on the change trend of the distance graph, especially by identifying the inflection point to select the appropriate k-distance value as the radius, effectively improves the accuracy of outlier identification. This embodiment can adapt to different types of data distributions, which helps to improve the efficiency and quality of data processing.
[0048] In an embodiment of the present disclosure, feature extraction is performed on the outliers of each type of data to obtain the outlier features of each type of data, including processing the outliers of each type of data based on the isolation forest algorithm; An outlier data processing method further includes: Determine the initial number of trees of the isolation forest algorithm, and update the initial number of trees to the target number of trees based on the accuracy of feature extraction; Determine the initial subsample size of the isolation forest algorithm, and update the initial subsample size to the target subsample size based on the outlier data sample size of each type of data; Determine the initial maximum depth of the isolation forest algorithm, and update the initial maximum depth to the target maximum depth based on the efficiency of feature extraction.
[0049] In this embodiment, the Isolation Forest algorithm is an unsupervised learning algorithm for anomaly detection. It isolates data points by constructing multiple random decision trees, determines whether a data point is an anomaly based on the difficulty of isolating it, and identifies the anomaly characteristics of the point.
[0050] The initial number of trees is the preset number of decision trees, and the target number of trees is the final appropriate number of decision trees obtained by adjusting the initial number of trees according to the accuracy of feature extraction.
[0051] The initial subsample size is the preset number of subsamples, and the target subsample size is the final appropriate number of subsamples obtained by adjusting the initial subsample size according to the amount of abnormal data samples for each type of data.
[0052] The initial maximum depth is the preset maximum depth of each tree, which is used to limit the growth of the tree. The target maximum depth is the final appropriate maximum depth of the tree obtained by adjusting the initial maximum depth according to the efficiency of feature extraction.
[0053] Updating the initial number of trees to the target number of trees based on the accuracy of feature extraction includes: In response to the accuracy of feature extraction being greater than or equal to the first accuracy threshold, increasing the initial number of trees by the first step size to obtain the target number of trees; In response to the accuracy of feature extraction being less than the first accuracy threshold, increasing the initial number of trees by the second step size to obtain the target number of trees; Wherein, the first step size is less than the second step size, and the first step size and the second step size can be set according to experience.
[0054] Updating the initial subsample size to the target subsample size based on the amount of abnormal data samples for each type of data includes: In response to the amount of abnormal data samples for each type of data being greater than or equal to the first quantity threshold, increasing the initial subsample size by the third step size to obtain the target subsample size; In response to the amount of abnormal data samples for each type of data being less than the first quantity threshold, reducing the initial subsample size by the fourth step size to obtain the target subsample size; Wherein, the third step size and the fourth step size can be set according to experience.
[0055] Updating the initial maximum depth to the target maximum depth based on the efficiency of feature extraction includes: In response to the efficiency of feature extraction being greater than or equal to the first efficiency threshold, reducing the initial maximum depth by the fifth step size to obtain the target maximum depth; In response to the efficiency of feature extraction being less than the first efficiency threshold, reducing the initial maximum depth by the sixth step size to obtain the target maximum depth; Among them, the fifth step size is smaller than the sixth step size, and the fifth step size and the sixth step size can be set according to experience.
[0056] For the abnormal data determined in each type of detection data (such as transaction data, device status data, etc.) of the open cabinet vending machine, in order to obtain the characteristics that can reflect its abnormality, the isolation forest algorithm is used to analyze and process these abnormal data, so as to extract the corresponding abnormal characteristics.
[0057] It can be concluded from the above that in this embodiment, by flexibly adjusting parameters such as the number of trees, subsample size, and maximum depth of the isolation forest algorithm, the accuracy and efficiency of feature extraction can be significantly improved. Dynamically update the number of trees according to the accuracy of feature extraction to ensure the accuracy of the model; adjust the subsample size based on the abnormal data sample size to enhance the adaptability of the model; optimize the maximum depth according to the feature extraction efficiency to improve the processing speed.
[0058] In an embodiment of the present disclosure, the abnormal features include payment abnormality, sales abnormality, cabinet door abnormality, and inventory abnormality; Determining the working mode based on the abnormal features includes: In response to the abnormal feature being a payment abnormality, switch the working mode to the payment verification mode; the payment verification mode includes verifying the reason for the payment abnormality; In response to the abnormal feature being a sales abnormality, switch the working mode to the sales correction mode; the sales correction mode includes correcting the sales record; In response to the abnormal feature being a cabinet door abnormality, switch the working mode to the device repair mode; the device repair mode includes repairing the cabinet door state; In response to the abnormal feature being an inventory abnormality, switch the working mode to the commodity inspection mode; the commodity inspection mode includes verifying the inventory information.
[0059] In this embodiment, the abnormal feature is the key information or characteristics that can reflect the abnormal situation extracted from various types of data of the open cabinet vending machine, and can be specifically divided into payment abnormality, sales abnormality, cabinet door abnormality, and inventory abnormality.
[0060] Payment abnormality refers to problems that do not conform to the normal situation in the payment link of the vending machine, such as payment failure, abnormal payment amount, repeated payment, etc.
[0061] Sales abnormality means that there are abnormal situations in the sales process of the vending machine, such as a sudden large fluctuation in the sales quantity, the absence of the sales record of a certain commodity, abnormal sales time, etc.
[0062] Cabinet door abnormality means that the cabinet door of the vending machine is in an abnormal state, such as the cabinet door not being closed normally, the cabinet door opening and closing frequently, cabinet door lock failure, etc.
[0063] Inventory anomaly refers to abnormal situations in the commodity inventory of a vending machine, such as the inventory quantity not matching the actual record, the commodity being out of stock but the system not being updated, etc.
[0064] Working mode refers to the specific operating mode that the vending machine switches to in order to handle different abnormal situations. Each mode has corresponding processing tasks and procedures.
[0065] Payment verification mode is a working mode that the vending machine enters when a payment anomaly is detected. The main task is to verify the reasons for the payment anomaly.
[0066] Sales correction mode is the mode that the vending machine switches to after a sales anomaly is discovered. The purpose is to correct the incorrect or abnormal sales records.
[0067] Device repair mode is the mode that the vending machine enters when the cabinet door has an anomaly, and is used to repair the abnormal state of the cabinet door.
[0068] Commodity inspection mode is the mode that the vending machine enters after an inventory anomaly is detected. The main work is to verify the inventory information to ensure the accuracy of the inventory data.
[0069] When a payment anomaly occurs in the vending machine is detected, the working mode of the vending machine will be switched to the payment verification mode. In the payment verification mode, the main work of the vending machine is to find and analyze the specific reasons for the payment anomaly.
[0070] Exemplarily, when a user purchases a commodity on the vending machine and selects WeChat payment, the page shows payment failure, but the user's WeChat shows successful payment. At this time, the vending machine detects this payment anomaly and switches the working mode to the payment verification mode. In this mode, the vending machine checks the status of the payment order, whether the payment amount is correct, whether the network connection is normal, etc. by interacting with the payment system to determine the reason for the payment anomaly.
[0071] If an anomaly in the sales of the vending machine is detected, the working mode will be switched to the sales correction mode. In the sales correction mode, the task of the vending machine is to check and correct the abnormal sales records to restore them to the correct state.
[0072] Exemplarily, the sales system record of the vending machine shows that within a certain period of time, the sales quantity of a certain beverage is negative, which is obviously an unreasonable sales anomaly. So the vending machine switches to the sales correction mode, and the staff checks the original data of the sales record, transaction timestamps and other information, and finds that it is a system entry error, and corrects the sales quantity to the correct value.
[0073] When the cabinet door of the vending machine is in an abnormal state, the system will switch the working mode to the device repair mode. In the device repair mode, the vending machine or relevant personnel will take measures to repair the abnormality of the cabinet door and restore it to a normal state.
[0074] Exemplarily, the cabinet door sensor of the vending machine detects that the cabinet door has been in the open state for longer than the normal transaction time, but there is no user performing shopping operations at this time, which belongs to the abnormality of the cabinet door. The vending machine switches to the device repair mode. First, it tries to automatically close the cabinet door. If it cannot be automatically closed, it will notify the maintenance personnel to come and check the mechanical structure and sensors of the cabinet door for repair to restore the normal closed state of the cabinet door.
[0075] Once an abnormal situation is detected in the inventory of the vending machine, the working mode will be switched to the commodity inspection mode. In the commodity inspection mode, the main task is to verify the inventory information to ensure that the inventory data matches the actual quantity of goods.
[0076] Exemplarily, the inventory management system of the vending machine shows that the inventory quantity of a certain snack is 10 pieces, but when the staff actually checks the shelf, they find that the snack is out of stock, which is an inventory abnormality. The vending machine switches to the commodity inspection mode. The staff verifies the inventory information by scanning the commodity barcodes, checking the update time of the inventory records, etc., finds out the reason for the mismatch between the inventory data and the actual situation, and corrects the inventory data.
[0077] From the above, it can be concluded that this embodiment improves the pertinence and efficiency of exception handling; at the same time, through the clear working mode switching mechanism, it ensures that exceptions can be solved in a timely and effective manner, reducing business interruptions or losses caused by exceptions.
[0078] In an embodiment of the present disclosure, an abnormal data processing method further includes: Determine the occurrence frequency of abnormal data for each type of data; Based on the occurrence frequency, predict the maintenance interval of the open cabinet vending machine.
[0079] In this embodiment, the occurrence frequency is the frequency of abnormal data appearing within a certain time period. It is usually measured by the number of times abnormal data appears per unit time, and the time period can be days, weeks, months, etc.
[0080] The maintenance interval of the open cabinet vending machine refers to the time interval between two maintenance operations on the vending machine (such as checking equipment components, updating software, replenishing goods, etc.). A reasonable maintenance interval can ensure the stable operation of the vending machine and reduce the probability of failures.
[0081] For each type of detection data of the open cabinet vending machine, count the number of occurrences of its abnormal data within a specific time range, and then calculate the occurrence frequency of the abnormal data based on this time range. Based on the occurrence frequencies of the abnormal data of each type of data obtained from the above calculations, estimate the time interval for maintaining the open cabinet vending machine. Generally speaking, the higher the occurrence frequency of the abnormality, the greater the possibility that there is a problem in this part, and more frequent maintenance is required, that is, the maintenance interval is shorter; on the contrary, the lower the occurrence frequency of the abnormality, the maintenance interval can be appropriately extended.
[0082] Predicting the maintenance interval of the open cabinet vending machine based on the occurrence frequency , including: In response to the occurrence frequency being less than or equal to the first frequency threshold, take the maximum maintenance interval as the maintenance interval of the open cabinet vending machine; In response to the occurrence frequency being greater than the first frequency threshold and less than or equal to the second frequency threshold, take as the maintenance interval of the open cabinet vending machine; In response to the occurrence frequency being greater than the second frequency threshold, take the minimum maintenance interval as the maintenance interval of the open cabinet vending machine.
[0083] Among them, is a constant and can be obtained through long-term experience summary; is the occurrence frequency of the abnormal data.
[0084] The minimum maintenance interval is the shortest time interval set to ensure that the vending machine can be maintained in a timely manner when abnormalities occur frequently.
[0085] It can be seen from the above that in this embodiment, by determining the occurrence frequency of the abnormal data of each type of data, it is possible to accurately grasp the occurrence frequency of various faults or abnormal conditions of the open cabinet vending machine during operation, providing strong data support for subsequent maintenance management. Secondly, predicting the maintenance interval of the vending machine based on these occurrence frequencies can effectively prevent the occurrence of faults, thereby improving the operating efficiency of the equipment.
[0086] Corresponding to an abnormal data processing method in the above embodiment, Figure 2 is a structural block diagram of an abnormal data processing device provided by an embodiment of the present disclosure. For the sake of simplicity of description, only the parts related to the embodiments of the present disclosure are shown. Refer to Figure 2 This abnormal data processing device 20 includes: an abnormal data determination module 21, an abnormal feature extraction module 22, and a processing strategy selection module 23.
[0087] Among them, the abnormal data determination module 21 is used to process multiple types of data based on a clustering algorithm to obtain the abnormal data of each type of data; the multiple types of data are the detection data of the open cabinet vending machine. The abnormal feature extraction module 22 is used to extract the features of the abnormal data of each type of data to obtain the abnormal features of each type of data, and determine the working mode based on the abnormal features. There are multiple processing strategies for the same working mode. The processing strategy selection module 23 is used to select a processing strategy that matches the abnormal severity level of the open cabinet vending machine from multiple processing strategies as the target processing strategy.
[0088] In an embodiment of the present disclosure, each type of data includes multiple data points. The abnormal data determination module 21 is specifically used to determine the distance metric values between each data point, sort them to obtain the first distance list; determine the k-distance value of each data point based on the first distance list, where k is the minimum number of points threshold. Plot the k-distance value of each data point to obtain the first distance graph; determine the neighborhood radius based on the change trend of the first distance graph. Determine the number of data points whose distance metric value is less than or equal to the neighborhood radius, denoted as the first quantity; determine the abnormal data of each type of data based on the first quantity.
[0089] In an embodiment of the present disclosure, the abnormal data determination module 21 is specifically further used to determine the inflection point of the first distance graph. Select the k-distance value corresponding to the inflection point as the neighborhood radius.
[0090] In an embodiment of the present disclosure, extracting the abnormal features of each type of data to obtain the abnormal features of each type of data includes processing the abnormal data of each type of data based on the isolation forest algorithm. An abnormal data processing device 20 further includes: a parameter adjustment module, which is used to determine the initial number of trees of the isolation forest algorithm, and update the initial number of trees to the target number of trees based on the accuracy of feature extraction. Determine the initial subsample size of the isolation forest algorithm, and update the initial subsample size to the target subsample size based on the abnormal data sample size of each type of data. Determine the initial maximum depth of the isolation forest algorithm, and update the initial maximum depth to the target maximum depth based on the efficiency of feature extraction.
[0091] In an embodiment of the present disclosure, the abnormal features include payment anomalies, sales anomalies, cabinet door anomalies, and inventory anomalies. The abnormal feature extraction module 22 is specifically used to, in response to the abnormal feature being a payment anomaly, switch the working mode to the payment verification mode; the payment verification mode includes verifying the reason for the payment anomaly. In response to the abnormal feature being a sales anomaly, switch the working mode to the sales correction mode; the sales correction mode includes correcting sales records; In response to the abnormal feature being a cabinet door anomaly, switch the working mode to the device repair mode; the device repair mode includes repairing the cabinet door state; In response to the abnormal feature being an inventory anomaly, switch the working mode to the commodity inspection mode; the commodity inspection mode includes verifying inventory information.
[0092] In an embodiment of the present disclosure, each abnormal severity level corresponds to a standard processing strategy; The processing strategy selection module 23 is specifically configured to determine the target standard processing strategy corresponding to the abnormal severity level of the open cabinet vending machine, and calculate the similarities between each processing strategy in multiple processing strategies and the target standard processing strategy; Determine the target processing strategy based on the comparison result between the multiple similarities and the first similarity threshold.
[0093] In an embodiment of the present disclosure, an abnormal data processing device 20 further includes: a maintenance interval determination module for determining the occurrence frequency of abnormal data for each type of data; Predict the maintenance interval of the open cabinet vending machine based on the occurrence frequency.
[0094] See Figure 3 , Figure 3 is a schematic block diagram of an abnormal data processing system provided by an embodiment of the present disclosure. As Figure 3 shown, an abnormal data processing system 300 in this embodiment may include: one or more processors 301, one or more input devices 302, one or more output devices 303, and one or more memories 304. The above-mentioned processors 301, input devices 302, output devices 303, and memories 304 communicate with each other through a communication bus 305. The memory 304 is used to store computer programs, and the computer programs include program instructions. The processor 301 is used to execute the program instructions stored in the memory 304. Among them, the processor 301 is configured to call the program instructions to execute the functions of each module / unit in the above-mentioned device embodiments, such as Figure 2 the functions of the modules 21 to 23 shown.
[0095] It should be understood that in the embodiments of the present disclosure, the so-called processor 301 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0096] The input device 302 may include a touchpad, a fingerprint acquisition sensor (for acquiring the fingerprint information and the direction information of the fingerprint of the user), a microphone, etc., and the output device 303 may include a display (such as an LCD), a speaker, etc.
[0097] The memory 304 may include a read-only memory and a random access memory, and provide instructions and data to the processor 301. A part of the memory 304 may also include a non-volatile random access memory. For example, the memory 304 may also store information about the device type.
[0098] In specific implementation, the processor 301, the input device 302, and the output device 303 described in the embodiments of the present disclosure may execute the implementation manners described in the first embodiment and the second embodiment of an abnormal data processing method provided by the embodiments of the present disclosure, and may also execute the implementation manner of an abnormal data processing system described in the embodiments of the present disclosure, which will not be elaborated herein.
[0099] In another embodiment of the present disclosure, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program, and the computer program includes program instructions. When the program instructions are executed by a processor, all or part of the processes in the method of the above embodiment are implemented. It can also be completed by instructing relevant hardware through the computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal, and software distribution medium, etc.
[0100] The computer-readable storage medium can be an internal storage unit of the system in any of the foregoing embodiments, such as the hard disk or memory of the system. The computer-readable storage medium can also be an external storage device of the system, such as a plug-in hard disk equipped on the system, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. Further, the computer-readable storage medium can also include both the internal storage unit and the external storage device of the system. The computer-readable storage medium is used to store the computer program and other programs and data required by the system. The computer-readable storage medium can also be used to temporarily store the data that has been output or will be output.
[0101] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present disclosure.
[0102] Those skilled in the art can clearly understand that for the convenience and conciseness of description, the specific working processes of the above-described system and units can refer to the corresponding processes in the foregoing method embodiments, and will not be described herein again.
[0103] In several embodiments provided by this application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed coupling, direct coupling, or communication connection to each other can be an indirect coupling or communication connection through some interfaces or units, and can also be in the form of electrical, mechanical, or other connections.
[0104] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiments of the present disclosure.
[0105] In addition, the functional units in various embodiments of the present disclosure can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
[0106] The above is only the specific implementation manner of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present disclosure can easily think of various equivalent modifications or replacements, and these modifications or replacements should all be covered within the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be subject to the protection scope of the claims.
Claims
1. A method for processing abnormal data, characterized in that: include: Process multiple types of data based on clustering algorithms to obtain abnormal data for each type of data; The multiple types of data are detection data of open cabinet vending machines; Extract features of abnormal data of each type of data to obtain abnormal features of each type of data, determine a working mode based on the abnormal features, and the same working mode has multiple processing strategies; A processing strategy that matches the severity level of the abnormality of the open cabinet vending machine is selected from the plurality of processing strategies as a target processing strategy.
2. The abnormal data processing method according to claim 1, characterized in that: Each type of data includes multiple data points; The clustering algorithm is used to process multiple types of data to obtain abnormal data of each type of data, including: Determine the distance metric value between each data point and sort them to obtain a first distance list; determine the k-th distance value of each data point based on the first distance list, where k is a minimum point number threshold; Plotting the k-th distance value of each data point to obtain a first distance graph; determining a neighborhood radius based on a change trend of the first distance graph; Determine the number of data points whose distance metric value is less than or equal to the neighborhood radius, recorded as a first number; and determine abnormal data of each type of data based on the first number.
3. The abnormal data processing method according to claim 2, characterized in that: The determining of the area radius based on the change trend of the first distance map includes: determining an inflection point of the first distance graph; The k-th distance value corresponding to the inflection point is selected as the neighborhood radius.
4. The abnormal data processing method according to claim 1, characterized in that: The extracting features of the abnormal data of each type of data to obtain the abnormal features of each type of data includes processing the abnormal data of each type of data based on an isolation forest algorithm; The abnormal data processing method further includes: Determining an initial number of trees of the isolation forest algorithm, and updating the initial number of trees to a target number of trees based on the accuracy of feature extraction; Determining an initial subsample size of the isolation forest algorithm, and updating the initial subsample size to a target subsample size based on the sample size of abnormal data of each type of data; An initial maximum depth of the isolation forest algorithm is determined, and the initial maximum depth is updated to a target maximum depth based on the efficiency of feature extraction.
5. The abnormal data processing method according to claim 1, characterized in that: The abnormal characteristics include payment abnormalities, sales abnormalities, cabinet door abnormalities and inventory abnormalities; The determining of the working mode based on the abnormal feature comprises: In response to the abnormal feature being a payment abnormality, switching the working mode to a payment verification mode; the payment verification mode includes verifying the cause of the payment abnormality; In response to the abnormal feature being a sales abnormality, switching the working mode to a sales correction mode; the sales correction mode includes correcting sales records; In response to the abnormal feature being a cabinet door abnormality, switching the working mode to an equipment repair mode; the equipment repair mode includes repairing a cabinet door state; In response to the abnormal feature being an inventory abnormality, the working mode is switched to a commodity inspection mode; the commodity inspection mode includes verifying inventory information.
6. The abnormal data processing method according to claim 1, characterized in that: Each abnormality severity level corresponds to a standard handling strategy; The step of selecting a processing strategy that matches the severity level of the abnormality from a plurality of processing strategies as a target processing strategy includes: Determine a target standard processing strategy corresponding to the abnormal severity level of the open cabinet vending machine, and calculate multiple similarities between each processing strategy in the plurality of processing strategies and the target standard processing strategy; A target processing strategy is determined based on comparison results of the multiple similarities with the first similarity threshold.
7. The abnormal data processing method according to claim 1, characterized in that: Also includes: Determine the frequency of occurrence of abnormal data for each type of data; A maintenance interval of the open cabinet vending machine is predicted based on the occurrence frequency.
8. An abnormal data processing device, characterized in that: include: An abnormal data determination module is used to process multiple types of data based on a clustering algorithm to obtain abnormal data for each type of data; The multiple types of data are detection data of open cabinet vending machines; An abnormal feature extraction module is used to extract features from abnormal data of each type of data to obtain abnormal features of each type of data, and determine a working mode based on the abnormal features. The same working mode has multiple processing strategies; The processing strategy selection module is used to select a processing strategy that matches the abnormal severity level of the open cabinet vending machine from multiple processing strategies as a target processing strategy.
9. An abnormal data processing system, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Multivariate time sequence similarity search method based on variable correlation
CN114003636A
Customer side load prediction method and system based on two-stage clustering and MGRU-AT
CN115081533A
Substation multi-class live detection data anomaly detection method based on deep learning
CN115221233A
Server data processing method networked with vending machine
CN115512481A
Vending machine material channel monitoring system based on machine vision
CN115988175A