Bill identification method and device, storage medium and electronic equipment
By constructing the bill time series data sequence and calling the exception identification model, the bill data on the cloud computing platform is abnormally identified, which solves the problem of low bill identification accuracy and improves cost management efficiency and resource utilization.
Patent Information
- Application Number
- CN202410747221.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-11
- Publication Date
- 2024-09-24
AI Technical Summary
The existing technology has low accuracy in identifying bill data on cloud computing platforms, making it difficult to effectively identify abnormalities in bill data, resulting in difficulty in cost management.
By obtaining bill data to be identified and historical bill data, a bill time series data sequence is constructed, the data is expanded, and the target anomaly identification model is called for anomaly identification to improve the accuracy of bill identification.
It effectively improves the accuracy of bill identification and anomaly identification, helps enterprises discover and solve cost anomalies in a timely manner, optimize resource utilization, and reduce cost management difficulty and risks.
Smart Images

Figure CN118690272A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a bill recognition method, device, storage medium and electronic equipment. Background Art
[0002] At present, cost management is one of the important issues that enterprises and organizational managers are concerned about, such as cost management on cloud computing platforms. Among them, more and more enterprises and departments choose to migrate their businesses to cloud computing platforms, and the use of cloud computing resources may lead to complex cost structures, and it is difficult to accurately predict and manage costs when used on a large scale, so it is necessary to promptly identify abnormal problems in billing (i.e., cost billing) data. However, related technologies usually determine that the billing data is abnormal when a certain cost in the billing data (such as the total cost or the cost involved in a business, etc.) exceeds a fixed cost threshold, and the billing data will change according to the cloud computing environment or business needs, resulting in low bill recognition accuracy. Based on this, there is currently no good solution for how to improve the accuracy of bill recognition. Summary of the invention
[0003] In view of this, an embodiment of the present invention provides a bill identification method, device, storage medium and electronic device to solve the problem that related technologies use fixed cost thresholds to perform bill identification, resulting in low bill identification accuracy; that is, an embodiment of the present invention can achieve abnormal identification of bill data to be identified by extending bill data to achieve bill identification of bill data to be identified, thereby obtaining abnormal identification results of the bill data to be identified (also referred to as bill identification results), which can effectively improve the accuracy of bill identification, and thereby improve the accuracy of abnormal bill identification.
[0004] According to one aspect of an embodiment of the present invention, a bill identification method is provided, the method comprising:
[0005] Acquire the bill data to be identified, and acquire a historical bill data set corresponding to the bill data to be identified, wherein the historical bill data set includes a plurality of historical bill data;
[0006] Constructing a bill time series data sequence based on the to-be-identified bill data and the historical bill data set;
[0007] Based on the bill time series data sequence, data expansion is performed on the bill data to be identified to obtain extended bill data corresponding to the bill data to be identified;
[0008] The target anomaly recognition model is called to perform anomaly recognition on the extended bill data to obtain a target anomaly recognition result, and the target anomaly recognition result is used as the anomaly recognition result of the bill data to be recognized. The target anomaly recognition result supports indicating whether the bill data to be recognized is abnormal.
[0009] According to another aspect of an embodiment of the present invention, a bill identification device is provided, the device comprising:
[0010] An acquisition unit, configured to acquire the billing data to be identified, and acquire a historical billing data set corresponding to the billing data to be identified, wherein the historical billing data set includes a plurality of historical billing data;
[0011] A processing unit, configured to construct a bill time series data sequence based on the bill data to be identified and the historical bill data set;
[0012] The processing unit is further configured to perform data expansion on the to-be-identified bill data based on the bill time series data sequence to obtain extended bill data corresponding to the to-be-identified bill data;
[0013] The processing unit is also used to call the target anomaly recognition model, perform anomaly recognition on the extended bill data, obtain a target anomaly recognition result, and use the target anomaly recognition result as the anomaly recognition result of the bill data to be identified. The target anomaly recognition result supports indicating whether the bill data to be identified is abnormal.
[0014] According to another aspect of an embodiment of the present invention, an electronic device is provided, comprising a processor and a memory storing a program, wherein the program comprises instructions, which, when executed by the processor, enable the processor to perform the above-mentioned method.
[0015] According to another aspect of an embodiment of the present invention, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to execute the above-mentioned method.
[0016] After obtaining the bill data to be identified and the historical bill data set corresponding to the bill data to be identified, the embodiment of the present invention can construct a bill time series data sequence based on the bill data to be identified and the historical bill data set; and based on the bill time series data sequence, perform data expansion on the bill data to be identified to obtain extended bill data corresponding to the bill data to be identified. Based on this, the target anomaly recognition model can be called to perform anomaly recognition on the extended bill data to obtain a target anomaly recognition result, and the target anomaly recognition result can be used as the anomaly recognition result of the bill data to be identified. The target anomaly recognition result supports indicating whether the bill data to be identified is abnormal. It can be seen that the embodiment of the present invention can realize anomaly recognition of the bill data to be identified by extending the bill data to realize bill recognition of the bill data to be identified, thereby obtaining anomaly recognition results of the bill data to be identified, which can effectively improve the accuracy of bill recognition, and further improve the accuracy of abnormal bill recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Further details, features and advantages of the invention are disclosed in the following description of exemplary embodiments in conjunction with the accompanying drawings, in which:
[0018] Figure 1 A schematic flow chart of a bill identification method according to an exemplary embodiment of the present invention is shown;
[0019] Figure 2 A schematic flow chart of another bill identification method according to an exemplary embodiment of the present invention is shown;
[0020] Figure 3 A schematic flow chart of another bill identification method according to an exemplary embodiment of the present invention is shown;
[0021] Figure 4 A schematic block diagram of a bill identification device according to an exemplary embodiment of the present invention is shown;
[0022] Figure 5 A block diagram of an exemplary electronic device that can be used to implement an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0023] Embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present invention. It should be understood that the drawings and embodiments of the present invention are only for exemplary purposes and are not intended to limit the scope of protection of the present invention.
[0024] It should be understood that the various steps described in the method embodiments of the present invention may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.
[0025] The term "including" and its variations used in this document are open inclusions, that is, "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one other embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions of other terms will be given in the following description. It should be noted that the concepts of "first", "second", etc. mentioned in the present invention are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0026] It should be noted that the modifications of "one" and "plurality" mentioned in the present invention are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0027] The names of the messages or information exchanged between multiple devices in the embodiments of the present invention are only used for illustrative purposes, and are not used to limit the scope of these messages or information.
[0028] It should be noted that the execution subject of the bill identification method provided in the embodiment of the present invention may be one or more electronic devices, and the present invention does not limit this; wherein, the electronic device may be a terminal (i.e., a client) or a server, then when the execution subject includes multiple electronic devices, and the multiple electronic devices include at least one terminal and at least one server, the bill identification method provided in the embodiment of the present invention may be jointly executed by the terminal and the server. Accordingly, the terminal mentioned here may include but is not limited to: smart phones, tablet computers, laptops, desktop computers, intelligent voice interaction devices, and the like. The server mentioned here may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing (cloud computing), cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and basic cloud computing services such as big data and artificial intelligence platforms, and the like.
[0029] Based on the above description, an embodiment of the present invention proposes a bill identification method, which can be executed by the electronic device (terminal or server) mentioned above; or, the bill identification method can be executed by the terminal and the server together. For the sake of convenience, the following description will be given by taking the electronic device executing the bill identification method as an example; Figure 1 As shown, the bill identification method may include the following steps S101-S104:
[0030] S101, obtaining billing data to be identified, and obtaining a historical billing data set corresponding to the billing data to be identified, wherein the historical billing data set includes a plurality of historical billing data.
[0031] Optionally, the electronic device may obtain the billing data to be identified (also referred to as cost billing data) once every preset interval. Optionally, the preset interval may be set based on experience or actual needs, which is not limited in the embodiments of the present invention; illustratively, when the preset interval is one day, one billing data may include cost data within one day, and when the preset interval is one week, one billing data may include cost data within one week. Optionally, in the cloud computing platform scenario, the billing data may also be referred to as cloud cost billing data.
[0032] In the embodiment of the present invention, the methods for obtaining the billing data to be identified may include but are not limited to the following:
[0033] The first acquisition method: the electronic device can obtain a bill download link, and use the bill data downloaded based on the bill download link as the bill data to be identified. Exemplarily, the bill data to be identified can be downloaded from a cloud computing platform through the bill download link.
[0034] The second acquisition method: the electronic device can obtain the bill data to be processed (such as obtaining the bill data to be processed from the cloud computing platform). In this case, the electronic device can perform data preprocessing on the bill data to be processed to obtain the bill data after data preprocessing, and use the bill data after data preprocessing as the bill data to be identified, etc. Optionally, data preprocessing may include but is not limited to operations such as data cleaning and data normalization, which are not limited in the embodiment of the present invention. Exemplarily, if the data preprocessing includes a data cleaning operation, then when the bill data to be processed is preprocessed to obtain the bill data after data preprocessing, the electronic device can perform data cleaning on the bill data to be processed (such as removing the bill features corresponding to the non-employed personnel, removing the bill features corresponding to the non-existent departments, removing the bill features corresponding to the non-existent areas, etc.), obtain the bill data after data cleaning, and use the bill data after data cleaning as the bill data after data preprocessing; if the data preprocessing also includes a data normalization operation, the electronic device can also perform normalization on the bill data after data cleaning to obtain the normalized bill data, and use the normalized bill data as the bill data after data preprocessing, etc. Based on this, the embodiment of the present invention can ensure the accuracy and consistency of the data.
[0035] Optionally, a historical billing data set corresponding to the billing data to be identified may be stored in the electronic device's own storage space, and the historical billing data set corresponding to the billing data to be identified may be obtained from its own storage space; or, the electronic device may obtain a historical billing data download link, and add all historical billing data downloaded based on the historical billing data download link to the historical billing data set, so as to obtain the historical billing data set corresponding to the billing data to be identified, and so on; this is not limited to the embodiments of the present invention.
[0036] It should be noted that the historical bill data set corresponding to the bill data to be identified may include multiple historical bill data whose bill generation time is earlier than the bill generation time of the bill data to be identified, that is, the bill generation time of any historical bill data in the historical bill data set corresponding to the bill data to be identified is earlier than the bill generation time of the bill data to be identified.
[0037] S102, constructing a bill time series data sequence based on the bill data to be identified and the historical bill data set.
[0038] In an embodiment of the present invention, the electronic device can construct the to-be-identified bill data and the historical bill data set into a bill time series data sequence in the order of time (i.e., the bill generation time) to realize the construction of a bill time series data sequence based on the to-be-identified bill data and the historical bill data set; that is, the to-be-identified bill data and the historical bill data set can be constructed into a bill time series data sequence in the order of the bill generation time from early to late.
[0039] For example, assuming that the historical bill data set includes historical bill data 1, historical bill data 2, historical bill data 3, historical bill data 4 and historical bill data 5 in chronological order (i.e., from early to late), then the bill time series data sequence may include historical bill data 1, historical bill data 2, historical bill data 3, historical bill data 4, historical bill data 5 and bill data to be identified in chronological order.
[0040] S103, based on the bill time series data sequence, data expansion is performed on the bill data to be identified to obtain extended bill data corresponding to the bill data to be identified.
[0041] The bill data to be identified may include the characteristic value of each bill feature in the multiple bill features, that is, one bill data may include the characteristic value of each bill feature at the bill generation time of the corresponding bill data; optionally, the multiple bill features may include but are not limited to: at least one bill feature under the resource dimension (that is, at least one resource bill feature, the characteristic value of a resource bill feature may be the bill information (that is, cost data) or resource usage of the corresponding resource, etc.), at least one bill feature under the regional dimension (that is, at least one regional bill feature, the characteristic value of a regional bill feature may be the bill information or resource usage of the corresponding region, etc.), at least one bill feature under the computer room dimension (that is, at least one computer room bill feature, the characteristic value of a computer room bill feature may be the bill information or network traffic of the corresponding computer room, etc.), at least one bill feature under the department dimension (that is, at least one department bill feature, the characteristic value of a department bill feature may be the bill information or resource usage of the corresponding department, etc.), at least one bill feature under the business dimension (that is, at least one business bill feature, the characteristic value of a business bill feature may be the bill information or business load of the corresponding business, etc.), etc.; the embodiment of the present invention does not limit this. Optionally, the multiple bill features may be bill features after data preprocessing.
[0042] It can be seen that when the computing resources are cloud computing resources, the use of cloud computing resources may lead to a complex cost structure, and when used on a large scale, it is difficult to accurately predict and manage costs; based on this, the bill identification method proposed in the embodiment of the present invention can promptly discover and solve the problem of cost anomalies, and when bill identification is performed for cloud cost bills, the bill identification method mentioned in the embodiment of the present invention can also be referred to as a method for identifying abnormal cloud cost bills; and the embodiment of the present invention is not only limited to the time series characteristics of cost data, but also takes into account other cost-related factors, such as resource usage, network traffic, business load, etc., to construct a multi-dimensional feature model to improve the accuracy of subsequent anomaly identification (also referred to as anomaly detection).
[0043] In an embodiment of the present invention, the electronic device can determine at least one trend billing feature from a plurality of billing features, and based on the billing time series data sequence, perform trend prediction on each trend billing feature in the at least one trend billing feature, and obtain the trend prediction value of each trend billing feature under the billing data to be identified. Based on this, the electronic device can perform data expansion on the billing data to be identified based on the trend prediction value of each trend billing feature under the billing data to be identified, and obtain the extended billing data corresponding to the billing data to be identified; optionally, the electronic device can add the trend prediction value of each trend billing feature under the billing data to be identified to the billing data to be identified, so as to achieve data expansion of the billing data to be identified, so that the extended billing data includes the billing data to be identified and the trend prediction value of each trend billing feature under the billing data to be identified, that is, the extended billing data can include the characteristic value of each billing feature under the billing data to be identified (that is, the characteristic value of each billing feature in the billing data to be identified) and the trend prediction value of each trend billing feature under the billing data to be identified, that is, the trend prediction value of each trend billing feature under the billing data to be identified and the characteristic value of each billing feature in the billing data to be identified can be spliced to obtain the extended billing data.
[0044] Optionally, for any trend bill feature in at least one trend bill feature, the electronic device can determine a trend model corresponding to any trend bill feature, and based on the characteristic value time series data of any trend bill feature in the bill time series data sequence, the trend model corresponding to any trend bill feature is used to predict the trend of any trend bill feature, and the trend prediction value of any trend bill feature under the bill data to be identified (i.e., the trend prediction value of any trend bill feature under the bill generation time corresponding to the bill data to be identified) is obtained. At this time, the model parameters in the trend model corresponding to any trend bill feature can be fitted based on the characteristic value time series data of any trend bill feature in the bill time series data sequence, so as to predict the trend of any trend bill feature through the trend model corresponding to any trend bill feature. Optionally, one bill feature can correspond to one trend model, and the trend model corresponding to one bill feature can be set according to experience or according to actual needs; optionally, the trend model corresponding to one bill feature can be a linear trend model or an exponential trend model, etc., which is not limited in the embodiment of the present invention. It should be understood that the trend model can be used to capture the overall trend of time series data, can automatically adapt to the growth and change of data, and has a certain flexibility to handle different types of trends. Among them, the predicted value / characteristic value of a bill feature under the bill data to be identified may refer to the predicted value / characteristic value of the corresponding bill feature at the bill generation time corresponding to the bill data to be identified.
[0045] Optionally, the electronic device may use all billing features as trending billing features, in which case at least one trending billing feature may include multiple billing features; or, the electronic device may determine trending billing feature setting information, and determine at least one trending billing feature from multiple billing features based on the trending billing feature setting information, in which case the electronic device may use billing features present in the trending billing feature setting information and multiple billing features as trending billing features, that is, it may determine billing features present in the trending billing feature setting information from multiple billing features, and use all billing features determined based on the trending billing feature setting information as trending billing features, so as to achieve determination of at least one trending billing feature from multiple billing features, etc. Optionally, the trending billing feature setting information may be set based on experience or actual needs, which is not limited in the embodiments of the present invention.
[0046] Optionally, when data expansion is performed on the billing data to be identified based on the trend prediction values of each trend billing feature under the billing data to be identified to obtain extended billing data corresponding to the billing data to be identified, the electronic device may also determine at least one seasonal billing feature from multiple billing features, and perform seasonal prediction on each seasonal billing feature in at least one seasonal billing feature based on the billing time series data sequence to obtain seasonal labels for each seasonal billing feature under the billing data to be identified; then, data expansion may be performed on the billing data to be identified based on the trend prediction values of each trend billing feature under the billing data to be identified and the seasonal labels of each seasonal billing feature under the billing data to be identified to obtain extended billing data corresponding to the billing data to be identified.
[0047] Optionally, the electronic device may use each of the multiple billing features as a seasonal billing feature, in which case at least one seasonal billing feature may include the multiple billing features mentioned above; or, the electronic device may determine the seasonal billing feature setting information, and determine at least one seasonal billing feature from the multiple billing features based on the seasonal billing feature setting information, that is, determine the billing features present in the seasonal billing feature setting information from the multiple billing features, and use all the billing features determined based on the seasonal billing feature setting information as seasonal billing features, thereby obtaining at least one seasonal billing feature, and so on. Optionally, the seasonal billing feature setting information may be set according to experience or according to actual needs, and this is not limited in the embodiments of the present invention. Optionally, the season label may be a seasonal index, or a seasonal indicator (such as an indicator for indicating January or February, etc.), and so on; this is not limited in the embodiments of the present invention.
[0048] Optionally, for any seasonal billing feature among at least one seasonal billing feature, the electronic device may determine a seasonal model (also referred to as a seasonal model) corresponding to any seasonal billing feature, and based on the characteristic value time series data of any seasonal billing feature in the billing time series data sequence, perform seasonal prediction on any seasonal billing feature through the seasonal model corresponding to any seasonal billing feature, and obtain a seasonal label for any seasonal billing feature under the billing data to be identified (that is, fit the model parameters in the seasonal model corresponding to any seasonal billing feature based on the characteristic value time series data of any seasonal billing feature in the billing time series data sequence, thereby performing seasonal prediction on any seasonal billing feature through the seasonal model corresponding to any seasonal billing feature), at which time a seasonal label may be a seasonal index; optionally, a billing feature may correspond to a seasonal model, and the seasonal models corresponding to different billing features may be the same or different, and the embodiment of the present invention is not limited to this; optionally, the seasonal model corresponding to a billing feature may be set according to experience or according to actual needs, and the embodiment of the present invention is not limited to this; illustratively, the seasonal model corresponding to a billing feature may be a seasonal ARIMA model (a model for predicting seasonality), or a seasonal AR model (another model for predicting seasonality), etc., and the embodiment of the present invention is not limited to this. Among them, seasonal models can be used to capture the periodicity and seasonal changes in time series data, thereby automatically identifying periodic models in time series data, and so on.
[0049] In one embodiment, the electronic device may respectively add the trend prediction value of each trend billing feature under the billing data to be identified and the season label of each seasonal billing feature under the billing data to be identified to the billing data to be identified to expand the billing data to be identified, so that the extended billing data includes the feature value of each billing feature under the billing data to be identified, the trend prediction value of each trend billing feature under the billing data to be identified, and the season label of each seasonal billing feature under the billing data to be identified.
[0050] In another embodiment, at least one seasonal billing feature is the same as at least one trend billing feature (i.e., a trend billing feature can be a seasonal billing feature), and a season label is a seasonal index. In this case, for any trend billing feature of at least one trend billing feature, the electronic device can perform multiplication or addition operations on the trend prediction value and the season label of any trend billing feature under the billing data to be identified, so as to obtain the time series prediction value of any trend billing feature under the billing data to be identified, and add the time series prediction value of any trend billing feature under the billing data to be identified to the billing data to be identified, so as to achieve data expansion of the billing data to be identified and obtain extended billing data. At this time, the extended billing data may include the feature values of each billing feature under the billing data to be identified and the time series prediction value of each trend billing feature under the billing data to be identified, and so on; in this case, the season label can be incorporated into the data prediction to improve the accuracy and reliability of the prediction.
[0051] In another embodiment, when data expansion is performed on the billing data to be identified based on the trend prediction value of each trend billing feature under the billing data to be identified and the season label of each seasonal billing feature under the billing data to be identified to obtain extended billing data corresponding to the billing data to be identified, the electronic device can also determine at least one holiday billing feature from multiple billing features, and based on the billing time series data sequence, perform holiday effect prediction on each holiday billing feature in the at least one holiday billing feature to obtain the holiday effect label of each holiday billing feature under the billing data to be identified; then, data expansion can be performed on the billing data to be identified based on the trend prediction value of each trend billing feature under the billing data to be identified, the season label of each seasonal billing feature under the billing data to be identified, and the holiday effect label of each holiday bill feature under the billing data to be identified to obtain the extended billing data corresponding to the billing data to be identified.
[0052] Optionally, the electronic device may use each of the multiple billing features as a holiday billing feature, in which case at least one holiday billing feature may include the multiple billing features mentioned above; or, the electronic device may determine the holiday billing feature setting information, and determine at least one holiday billing feature from the multiple billing features based on the holiday billing feature setting information, that is, determine the billing features present in the holiday billing feature setting information from the multiple billing features, and use all the billing features determined based on the holiday billing feature setting information as holiday billing features, thereby obtaining at least one holiday billing feature, and so on. Optionally, the holiday billing feature setting information may be set according to experience or according to actual needs, and the embodiment of the present invention does not limit this. Optionally, the holiday effect label may be a holiday effect index, or a holiday indicator mark (such as an indicator mark used to indicate any holiday), and so on; the embodiment of the present invention does not limit this.
[0053] Optionally, for any holiday bill feature among at least one holiday bill feature, the electronic device may determine a holiday effect model corresponding to any holiday bill feature, and based on the characteristic value time series data of any holiday bill feature in the bill time series data sequence, predict the holiday effect of any holiday bill feature through the holiday effect model corresponding to any holiday bill feature, and obtain a holiday effect label for any holiday bill feature under the bill data to be identified (that is, model parameters in the holiday effect model corresponding to any holiday bill feature are fitted based on the characteristic value time series data of any holiday bill feature in the bill time series data sequence, thereby predicting the holiday effect of any holiday bill feature through the holiday effect model corresponding to any holiday bill feature). At this time, a holiday effect The label can be a holiday effect index; optionally, a bill feature can correspond to a holiday effect model, and the holiday effect models corresponding to different bill features can be the same or different, which is not limited in the embodiment of the present invention; optionally, the holiday effect model corresponding to a bill feature can be set according to experience or according to actual needs, which is not limited in the embodiment of the present invention; illustratively, the holiday effect model corresponding to a bill feature can be a Prophet model (a large-scale time series prediction model) or a model in NBS-SA software (a software that can be used to achieve holiday effect prediction) (that is, NBS-SA software can be called to achieve holiday effect prediction at this time), etc., which is not limited in the embodiment of the present invention. Among them, the user can improve the holiday effect prediction ability of the holiday effect model by specifying the holiday date and the related holiday effect; in this case, the embodiment of the present invention takes into account the impact of the holiday effect on the time series data.
[0054] Optionally, when data expansion is performed on the billing data to be identified based on the trend prediction values of each trend billing feature under the billing data to be identified, the season labels of each seasonal billing feature under the billing data to be identified, and the holiday effect labels of each holiday billing feature under the billing data to be identified to obtain extended billing data corresponding to the billing data to be identified, the electronic device may respectively add the trend prediction values of each trend billing feature under the billing data to be identified, the season labels of each seasonal billing feature under the billing data to be identified, and the holiday effect labels of each holiday billing feature under the billing data to be identified to the billing data to be identified, so that the extended billing data includes the feature values of each billing feature under the billing data to be identified, the trend prediction values of each trend billing feature under the billing data to be identified, the season labels of each seasonal billing feature under the billing data to be identified, and the holiday effect labels of each holiday billing feature under the billing data to be identified. Alternatively, at least one seasonal billing feature, at least one trend billing feature and at least one holiday effect feature may be the same. In this case, for any one of the at least one trend billing features, the electronic device may perform multiplication or addition operations on the trend prediction value, season label and holiday effect label of any trend billing feature under the billing data to be identified, so as to obtain the timing prediction value of any trend billing feature under the billing data to be identified, and add the timing prediction value of any trend billing feature under the billing data to be identified to the billing data to be identified, so as to achieve data expansion of the billing data to be identified and obtain extended billing data. At this time, the extended billing data may include the feature values of each billing feature under the billing data to be identified and the timing prediction value of each trend billing feature under the billing data to be identified, and the like.
[0055] It can be seen that the electronic device can use a decomposition model to decompose the time series data into three parts: trend, seasonality, and holiday effects, so as to better understand the characteristics of the time series data, and be able to model and predict these parts separately, thereby improving the prediction accuracy of the model. Based on this, the embodiment of the present invention can adjust the specific parameters of the trend model, holiday model and other models according to the actual scenario of the billing data to be identified to adapt to the actual operation of the enterprise; that is, a trend model suitable for the billing data to be identified can be constructed to predict the trend prediction value, etc., so as to accurately predict the data for the billing data to be identified, thereby obtaining extended billing data with higher accuracy, so as to better describe the billing data to be identified through the extended billing data.
[0056] In an embodiment of the present invention, the trend model, seasonal model, holiday effect model, etc. corresponding to a bill feature can be adjusted and optimized according to actual needs, and the model parameters can be flexibly adjusted based on the bill time series data sequence to improve the accuracy and robustness of the prediction.
[0057] S104, calling the target anomaly recognition model, performing anomaly recognition on the extended billing data, obtaining a target anomaly recognition result, and using the target anomaly recognition result as the anomaly recognition result of the billing data to be recognized. The target anomaly recognition result supports indicating whether the billing data to be recognized is abnormal.
[0058] Specifically, the electronic device can input the extended billing data into the target anomaly recognition model to run the target anomaly recognition model to obtain a target anomaly recognition result; based on this, when the target anomaly recognition result is used to indicate that the billing data to be identified is abnormal, the abnormal situation of the billing data to be identified can be identified through the extended billing data.
[0059] Optionally, the bill identification method mentioned in the embodiment of the present invention can be implemented by Python language (a computer programming language), or by Java language (another computer programming language), etc.; the embodiment of the present invention is not limited to this. In addition, the embodiment of the present invention can encapsulate a service that supports real-time data input based on the bill identification method, and support access through HTTP (HyperText Transfer Protocol), GRPC (a high-performance, open source and general RPC (Remote Procedure Call Protocol) framework) interfaces, etc.; optionally, the embodiment of the present invention can also build an alarm sending service (such as using Python language to build an alarm sending service), which supports access through HTTP and GRPC protocols.
[0060] After obtaining the bill data to be identified and the historical bill data set corresponding to the bill data to be identified, the embodiment of the present invention can construct a bill time series data sequence based on the bill data to be identified and the historical bill data set; and based on the bill time series data sequence, perform data expansion on the bill data to be identified to obtain extended bill data corresponding to the bill data to be identified. Based on this, the target anomaly recognition model can be called to perform anomaly recognition on the extended bill data to obtain a target anomaly recognition result, and the target anomaly recognition result can be used as the anomaly recognition result of the bill data to be identified. The target anomaly recognition result supports indicating whether the bill data to be identified is abnormal. It can be seen that the embodiment of the present invention can realize anomaly recognition of the bill data to be identified by extending the bill data to realize bill recognition of the bill data to be identified, thereby obtaining anomaly recognition results of the bill data to be identified, which can effectively improve the accuracy of bill recognition, and further improve the accuracy of abnormal bill recognition.
[0061] Based on the above description, the embodiment of the present invention also proposes a more specific bill identification method. Accordingly, the bill identification method can be executed by the electronic device (terminal or server) mentioned above; or, the bill identification method can be executed by the terminal and the server together. For the sake of convenience, the following description will be based on the example of an electronic device executing the bill identification method; please refer to Figure 2 The bill identification method may include the following steps S201-S205:
[0062] S201, obtaining billing data to be identified, and obtaining a historical billing data set corresponding to the billing data to be identified, wherein the historical billing data set includes a plurality of historical billing data.
[0063] S202: construct a bill time series data sequence based on the bill data to be identified and the historical bill data set.
[0064] S203, based on the bill time series data sequence, perform data expansion on the bill data to be identified to obtain extended bill data corresponding to the bill data to be identified.
[0065] S204, calling the target anomaly recognition model to reconstruct the extended billing data to obtain reconstructed billing data of the extended billing data.
[0066] In an embodiment of the present invention, the target anomaly recognition model may be an autoencoder model (Autoencoder, also referred to as an autoencoder), that is, an anomaly recognition model may be an autoencoder model; wherein, the autoencoder model may be composed of an encoder and a decoder, and may be constructed by encoding the input data into a low-dimensional hidden representation (i.e., the encoder may receive the input data and map it to a low-dimensional hidden representation), and then decoding the hidden representation back to the original data (i.e., the decoder may receive the hidden representation generated by the encoder and decode it back to the original data space), thereby realizing data reconstruction. It should be noted that the encoder may be composed of a series of fully connected layers or convolutional layers, wherein the number of neurons in each layer gradually decreases, and finally a hidden representation is obtained; correspondingly, the structure of the decoder is opposite to that of the encoder, i.e., it includes a series of fully connected layers or convolutional layers, wherein the number of neurons in each layer gradually increases, and finally generates reconstructed data of the same size as the original data.
[0067] Based on this, the electronic device can also obtain multiple training extended billing data, one training extended billing data can be determined by the training historical billing data set corresponding to the corresponding training billing data, that is, one training extended billing data can be obtained by data expansion of the training billing time series data sequence constructed based on the corresponding training billing data and the training historical billing data set corresponding to the corresponding training billing data, and one training extended billing data corresponds to one training billing data. Further, the electronic device can call the initial abnormal recognition model to reconstruct the data of each training extended billing data in the multiple training extended billing data, and obtain the reconstructed billing data of each training extended billing data; that is, for any training extended billing data in the multiple training extended billing data, the encoder in the initial abnormal recognition model can be called to encode any training extended billing data to obtain the encoded representation (i.e., hidden representation) of any training extended billing data, and the decoder in the initial abnormal recognition model can be called to decode the encoded representation of any training extended billing data to obtain the reconstructed billing data of any training extended billing data, so as to realize data reconstruction of any training extended billing data. Then, the electronic device can calculate the model reconstruction error (Reconstruction Error) based on each training extended bill data and the reconstructed bill data of the corresponding training extended bill data; specifically, for any training extended bill data among multiple training extended bill data, the difference (i.e., the difference vector) between any training extended bill data and the reconstructed bill data of any training extended bill data can be weighted summed to obtain the reconstruction error under any training extended bill data, and then after obtaining the reconstruction error under each training extended bill data, the reconstruction error under each training extended bill data is summed or averaged to obtain the model reconstruction error; optionally, when performing weighted summation on the difference between any training extended bill data and the reconstructed bill data of any training extended bill data, the weight value of a bill feature can be set according to experience or according to actual needs, and the embodiment of the present invention is not limited to this.
[0068] Furthermore, the electronic device can optimize the model parameters in the initial abnormality recognition model in the direction of reducing the model reconstruction error, obtain the initial abnormality recognition model after model optimization, and determine the target abnormality recognition model based on the initial abnormality recognition model after model optimization. It can be seen that the embodiment of the present invention can implement the model training process by minimizing the model reconstruction error, that is, by optimizing the parameters of the encoder and the decoder, the difference between the reconstructed billing data of the training extended billing data and the original data (i.e., the training extended billing data) is minimized.
[0069] Optionally, the electronic device may continue to call the initial abnormality recognition model after model optimization, reconstruct the data of each training extended bill data respectively, obtain the current reconstructed bill data of each training extended bill data, and calculate the current model reconstruction error based on each training extended bill data and the current reconstructed bill data of the corresponding training extended bill data, so as to optimize the model parameters in the initial abnormality recognition model after model optimization in the direction of reducing the current model reconstruction error, until the convergence condition is reached (such as the number of iterations reaches a preset iteration number threshold or the current model reconstruction error is less than a preset model loss threshold, etc.), so as to use the abnormality recognition model when the convergence condition is reached as the target abnormality recognition model. Optionally, the preset iteration number threshold and the preset model loss threshold can be set according to experience or according to actual needs, and the embodiments of the present invention are not limited to this.
[0070] It should be noted that the autoencoder model can learn the intrinsic representation of the data, so as to better capture the complex characteristics of the data, and has strong modeling capabilities for nonlinear data, which can effectively improve the accuracy of reconstructed billing data, and thus improve the accuracy of subsequent anomaly identification; and the autoencoder model does not require labeled abnormal data. For example, there is no need to mark the training extended bill data for anomalies during training, which can save labeling costs.
[0071] In other embodiments, the target anomaly recognition model may also be a Transformer model (a model that uses an attention mechanism to improve the model training speed), etc.; the present invention is not limited to this.
[0072] S205, using the reconstruction error between the extended bill data and the reconstructed bill data of the extended bill data, determine the target anomaly recognition result, and use the target anomaly recognition result as the anomaly recognition result of the bill data to be identified, and the target anomaly recognition result supports indicating whether the bill data to be identified is abnormal.
[0073] Among them, the reconstruction error between the extended bill data and the reconstructed billing data of the extended bill data can be determined based on the difference between the extended bill data and the reconstructed billing data of the extended bill data; specifically, the electronic device can perform weighted summation on the difference between the extended bill data and the reconstructed billing data of the extended bill data to obtain the reconstruction error between the extended bill data and the reconstructed billing data of the extended bill data.
[0074] In an embodiment of the present invention, the electronic device can determine a reconstruction error threshold. If the reconstruction error between the extended billing data and the reconstructed billing data of the extended billing data is less than or equal to the reconstruction error threshold, the target abnormality identification result can be determined to be non-abnormal (i.e., the target abnormality identification result can be a non-abnormal indication mark, and the non-abnormal indication mark can be used to indicate that the billing data is not abnormal). At this time, the target abnormality identification result can be used to indicate that the billing data to be identified is not abnormal; correspondingly, if the reconstruction error between the extended billing data and the reconstructed billing data of the extended billing data is greater than the reconstruction error threshold, the target abnormality identification result can be determined to be abnormal (i.e., the target abnormality identification result can be an abnormal indication mark), and at this time, the target abnormality identification result can be used to indicate that the billing data to be identified is abnormal. Optionally, when the target abnormality identification result is abnormal, the electronic device can also use a bill abnormality mark to mark the billing data to be identified as abnormal billing data; optionally, the non-abnormal indication mark, the abnormal indication mark, and the bill abnormality mark can all be set according to experience or according to actual needs, and the embodiment of the present invention does not limit this.
[0075] Optionally, the reconstruction error threshold may be set according to experience, may be set according to actual needs, may be randomly generated within a preset reconstruction error range, etc., which is not limited in the embodiment of the present invention. Optionally, the preset reconstruction error range may be set according to experience, or may be set according to actual needs, which is not limited in the embodiment of the present invention.
[0076] Further, the bill data to be identified may include the characteristic value of each bill feature among the multiple bill features, that is, the characteristic value of each bill feature at the bill generation time of the bill data to be identified; based on this, for any bill feature among the multiple bill features, if the target abnormality identification result is used to indicate that the bill data to be identified is abnormal, the characteristic value range corresponding to the characteristic value of any bill feature in the bill data to be identified can be determined; and based on the characteristic value range corresponding to the characteristic value of any bill feature in the bill data to be identified, it is determined whether the characteristic value of any bill feature in the bill data to be identified is abnormal; wherein, if the characteristic value of any bill feature in the bill data to be identified is not within the characteristic value range corresponding to the characteristic value of any bill feature in the bill data to be identified, it can be determined that the characteristic value of any bill feature in the bill data to be identified is abnormal. Then correspondingly; if the characteristic value of any bill feature in the bill data to be identified is abnormal, the characteristic value of any bill feature in the bill data to be identified can be abnormally marked, such as using a characteristic abnormality mark to mark the characteristic value of any bill feature in the bill data to be identified as abnormal. Optionally, the characteristic abnormality mark can be set according to experience or according to actual needs, and the embodiment of the present invention is not limited to this.
[0077] Optionally, when determining the characteristic value range corresponding to the characteristic value of any bill feature in the bill data to be identified, the electronic device can determine the characteristic value time series data of any bill feature from the bill time series data sequence, and determine a peak point set from the characteristic value time series data, so as to use the peak point set to fit the maximum trend prediction value of any bill feature under the bill data to be identified (that is, the peak point set can be used to perform the maximum trend prediction on any bill feature to obtain the maximum trend prediction value of any bill feature under the bill data to be identified), and determine the characteristic value range corresponding to the characteristic value of any bill feature in the bill data to be identified based on the maximum trend prediction value of any bill feature under the bill data to be identified. Optionally, the electronic device may use zero and maximum trend prediction values to construct a feature value range corresponding to the feature value of any bill feature in the bill data to be identified. In this case, the maximum value in the feature value range corresponding to the feature value of any bill feature in the bill data to be identified can be the maximum trend prediction value, and the minimum value can be 0; or, the electronic device may determine a set of valley points from the feature value time series data, use the valley point set to fit the minimum trend prediction value of any bill feature under the bill data to be identified, and use the minimum trend prediction value and the maximum trend prediction value to construct a feature value range corresponding to the feature value of any bill feature in the bill data to be identified, so as to determine the feature value range corresponding to the feature value of any bill feature in the bill data to be identified. In this case, the maximum value in the feature value range corresponding to the feature value of any bill feature in the bill data to be identified can be the maximum trend prediction value, and the minimum value can be the minimum trend prediction value.
[0078] Optionally, the electronic device may also determine non-abnormal historical billing data that is not marked with a bill abnormality mark from the historical billing data set, and select the maximum characteristic value from the characteristic values of any bill feature under each non-abnormal historical billing data, and select the minimum characteristic value from the characteristic values of any bill feature under each non-abnormal historical billing data, thereby using the maximum characteristic value and the minimum characteristic value to construct a characteristic value range corresponding to the characteristic value of any bill feature in the bill data to be identified, and so on; the embodiments of the present invention are not limited to this.
[0079] Optionally, if the target abnormality identification result indicates that the billing data to be identified is abnormal, the electronic device can generate abnormality alarm information of the billing data to be identified, and send the abnormality alarm information to the target object (such as a manager or responsible person, etc.) so that the target object can take corresponding measures to handle it, thereby realizing alarm and processing, such as Figure 3 Optionally, the abnormal alarm information may be set according to demand, or may be determined based on a feature value marked with a feature abnormality mark, etc.; this is not limited in the embodiment of the present invention.
[0080] Optionally, when the electronic device can further perform abnormality detection on the characteristic value, the abnormal alarm information may include but is not limited to the characteristic value marked with the characteristic abnormality mark and the characteristic identifier of the billing feature to which the corresponding characteristic value belongs, etc.; the embodiment of the present invention is not limited to this. Optionally, the characteristic identifier of a billing feature can be set according to experience or according to actual needs, which is not limited by the embodiment of the present invention. Exemplarily, assuming that there are unexpected fee fluctuations in the billing data to be identified (i.e., fees marked with characteristic abnormality marks), the abnormal alarm information may include the abnormal fee and the characteristic identifier of the billing feature to which the abnormal fee belongs, or when there is an abnormally high resource usage in the billing data to be identified (i.e., resource usage marked with characteristic abnormality marks), the abnormal alarm information may include the abnormal resource usage and the characteristic identifier of the billing feature to which the abnormal resource usage belongs, and so on.
[0081] The embodiment of the present invention can construct a billing time series data sequence based on the billing data to be identified and the historical billing data set corresponding to the billing data to be identified after obtaining the billing data to be identified and the historical billing data set; and based on the billing time series data sequence, perform data expansion on the billing data to be identified to obtain extended billing data corresponding to the billing data to be identified. Based on this, the target anomaly recognition model can be called to reconstruct the extended billing data to obtain reconstructed billing data of the extended billing data; further, the reconstruction error between the extended billing data and the reconstructed billing data of the extended billing data can be used to determine the target anomaly recognition result, and the target anomaly recognition result can be used as the anomaly recognition result of the billing data to be identified, and the target anomaly recognition result supports indicating whether the billing data to be identified is abnormal. It can be seen that the embodiments of the present invention can realize the abnormal identification of the billing data to be identified by extending the billing data, so as to realize the bill identification of the billing data to be identified, thereby obtaining the abnormal identification result of the billing data to be identified, which can effectively improve the accuracy of bill identification, and then improve the accuracy of abnormal bill identification, and can effectively solve the problem of internal resource billing and billing of the enterprise; and the embodiments of the present invention can better adapt to the changes and complexity of data through the target abnormal identification model, improve the accuracy and efficiency of abnormal identification, and effectively improve the efficiency of cost management (that is, effectively manage costs, timely discover and solve possible abnormal situations, thereby reducing the difficulty and risk of cost management), optimize resource utilization (that is, help managers discover problems in resource use, and optimize resource allocation, improve resource efficiency). Resource utilization and performance, thereby reducing unnecessary cost expenditures), improving forecast accuracy (that is, using historical billing data sets and trends to predict future cost changes, which helps to improve the accuracy and reliability of cost forecasts, enabling managers to better plan and budget costs and avoid uncertainties and risks caused by cost fluctuations) and enhancing security and stability (that is, timely identifying and processing abnormal bills (such as abnormal cloud cost bills) to reduce security risks and system stability issues caused by abnormal costs, which helps to ensure the safe operation and business continuity of cloud computing platforms, and improve the reliability and stability of the overall system), thereby helping enterprises and organizations to better manage and control costs (such as cloud computing costs) and achieve the goals of cost savings and maximum benefits.
[0082] Based on the description of the relevant embodiments of the above-mentioned bill identification method, the embodiment of the present invention further proposes a bill identification device, which can be a computer program (including program code) running in an electronic device; Figure 4 As shown, the bill identification device may include an acquisition unit 401 and a processing unit 402. The bill identification device may execute Figure 1 or Figure 2 The bill identification method shown, that is, the bill identification device can run the above-mentioned units:
[0083] The acquisition unit 401 is used to acquire the billing data to be identified, and acquire a historical billing data set corresponding to the billing data to be identified, wherein the historical billing data set includes a plurality of historical billing data;
[0084] A processing unit 402 is used to construct a bill time series data sequence based on the bill data to be identified and the historical bill data set;
[0085] The processing unit 402 is further configured to perform data expansion on the to-be-identified bill data based on the bill time series data sequence to obtain extended bill data corresponding to the to-be-identified bill data;
[0086] The processing unit 402 is also used to call the target anomaly recognition model, perform anomaly recognition on the extended bill data, obtain a target anomaly recognition result, and use the target anomaly recognition result as the anomaly recognition result of the bill data to be recognized. The target anomaly recognition result supports indicating whether the bill data to be recognized is abnormal.
[0087] In one implementation, the to-be-identified bill data includes a characteristic value of each bill characteristic among a plurality of bill characteristics; when the processing unit 402 performs data expansion on the to-be-identified bill data based on the bill time series data sequence to obtain the extended bill data corresponding to the to-be-identified bill data, it can be specifically used to:
[0088] Determine at least one trend bill feature from the multiple bill features, and perform trend prediction on each trend bill feature in the at least one trend bill feature based on the bill time series data sequence to obtain a trend prediction value of each trend bill feature under the bill data to be identified;
[0089] Based on the trend prediction values of the various trend bill features under the bill data to be identified, data expansion is performed on the bill data to be identified to obtain extended bill data corresponding to the bill data to be identified.
[0090] In another embodiment, when the processing unit 402 performs data expansion on the bill data to be identified based on the trend prediction value of each trend bill feature under the bill data to be identified to obtain the extended bill data corresponding to the bill data to be identified, it can be specifically used to:
[0091] Determine at least one seasonal bill feature from the multiple bill features, and perform seasonal prediction on each seasonal bill feature in the at least one seasonal bill feature based on the bill time series data sequence to obtain a seasonal label for each seasonal bill feature under the bill data to be identified;
[0092] Based on the trend prediction values of the various trend bill features under the bill data to be identified and the season labels of the various seasonal bill features under the bill data to be identified, the bill data to be identified is expanded to obtain extended bill data corresponding to the bill data to be identified.
[0093] In another embodiment, the processing unit 402 performs data expansion on the bill data to be identified based on the trend prediction value of each trend bill feature under the bill data to be identified and the season label of each seasonal bill feature under the bill data to be identified to obtain the extended bill data corresponding to the bill data to be identified, which can be specifically used to:
[0094] Determine at least one holiday bill feature from the multiple bill features, and based on the bill time series data sequence, perform holiday effect prediction on each holiday bill feature in the at least one holiday bill feature to obtain a holiday effect label for each holiday bill feature under the bill data to be identified;
[0095] Based on the trend prediction values of the trend bill features under the bill data to be identified, the season labels of the seasonal bill features under the bill data to be identified, and the holiday effect labels of the holiday bill features under the bill data to be identified, the bill data to be identified is expanded to obtain extended bill data corresponding to the bill data to be identified.
[0096] In another implementation, the target anomaly recognition model is a self-encoding model, and the acquisition unit 401 can also be used to:
[0097] Acquire multiple training extension billing data, where one training extension billing data is determined by a training history billing data set corresponding to the corresponding training billing data;
[0098] The processing unit 402 may also be used to:
[0099] Calling the initial anomaly recognition model to reconstruct data of each of the plurality of training extended bill data to obtain reconstructed bill data of each of the training extended bill data;
[0100] Calculating a model reconstruction error based on the respective training extended bill data and the reconstructed bill data of the corresponding training extended bill data;
[0101] In the direction of reducing the model reconstruction error, the model parameters in the initial abnormality recognition model are optimized to obtain the initial abnormality recognition model after model optimization, and the target abnormality recognition model is determined based on the initial abnormality recognition model after model optimization.
[0102] In another implementation, when the processing unit 402 calls the target anomaly recognition model to perform anomaly recognition on the extended bill data and obtains the target anomaly recognition result, it can be specifically used to:
[0103] Calling a target anomaly recognition model to reconstruct the extended bill data to obtain reconstructed bill data of the extended bill data;
[0104] A target anomaly recognition result is determined using a reconstruction error between the extended bill data and the reconstructed bill data of the extended bill data.
[0105] In another implementation manner, the to-be-identified bill data includes a characteristic value of each bill characteristic among a plurality of bill characteristics, and the processing unit 402 may further be used to:
[0106] For any bill feature among the multiple bill features, if the target abnormality identification result is used to indicate that the bill data to be identified is abnormal, determine a feature value range corresponding to a feature value of any bill feature in the bill data to be identified;
[0107] Based on the feature value range corresponding to the feature value of any bill feature in the to-be-identified bill data, determining whether the feature value of any bill feature in the to-be-identified bill data is abnormal;
[0108] If the characteristic value of any bill feature in the to-be-identified bill data is abnormal, the characteristic value of any bill feature in the to-be-identified bill data is marked as abnormal.
[0109] According to one embodiment of the present invention, Figure 1 or Figure 2 Each step involved in the method shown can be Figure 4 The bill identification device shown in the figure is executed by each unit. For example, Figure 1 The step S101 shown in FIG. 1 can be performed by Figure 4 The acquisition unit 401 shown in FIG. 1 is executed, and steps S102-S104 can be performed by Figure 4 The processing unit 402 shown in is executed. For example, Figure 2 The step S201 shown in FIG. 1 can be performed by Figure 4 The acquisition unit 401 shown in FIG. 1 is executed, and steps S202-S205 can be performed by Figure 4 The processing unit 402 shown in executes, and so on.
[0110] According to another embodiment of the present invention, Figure 4Each unit in the bill identification device shown can be separately or completely combined into one or several other units to form a unit, or one (or some) of the units can be further divided into multiple functionally smaller units to form a unit, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present invention. The above-mentioned units are divided based on logical functions. In actual applications, the function of one unit can also be implemented by multiple units, or the functions of multiple units can be implemented by one unit. In other embodiments of the present invention, any bill identification device can also include other units. In actual applications, these functions can also be implemented with the assistance of other units, and can be implemented by the collaboration of multiple units.
[0111] According to another embodiment of the present invention, the program can be executed by running a program on a general electronic device such as a computer including a central processing unit (CPU), a random access memory medium (RAM), a read-only memory medium (ROM), and other processing elements and storage elements. Figure 1 or Figure 2 A computer program (including program code) for each step involved in the corresponding method shown in Figure 4 The bill identification device shown in the embodiment of the present invention is used to implement the bill identification method of the embodiment of the present invention. The computer program can be recorded on a computer storage medium, for example, and loaded into the above-mentioned electronic device through the computer storage medium and run therein.
[0112] After obtaining the bill data to be identified and the historical bill data set corresponding to the bill data to be identified, the embodiment of the present invention can construct a bill time series data sequence based on the bill data to be identified and the historical bill data set; and based on the bill time series data sequence, perform data expansion on the bill data to be identified to obtain extended bill data corresponding to the bill data to be identified. Based on this, the target anomaly recognition model can be called to perform anomaly recognition on the extended bill data to obtain a target anomaly recognition result, and the target anomaly recognition result can be used as the anomaly recognition result of the bill data to be identified. The target anomaly recognition result supports indicating whether the bill data to be identified is abnormal. It can be seen that the embodiment of the present invention can realize anomaly recognition of the bill data to be identified by extending the bill data to realize bill recognition of the bill data to be identified, thereby obtaining anomaly recognition results of the bill data to be identified, which can effectively improve the accuracy of bill recognition, and further improve the accuracy of abnormal bill recognition.
[0113] Based on the description of the above method embodiment and device embodiment, the exemplary embodiment of the present invention further provides an electronic device, including: at least one processor; and a memory connected to the at least one processor in communication. The memory stores a computer program that can be executed by the at least one processor, and the computer program is used to enable the electronic device to perform the method according to the embodiment of the present invention when executed by the at least one processor.
[0114] Exemplary embodiments of the present invention also provide a non-transitory computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor of a computer, is used to cause the computer to perform a method according to an embodiment of the present invention.
[0115] An exemplary embodiment of the present invention further provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor of a computer, the computer is used to enable the computer to perform a method according to an embodiment of the present invention.
[0116] refer to Figure 5 , a block diagram of an electronic device 500 that can be used as a server or client of the present invention will now be described, which is an example of a hardware device that can be applied to various aspects of the present invention. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0117] like Figure 5 As shown, the electronic device 500 includes a computing unit 501, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 502 or a computer program loaded from a storage unit 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 can also be stored. The computing unit 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0118] A plurality of components in the electronic device 500 are connected to the I / O interface 505, including: an input unit 506, an output unit 507, a storage unit 508, and a communication unit 509. The input unit 506 may be any type of device capable of inputting information to the electronic device 500, and the input unit 506 may receive input digital or character information, and generate key signal inputs related to user settings and / or function control of the electronic device. The output unit 507 may be any type of device capable of presenting information, and may include, but is not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 508 may include, but is not limited to, a disk, an optical disk. The communication unit 509 allows the electronic device 500 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and may include, but is not limited to, a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth™ device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.
[0119] The computing unit 501 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 501 performs the various methods and processes described above. For example, in some embodiments, the bill identification method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 500 via the ROM 502 and / or the communication unit 509. In some embodiments, the computing unit 501 may be configured to perform the bill identification method in any other appropriate manner (e.g., by means of firmware).
[0120] The program code for implementing the method of the present invention can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.
[0121] In the context of the present invention, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0122] As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and / or device (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.
[0123] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0124] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0125] A computer system may include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.
[0126] Furthermore, it should be understood that what is disclosed above is only a preferred embodiment of the present invention, and certainly cannot be used to limit the scope of rights of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.
Claims
1. A bill identification method, characterized in that: include: Acquire the bill data to be identified, and acquire a historical bill data set corresponding to the bill data to be identified, wherein the historical bill data set includes a plurality of historical bill data; Constructing a bill time series data sequence based on the to-be-identified bill data and the historical bill data set; Based on the bill time series data sequence, data expansion is performed on the bill data to be identified to obtain extended bill data corresponding to the bill data to be identified; The target anomaly recognition model is called to perform anomaly recognition on the extended bill data to obtain a target anomaly recognition result, and the target anomaly recognition result is used as the anomaly recognition result of the bill data to be recognized. The target anomaly recognition result supports indicating whether the bill data to be recognized is abnormal.
2. The method according to claim 1, characterized in that: The to-be-identified bill data includes a characteristic value of each bill feature among a plurality of bill features; the to-be-identified bill data is data expanded based on the bill time series data sequence to obtain extended bill data corresponding to the to-be-identified bill data, including: Determine at least one trend bill feature from the multiple bill features, and perform trend prediction on each trend bill feature in the at least one trend bill feature based on the bill time series data sequence to obtain a trend prediction value of each trend bill feature under the bill data to be identified; Based on the trend prediction values of the various trend bill features under the bill data to be identified, data expansion is performed on the bill data to be identified to obtain extended bill data corresponding to the bill data to be identified.
3. The method according to claim 2, characterized in that The step of performing data expansion on the bill data to be identified based on the trend prediction value of each trend bill feature under the bill data to be identified to obtain extended bill data corresponding to the bill data to be identified includes: Determine at least one seasonal bill feature from the multiple bill features, and perform seasonal prediction on each seasonal bill feature in the at least one seasonal bill feature based on the bill time series data sequence to obtain a seasonal label for each seasonal bill feature under the bill data to be identified; Based on the trend prediction values of the various trend bill features under the bill data to be identified and the season labels of the various seasonal bill features under the bill data to be identified, the bill data to be identified is expanded to obtain extended bill data corresponding to the bill data to be identified.
4. The method according to claim 3, characterized in that The step of performing data expansion on the bill data to be identified based on the trend prediction value of each trend bill feature under the bill data to be identified and the season label of each season bill feature under the bill data to be identified to obtain extended bill data corresponding to the bill data to be identified includes: Determine at least one holiday bill feature from the multiple bill features, and based on the bill time series data sequence, perform holiday effect prediction on each holiday bill feature in the at least one holiday bill feature to obtain a holiday effect label for each holiday bill feature under the bill data to be identified; Based on the trend prediction values of the trend bill features under the bill data to be identified, the season labels of the seasonal bill features under the bill data to be identified, and the holiday effect labels of the holiday bill features under the bill data to be identified, the bill data to be identified is expanded to obtain extended bill data corresponding to the bill data to be identified.
5. The method according to any one of claims 1 to 4, characterized in that: The target anomaly recognition model is a self-encoding model, and the method further includes: Acquire multiple training extension billing data, where one training extension billing data is determined by a training history billing data set corresponding to the corresponding training billing data; Calling the initial anomaly recognition model to reconstruct data of each of the plurality of training extended bill data to obtain reconstructed bill data of each of the training extended bill data; Calculating a model reconstruction error based on the respective training extended bill data and the reconstructed bill data of the corresponding training extended bill data; In the direction of reducing the model reconstruction error, the model parameters in the initial abnormality recognition model are optimized to obtain the initial abnormality recognition model after model optimization, and the target abnormality recognition model is determined based on the initial abnormality recognition model after model optimization.
6. The method according to any one of claims 1 to 4, characterized in that: The calling of the target anomaly recognition model to perform anomaly recognition on the extended bill data to obtain a target anomaly recognition result includes: Calling a target anomaly recognition model to reconstruct the extended bill data to obtain reconstructed bill data of the extended bill data; A target anomaly recognition result is determined using a reconstruction error between the extended bill data and the reconstructed bill data of the extended bill data.
7. The method according to claim 6, characterized in that The to-be-identified bill data includes a characteristic value of each bill characteristic among a plurality of bill characteristics, and the method further includes: For any bill feature among the multiple bill features, if the target abnormality identification result is used to indicate that the bill data to be identified is abnormal, determine a feature value range corresponding to a feature value of any bill feature in the bill data to be identified; Based on the feature value range corresponding to the feature value of any bill feature in the to-be-identified bill data, determining whether the feature value of any bill feature in the to-be-identified bill data is abnormal; If the characteristic value of any bill feature in the to-be-identified bill data is abnormal, the characteristic value of any bill feature in the to-be-identified bill data is marked as abnormal.
8. A bill recognition device, characterized in that: The device comprises: An acquisition unit, configured to acquire the billing data to be identified, and acquire a historical billing data set corresponding to the billing data to be identified, wherein the historical billing data set includes a plurality of historical billing data; A processing unit, configured to construct a bill time series data sequence based on the bill data to be identified and the historical bill data set; The processing unit is further configured to perform data expansion on the to-be-identified bill data based on the bill time series data sequence to obtain extended bill data corresponding to the to-be-identified bill data; The processing unit is also used to call the target anomaly recognition model, perform anomaly recognition on the extended bill data, obtain a target anomaly recognition result, and use the target anomaly recognition result as the anomaly recognition result of the bill data to be identified. The target anomaly recognition result supports indicating whether the bill data to be identified is abnormal.
9. An electronic device, characterized in that: include: processor; as well as Memory for storing programs, The program includes instructions, which, when executed by the processor, cause the processor to perform the method according to any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to make a computer execute the method according to any one of claims 1-7.
