Model gray release method, device, equipment, medium and program product
By sharding the business data in the financial transaction system and routing it to the old and new model clusters, and adjusting the traffic allocation ratio according to performance indicators, the problem of insufficient performance verification before the new model is launched is solved, and stable transition and full replacement of new and old models are achieved, improving the continuity and stability of the business.
Patent Information
- Application Number
- CN202411670077.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-03-14
AI Technical Summary
In the prior art, model updates and deployments usually adopt full replacement methods, resulting in a lack of sufficient online verification before the new model is launched, and it is impossible to ensure that the performance of the new model meets expectations, which may lead to false positives, missed reports and business system crashes, affecting the continuity and stability of the business.
By acquiring business data, sharding processing and routing to the old model cluster or new model cluster, the traffic allocation ratio is adjusted according to the performance indicators of the new model cluster processing traffic shards. If the set proportion threshold is exceeded, all service data flows to the new model cluster, and the gradual transition and full replacement of new and old models are realized.
Ensure the performance of the new model is stable in the early stages of launch, avoid business system crashes caused by poor performance, improve business continuity and stability, and provide the flexibility and response speed of model release.
Smart Images

Figure CN119621130A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of big data technology, and in particular to a model grayscale publishing method, device, equipment, medium and program product. Background Art
[0002] With the development of financial technology, models implemented through technical means such as machine learning algorithms play a vital role in modern financial services.
[0003] In the existing technology, the update and deployment of models usually adopts the method of full replacement. Due to the lack of sufficient online verification before the new model goes online, it is impossible to ensure that the performance of the new model meets expectations. If the full replacement is performed, it may lead to a large number of risks such as false positives and missed positives, and even cause the business system to crash, thus affecting the continuity and stability of the business. Summary of the invention
[0004] The embodiments of the present invention provide a model grayscale release method, device, equipment, medium and program product, which can improve the problems of false alarms and missed alarms caused by the performance of the model not meeting expectations, and improve the continuity and stability of the business.
[0005] In a first aspect, an embodiment of the present invention provides a method for grayscale publishing of a model, including:
[0006] Acquire business data, slice the business data flow according to the attributes of the business data to obtain traffic slices, and determine the traffic slice parameter name corresponding to the traffic slice according to the attributes associated with the traffic slice, wherein the business data is used to characterize the real-time data flow associated with the financial transaction;
[0007] Matching a routing rule parameter according to the traffic slicing parameter name to obtain routing information corresponding to the traffic slicing, wherein the routing rule parameter is used to characterize a processing path of the service data flow, and the processing path is determined based on a traffic allocation ratio;
[0008] Routing the traffic slice to an old model cluster or a new model cluster according to the routing information, identifying abnormal transactions based on the corresponding traffic slice through the old model cluster or the new model cluster, wherein the version of the new model cluster is higher than that of the old model cluster;
[0009] The performance index of the traffic slice corresponding to the processing of the new model cluster is obtained, and the traffic distribution ratio is adjusted according to the performance index. If the traffic distribution ratio exceeds the set ratio threshold, all business data flows are switched to the new model cluster.
[0010] In a second aspect, an embodiment of the present invention further provides a model grayscale publishing device, including:
[0011] A traffic slicing module, used to obtain business data, slice the business data stream according to the attributes of the business data to obtain traffic slices, and determine the traffic slicing parameter name corresponding to the traffic slice according to the attributes associated with the traffic slice, wherein the business data is used to characterize the real-time data stream associated with the financial transaction;
[0012] A routing determination module, used to match routing rule parameters according to the traffic slicing parameter name to obtain routing information corresponding to the traffic slicing, wherein the routing rule parameters are used to characterize the processing path of the service data flow, and the processing path is determined based on the traffic allocation ratio;
[0013] A traffic distribution module, configured to route the traffic slice to an old model cluster or a new model cluster according to the routing information, and identify abnormal transactions based on the corresponding traffic slice through the old model cluster or the new model cluster, wherein the version of the new model cluster is higher than that of the old model cluster;
[0014] The ratio adjustment module is used to obtain the performance index of the traffic slice corresponding to the processing of the new model cluster, adjust the traffic distribution ratio according to the performance index, and if the traffic distribution ratio exceeds the set ratio threshold, switch all business data flows to the new model cluster.
[0015] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the model grayscale publishing method as described in any one of the embodiments of the present invention is implemented.
[0016] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the model grayscale publishing method as described in any one of the embodiments of the present invention.
[0017] In a fifth aspect, an embodiment of the present invention further provides a computer program product, including a computer program, which, when executed by a processor, implements the model grayscale publishing method as described in any one of the embodiments of the present invention.
[0018] In an embodiment of the present invention, the business data stream is sliced and processed by the attributes of the business data to obtain traffic slices, and the traffic slice parameter name corresponding to the traffic slice is determined according to the attributes associated with the traffic slice, and then the routing rule parameter is matched according to the traffic slice parameter name to allocate the traffic slice to the old model cluster or the new model cluster. By shunting the data and routing them to the new model cluster and the old model cluster respectively, the parallel operation of the new and old model clusters in the production environment is realized. The performance indicators of the traffic slices corresponding to the processing of the new model cluster are obtained to monitor the performance of the new model cluster. The traffic allocation ratio is adjusted according to the performance indicators. If the traffic allocation ratio exceeds the set ratio threshold, all business data streams are switched to the new model cluster. The business data streams allocated to the new model cluster are gradually increased according to the performance of the new model cluster, and finally the full replacement of the new and old models is realized. In the embodiment of the present disclosure, by using the business data in the production environment to monitor and evaluate the performance of the new model cluster, the performance of the new model is ensured to be stable in the early stage of going online, and the business system crashes due to the poor performance of the new model on line is avoided, thereby improving the continuity and stability of the business. The distribution ratio of business data flow of the new model cluster is dynamically adjusted based on the performance evaluation results, which reduces the impact range of new models with poor performance and provides flexibility and responsiveness in model release. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0020] Figure 1 A schematic diagram of a flow chart of a model grayscale publishing method provided by an embodiment of the present invention;
[0021] Figure 2 A schematic diagram of a flow chart of another model grayscale publishing method provided by an embodiment of the present invention;
[0022] Figure 3 A schematic diagram of a flow chart of another model grayscale publishing method provided by an embodiment of the present invention;
[0023] Figure 4 A schematic diagram of a flow chart of another model grayscale publishing method provided by an embodiment of the present invention;
[0024] Figure 5 A schematic diagram of the structure of a model grayscale publishing device provided by an embodiment of the present invention;
[0025] Figure 6A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0026] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0027] It should be noted that similar numbers and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. At the same time, in the description of the present invention, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance. The acquisition, storage, use, processing, etc. of data in the technical solution of this application comply with the relevant provisions of national laws and regulations. It should be noted that in the embodiments of this application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of the implementation of the technical solution of this application, but it does not mean that the applicant has or must use the relevant content of "the solution".
[0028] To facilitate understanding, technical terms that may appear in the embodiments of the present invention are explained below.
[0029] Big Data Stream Processing refers to the technology and methods for real-time processing of continuously generated data streams. Big Data Stream Processing frameworks (such as Apache Flink or Apache Kafka Streams) can perform low-latency, high-throughput real-time computing and analysis on large-scale, rapidly changing data, and are suitable for data processing scenarios that require fast response, such as financial transactions, the Internet of Things, and social media.
[0030] Canary Release or Progressive Delivery is a software release strategy that gradually introduces new versions and replaces old versions to ensure that the functions and performance of the new version are fully verified in the actual production environment. For example, in the canary release process of the financial transaction anti-fraud model, part of the traffic is first imported into the new model for testing, and then the traffic is gradually increased according to its performance until the entire switch is completed.
[0031] Fraud detection model refers to a model for identifying fraudulent behavior that is built based on historical transaction data and real-time behavior characteristics using machine learning algorithms, statistical methods, rule engines and other technical means. Common fraud detection models include logistic regression, decision trees, random forests and neural networks.
[0032] Traffic Sharding or Data Partitioning: The sharded data stream is assigned to different processing paths or models. This method can fine-grainedly control the data processing ratio of the new and old models and achieve precise traffic management.
[0033] Traffic Routing is the process of dynamically allocating data streams to different processing nodes or models in a streaming data processing system. Through dynamic traffic routing, the processing path of data streams can be flexibly adjusted according to real-time business needs to ensure efficient operation of the system and smooth transition of the model.
[0034] Dynamic Parameter Tuning refers to the real-time adjustment of system operating parameters (such as traffic ratio, routing rules, model thresholds, etc.) to achieve dynamic control and optimization of system behavior. The dynamic parameter adjustment module can automatically adjust the model's processing strategy and traffic distribution based on real-time monitoring data and business needs.
[0035] HBase is an open source distributed database system based on Hadoop HDFS, suitable for storing structured data. HBase supports fast read and write operations of large-scale data sets and is often used in scenarios that require high-performance random read and write. In the present invention, HBase is used to store and manage dynamic adjustment parameters, providing flexible flow control and routing configuration for the system.
[0036] Flink is a distributed stream processing framework that supports low-latency, high-throughput real-time data stream processing. Flink can handle stateful data stream tasks, provide powerful fault tolerance and recovery mechanisms, and is suitable for large-scale data processing and real-time analysis scenarios. In the present invention, Flink is used to process business data streams in real time, execute model calculations, and implement grayscale release strategies.
[0037] Flink has the following advantages:
[0038] Low latency and high throughput: Able to efficiently process large-scale data streams with low latency.
[0039] State management and fault-tolerance mechanism: Provides powerful state management capabilities and built-in fault-tolerance mechanism to ensure data consistency and system stability during processing.
[0040] Flexible window operations: Supports multiple window operations and can flexibly define data processing logic according to business needs.
[0041] Checkpoint is a data state management mechanism used to save the intermediate state of the system in a stream processing framework (such as Flink). Checkpoint can ensure that the system can quickly recover to the last saved state in the event of a failure, ensuring the continuity and consistency of data processing. During the grayscale release process, Checkpoint is used to ensure data consistency during the switch between the old and new models.
[0042] Continuous Integration and Continuous Delivery (CI / CD) is a software development practice that achieves continuous integration (CI) and continuous delivery (CD) of software through automated build, test, and deployment pipelines. CI / CD tools (such as Jenkins, GitLab CI) can help development teams quickly iterate and release software. For example, CI / CD is used to automate the development, testing, and deployment process of anti-fraud models, improving the efficiency and quality of model launch.
[0043] The rollback mechanism is an operation mechanism that quickly restores the system state to the old version when serious problems are found in the new version during the system update or new model launch process. The rollback mechanism can reduce the risks brought by the new version or new model and ensure the stability of the system. During the grayscale release process, the rollback mechanism can quickly respond to abnormal situations of the new model and protect the production environment from being affected.
[0044] Anomaly detection refers to identifying abnormal behaviors or data patterns that are beyond the normal range by monitoring and analyzing the system operation status. Anomaly detection technology is often used to identify potential fraudulent behaviors and abnormal transactions in anti-fraud scenarios. In the present invention, the anomaly detection module is used to monitor the performance and performance of the new model in real time, and promptly detect and handle possible abnormal situations.
[0045] Existing anti-fraud model deployment methods face the following challenges:
[0046] High real-time requirements: Financial transactions are characterized by high frequency and strong real-time nature, requiring anti-fraud models to be able to make decisions at the millisecond level to prevent potential fraud.
[0047] Frequent model updates: In order to cope with ever-changing fraud methods, anti-fraud models need to be updated frequently, which places higher requirements on model deployment and switching.
[0048] Risk control: When a new model is launched, there may be a high rate of false positives or false negatives due to insufficient verification, which will have a negative impact on the business stability and customer experience of financial institutions.
[0049] Existing model publishing methods have the following limitations:
[0050] In anti-fraud systems, model updates and deployments usually involve completely replacing the old version of the model with the new version. This method is simple and direct, but it carries high risks and potential instability. The steps are as follows:
[0051] 1. Prepare a new model
[0052] Model training and validation: In the development and testing environment, the data science team first trains, tests, and validates the new model to ensure that the new model performs well in an offline environment and that indicators such as accuracy and recall are better than or at least not worse than the old model.
[0053] Model packaging and deployment preparation: Package the new model into a deployable format (such as a PMML model file or a serialized machine learning model), and ensure that the model files, configuration parameters, etc. are ready.
[0054] 2. Stop the old model service
[0055] Notify the downtime window: Notify relevant business and technical teams to determine a time window with relatively low business volume to switch models, so as to minimize the impact on the production environment.
[0056] Suspend data input: During the downtime window, suspend data input to the old model service to ensure that there is no data loss or processing inconsistencies during the switch.
[0057] Stop old model instances: Shut down service instances running old models to ensure that all old models stop running.
[0058] 3. Deploy the new model
[0059] Deploy new model service: Deploy the new model to the production environment and start the service instance of the new model. The new model may run on the same hardware resources as the old model, or a new resource environment may be allocated.
[0060] Configuration update: Update system configuration files or routing rules to ensure that the new model can correctly receive real-time data streams, and update related dependencies (such as model parameters, library versions, etc.) as needed.
[0061] 4. Start the new model service
[0062] Start data input: Resume the input of the data flow and import the production data flow into the new model for processing.
[0063] Observe the performance of the new model: In the early stage of the new model’s launch, closely monitor its operating status and processing performance, focusing on key indicators such as the model’s processing latency, false alarm rate, and accuracy.
[0064] 5. Verify the performance of the new model
[0065] Preliminary verification: Verify the performance of the new model through real-time monitoring systems (such as monitoring dashboards, log monitoring tools, etc.) to ensure that its accuracy and efficiency in processing data in the production environment meet expectations.
[0066] Performance tuning: If you find that the performance of a new model in a production environment does not meet your expectations, you may need to adjust parameters or optimize the configuration.
[0067] In the process of implementing the present invention, the inventors found that the full replacement method has the following limitations:
[0068] 1. High risk: high risk of full model switching
[0069] Uncontrollable risks: Traditional model switching technology usually adopts a full replacement method, that is, the new model directly replaces the old model when it goes online. This method is extremely risky. If the new model performs poorly in the actual production environment, it may cause a large number of false positives, missed positives, or even system crashes.
[0070] Lack of transition mechanism: The full-volume switching method has no transition phase. Once the new model is launched, its effectiveness in the actual production environment cannot be verified. This method lacks a risk control mechanism and may cause serious business impact.
[0071] 2. Lack of real-time performance monitoring and feedback mechanism
[0072] No real-time monitoring support: Existing technologies usually do not have the ability to monitor the performance of new models in real time, and cannot detect the performance of the model in real time after it goes online. Key indicators such as the false alarm rate and accuracy of new models are difficult to obtain and analyze quickly, which affects decision-making and adjustments.
[0073] Feedback lag: Due to the lack of real-time monitoring and feedback mechanisms, any problems with the new model may not be discovered until they have accumulated a large impact, which will increase the cost of problem handling and rollback.
[0074] Difficult to roll back quickly: Once a problem occurs in the new model, it is difficult to quickly roll back to the old version model, which may affect the normal operation of the system.
[0075] 3. The response after the model is launched is not flexible
[0076] Unable to roll back quickly: Once problems arise in the existing full-volume switching solution after the new model is launched, the rollback operation is complex and lacks automation capabilities, which may cause long-term system instability or business interruption.
[0077] Inflexible adjustments: Traditional model switching methods usually require human intervention and manual adjustments after problems are discovered. They lack flexibility and automation support, making it difficult to respond to business needs and market changes in a timely manner.
[0078] 4. No support for progressive updates
[0079] One-time full replacement: Model updates are usually all-at-once replacements, with no mechanism for updating in stages or in batches, which can easily lead to large-scale failures or system instability.
[0080] No grayscale release capability: Existing technologies lack the concept of grayscale release and cannot gradually introduce new models for testing and verification, resulting in excessive risks in the model update process.
[0081] 5. Not conducive to model management in large-scale production environments
[0082] Lack of support for multi-version management: Existing technical solutions usually do not support the simultaneous management of multiple model versions, and cannot achieve parallel testing and switching of models.
[0083] High operational complexity: In a production environment, the model switching and management process is complex and requires a lot of manual intervention and operation, making it difficult to achieve automated and standardized management.
[0084] 6. Poor business continuity
[0085] System stability is difficult to ensure: Due to the lack of grayscale release and dynamic adjustment mechanisms, the model switching process is prone to cause system performance fluctuations and instability, affecting business continuity.
[0086] Lack of adaptability to business scenarios: Failure to flexibly adjust the model switching strategy according to the needs of different business scenarios makes it difficult to adapt to the complex and changing business environment.
[0087] The present invention provides a model grayscale publishing method based on a large data stream processing framework to solve the problems in the above-mentioned model publishing process and achieve smooth transition of the model and controllable risks.
[0088] Figure 1A flow chart of a model grayscale publishing method provided in an embodiment of the present invention is applicable to a model iteration grayscale publishing method, for example, it relates to a model iteration grayscale publishing method based on a big data stream processing framework. The real-time processing capability provided by the big data stream processing framework can be used to optimize the deployment and iteration process of the model, ensuring that the risk is controllable and the performance is stable during the model switching process. In particular, the present invention is applicable to financial scenarios that require frequent model updates, such as financial institutions such as banks, payment platforms, and online lending platforms. Through the technical solution of the embodiment of the present invention, financial institutions can update and deploy models more flexibly, effectively improve the timeliness and accuracy of abnormal transaction detection, and reduce the risk of new model launch, ensuring business stability and customer experience. The method can be implemented by a model grayscale publishing device, which can be implemented by software and / or hardware, and the device is usually configured in an electronic device, for example, the electronic device includes a server cluster, etc.
[0089] like Figure 1 As shown, the method includes:
[0090] S110. Acquire business data, slice the business data flow according to the attributes of the business data to obtain traffic slices, and determine the traffic slice parameter name corresponding to the traffic slice according to the attributes associated with the traffic slice.
[0091] The business data is used to characterize the real-time data stream associated with financial transactions. The real-time business data stream is imported into the Apache Flink cluster through Apache Kafka or other message queue systems. The Kafka cluster is responsible for the efficient transmission and buffering of data to ensure the real-time and reliability of data. Based on Flink's distributed stream processing capabilities, it can process large-scale financial transaction data, achieve low-latency, high-throughput data analysis and fraud detection, and provide financial institutions with high-performance real-time anti-fraud services.
[0092] The attributes of business data include the user ID, transaction type, and location information of the business data. Sharding is a data segmentation technology that represents a method of decomposing a business data stream into multiple small data blocks according to certain rules or algorithms. Traffic shards are traffic blocks corresponding to business data streams. Traffic shard parameter names refer to parameter names corresponding to traffic shards. Parameter names are used to identify traffic shards. For example, if the hash value of the user ID is used for sharding, the parameter name of the resulting traffic shard is the user ID, and the parameter value is the hash value of the user ID.
[0093] Exemplarily, slicing the service data stream according to the attribute of the service data to obtain traffic slices, and determining the traffic slice parameter name corresponding to the traffic slice according to the attribute associated with the traffic slice, including:
[0094] According to at least one of the transaction type, location information, and hash value of the user identifier of the business data, the business data flow is sliced to obtain traffic slices;
[0095] Determine a traffic slicing parameter name corresponding to the traffic slicing based on at least one of the transaction type, location information, and user identification associated with the traffic slicing, wherein a parameter value corresponding to the traffic slicing parameter name is at least one of the transaction type, location information, and hash value.
[0096] When the business data of financial transactions enters the system, the business data flow is first sharded in real time, and the traffic shards are routed to the new model cluster or the old model cluster for processing according to different sharding routing rules. The traffic distribution and model routing rules can be dynamically adjusted according to real-time business needs and data flow characteristics, so that the system can quickly use the changing business environment.
[0097] Exemplarily, Flink's streaming processing capabilities are used to perform real-time sharding of business data streams according to specific rules (such as user ID hash value, transaction type, geographic location, etc.). Specifically, during peak trading periods, the traffic allocation ratio is dynamically adjusted to adjust the routing rule parameters, and then all business data streams are allocated to the old model cluster. If a new type of fraud technique appears in a certain place, the business data is sharded according to the geographic location and transaction type, and the corresponding traffic shards are preferentially allocated to the new model cluster. Alternatively, different types of business data streams or business data streams of user groups can be routed to new model clusters or old model clusters through sharding to implement differentiated fraud detection strategies.
[0098] Specifically, the business data stream is sliced according to the transaction type of the business data to obtain traffic slices, and the traffic slice parameter name corresponding to the traffic slice is determined according to the transaction type associated with the traffic slice, and the parameter value corresponding to the traffic slice parameter name is the transaction type. Differentiated fraud detection strategies are implemented according to transaction types.
[0099] Alternatively, the business data stream is sliced according to the location information of the business data to obtain traffic slices, and the traffic slice parameter name corresponding to the traffic slice is determined according to the location information associated with the traffic slice, and the parameter value corresponding to the traffic slice parameter name is the location information. A regional fraud detection strategy is implemented according to the location information. For example, if a new type of fraud method appears in a certain area, the business data stream of the area can be assigned to the new model cluster so that the new model cluster can be used for fraud detection.
[0100] Alternatively, the business data is sliced according to the hash value of the user ID of the business data to obtain traffic slices, and the traffic slice parameter name corresponding to the traffic slice is determined according to the user ID associated with the traffic slice, and the parameter value corresponding to the traffic slice parameter name is the hash value. A differentiated fraud detection strategy for user groups is implemented according to the user ID.
[0101] It should be noted that at least two of the attributes of business data such as transaction type, location information, and user identification can be combined according to business needs for sharding processing to obtain traffic shards to achieve fraud detection for specific regions, specific transaction types, and specific groups.
[0102] S120. Match routing rule parameters according to the traffic slice parameter name to obtain routing information corresponding to the traffic slice.
[0103] The routing rule parameters are used to characterize the processing path of the service data flow. The processing path may characterize the path corresponding to the server cluster of the deployment model.
[0104] The processing path is determined based on the traffic allocation ratio. The traffic allocation ratio refers to the proportion of business data flows allocated to the new model cluster to all business data flows. Assuming that all business data flows are divided into 100 traffic shards, when the traffic allocation ratio is 20%, the traffic shards with hash values of 1-20 of the user identifier are allocated to the new model cluster. When the traffic allocation ratio is 40%, the traffic shards with hash values of 21-40 of the user identifier are allocated to the new model cluster. When the traffic allocation ratio is 60%, the traffic shards with hash values of 41-60 of the user identifier are allocated to the new model cluster. When the traffic allocation ratio exceeds 60%, all business data flows are allocated to the new model cluster.
[0105] Optionally, the model performance parameters and routing rule parameters are stored in a preset parameter table, wherein the model performance parameters are used to characterize the threshold information of the performance indicators of the new model cluster processing traffic sharding. The preset parameter table can be a parameter table defined in HBase. By reading and updating the parameter configuration in HBase, customized dynamic routing and traffic control of the business data stream can be achieved, making the model grayscale release process more flexible, and being able to dynamically adjust the model's processing strategy and traffic allocation ratio in real time according to business needs and traffic characteristics. For example, the table structure of the preset parameter table includes parameter name, parameter value, and last update time, etc. According to the user, the parameters can be divided into routing rule parameters and model performance parameters, etc., so as to quickly call and adjust parameters in different business scenarios.
[0106] Exemplarily, matching a routing rule parameter according to the traffic slice parameter name to obtain routing information corresponding to the traffic slice includes:
[0107] The preset parameter table is traversed according to the traffic slice parameter name to obtain the target routing rule parameter whose parameter name matches the traffic slice parameter name, and the routing information corresponding to the traffic slice is determined according to the parameter value of the target routing rule parameter.
[0108] Use Flink SQL's routing statement to associate the preset parameter table based on the routing shard parameter name, and obtain the target routing rule parameter whose parameter name matches the traffic shard parameter name. Determine the processing path corresponding to the traffic shard based on the parameter value of the target routing rule parameter, and route the traffic shard to the new model cluster or the old model cluster based on the processing path.
[0109] Assuming that the business data stream is sharded based on the hash value of the user ID, the parameter name in the Flink SQL routing statement is determined based on the user ID. The preset parameter table is queried through the Flink SQL routing statement to obtain the parameter value of the parameter name corresponding to the user ID, which is 1-20. If the hash value of the user ID of the current traffic allocation is within the range of 1-20, the current traffic shard is allocated to the new model cluster. If the hash value of the user ID of the current traffic allocation is 25, the current traffic shard is allocated to the old model cluster.
[0110] During the grayscale release of the model, the main business data flow is initially allocated to the old model cluster, and a small part of the business data flow is allocated to the new model cluster. The new model cluster processes the traffic allocation, and dynamically adjusts the traffic allocation ratio in combination with the performance indicators corresponding to the new model cluster processing traffic allocation, gradually increasing the proportion of business data allocated to the new model cluster until all business data flows are finally allocated to the new model cluster.
[0111] S130. Routing the traffic slice to an old model cluster or a new model cluster according to the routing information, identifying abnormal transactions based on the corresponding traffic slice through the old model cluster or the new model cluster, wherein the version of the new model cluster is higher than that of the old model cluster.
[0112] Optionally, the new model cluster and the old model cluster include an anti-fraud model for identifying abnormal transactions involving fraudulent behavior. The real-time processing capabilities provided by the big data stream processing framework can be used to optimize the deployment and iteration process of the anti-fraud model to ensure that risks are controllable and performance is stable during the model switching process. In particular, the present invention is suitable for financial scenarios that require frequent updates of anti-fraud models. Through the technical solutions of the embodiments of the present invention, financial institutions can update and deploy models more flexibly, effectively improving the timeliness and accuracy of anti-fraud detection.
[0113] Exemplarily, if the processing path represented by the routing information corresponds to an old model cluster, the traffic slice is allocated to the old model cluster, and abnormal transactions are identified based on the corresponding traffic slice through the old model cluster. If the processing path represented by the routing information corresponds to a new model cluster, the traffic slice is allocated to the new model cluster, and abnormal transactions are identified based on the corresponding traffic slice through the new model cluster.
[0114] S140. Obtain the performance index of the traffic slice corresponding to the processing of the new model cluster, adjust the traffic allocation ratio according to the performance index, and if the traffic allocation ratio exceeds the set ratio threshold, switch all business data flows to the new model cluster.
[0115] Among them, the performance indicators represent the model performance data presented by the traffic slices corresponding to the new model cluster processing. By integrating specific monitoring tools, the performance data of the new model cluster can be collected and visualized in real time. For example, performance indicators include processing delay, false alarm rate, and accuracy.
[0116] Exemplarily, the performance index of the traffic slice corresponding to the processing of the new model cluster is obtained. If the performance index is higher than the ratio adjustment threshold, the traffic allocation ratio is increased to allocate the traffic slice corresponding to the newly acquired business data to the new model cluster or the old model cluster according to the increased traffic allocation ratio. Through real-time data feedback and intelligent decision support, the model and parameter configuration can be dynamically adjusted according to the latest fraud behavior pattern, thereby enhancing the accuracy of fraud detection. The model and traffic strategy can be flexibly adjusted according to different business scenarios (such as high-risk transactions, special user groups), providing more targeted anti-fraud detection services, and improving the adaptability and effectiveness of the overall anti-fraud strategy.
[0117] Optionally, different ratio adjustment thresholds may be set for different traffic allocation ratios, or the same ratio adjustment threshold may be set for different traffic allocation ratios. As the traffic allocation ratio gradually increases, the ratio adjustment threshold also increases step by step. Assuming that the traffic allocation ratio is 20%, 40%, and 60%, the ratio adjustment threshold corresponding to 20% is higher than the ratio adjustment threshold corresponding to 40%, and the ratio adjustment threshold corresponding to 40% is higher than the ratio adjustment threshold corresponding to 60%.
[0118] The ratio threshold is set to represent the critical value at which all business data flows can be switched to the new model cluster during the grayscale release of the model. If the traffic allocation ratio exceeds the set ratio threshold, all business data flows will be switched to the new model cluster.
[0119] Optionally, during the grayscale release process, if the new model cluster behaves abnormally, the traffic is rolled back to the old model cluster to ensure the stability of the business system and the continuity of the business. Optionally, the abnormal performance of the new model cluster can be detected based on performance indicators through a rule engine or a machine learning model. For example, abnormal performance includes exceeding the processing delay and a sharp increase in the false alarm rate. Once the abnormal performance of the new model cluster is detected, the rollback operation is triggered to switch all business data flows back to the old model cluster. During the rollback process, Flink's state management function is used to ensure the consistency and correctness of the data state through state save points. Checkpoints are created periodically through Flink's state save point (Checkpoint) mechanism. If a rollback event is triggered, the state can be quickly restored based on the most recent Checkpoint to ensure data consistency and correctness.
[0120] Optionally, the preset parameter table also includes a transaction volume threshold: if the business data exceeds the transaction volume threshold, the traffic allocation ratio is adjusted to switch all business data flows to the old model cluster. Specifically, for peak trading periods, the traffic allocation ratio is adjusted to 0, indicating that all business data flows are switched to the old model cluster. Since the new model cluster needs to be verified and evaluated based on online business data, and whether to modify the model is determined based on the evaluation results, that is, the performance of the new model in the early stage of going online is unstable. If you encounter a peak trading period, errors are more likely to occur. Therefore, by adjusting the traffic allocation ratio to 0 through the preset parameter table during the peak trading period, all business data flows can be quickly switched back to the old model cluster.
[0121] The technical solution of the embodiment of the present invention is to slice the business data flow through the attributes of the business data to obtain traffic slices, determine the traffic slice parameter name corresponding to the traffic slice according to the attributes associated with the traffic slice, and then match the routing rule parameters according to the traffic slice parameter name to allocate the traffic slice to the old model cluster or the new model cluster. By splitting the data and routing them to the new model cluster and the old model cluster respectively, the parallel operation of the new and old model clusters in the production environment is realized. The performance indicators of the traffic slices corresponding to the processing of the new model cluster are obtained to monitor the performance of the new model cluster. The traffic allocation ratio is adjusted according to the performance indicators. If the traffic allocation ratio exceeds the set ratio threshold, all business data flows are switched to the new model cluster. The business data flow allocated to the new model cluster is gradually increased according to the performance of the new model cluster, and finally the full replacement of the new and old models is realized. In the embodiment of the present disclosure, by using the business data in the production environment to monitor and evaluate the performance of the new model cluster, the performance of the new model is ensured to be stable in the early stage of going online, and the business system crash caused by the poor performance of the new model on line is avoided, thereby improving the continuity and stability of the business. The distribution ratio of business data flow of the new model cluster is dynamically adjusted based on the performance evaluation results, which reduces the impact range of new models with poor performance and provides flexibility and responsiveness in model release.
[0122] Figure 2 The present invention provides another flow chart of a method for grayscale model release. Based on the above embodiments, the present invention provides an additional limitation on grayscale model release process. If the traffic distribution ratio does not exceed the set ratio threshold, the routing rule parameters are updated according to the adjusted traffic distribution ratio, and the execution is returned to obtain the service data. Figure 2 As shown, the method includes:
[0123] S210. Acquire business data, slice the business data stream according to the attributes of the business data to obtain traffic slices, and determine the traffic slice parameter name corresponding to the traffic slice according to the attributes associated with the traffic slice.
[0124] S220. Match routing rule parameters according to the traffic slice parameter name to obtain routing information corresponding to the traffic slice.
[0125] S230. Routing the traffic slice to an old model cluster or a new model cluster according to the routing information, and identifying abnormal transactions based on the corresponding traffic slice through the old model cluster or the new model cluster.
[0126] S240: Obtain a performance indicator of the traffic slice corresponding to the new model cluster processing, and adjust the traffic allocation ratio according to the performance indicator.
[0127] S250. If the traffic distribution ratio does not exceed the set ratio threshold, the routing rule parameters are updated according to the adjusted traffic distribution ratio, and the process returns to execute the acquisition of service data (ie, S210).
[0128] For example, assuming that the ratio threshold is set to 60% and the current traffic allocation ratio is 20%, if the performance index exceeds the ratio adjustment threshold, it means that the performance of the new model cluster for processing 20% of the traffic shards of the business data volume is in line with expectations, and the traffic allocation ratio is increased to 40%. For the traffic shards determined by the hash value based on the user identifier, if there are 100 traffic shards in total and the hash values corresponding to the traffic shards are 1-100, the routing rule parameters are modified to a lower limit hash value of 1 and an upper limit hash value of 40, indicating that the traffic shards with hash values of 1-40 are allocated to the new model cluster.
[0129] For traffic sharding determined based on transaction type, if there are 40 traffic shards in total, the transaction type is mapped to a consecutive number, and the identification information of the traffic shard is 1 to 40. If the traffic allocation ratio is increased to 40%, the routing rule parameters are modified to a lower limit number of 1 and an upper limit number of 16.
[0130] For the traffic shards determined based on the location information, if there are 60 traffic shards in total, the location information is mapped to a continuous number, that is, the identification information of the traffic shards is 1 to 60. If the traffic distribution ratio is increased to 40%, the routing rule parameters are modified to a lower limit number of 1 and an upper limit number of 24.
[0131] After adjusting the routing rule parameters, the newly acquired business data is allocated and processed, and the routing information corresponding to the traffic shards is determined based on the updated routing rule parameters, so that the traffic shards are allocated to the new model cluster or the old model cluster according to the routing information, so that the new model cluster or the old model cluster can process the traffic shards. The performance indicators of the new model cluster (such as processing delay, accuracy, false alarm rate, etc.) are tracked in real time through monitoring tools. Monitor and evaluate the performance indicators of the new model and the processing of traffic shards. If the performance indicators indicate that the performance of the new model cluster meets expectations, continue to adjust the traffic allocation ratio. This real-time monitoring and automated adjustment mechanism ensures that the new model is always in the best operating state during the launch process.
[0132] S260: If the traffic distribution ratio exceeds the set ratio threshold, all business data flows are switched to the new model cluster.
[0133] The technical solution of the embodiment of the present invention can make full use of existing computing resources to achieve efficient data processing and model verification by deploying new and old models in parallel in the production environment and combining dynamic traffic control strategies. Dynamic traffic control ensures that the system can run with the best resource configuration at any time, improving the overall system performance. Through multi-level verification and gradual volume release mechanism, new models can be gradually introduced in a small range, and the traffic allocation ratio can be adjusted according to real-time monitoring results. In this way, the effect and stability of the new model can be fully verified without affecting the production environment, effectively reducing the risk of launching the new model.
[0134] Figure 3 The present invention provides another flow chart of a method for grayscale release of a model. Based on the above embodiments, the present invention specifically defines the adjustment method of the flow distribution ratio. Figure 3 As shown, the method includes:
[0135] S310. Acquire business data, slice the business data stream according to the attributes of the business data to obtain traffic slices, and determine the traffic slice parameter name corresponding to the traffic slice according to the attributes associated with the traffic slice.
[0136] S320. Match routing rule parameters according to the traffic slice parameter name to obtain routing information corresponding to the traffic slice.
[0137] Exemplarily, the preset parameter table is traversed according to the traffic slicing parameter name to obtain the target routing rule parameter whose parameter name matches the traffic slicing parameter name, and the routing information corresponding to the traffic slicing is determined according to the parameter value of the target routing rule parameter.
[0138] S330. Routing the traffic slice to an old model cluster or a new model cluster according to the routing information, and identifying abnormal transactions based on the corresponding traffic slice through the old model cluster or the new model cluster.
[0139] S340: Obtain the processing delay, accuracy, and false alarm rate of the new model cluster in identifying abnormal transactions based on the corresponding traffic shards.
[0140] S350, querying a preset parameter table according to the processing delay, accuracy and false alarm rate to obtain corresponding target model performance parameters.
[0141] The target model performance parameters include a processing delay threshold, an accuracy threshold, and a false alarm rate threshold.
[0142] S360: Determine whether the performance index of the new model cluster meets the performance requirements. If so, execute S370; otherwise, execute S3100.
[0143] Exemplarily, if the processing delay is not greater than the processing delay threshold, the accuracy is not less than the accuracy threshold, and the false alarm rate is not greater than the false alarm rate threshold, it is determined that the performance indicator of the new model cluster meets the performance requirements.
[0144] If one of the following is satisfied, it is determined that the performance indicator of the new model cluster does not meet the performance requirements:
[0145] The processing delay is greater than the processing delay threshold;
[0146] The accuracy is less than the accuracy threshold;
[0147] The false alarm rate is greater than the false alarm rate threshold.
[0148] S370, increasing the flow distribution ratio according to the set step size.
[0149] S380: Periodically generate a state information snapshot according to the state information of the old model cluster based on the state save point, and associate the state information snapshot with the state save point and store it in the storage system.
[0150] Exemplarily, the intermediate state of the server cluster running the old model is periodically saved through the state saving point. The snapshot of the intermediate state is associated with the state saving point to the storage system. The storage system includes the state information snapshots corresponding to the state saving point arranged in chronological order.
[0151] S390. Determine whether the flow distribution ratio exceeds the set ratio threshold. If so, execute S3100; otherwise, execute S310.
[0152] S3100. Allocate all service data flows to the old model cluster.
[0153] Exemplarily, if the old model cluster is not deactivated, the service data flow is allocated to the old model cluster. If the old model cluster is deactivated, a state information snapshot associated with the state save point is obtained from the storage system. The state information of the old model cluster is determined according to the state information snapshot, the old model cluster is restarted according to the state information, and all service data flows are allocated to the restarted old model cluster.
[0154] According to the technical solution of the embodiment of the present invention, during the grayscale release process, if it is detected that the new model behaves abnormally or does not meet the performance standards, the system can quickly trigger a fast rollback mechanism to switch the traffic back to the old model cluster to avoid affecting the production environment. This fast rollback capability ensures the high stability of the system and the continuity of business. Ensure data consistency and accuracy by creating state save points. Even in abnormal situations, the system can recover quickly, ensuring the integrity of business data and the reliability of model detection.
[0155] Figure 4 The present invention provides another flow chart of a method for grayscale publishing of a model. The present invention provides an additional parameter table update method based on the above embodiments. Figure 4 As shown, the method includes:
[0156] S410: Display the configuration items of the model performance parameters and the configuration items of the routing rule parameters through an interactive interface.
[0157] The configuration items of the routing rule parameters include priority configuration items, and the priority configuration items are used to configure the priorities of the routing rule parameters.
[0158] S420: Update a database table corresponding to the preset parameter table according to the configuration operation for the configuration item.
[0159] The database table is used to record the model performance parameters and routing rule parameters within a set time interval in the preset parameter table.
[0160] S430, determine whether a synchronization event is triggered, if so, execute S440, otherwise execute S450.
[0161] The synchronization event is triggered regularly by the timer.
[0162] S440. Update the preset parameter table according to the database table, and execute S460.
[0163] S450: Update the timer.
[0164] S460. Acquire business data, slice the business data stream according to the attributes of the business data to obtain traffic slices, and determine the traffic slice parameter name corresponding to the traffic slice according to the attributes associated with the traffic slice.
[0165] S470. Traverse the preset parameter table according to the traffic slicing parameter name to obtain the target routing rule parameter whose parameter name matches the traffic slicing parameter name, and determine the routing information corresponding to the traffic slicing according to the parameter value and priority of the target routing rule parameter.
[0166] In some embodiments, if the business data of a certain region needs to be assigned to the new model cluster, a higher priority can be set for the routing rule parameters corresponding to the region in the preset parameter table. In some embodiments, if the business data of a specific transaction type needs to be assigned to the new model cluster, a higher priority can be set for the routing rule parameters corresponding to the transaction type in the preset parameter table.
[0167] S480. Routing the traffic slice to an old model cluster or a new model cluster according to the routing information, and identifying abnormal transactions based on the corresponding traffic slice through the old model cluster or the new model cluster.
[0168] S490. Obtain the performance index of the traffic slice corresponding to the processing of the new model cluster, adjust the traffic allocation ratio according to the performance index, and if the traffic allocation ratio exceeds the set ratio threshold, switch all business data flows to the new model cluster.
[0169] The technical solution of the embodiment of the present invention can dynamically adjust the traffic distribution and model routing strategy according to real-time business needs and data flow characteristics through the preset parameter table, so that the system can quickly adapt to the changing business environment with flexibility. By dynamically configuring the parameters in the preset parameter table, customized traffic routing and sharding rules are implemented, making the model grayscale release process more accurate and flexible, and able to implement differentiated abnormal transaction detection strategies for different types of transaction data or customer groups.
[0170] Figure 5 The present invention provides a schematic diagram of a model grayscale publishing device provided in an embodiment of the present invention. The device can be used to execute the model grayscale publishing method described in any embodiment of the present invention. The device can be implemented by software and / or hardware, and the device is usually configured in an electronic device, for example, the electronic device includes a server cluster, etc.
[0171] like Figure 5 As shown, the device includes: a traffic slicing module 510, a routing determination module 520, a traffic allocation module 530 and a ratio adjustment module 540.
[0172] The traffic slicing module 510 is used to obtain business data, slice the business data flow according to the attributes of the business data to obtain traffic slices, and determine the traffic slicing parameter name corresponding to the traffic slice according to the attributes associated with the traffic slice, wherein the business data is used to characterize the real-time data flow associated with the financial transaction;
[0173] A routing determination module 520, configured to match routing rule parameters according to the traffic slicing parameter name to obtain routing information corresponding to the traffic slicing, wherein the routing rule parameters are used to characterize a processing path of the service data flow, and the processing path is determined based on a traffic allocation ratio;
[0174] A traffic distribution module 530, configured to route the traffic slice to an old model cluster or a new model cluster according to the routing information, and identify abnormal transactions based on the corresponding traffic slice through the old model cluster or the new model cluster, wherein the version of the new model cluster is higher than that of the old model cluster;
[0175] The ratio adjustment module 540 is used to obtain the performance index of the traffic slice corresponding to the new model cluster processing, and adjust the traffic distribution ratio according to the performance index. If the traffic distribution ratio exceeds the set ratio threshold, all business data flows are switched to the new model cluster.
[0176] Optionally, it also includes:
[0177] The parameter updating module is used to update the routing rule parameters according to the adjusted traffic allocation ratio if the traffic allocation ratio does not exceed the set ratio threshold, and return to execute and obtain business data.
[0178] Optionally, the traffic slicing module 510 is specifically configured to:
[0179] According to at least one of the transaction type, location information, and hash value of the user identifier of the business data, the business data flow is sliced to obtain traffic slices;
[0180] Determine a traffic slicing parameter name corresponding to the traffic slicing based on at least one of the transaction type, location information, and user identification associated with the traffic slicing, wherein a parameter value corresponding to the traffic slicing parameter name is at least one of the transaction type, location information, and hash value.
[0181] Optionally, it also includes:
[0182] The model performance parameters and routing rule parameters are stored in a preset parameter table, wherein the model performance parameters are used to characterize the threshold information of the performance index of the new model cluster in processing traffic sharding;
[0183] The route determination module 520 is specifically used for:
[0184] The preset parameter table is traversed according to the traffic slice parameter name to obtain the target routing rule parameter whose parameter name matches the traffic slice parameter name, and the routing information corresponding to the traffic slice is determined according to the parameter value of the target routing rule parameter.
[0185] Optionally, the traffic distribution module 530 is specifically configured to:
[0186] If the processing path represented by the routing information corresponds to an old model cluster, the traffic shard is allocated to the old model cluster, and abnormal transactions are identified based on the corresponding traffic shard through the old model cluster;
[0187] If the processing path represented by the routing information corresponds to a new model cluster, the traffic shard is allocated to the new model cluster, and abnormal transactions are identified based on the corresponding traffic shard through the new model cluster.
[0188] Optionally, the ratio adjustment module 540 is specifically used for:
[0189] Obtaining the processing delay, accuracy and false alarm rate of the new model cluster in identifying abnormal transactions based on the corresponding traffic shards;
[0190] According to the processing delay, accuracy rate and false alarm rate, a preset parameter table is queried to obtain corresponding target model performance parameters, wherein the target model performance parameters include a processing delay threshold, an accuracy threshold and a false alarm rate threshold;
[0191] If the processing delay is not greater than the processing delay threshold, the accuracy is not less than the accuracy threshold, and the false alarm rate is not greater than the false alarm rate threshold, it is determined that the performance indicators of the new model cluster meet the performance requirements, and the traffic allocation ratio is increased according to the set step size.
[0192] Furthermore, a traffic rollback module is included, which is used to:
[0193] If at least one of the following is satisfied, all service data flows are assigned to the old model cluster:
[0194] The processing delay is greater than the processing delay threshold;
[0195] The accuracy is less than the accuracy threshold;
[0196] The false alarm rate is greater than the false alarm rate threshold.
[0197] Furthermore, it also includes:
[0198] A state storage module, used for periodically generating a state information snapshot according to the state information of the old model cluster based on a state save point before allocating all service data flows to the old model cluster, and storing the state information snapshot in association with the state save point in the storage system;
[0199] The traffic rollback module is specifically used for:
[0200] If the old model cluster has been deactivated, obtaining a state information snapshot associated with the state save point from the storage system;
[0201] The state information of the old model cluster is determined according to the state information snapshot, the old model cluster is restarted according to the state information, and all business data traffic is allocated to the restarted old model cluster.
[0202] Furthermore, a parameter table updating module is included, which is used to:
[0203] Displaying the configuration items of the model performance parameters and the configuration items of the routing rule parameters through an interactive interface;
[0204] updating a database table corresponding to the preset parameter table according to the configuration operation for the configuration item, wherein the database table is used to record the model performance parameters and routing rule parameters within a set time interval in the preset parameter table;
[0205] If a data synchronization event is triggered, the preset parameter table is updated according to the database table.
[0206] Furthermore, it also includes: the configuration item of the routing rule parameter includes a priority configuration item, and the priority configuration item is used to configure the priority of the routing rule parameter;
[0207] The determining, according to the parameter value of the target routing rule parameter, the routing information corresponding to the traffic slice includes:
[0208] Determine the routing information corresponding to the traffic slice according to the parameter value and priority of the target routing rule parameter.
[0209] Furthermore, the preset parameter table also includes a transaction volume threshold:
[0210] If the business data exceeds the transaction volume threshold, the traffic distribution ratio is adjusted to switch all business data flows to the old model cluster.
[0211] Furthermore, the new model cluster and the old model cluster include an anti-fraud model for identifying abnormal transactions involving fraudulent behavior.
[0212] The model grayscale publishing device provided in the embodiment of the present invention can execute the model grayscale publishing method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0213] Figure 6 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, and other suitable computers. The components shown herein, their connections and relationships, and their functions are only for example and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0214] like Figure 6As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0215] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0216] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 11 executes the various methods and processes described above, such as a model grayscale release method.
[0217] In some embodiments, a model grayscale publishing method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute a model grayscale publishing method in any other appropriate manner (e.g., by means of firmware).
[0218] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0219] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable rule-based decision-making device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0220] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage 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. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. 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.
[0221] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device 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 a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0222] The systems and techniques described herein may be implemented in a computing system that includes backend 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 frontend 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 backend components, middleware components, or frontend 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), a blockchain network, and the Internet.
[0223] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0224] An embodiment of the present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements the model grayscale publishing method provided in any embodiment of the present application.
[0225] In the process of implementation, the computer program product can be written in one or more programming languages or a combination thereof to perform the computer program code of the present invention, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).
[0226] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A model grayscale release method, characterized in that: include: Acquire business data, slice the business data flow according to the attributes of the business data to obtain traffic slices, and determine the traffic slice parameter name corresponding to the traffic slice according to the attributes associated with the traffic slice, wherein the business data is used to characterize the real-time data flow associated with the financial transaction; Matching a routing rule parameter according to the traffic slicing parameter name to obtain routing information corresponding to the traffic slicing, wherein the routing rule parameter is used to characterize a processing path of the service data flow, and the processing path is determined based on a traffic allocation ratio; Routing the traffic slice to an old model cluster or a new model cluster according to the routing information, identifying abnormal transactions based on the corresponding traffic slice through the old model cluster or the new model cluster, wherein the version of the new model cluster is higher than that of the old model cluster; The performance index of the traffic slice corresponding to the processing of the new model cluster is obtained, and the traffic distribution ratio is adjusted according to the performance index. If the traffic distribution ratio exceeds the set ratio threshold, all business data flows are switched to the new model cluster.
2. The method according to claim 1, characterized in that Also includes: If the traffic distribution ratio does not exceed the set ratio threshold, the routing rule parameters are updated according to the adjusted traffic distribution ratio, and the process returns to execute and obtain the service data.
3. The method according to claim 1, characterized in that The slicing of the service data stream according to the attribute of the service data to obtain traffic slices, and determining the traffic slice parameter name corresponding to the traffic slice according to the attribute associated with the traffic slice, includes: According to at least one of the transaction type, location information, and hash value of the user identifier of the business data, the business data flow is sliced to obtain traffic slices; Determine a traffic slicing parameter name corresponding to the traffic slicing based on at least one of the transaction type, location information, and user identification associated with the traffic slicing, wherein a parameter value corresponding to the traffic slicing parameter name is at least one of the transaction type, location information, and hash value.
4. The method according to claim 1, characterized in that: Also includes: The model performance parameters and routing rule parameters are stored in a preset parameter table, wherein the model performance parameters are used to characterize the threshold information of the performance index of the new model cluster in processing traffic sharding; The matching of routing rule parameters according to the traffic slice parameter name to obtain routing information corresponding to the traffic slice includes: The preset parameter table is traversed according to the traffic slice parameter name to obtain the target routing rule parameter whose parameter name matches the traffic slice parameter name, and the routing information corresponding to the traffic slice is determined according to the parameter value of the target routing rule parameter.
5. The method according to claim 1, characterized in that The step of routing the traffic slice to the old model cluster or the new model cluster according to the routing information, and identifying abnormal transactions based on the corresponding traffic slice through the old model cluster or the new model cluster, includes: If the processing path represented by the routing information corresponds to an old model cluster, the traffic shard is allocated to the old model cluster, and the abnormal transaction is identified based on the corresponding traffic shard through the old model cluster; If the processing path represented by the routing information corresponds to a new model cluster, the traffic shard is allocated to the new model cluster, and the abnormal transaction is identified based on the corresponding traffic shard through the new model cluster.
6. The method according to claim 4, characterized in that The obtaining a performance indicator of the traffic slice corresponding to the new model cluster processing, and adjusting the traffic distribution ratio according to the performance indicator, includes: Obtaining the processing delay, accuracy and false alarm rate of the new model cluster in identifying abnormal transactions based on the corresponding traffic shards; According to the processing delay, accuracy rate and false alarm rate, a preset parameter table is queried to obtain corresponding target model performance parameters, wherein the target model performance parameters include a processing delay threshold, an accuracy threshold and a false alarm rate threshold; If the processing delay is not greater than the processing delay threshold, the accuracy is not less than the accuracy threshold, and the false alarm rate is not greater than the false alarm rate threshold, it is determined that the performance indicators of the new model cluster meet the performance requirements, and the traffic allocation ratio is increased according to the set step size.
7. The method according to claim 6, characterized in that The method further includes allocating all service data flows to the old model cluster if at least one of the following is satisfied: The processing delay is greater than the processing delay threshold; The accuracy is less than the accuracy threshold; The false alarm rate is greater than the false alarm rate threshold.
8. The method according to claim 7, characterized in that Before allocating all business data flows to the old model cluster, it also includes: periodically generating a state information snapshot according to the state information of the old model cluster based on the state save point, and storing the state information snapshot in the storage system in association with the state save point; The allocating all service data flows to the old model cluster includes: If the old model cluster has been deactivated, obtaining a state information snapshot associated with the state save point from the storage system; The state information of the old model cluster is determined according to the state information snapshot, the old model cluster is restarted according to the state information, and all business data traffic is allocated to the restarted old model cluster.
9. The method according to claim 4, characterized in that Also includes: Displaying the configuration items of the model performance parameters and the configuration items of the routing rule parameters through an interactive interface; updating a database table corresponding to the preset parameter table according to the configuration operation for the configuration item, wherein the database table is used to record the model performance parameters and routing rule parameters within a set time interval in the preset parameter table; If a data synchronization event is triggered, the preset parameter table is updated according to the database table.
10. The method according to claim 9, characterized in that Also includes: The configuration item of the routing rule parameter includes a priority configuration item, and the priority configuration item is used to configure the priority of the routing rule parameter; The determining, according to the parameter value of the target routing rule parameter, the routing information corresponding to the traffic slice includes: Determine the routing information corresponding to the traffic slice according to the parameter value and priority of the target routing rule parameter.
11. The method according to claim 4, characterized in that The preset parameter table also includes the transaction volume threshold: If the business data exceeds the transaction volume threshold, the traffic distribution ratio is adjusted to switch all business data flows to the old model cluster.
12. The method according to claim 1, characterized in that The new model cluster and the old model cluster include an anti-fraud model for identifying abnormal transactions involving fraudulent behavior.
13. A model grayscale publishing device, characterized in that: include: A traffic slicing module, used to obtain business data, slice the business data stream according to the attributes of the business data to obtain traffic slices, and determine the traffic slicing parameter name corresponding to the traffic slice according to the attributes associated with the traffic slice, wherein the business data is used to characterize the real-time data stream associated with the financial transaction; A routing determination module, used to match routing rule parameters according to the traffic slicing parameter name to obtain routing information corresponding to the traffic slicing, wherein the routing rule parameters are used to characterize the processing path of the service data flow, and the processing path is determined based on the traffic allocation ratio; A traffic distribution module, configured to route the traffic slice to an old model cluster or a new model cluster according to the routing information, and identify abnormal transactions based on the corresponding traffic slice through the old model cluster or the new model cluster, wherein the version of the new model cluster is higher than that of the old model cluster; The ratio adjustment module is used to obtain the performance index of the traffic slice corresponding to the processing of the new model cluster, adjust the traffic distribution ratio according to the performance index, and if the traffic distribution ratio exceeds the set ratio threshold, switch all business data flows to the new model cluster.
14. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the model grayscale publishing method as described in any one of claims 1 to 11 when executing the computer program.
15. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the model grayscale publishing method as described in any one of claims 1 to 12 is implemented.
16. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the computer program implements the model grayscale publishing method according to any one of claims 1 to 12.
Citation Information
Cited By
Visual model continuous publishing method and system based on high-risk scene slice regression gating
CN122289904A
A visual model continuous release method and system based on high-risk scenario slice regression gating
CN122289904B