Business processing method and system, medium and electronic equipment
By dynamically adjusting the parameters of the calculation rule service, it solves the problems of low efficiency and waste of resources in processing massive policy data in traditional technology, achieves efficient use of hardware resources, and improves business operation efficiency.
Patent Information
- Application Number
- CN202410833882.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-25
- Publication Date
- 2024-10-18
AI Technical Summary
When traditional computing services and rule verification services process massive policy data, it often takes hours or even longer to complete the processing, resulting in system crashes or resource waste, which limits business development potential.
By dynamically adjusting the parameters that affect the processing efficiency of the computing rule service, such as the number of shards, the number of threads and hardware configuration parameters for parallel processing of subject data, the high processing efficiency of the computing rule service is ensured and the cost-effective utilization of hardware resources is achieved.
It achieves efficient processing of massive policy data under limited hardware resources, improves business processing efficiency, avoids waste of resources and system crashes, and improves the potential of business operations.
Smart Images

Figure CN118799091A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a business processing method, system, medium and electronic device. Background Art
[0002] Calculation services and rule verification services play a core role in the insurance business field, and their performance has a significant impact on business operation efficiency. For example, in business scenarios involving a large number of insurance objects, such as group credit insurance and fleet insurance, the speed of premium calculation and rule verification directly determines the efficiency of business processing, which in turn affects the growth potential of the business. For example, in a common business model, insurance companies sell policies through multiple sales channels. These channels are usually able to generate policy data in their own business terminals, and then send batches of policy data to the insurance company's service terminal for policy supplement and issuance operations. Faced with massive policy data submitted by many channels, the problem that insurance companies need to solve is to efficiently complete premium calculation and rule verification within a limited time to ensure that the issuance process is completed in a timely manner.
[0003] However, traditional computing services and rule verification services usually have fixed software and hardware resources. Therefore, in the scenario of processing massive amounts of insurance policy data, traditional computing services and rule verification services often take several hours, a whole day or even longer to complete, and sometimes even cause system crashes, limiting the development potential of the business. Summary of the invention
[0004] The embodiments of the present application provide a business processing method, system, medium and electronic device, which can ensure that the computing rule service has a high processing efficiency while achieving economical and efficient use of hardware resources during the data processing of business data.
[0005] In a first aspect, an embodiment of the present application provides a business processing method, which is applied to a business processing system, and the method includes: obtaining business data to be processed, wherein the business data to be processed includes multiple subject data; determining that a first type of parameter set used for data processing of the business data to be processed is a first parameter set (also called a first dynamic parameter set), wherein the parameters in the first type of parameter set have an impact on the response time of data processing of the business data to be processed; within a first sliding time window, performing data processing on the business data to be processed based on the first parameter set; determining that a first response time for data processing within the first sliding time window is greater than a preset response time, adjusting the value of at least one parameter in the first parameter set to obtain a second parameter set (also called a second dynamic parameter set); and performing data processing on the business data to be processed based on the second parameter set.
[0006] It can be understood that data processing can be performed on the pending business data based on the second parameter set until the processing is completed. In addition, the present application can continue to perform data processing on the pending business data using the second parameter set within another sliding time window (such as recorded as the second sliding time window), wherein the second response time of the data processing within the second time window is less than the first response time, the second sliding time window is located after the first sliding time window, and the duration of the second sliding time window is the same as the duration of the first sliding time window.
[0007] Thus, the business processing method provided by the present application dynamically adjusts one or more parameters (hereinafter referred to as dynamic parameters) that affect the processing efficiency of business data processing (specifically, computing rule service processing). In this way, while ensuring a high processing efficiency of the computing rule service, economical and efficient use of hardware resources is achieved.
[0008] In a possible implementation of the first aspect, the parameters in the first parameter set include at least one of the following: the number of shards for parallel processing of the target data, the number of threads for parallel processing of the target data, and the hardware configuration parameters for parallel processing of the target data, wherein each shard for parallel processing of the target data includes at least one target data. It can be understood that these parameters are dynamic parameters that affect the response time of data processing of the business data to be processed.
[0009] In a possible implementation of the first aspect, the parameters in the first parameter set are arranged in a first order, and the value of at least one parameter in the first parameter set is adjusted to obtain the second parameter set, including: adjusting the value of at least one parameter in the first parameter set according to the priority indicated by the first order to obtain the second parameter set. The priority of the parameter arranged first in the first order is higher than or equal to the priority of the parameter arranged later and adjacent.
[0010] In a possible implementation of the first aspect above, the number of parameters in the first parameter set is N, and the value of at least one parameter in the first parameter set is adjusted according to the priority indicated by the first order to obtain the second parameter set, including: adjusting the value of the i-th parameter in the first parameter set according to the priority indicated by the first order to update the first parameter set; in the sliding time window corresponding to the i-th parameter, using the updated first parameter set to process the business data to be processed; corresponding to i<N and the response time of data processing in the sliding time window corresponding to the i-th parameter is greater than the preset response time, the value of i plus 1. That is, the present application can adjust parameters such as the number of shards and the number of threads in order of priority to improve the efficiency of business data processing.
[0011] In a possible implementation of the first aspect, the method further includes: if the response time of data processing in the sliding time window corresponding to i≤N and corresponding to the i-th parameter is less than or equal to the preset response time, the updated first parameter set is used as the second parameter set. At this time, the present application adjusts some or all of the parameters in each dynamic parameter so that the response time corresponding to the second parameter set meets the requirement.
[0012] In a possible implementation of the first aspect, the method further includes: if the response time of data processing in the sliding time window corresponding to i=N and corresponding to the i-th parameter is greater than the preset response time, the updated first parameter set is used as the second parameter set, and a prompt message is output. At this time, after adjusting all parameters in each dynamic parameter, if the response time corresponding to the second parameter set still does not meet the requirements, the user will be prompted with prompt messages such as optimization failure.
[0013] In a possible implementation of the first aspect above, the value of the i-th parameter in the first parameter set is adjusted according to the priority indicated by the first order to update the first parameter set, including: inputting the second type parameter set corresponding to the business data to be processed, the remaining parameters in the first parameter set except the i-th parameter, and the preset response time into the i-th prediction model to output the i-th prediction value, wherein each parameter in the second type parameter set is used to indicate the content of the business data to be processed; and updating the value of the i-th parameter in the first parameter set with the i-th prediction value to update the first parameter set. It can be understood that for different types of dynamic parameters, the input variables and output variables of the model are different.
[0014] In a possible implementation of the first aspect, the parameters in the second parameter set include at least one of the following parameters: the number of target objects, and the complexity of the calculation rule of the target object data. In this case, these parameters may be referred to as static parameters.
[0015] In a possible implementation of the first aspect above, the business processing system includes a pre-processing engine and a computing rule engine, wherein the pre-processing engine is used to perform sharding and threading on the target object data, and the computing rule engine is used to execute computing rule services on the target object data; and the hardware configuration parameters include hardware configuration parameters of the pre-processing engine and hardware configuration parameters of the computing rule engine.
[0016] In a possible implementation of the first aspect above, the pre-processing engine is implemented by a first-category device or a second-category device, and the calculation rule engine is implemented by a first-category device or a second-category device; wherein the hardware configuration parameters of the first-category device include RAM parameters; and the hardware configuration parameters of the second-category device include central processing unit CPU parameters and RAM parameters.
[0017] In a possible implementation of the first aspect above, in the priorities indicated in the first order, the priority of the number of shards and the priority of the number of threads are higher than the priority of the hardware configuration parameters of the first category of devices, and the priority of the hardware configuration parameters of the first category of devices is higher than the priority of the hardware configuration parameters of the second category of devices.
[0018] In a possible implementation of the first aspect, the pre-processing engine is implemented by a second type of device, and the second type of device is a device in a kubernetes cluster, and the computing rule engine is implemented by a first type of device, and the first type of device is a device of a serverless platform. In this case, the hardware configuration parameters of the computing rule engine are RAM parameters, and the hardware configuration parameters of the pre-processing engine include RAM parameters and CPU parameters.
[0019] In a possible implementation of the first aspect above, a method for determining the parameters in the first category parameter set includes: determining the parameters in the first category parameter set from at least one first characteristic parameter; wherein the at least one first characteristic parameter includes at least one of the following items: the user's geographic location, the user's device type, the user's browser type and version, the business type of the business data requested to perform data processing, the number of objects of the business data requested to perform data processing, the computational complexity and / or rule verification complexity of the object data, the number of shards for parallel processing of the object data, the number of threads for parallel processing of the object data, the CPU parameters of the front-end processing engine, the RAM parameters of the front-end processing engine, the RAM parameters of the computing rule engine, the vendor type of the computing rule engine, the timestamp of the business data requested to perform data processing, and the network delay parameters.
[0020] In a possible implementation of the first aspect above, determining parameters in a first type parameter set from at least one first characteristic parameter includes: obtaining a first training data set, wherein the first training data set includes multiple training data, and each training data includes a business data, a corresponding response time, and a corresponding value of at least one first characteristic parameter; inputting the first training data set into a first screening model, outputting at least one second characteristic parameter through the first screening model, and a first coefficient corresponding to each second characteristic parameter, wherein the at least one second characteristic parameter includes: the number of subject matters, the complexity of calculation rules for subject matter data, the number of shards for parallel processing of subject matter data, the number of threads for parallel processing of subject matter data, the CPU parameter of the pre-processing engine, the RAM parameter of the pre-processing engine, and the RAM parameter of the calculation rule engine; wherein the at least one second characteristic parameter is a characteristic parameter of the at least one first characteristic parameter that has a greater impact on the response time of data processing of business data, and the second characteristic parameter corresponding to the larger the value of the first coefficient, the greater the degree of impact on the response time of data processing of business data; and filtering out parameters in the first type parameter set from the at least one second characteristic parameter.
[0021] In a possible implementation of the first aspect above, parameters in a first type of parameter set are filtered out from at least one second characteristic parameter, including: using data corresponding to at least one second characteristic parameter in a first training data set as a second training data set; inputting the second training data set into a second screening model, and outputting at least one third characteristic parameter and a second coefficient corresponding to each third characteristic parameter through the second screening model, wherein at least one third characteristic parameter is a characteristic parameter of at least one second characteristic parameter that has a greater impact on the response time of data processing of business data, and a third characteristic parameter corresponding to a larger value of the second coefficient has a greater degree of impact on the response time of data processing of business data; filtering out parameters in the first type of parameter set from at least one third characteristic parameter, and determining the priority of each parameter.
[0022] In a possible implementation of the first aspect above, the method also includes: preprocessing each training data in the first training data set, wherein the preprocessing method includes at least one of the following methods: data cleaning, removing outliers, processing missing values, removing training data corresponding to business data with response time above the median, normalizing the number of subject matters in different business data, and classifying the complexity of calculation rules corresponding to different business data.
[0023] In a second aspect, an embodiment of the present application provides a business processing system, which includes: a pre-processing engine, a monitoring center, and a calculation rule engine; the pre-processing engine is used to obtain business data to be processed, wherein the business data to be processed includes multiple subject data; a first parameter set for data processing of the business data to be processed is determined as a first parameter set, wherein the parameters in the first parameter set have an impact on the response time of data processing of the business data to be processed; a calculation rule engine is used to perform data processing on the business data to be processed based on the first parameter set within a first sliding time window; the monitoring center is used to determine a first response time for data processing within the first sliding time window; the pre-processing engine is used to determine that the first response time for data processing within the first sliding time window is greater than a preset response time, and adjust the value of at least one parameter in the first parameter set to obtain a second parameter set; the calculation rule engine is also used to perform data processing on the business data to be processed based on the second parameter set.
[0024] In a third aspect, an embodiment of the present application provides a readable medium having instructions stored thereon, which, when executed on an electronic device, enables the electronic device to execute the business processing method in the first aspect and any possible implementation thereof.
[0025] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising: a memory for storing instructions executed by one or more processors of the electronic device, and a processor, which is one of the processors of the electronic device, for executing the business processing method in the above-mentioned first aspect and any possible implementation method thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 According to some embodiments of the present application, a schematic diagram of a framework of a business data scenario is shown;
[0027] Figure 2 According to some embodiments of the present application, a schematic diagram of the architecture of a business processing system is shown;
[0028] Figure 3 According to some embodiments of the present application, a schematic diagram of the architecture of a business processing system is shown;
[0029] Figure 4 According to some embodiments of the present application, a schematic diagram of a parameter screening process for business processing is shown;
[0030] Figure 5 According to some embodiments of the present application, an example diagram of a plurality of characteristic parameters and their coefficients is shown;
[0031] Figure 6According to some embodiments of the present application, a schematic diagram of three-level adjustment in a hierarchical optimization strategy is shown;
[0032] Fig. 7A According to some embodiments of the present application, a flow chart of a business processing method is shown;
[0033] Figure 7B According to some embodiments of the present application, a schematic diagram of a numerical adjustment process of parameters in a first dynamic parameter set is shown;
[0034] Figure 8 According to some embodiments of the present application, a schematic diagram of the process of primary adjustment, secondary adjustment and tertiary adjustment in a hierarchical optimization strategy is shown;
[0035] Fig. 9 According to some embodiments of the present application, a schematic structural diagram of an electronic device is shown. DETAILED DESCRIPTION
[0036] Illustrative embodiments of the present application include, but are not limited to, business processing methods and systems.
[0037] First, some terms involved in the embodiments of the present application are explained.
[0038] (1) Subject matter: usually refers to the object to which the rights and obligations between the parties to the contract are directed. In the insurance business field, the subject matter of insurance refers to the specific object of insurance coverage agreed upon in the insurance contract. For example, for life insurance, the subject matter is the life of a person; for vehicle insurance, the subject matter is the vehicle; for house insurance, the subject matter is the house. In addition, the subject matter in other business fields can be other objects, and this application does not make specific restrictions on this.
[0039] (2) Business data: data related to the computing service and / or rule verification service of the subject matter. Among them, one business data may include one or more subject matters, that is, it contains one or more subject matter data. It can be understood that the business data in this application can also be referred to as business files, business data files, etc. For example, in the insurance business field, business data can be referred to as insurance policies, insurance policy data, insurance policy files, etc. As an example, the business data is a fleet insurance policy, and the fleet insurance policy contains multiple vehicle information, and one vehicle information is a subject matter data.
[0040] (3) Sharding: refers to dividing a database or batch data into different parts, each part is a shard, and each shard contains a corresponding amount of data (such as subject matter data). For example, for the underwriting rule verification of a fleet insurance policy containing 100,000 vehicles, the vehicle records of this policy can be divided into multiple shards, each of which contains a corresponding number of vehicle records, such as 1,000, 2,000 or 4,000. Specifically, in the above insurance policy containing 100,000 vehicles, if each shard contains 2,000 vehicle information, then there will be a total of 50 shards.
[0041] Optionally, the business processing method provided by the present application can be applied to business fields involving large data processing such as insurance business and financial business, but is not limited thereto. In the following embodiments, the business processing method of the present application is mainly described by taking the insurance business field as an example.
[0042] Reference Figure 1 A schematic diagram of a framework of a business data scenario is shown, in which a business end 10 can transmit business data to a server end 20, and the server end 20 performs calculation rule services on the business data, namely, calculation services and / or rule verification services.
[0043] For the convenience of description, the "computing rule service" in this application generally refers to the two service forms of computing service and rule verification service. In actual business scenarios, computing service and rule verification service can operate independently or be integrated into the same service, and this embodiment of the application does not specifically limit this.
[0044] As an example, in the insurance business, Figure 1 The server 20 shown can perform calculation rule services on the policy data to perform tasks such as policy supplementation and policy issuance. Policy issuance refers to the process in which the insurance company, after receiving the customer's insurance application, confirms that the customer meets the insurance conditions through the underwriting process and then formally issues the insurance contract. Policy supplementation refers to the process in which the insurance company will reissue a policy with exactly the same content based on the content of the original contract for an insurance contract that has been signed and is in effect, if the original policy is lost, damaged, in doubt, or a new copy of the policy is required for other reasons.
[0045] In addition, the service end 10 is used to provide requested service data such as policy data. Figure 1Only one business terminal 10 is shown, but in actual application, the number of business terminals 10 can be multiple. As an example, in the insurance business field, the business terminal 10 can be an electronic device of an insurance company under different sales channels, such as direct sales channels, bank insurance channels, Internet of Things channels, etc. Specifically, the electronic devices applicable to the business terminal 10 include but are not limited to desktop computers, portable computers, PDAs, mobile phones, tablet computers, etc., and this application does not limit this.
[0046] In some embodiments, a business processing system may be deployed in the server 20, and the system may be used to execute calculation rule services for business data.
[0047] Reference Figure 2 , which is a schematic diagram of the architecture of the business processing system provided by the embodiment of the present application. Specifically, the business processing system 20A deployed on the server 20 provides a calculation rule service through a pre-processing engine 21 and a calculation rule engine 22.
[0048] The pre-processing engine 21 is used to allocate software resources and hardware resources for the requested business data. The software resources can be the number of shards for parallel processing of the target data at the software level, and the number of threads for parallel processing of the target data (i.e., the number of concurrent threads). The hardware resources can be the hardware resources of the device where the pre-processing engine 21 is located and the device where the calculation rule service engine 22 is located, such as the resources of the central processing unit (CPU) or the resources of the memory such as the random access memory (RAM).
[0049] Specifically, the pre-processing engine 21 can load the requested business data, slice the subject data in the business data, and send each slice to the calculation rule engine 22 through multiple threads concurrently. Then, the calculation rule engine 22 uses multiple threads to process the subject data in multiple slices in parallel, and then sends the processing results of each subject data to the pre-processing engine 21 for merging processing.
[0050] For example, for insurance policy data (i.e., business data) containing 100,000 vehicles, the pre-processing engine 21 first divides the insurance policy data into 50 slices, each containing 2,000 pieces of vehicle information, and then sends these slices to the calculation rule engine 22 through multiple threads to execute the rule verification task in parallel. In addition, after receiving the processing results of each subject matter data returned by the calculation rule engine 22, the pre-processing engine 21 will merge these results and finally return the processed data to the subsequent processing flow, such as returning the insurance policy supplement or insurance policy issuance results to the business terminal 10.
[0051] However, in the above background technology, traditional computing rule services usually use a static business processing strategy to process different business data. Specifically, the static business processing strategy uses fixed software resources and hardware resources to process business data, such as using fixed software-level parameters such as the number of shards and the number of threads, and hardware resources indicated by fixed hardware configuration parameters to process each object data in the business data in parallel.
[0052] Specifically, in the above-mentioned scenarios of supplementary recording and policy issuance, since the policies come from multiple channels and cover different product lines, the complexity of their calculation and rule verification varies. In addition, the number of insured objects on each policy is also different. For example, in fleet insurance, some policies may only involve hundreds of vehicles, while others may include thousands, tens of thousands, or even hundreds of thousands of vehicles. Similarly, in group credit insurance, the number of people insured on the policy may range from thousands to tens of thousands, or even up to one million. However, the differences and uncertainties in the number of objects and the complexity of calculation and rule verification in different policy data make the processing efficiency and resource allocation of traditional calculation rule services unreasonable. Then, on the one hand, due to unreasonable software parameter settings such as the number of shards of traditional calculation rule services or insufficient hardware resources, it may be impossible to complete the supplementary recording and issuance tasks within the scheduled time, resulting in low processing efficiency. On the other hand, in order to meet the processing speed, traditional calculation rule services need to configure hardware resources in advance according to the maximum estimated value, which may cause resource waste.
[0053] In other words, traditional calculation rule services cannot adjust relevant parameters based on factors such as the number of insured objects on the policy and the complexity of the calculation or rule verification, such as the number of threads and shards at the software level and CPU parameters at the hardware level. Instead, they mechanically apply a unified processing strategy, ignoring changes in the actual business processing needs, resulting in low processing efficiency and unreasonable resource allocation.
[0054] In order to solve the above problems, the embodiment of the present application provides a business processing method. For business data containing more subject matters, in the process of data processing of business data to execute computing rule services, the relevant parameters of computing rule services can be optimized in real time to improve the processing efficiency and resource utilization of computing rule services. Specifically, the method can dynamically adjust some dynamic parameters that affect the processing efficiency and response time of computing rule services, such as the number of shards for parallel processing of subject matter data, the number of threads for parallel processing of subject matter data, and the hardware configuration parameters for parallel processing of subject matter data. In this way, while ensuring that the computing rule service has a high processing efficiency, the economical and efficient use of hardware resources is achieved.
[0055] In some embodiments, the above-mentioned dynamic parameters, which may also be referred to as first-category parameters, refer to adjustable parameters among the parameters that affect the processing efficiency of the calculation rule service.
[0056] Correspondingly, static parameters, also called second-class parameters, refer to parameters that cannot be adjusted among the parameters that affect the processing efficiency of the calculation rule service. For example, the above static data may include the number of subject matters corresponding to the business data and the complexity of the calculation rules.
[0057] Among them, the parameter screening process of dynamic parameters and static parameters related to the calculation rule service in this application, as well as the parameter adjustment process of dynamic parameters will be described below and will not be described in detail here.
[0058] In some embodiments, reference Figure 3 , a business processing system provided by this application is described. Figure 3 As shown, the business processing system 20B includes not only a pre-processing engine 21 and a calculation rule engine 22 , but also a configuration center 23 and a monitoring center 24 .
[0059] in, Figure 3 The business processing system 20B shown is Figure 2 Compared with the business processing system 20A in the embodiment, the main difference is that the dynamic parameters affecting the processing efficiency of the calculation rule service in the business processing system 20B are dynamically adjusted.
[0060] Specifically, the configuration center 23 is used to store parameters related to the computing rule service, such as dynamic parameters such as the number of shards, the number of threads, and hardware configuration parameters. Accordingly, the pre-processing engine 21 can interact with the configuration center 23 to obtain the corresponding dynamic parameters, and based on these dynamic parameters, request the computing rule engine 22 to provide computing rule services for business data.
[0061] In addition, the monitoring center 24 is used to provide monitoring and optimization services, specifically to monitor the average response speed (such as average response time) of the calculation rule service within a certain period of time, and to dynamically adjust the values of dynamic parameters related to the calculation rule service, thereby ensuring the efficient operation of the calculation rule service and the rational use of resources.
[0062] Next, continue to refer to Figure 3 The hardware related to the business processing system 20B is described in detail. Figure 3 As shown, the pre-processing engine 21 and the configuration center 23 in the above-mentioned business processing system 20B can be set in the server A, the calculation rule engine 22 can be set on the server B, and the monitoring center 24 can be set on the server C.
[0063] Optionally, the above-mentioned servers A, B, and C can be implemented by at least one of a hardware server, a cloud server, and a serverless device. It can be understood that the present application can adjust the hardware resources of each server, that is, adjust the hardware configuration parameters of each server, by calling the application programming interface (API) provided by the servers A, B, and C. For example, the above-mentioned hardware configuration parameters may include CPU parameters and RAM parameters. Among them, the CPU parameter may be, for example, the number of cores of the CPU, that is, the number of cores or cores contained in the CPU, such as the number of cores being 0.5, 1, or 2. The RAM parameter may be, for example, the memory capacity, such as the size of the memory, such as 0.5GB, 1GB, 2GB, etc.
[0064] In some embodiments, the above-mentioned hardware server or cloud server can be implemented by a server in a kubernetes cluster (i.e., a K8S cluster), and can be implemented specifically by one or more Pods in a kubernetes cluster. Among them, kubernetes is an open source container cluster management system, and Pod is a unit of a host container in K8S, and one or more containers can be run in a Pod. Among them, a microservice, such as a service provided by the pre-processing engine 21 (i.e., a pre-processing service), is packaged into a docker image (a mirror file), and after being released to the K8S cluster, the docker image is started to become a docker container running in a Pod instance. Correspondingly, if a container is configured to run only in one Pod, then if multiple containers are to be started, multiple Pods will run.
[0065] It can be understood that the application adjusts the hardware configuration parameters of the server in the K8S cluster, which refers to adjusting the parameters of the Pod in the K8S cluster, such as adjusting the CPU parameters and RAM parameters of the Pod. In other words, the application can call the API provided by the K8S cluster to adjust the CPU parameters and RAM parameters of the Pod.
[0066] In some embodiments, the allocation of CPU and memory (such as RAM) resources to Pods in a K8S cluster typically includes resource requests and resource limits. Resource requests are the minimum amount of resources that a Pod is guaranteed to obtain, while resource limits are the maximum amount of resources that a Pod can use. CPU settings for Pods are typically expressed in cores or millicores. 1 core equals 1000 millicores. RAM settings for Pods are typically expressed in Mi or Gi, where Mi is MB and Gi is GB.
[0067] As an example, the resource request "requests" for the Pod in this application is: 1 core of CPU and 0.5 GB of RAM. The resource limit "limits" for the Pod is 2 cores of CPU and 4 GB of RAM. In actual applications, for the Pod, both resource request and resource limit parameters will be set. To simplify the explanation, only one set of CPU and RAM settings is used as the hardware configuration parameters of the Pod in this application. In addition, core and GB are used in the application to represent the configuration parameters of CPU and RAM, respectively.
[0068] In some embodiments, the server A where the pre-processing engine 21 is located can be implemented by a server in the K8S cluster, such as by one or more Pods. At this time, the hardware configuration parameters of the pre-processing engine 21 may include the CPU parameters and RAM parameters of the Pod where it is located, such as the CPU parameter is 1 core and the RAM parameter is 0.5 GB.
[0069] In addition, in some embodiments, the configuration center 23 and the monitoring center 24 can also be implemented through the Pod in the K8S cluster. In addition, the pre-processing engine 21, the configuration center 23 and the monitoring center 24 are usually located in different Pods of the kubernetes cluster.
[0070] In some embodiments, the server B where the computing rule engine 22 is located can be implemented by a device of the serverless platform, that is, the computing rule engine 22 is a serverless device. Among them, the serverless device refers to serverless infrastructure such as Lambda (a computing model), also known as serverless architecture or serverless, which is a cloud computing model. Serverless allows developers and enterprises to focus on code development without managing or maintaining the servers and infrastructure behind it. In actual applications, the computing rule engine 22 can be called a serverless function, and the hardware configuration parameters corresponding to the computing rule engine 22 are RAM parameters.
[0071] In the parameter screening stage, the present application can first screen out the various parameters that affect the processing efficiency of the calculation rule service, and then determine the adjustable dynamic parameters from these parameters. It can be understood that the processing efficiency of the calculation rule service is mainly characterized by the response speed or response time of processing business data. The smaller the response time for processing business data, the higher the processing efficiency. It can be seen that the present application can screen out the parameters corresponding to the factors that affect the processing speed of the calculation rule service by the size of the response time for processing historical business data.
[0072] In some embodiments, the present application can manually determine dynamic parameters that affect the processing speed of the calculation rule service, for example, by manually analyzing data such as the response time of historical policy data and other business data to determine these dynamic parameters.
[0073] In other embodiments, the present application may determine the dynamic parameters that affect the processing speed of the calculation rule service through one or more machine learning models (hereinafter referred to as screening models), for example, by analyzing the response time of historical business data through multiple screening models to determine these dynamic parameters. The description of the above screening models will be described below and will not be repeated here.
[0074] In addition, during the parameter adjustment stage, the present application can predict the predicted values of each dynamic parameter screened out through one or more machine learning models (hereinafter referred to as prediction models) to improve the processing efficiency of the calculation rule service that adopts these dynamic parameters, that is, to ensure that the calculation rule service has a higher processing efficiency.
[0075] In some embodiments, a prediction model may be trained for each dynamic parameter in the present application to output the prediction value of the corresponding dynamic parameter through each prediction model. It is understood that a prediction model inputs a specific type of parameter and outputs the prediction value of the specific type of dynamic parameter. For example, for the dynamic parameter of the number of shards for parallel processing of target data, a prediction model may be trained to output the prediction value of the number of shards through the prediction model.
[0076] In other embodiments, the present application may pre-train a prediction model for multiple dynamic parameters to output predicted values of each dynamic parameter through the prediction model. The prediction model inputs different parameter types, and the output predicted values belong to different dynamic parameters.
[0077] In addition, for different business data, such as business data with different quantities of subject matter, the predicted values of the dynamic parameters output by the corresponding prediction model are usually different. The description of the above prediction model in this application will be described below and will not be repeated here.
[0078] Next, the parameter screening phase and parameter adjustment phase related to the business processing in the present application are described in detail with reference to the accompanying drawings. Optionally, the execution subject of processing business data in the parameter adjustment phase can be implemented by the various units in the business processing system 20B. The execution subject of processing business data in the parameter screening phase can be implemented by the configuration center 23 in the business processing system 20B, or can also be implemented by other servers or electronic devices different from the business processing system 20B.
[0079] Parameter screening stage
[0080] exist Figure 3 Based on the business processing system 20B shown, refer to Figure 4 The parameter screening process of the business processing provided by this application is introduced in detail. Figure 4 As shown, the parameter screening process includes the following steps:
[0081] S401: Obtain a first training data set.
[0082] In some embodiments, the first training data set includes a plurality of training data, and each training data includes: a response time corresponding to a business data and at least one corresponding first characteristic parameter.
[0083] Optionally, the first training data set can be obtained by summarizing the environment link logs and corresponding configuration data (such as hardware configuration data) of some historical business data during operation. Specifically, when deeply analyzing the characteristic parameters that affect the processing speed of the calculation rule service, a large amount of historical data related to the business data can be collected, and these historical data cover various characteristic parameters that may affect the response time of the calculation rule service.
[0084] Referring to Table 1, an example of characteristic parameters that may affect the response time of the calculation rule service is shown. For example, the characteristic parameters shown in Table 1 are at least one first characteristic parameter in the first training data set.
[0085] Table 1:
[0086]
[0087]
[0088] It can be understood that the characteristic parameters shown in Table 1 will obviously have a direct impact on the response time. For example, the larger the number of threads, the lower the response time is usually. However, the impact of some other characteristic parameters on the response time may not be so intuitive. In order to intelligently select valuable characteristic parameters that truly affect the response time from these large number of characteristic parameters, the present application can use a screening model to perform parameter screening.
[0089] Of course, the characteristic parameters of the first training data set in actual applications include but are not limited to the examples in Table 1. For example, in some embodiments, the first characteristic parameter may also include a characteristic parameter "service type of business data", which is used to characterize whether the business data request is a computing service or a rule verification service. Accordingly, the "complexity of computing rules for business data" in the first characteristic parameter may be one of the complexity of the computing service or the complexity of the rule verification actually applied to the business data.
[0090] S402: Preprocess each training data in the first training data set.
[0091] In some embodiments, the above-mentioned preprocessing includes at least one of the following: data cleaning, removal of outliers, missing value processing, removal of training data corresponding to business data with response time above the median, normalization of the number of subject matters in different business data (i.e., dimensional normalization), and classification of the complexity of the calculation rules of business data.
[0092] In some embodiments, the calculation service or rule verification service can be implemented by a formula, then the calculation rule complexity refers to the complexity of the formula. As an example, the present application can assign different classification values to the calculation rule complexity in the training data set, such as a higher complexity value of 2, a medium complexity value of 1, and a lower complexity value of 0. Specifically, during training, one hot encoding (a coding algorithm) is performed for different classification values, such as a higher complexity encoding as [1,0,0], a medium complexity encoding as [0,1,0], and a lower complexity encoding as [0,0,1].
[0093] Of course, the preprocessing of the above training data is not limited to the above examples, but can also be some other processing actions. For example, the above preprocessing also includes classifying the working time period in which the request timestamp of the business data is located. For another example, the above preprocessing also includes classifying the "service type of business data". As an example, the present application can assign different classification values to the complexity of the calculation rules in the training data set, such as assigning a value of 0 to the rule verification service and a value of 1 to the calculation service. In addition, during training, one hot encoding is performed for different classification values, such as encoding the rule verification service as [1,0] and encoding the calculation service as [0,1].
[0094] It can be understood that the purpose of preprocessing the above-mentioned first training data set is to improve the accuracy, completeness and consistency of the data, and to ensure that subsequent data analysis and model training based on the first training data set can be carried out on a high-quality data basis.
[0095] S403: Input the training data in the first training data set into the first screening model, and output at least one second characteristic parameter and a first coefficient corresponding to each second characteristic parameter.
[0096] It can be understood that the at least one second characteristic parameter mentioned above is a characteristic parameter among the at least one first characteristic parameter that has a greater impact on the response time of data processing of business data (i.e., the response time of the calculation rule service), and the larger the value of the first coefficient, the greater the impact of the second characteristic parameter corresponding to the second characteristic parameter on the response time of data processing of business data.
[0097] In some embodiments, the first screening model may be a regression model, such as a least absolute shrinkage and selection operator (Lasso) regression model. Lasso is a regularization method for a linear model. It is understood that the Lasso regression model has the ability of feature selection, and can automatically screen out feature parameters that have a significant impact on the response time during the training process, and compress the coefficients of unimportant feature parameters to near zero.
[0098] Optionally, the present application can use a cross-validation method to train and evaluate the Lasso regression model. By adjusting the weight of the Lasso penalty term, the intensity of the feature parameter selection is controlled to find the most suitable subset of feature parameters. Specifically, in the first screening model training process, Lasso regression selects feature parameters by minimizing the objective function of the sum of the residual squares and the L1 norm of the regression coefficient. Thus, after a series of training and parameter adjustment, a comprehensive and stable Lasso regression model is obtained, and a set of feature parameters (i.e., the second feature parameters) that have a significant impact on the response time are screened out.
[0099] Referring to Table 2, examples of characteristic parameters that affect the response time of the calculation rule service are shown. For example, the characteristic parameters shown in Table 2 may be the at least one second characteristic parameter mentioned above.
[0100] Table 2:
[0101]
[0102]
[0103] It can be understood that the output of the Lasso regression model is a set of coefficients (i.e., the first coefficients), each of which corresponds to a characteristic parameter in the model. These coefficients represent the degree and direction of influence of each characteristic parameter on the response variable (such as response time). Usually, the absolute value of the coefficient in the output of the Lasso regression model can be used as an indication of the relative importance of the characteristic parameter to the response time. The larger the absolute value of the coefficient, the higher the importance of the characteristic parameter in the model.
[0104] S404: Use the data corresponding to at least one second characteristic parameter in the first training data set as the second training data set.
[0105] It can be understood that since the size of the coefficients output by the Lasso regression model is also affected by the feature scale and collinearity, the order of the coefficients output by the Lasso regression model may not accurately characterize the importance of the corresponding feature parameters. Then, in order to further accurately determine the feature parameters that affect the response time, the present application can use the feature parameters identified by the Lasso regression model to construct a second training data set, and screen out the feature parameters that affect the response time based on the second training data set.
[0106] Similarly, each training data in the second training data set includes a business data, a corresponding response time and a value corresponding to at least one second characteristic parameter.
[0107] S405: Input the second training data set into the second screening model, and output at least one third characteristic parameter and a second coefficient corresponding to each third characteristic parameter.
[0108] Among them, at least one third characteristic parameter is a characteristic parameter that has a greater impact on the response time of data processing of business data among the at least one second characteristic parameter, and a larger value of the second coefficient indicates that the corresponding third characteristic parameter has a greater impact on the response time of data processing of business data. It can be understood that the type of the at least one third characteristic parameter is a subset of the at least one second characteristic parameter, and the type of the third characteristic parameter is less than or equal to the type of the second characteristic parameter.
[0109] In some embodiments, the second screening model may be a gradient optimization model, such as an improved extreme gradient boosting (XGBoost) model. Specifically, the XGBoost model may be trained using a second training data set to determine each third feature parameter and the corresponding second coefficient through the XGBoost model.
[0110] Reference Figure 5 As shown, it is an example diagram of multiple characteristic parameters and their coefficients provided in the embodiment of the present application. For example, Figure 5The characteristic parameter shown in is at least one third characteristic parameter, and the corresponding coefficient is the second coefficient.
[0111] exist Figure 5 Based on the above, referring to Table 3, examples of characteristic parameters and coefficients that affect the response time of the calculation rule service are shown. For example, the characteristic parameters shown in Table 3 may be at least one of the third characteristic parameters mentioned above.
[0112] Among them, the coefficient of each row in Table 3 indicates the importance of the relevant feature parameter, that is, the degree of influence of the feature parameter on the response time. Because the influence of the feature parameter on the target variable (response time) can be positive or negative, for example, the larger the number of subject matter, the longer the response time; and the larger the RAM number of the calculation rule engine, the shorter the response time. For simplicity, this application uniformly uses the absolute value of the coefficient to express.
[0113] Table 3:
[0114] Characteristic parameters that affect response time coefficient Number of subject matter 0.42 RAM parameters for calculating rule engines 0.23 RAM parameters of the pre-processing engine 0.15 CPU parameters of the pre-processing engine 0.07 Number of threads 0.06 Number of Shards 0.04 Calculation rule complexity 0.03
[0115] Referring to Table 3, Figure 5 The characteristic parameters of the coefficients shown are sorted from high to low as follows: the number of objects, the RAM parameters of the calculation rule engine (i.e., RAM configuration information), the RAM parameters of the pre-processing engine (i.e., RAM configuration information), the CPU parameters of the pre-processing engine (i.e., CPU configuration information), the number of threads, the number of shards, and the complexity of the calculation rules.
[0116] S406: Filter out dynamic parameters in the dynamic parameter set from at least one third characteristic parameter, and determine the priority of each dynamic parameter.
[0117] It can be understood that among the various characteristic parameters shown in Table 3, the number of subject matters and the complexity of the calculation rules are non-adjustable factors, which correspond to the actual business situation of the business data to be processed and can be used as static parameters. In addition, other characteristic parameters are adjustable parameters and can be used as dynamic parameters in the dynamic parameter set. Then, in order to take into account both performance and hardware resource costs, in actual business processing scenarios, this application can optimize the response time of the calculation rule service by dynamically adjusting the above dynamic parameters.
[0118] Optionally, the present application may adopt a hierarchical optimization strategy to hierarchically adjust the dynamic parameters in the dynamic parameter set, such as adjusting the dynamic parameters in order of priority from high to low until the response time of the calculation rule service meets the performance requirements. Specifically, since the adjustable dynamic parameters involve the software level and two hardware resources, kubernetes and serverless, and the serverless infrastructure is more economical, the present application may prioritize the dynamic parameters according to these three dimensions and implement a hierarchical optimization strategy, thereby achieving performance optimization of business processing in a more economical and effective way.
[0119] As an example, the hierarchical optimization strategy of the present application can divide multiple dynamic parameters in the dynamic parameter set into three priorities. For example, the number of shards and threads at the software level can be used as the first priority parameters, the RAM parameters of the serverless hardware can be used as the second priority parameters, and the RAM parameters and CPU parameters of the Kubernetes hardware where the front-end processing engine is located can be used as the third priority parameters.
[0120] Thus, in an actual business processing scenario, the present application can select one or more dynamic parameters from the dynamic parameter set for numerical adjustment. Moreover, for multiple dynamic parameters under the same priority, numerical adjustments can be made in order of coefficients from large to small.
[0121] Specifically, in the field of insurance business, in order to meet the specific policy situation and the expected response time of the calculation rule service, this application first adjusts the dynamic parameters at the software level. These adjustments are made based on the importance of the characteristic parameters at this level, giving priority to those dynamic parameters with higher characteristic importance. That is, for multiple dynamic parameters of the same priority, the most important dynamic parameters can be adjusted first. If the response time after these adjustments cannot meet the performance requirements, other characteristic parameters with lower importance will continue to be adjusted until all dynamic parameters are adjusted. If the performance processing requirements can be met by adjusting the dynamic parameters of one priority, there is no need to adjust the dynamic parameters of the next level.
[0122] It can be understood that when the dynamic parameters are divided into three priorities, the actual business processing process can adjust the dynamic parameters in three levels. Figure 6The figure shows a schematic diagram of the three-level adjustment in the hierarchical optimization strategy. In the process of business data processing, the first-level adjustment is first started to adjust the number of threads and shards of the front-end processing engine. If the response time after the first-level adjustment fails to meet the required performance requirements, the second-level adjustment is started, that is, the parameters of the serverless infrastructure such as the RAM parameters of the calculation rule service are adjusted. If the response time after the second-level adjustment still cannot meet the performance requirements, the third-level adjustment will be carried out, that is, the RAM parameters and CPU parameters of the Pod in the kubernetes cluster where the front-end engine is located are optimized.
[0123] In some embodiments, the present application can integrate hierarchical optimization strategies into a decision table so that these strategies can be executed during actual business operation. In the decision table, the importance of feature parameters determines their priority as tuning parameters, and the more important feature parameters are adjusted first. Such a design ensures that during the optimization process, the feature parameters that have the greatest impact on performance can be given priority, thereby more effectively achieving the goal of performance improvement.
[0124] Referring to Table 4, an example of a decision table for a hierarchical optimization strategy is shown. For example, the characteristic parameter shown in Table 4 may be the at least one third characteristic parameter mentioned above, and the corresponding coefficient is the second coefficient mentioned above.
[0125] Table 4:
[0126] Priority Dynamic parameters that affect response time coefficient 1 Number of threads 0.06 1 Number of Shards 0.04 2 RAM parameters for calculating rule engines 0.23 3 RAM parameters of the pre-processing engine 0.15 3 CPU parameters of the pre-processing engine 0.07
[0127] Among them, the dynamic parameters and coefficients in the decision table shown in Table 4 above can be dynamically changed, and can be updated according to the changes in the real-time situation of the business data operation. Then, when optimizing the dynamic parameters, the current level of dynamic parameters will be selected from Table 4 for each priority, and the importance represented by the corresponding coefficients will be sorted, and each dynamic parameter will be optimized in turn. In this way, it can be ensured that the parameter optimization work can be carried out in an orderly manner, and the characteristic parameters with the greatest impact on performance are given priority to achieve the most effective performance improvement.
[0128] It can be understood that in the hierarchical optimization strategy shown in Table 4, the order of optimizing the dynamic parameters in the dynamic parameter set can be the following first order: number of threads → number of shards → RAM parameters of the calculation rule engine → RAM parameters of the pre-processing engine → CPU parameters of the pre-processing engine. At this time, the priority of the dynamic parameter ranked first in the first order is higher than or equal to the priority of the dynamic parameter ranked later and adjacent. And, Figure 4 The number N of dynamic parameters in the dynamic parameter set is 5.
[0129] In addition, the number of priorities for the dynamic parameters divided by the hierarchical optimization strategy in the present application is not limited to the above examples and can be set according to actual needs. For example, in other embodiments, the present application can sort the dynamic parameters according to the above first order and treat each dynamic parameter as a dynamic parameter of a priority level, and in this case, there are five priorities in total.
[0130] Optionally, in some other embodiments, after executing S404, the above parameter screening stage may not execute S405. Accordingly, the characteristic parameter of the dynamic parameter set determined in S406 may be replaced by at least one third characteristic parameter with at least one second characteristic parameter. That is, the present application can screen out adjustable dynamic parameters using one screening model.
[0131] Furthermore, the present application automatically identifies the dynamic parameters that affect the response time and constructs a decision table of hierarchical optimization strategies. These strategies are designed to determine the optimal value of each dynamic parameter for different amounts of business data to achieve the tuning goal. To this end, the present application trains a prediction model for each dynamic parameter to ensure that accurate parameter configuration can be provided in a variety of business data scenarios.
[0132] S407: For each dynamic parameter in the dynamic parameter set, a corresponding prediction model is trained.
[0133] In some embodiments, the present application may obtain a training data set corresponding to each dynamic parameter, and use the corresponding training data set to train a corresponding prediction model.
[0134] In some embodiments, the method for obtaining a training data set corresponding to a dynamic parameter is similar to that of the second training data set, which is not described in detail here. As an example, a training data set corresponding to a dynamic parameter can be a subset of the above-mentioned second training data set. Specifically, a training data set corresponding to a dynamic parameter includes multiple training data, and one training data includes at least one second characteristic parameter corresponding to a business data and a corresponding response time.
[0135] It can be understood that for a prediction model of a dynamic parameter, the dynamic parameter can be trained as a target variable. Specifically, for a prediction model of a dynamic parameter, the input variables include the corresponding response time and other characteristic parameters of at least one second characteristic parameter except the dynamic parameter, and the output variable is the dynamic parameter. For example, for the dynamic parameter of the number of threads, other characteristic parameters of at least one second characteristic parameter except the dynamic parameter include: the number of subject matters, the RAM parameter of the calculation rule engine, the RAM parameter of the pre-processing engine, the CPU parameter of the pre-processing engine, the number of shards, and the complexity of the calculation rules. At this time, the response time in the input variable is specifically the response time of the calculation rule service based on the at least one second characteristic parameter in the historical data.
[0136] It can be understood that during the model training phase of the prediction model, the response time involved in the training is the response time in the historical data set. When the trained model is used for prediction later, the response time input into the prediction model can be the preset response time, so that the model predicts the value of the relevant dynamic parameter.
[0137] As an example, the number of threads of the pre-processing engine is taken as an example to explain the input variables and output variables of the prediction model. Referring to Table 5, an example of the input variables and output variables of the prediction model corresponding to the number of threads is shown.
[0138] Table 5:
[0139]
[0140] It can be understood that, for the input variables and output variables of the prediction model of other dynamic parameters except the number of threads, corresponding adjustments can be made with reference to the example shown in Table 5, which will not be elaborated here.
[0141] In addition, during the training phase of a dynamic parameter prediction model, the present application can split the corresponding training data set, using 80% of the data for model training and the remaining 20% for verification and model evaluation.
[0142] Optionally, for the prediction model of each dynamic parameter, the present application can select a variety of algorithm models such as random forest and XGBoost for training to determine the model parameters of the model. In addition, for different prediction models, a combination of grid search and cross-validation can be used to effectively find its optimal model parameter combination. When setting the parameter space for the prediction model, different parameter combinations can be considered for evaluation during the grid search process. For example, for a random forest regressor, a parameter space similar to the following can be set: {"n_estimators": [100, 300, 500], "max_depth": [3, 5, 7, 9]}. Among them, the above parameter space means using 100, 300, and 500 decision trees respectively, and trying different maximum depths of 3, 5, 7, and 9 to train the model and predict, and finally output the prediction result.
[0143] In the processing of training data sets, the present application can divide the training data set corresponding to a dynamic parameter into K non-overlapping subsets, and in each iteration, select 1 subset for verification, and the other K-1 subsets for training the model. This process will be repeated K times, and each iteration uses a different subset as a test set. Through the combination of grid search and cross-validation technology, the training process can perform cross-validation evaluation on each parameter combination, and finally select the network parameter combination that performs best in cross-validation.
[0144] Optionally, the present application may select R2 as the model performance evaluation index, and select the model with the highest R2 value as the final prediction model for each dynamic parameter. Similarly, the present application may train a prediction model for each dynamic parameter in the dynamic parameter set.
[0145] In addition, for the sake of convenience, the present application may use prediction models corresponding to the number of threads, the number of shards, the RAM parameters of the calculation rule engine, the RAM parameters of the pre-processing engine, and the CPU parameters of the pre-processing engine, and record these models as M1, M2, M3, M4, and M5, respectively.
[0146] In some embodiments, after training the models M1, M2, M3, M4, and M5, the present application may save these models in the configuration center 23 or other devices.
[0147] Optionally, in order to facilitate the application of each prediction model, the present application can encapsulate an independent prediction application programming interface (API) for each model, which is used to receive the corresponding input variables, and then load the corresponding model to predict the value of the parameter that needs to be adjusted in the relevant stage. For example, the API corresponding to the model can be recorded as API1, API2, API3, API4, API5. In the following embodiments, for the convenience of description, API1, API2, API3, API4, API5 can be collectively referred to as prediction API.
[0148] It can be understood that in actual business processing, the output variable of a prediction model with dynamic parameters can ensure a lower response time of the calculation rule service, that is, a higher processing efficiency.
[0149] In this way, the business processing method of the present application can train corresponding prediction models for each dynamic parameter that affects the response time of the calculation rule service. In this way, the ability to dynamically adjust each dynamic parameter through each prediction model can be realized to realize the hierarchical optimization strategy of business processing.
[0150] Parameter adjustment stage
[0151] Next, refer to Fig. 7A The business processing method provided in the embodiment of the present application is introduced. Specifically, the execution subject of the business processing method can be Figure 3 The units in the business processing system 20B are shown. In addition, the system can perform business processing according to the hierarchical optimization strategy through each prediction model trained in the parameter screening stage.
[0152] like Fig. 7A As shown, the method flow includes the following steps:
[0153] S701: The pre-processing engine 21 loads the business data to be processed.
[0154] It can be understood that the business data to be processed may include multiple subject matter data.
[0155] In some embodiments, the present application may pre-process some of the data to be processed, such as dimensional normalization of the number of subject matters, and one-hot encoding of the service type and complexity of the calculation rule service.
[0156] S702: The pre-processing engine 21 calls the service API in the calculation rule engine 22 to process the pending business data in the first sliding time window using the first dynamic parameter set.
[0157] That is, the calculation rule engine 22 uses the first dynamic parameter set to perform parallel processing on the subject data in the service data to be processed in the first sliding time window. It can be understood that the first dynamic parameter set is a first type of parameter set, and specifically the first dynamic parameter set can also be called a first parameter set.
[0158] In some embodiments, the value of each dynamic parameter in the unadjusted first dynamic parameter set may be a preset value, that is, the first dynamic parameter set is a default dynamic parameter set. At this time, in the processing of the current business data to be processed, the dynamic parameters in the first dynamic parameter set are not adjusted. For example, the number of shards in the first dynamic parameter set is 10, the number of threads is 4, the RAM parameter of the calculation rule engine is 8GB, the RAM parameter of the pre-processing engine is 4GB, and the CPU parameter of the pre-processing engine is 4core.
[0159] In some other embodiments, during the processing of the current service data to be processed, some dynamic parameters in the first dynamic parameter set have been adjusted, that is, the first dynamic parameter set is not a default dynamic parameter set.
[0160] As an example, the configuration center 23 stores a first dynamic parameter set, and the pre-processing engine 21 may first obtain the first dynamic parameter set from the configuration center 23 before executing S702.
[0161] In some embodiments, the calculation rule engine 22 provides a calculation rule interface API (i.e., service API), and the pre-processing engine 21 can call the API to complete the calculation rule service (i.e., calculation service or verification rule service). Specifically, the pre-processing engine 21 can use a dynamic parameter set, such as the software-level parameters in the first dynamic parameter set, as input parameters for calling the API of the calculation rule service. For example, when the business data to be processed contains 100,000 pieces of vehicle information, the pre-processing engine 21 uses the number of shards and the number of threads in the first dynamic parameter set to divide the business data to be processed into 10 pieces, that is, each piece contains 10,000 pieces of vehicle information; at the same time, 4 threads are started to call the calculation rule interface API to send the 10 pieces of the business data to be processed to the calculation rule engine 22, and then the calculation rule engine 22 processes the vehicle information in the 10 pieces in parallel.
[0162] It is understood that in order to prevent frequent dynamic adjustment of dynamic parameters related to business data for each request, a sliding time window can be set in this application, and its interval (duration) is T minutes. For example, T is 30, but not limited to this. Accordingly, the calculation rule engine 22 can execute the calculation rule service in parallel on the vehicle information in 10 shards within 30 minutes.
[0163] It should be noted that the number of shards and the number of threads in the dynamic parameters adjusted in this application are parameters applied on the front-end processing engine side, that is, the front-end processing engine uses the number of shards to shard the business data, and uses the threads corresponding to the number of threads to send the shards of the business data to the calculation rule engine. The number of threads for the calculation rule engine 22 to process business data in parallel can be controlled autonomously by the serverless device.
[0164] In some embodiments, the pre-processing engine 21 and the calculation rule engine 22 may process the target object data in the business data in a streaming processing mode.
[0165] For example, in the streaming processing mode, for the subject data in the business data to be processed, the pre-processing engine 21 can continuously send the data stream to be processed to the calculation rule engine. Correspondingly, the calculation rule engine starts processing immediately after receiving the data, and returns the processing results to the pre-processing engine in real time or near real time after completing the calculation of each data unit or data block. At this time, in the above S702, the pre-processing engine 21 can send the subject data in each fragment of the data to be processed to the calculation rule engine 22 in real time, and receive the processing results of each subject data returned by the calculation rule engine 22 in real time.
[0166] For example, in batch processing mode, for the subject data in the business data to be processed, the pre-processing engine will collect these data within a time window, and then send this batch of data to the calculation rule engine at one time. The calculation rule engine will not start the calculation until it receives the entire data batch, and after all calculation tasks are completed, it will return the calculation results of the entire batch to the pre-processing engine at one time. At this time, in the above S702, the pre-processing engine 21 can send all the subject data in the data to be processed to the calculation rule engine 22 in batches. Furthermore, after executing S702 until all the subject data in the data to be processed have completed the calculation rule service, the pre-processing engine 21 will receive the processing results of all the subject matters from the calculation rule engine 22 and merge these processing results.
[0167] S703: The pre-processing engine 21 calls the monitoring API in the monitoring platform 24 to monitor the first response time of data processing in the first sliding time window.
[0168] It is understandable that the monitoring platform 24 can provide an API for monitoring response time (ie, monitoring API) for returning the response time of the calculation rule service within the current sliding time window. At this time, the monitoring platform 24 can send the first response time to the front processing engine 21 through the API.
[0169] Optionally, the response time of data processing in a sliding time window in the present application, such as the first sliding time window, can be the average response time of performing calculation rule services on the target data in the sliding time window, that is, the average response time (denoted as Tavg).
[0170] S704: The pre-processing engine 21 determines whether the first response time is greater than a preset response time.
[0171] In some embodiments, the preset response time is to set an expected standard response time target. For example, if the preset response time is 1000 milliseconds (ms), the performance requirement is that the response time does not exceed 1000 ms.
[0172] If the judgment is yes, it means that the response time of the calculation rule service using the first dynamic parameter set does not meet the requirements and needs to be adjusted, and the process will enter S706; otherwise, if the judgment is no, it means that the response time of the calculation rule service using the first dynamic parameter set meets the requirements and does not need to be adjusted, and the process will enter S705. For example, if the first response time is 800ms, this response time meets expectations and no optimization adjustment is required; if the first response time is 2300 milliseconds, it exceeds expectations and parameter optimization adjustment is required.
[0173] S705: The pre-processing engine 21 calls the service API in the calculation rule engine 22 and uses the first dynamic parameter set to continue processing the business data to be processed, until all the subject data in the business data to be processed are processed.
[0174] It can be understood that the calculation rule engine 22 can use the first dynamic parameter set to complete the processing of all the subject data in the business data to be processed, and use the streaming mode or batch processing mode to return all the processing results of each subject data to the front-end processing engine 21, so that the front-end processing engine 21 can merge these processing results to complete tasks such as policy supplementation or policy issuance.
[0175] S706: The pre-processing engine 21 calls at least one prediction model in the configuration center 23 to adjust the value of at least one dynamic parameter in the first dynamic parameter set according to the priority indicated by the first order to obtain a second dynamic parameter set.
[0176] It can be understood that the second dynamic parameter set is a first type parameter set, and specifically the second dynamic parameter set can also be referred to as a second parameter set.
[0177] For example, when the number of dynamic parameters in the dynamic parameter set is N=5, the number of times the pre-processing engine 21 performs dynamic parameter adjustment in the first order is a value between 1 and 5.
[0178] The pre-processing engine 21 can call the prediction API to use the prediction model, for example, use the corresponding models M1 to M5 through API1 to API5. In addition, the pre-processing engine 21 can use the prediction models stored in the configuration center 23 through the prediction API.
[0179] Specifically, for a dynamic parameter to be optimized, the input variables of the prediction model are the values of other dynamic parameters in the dynamic parameter set before adjustment except the dynamic parameter, various static parameters (i.e. the number of objects and the complexity of calculation rules, etc.) and the preset response time, and the output variable is the predicted value of the dynamic parameter, i.e. the value of the dynamic parameter after adjustment.
[0180] It is understandable that the pre-processing engine 21 can adopt the hierarchical optimization strategy of the present application to perform primary adjustment, secondary adjustment, and tertiary adjustment operations on the first dynamic parameter set until the response time meets the performance requirements, or the three-level adjustment is completed. For example, the dynamic parameters optimized in the above S706 are the number of threads and the number of shards, or the optimized parameters are all dynamic parameters.
[0181] In some embodiments, the values of the dynamic parameters in the dynamic parameter set in the present application are adjusted on-demand. For example, after the current service data to be processed is processed using the adjusted second dynamic parameter set, the pre-processing engine 21 can release the second dynamic parameter set immediately or after a preset time (such as 2 hours), and will re-acquire the default dynamic parameter set for service processing when processing other service data subsequently.
[0182] In some embodiments, after obtaining the second dynamic parameter set by adopting the hierarchical optimization strategy, the pre-processing engine 21 can store the second dynamic parameter set in the configuration center 23 to update the default dynamic parameter set. Then, when processing other business data subsequently, the updated default dynamic parameter set will be re-acquired for business processing.
[0183] S707: The pre-processing engine 21 calls the service API in the calculation rule engine 22 to continue processing the business data to be processed using the second dynamic parameter set, until all the subject data in the business data to be processed are processed.
[0184] That is, the pre-processing engine 21 calls the calculation rule engine 22 to continue processing the service data to be processed by using the second dynamic parameter set.
[0185] In some embodiments, before executing 707, the pre-processing engine 21 may call the calculation rule engine 22 to continue processing the pending business data within the second sliding time window using the second dynamic parameter set. And, call the monitoring platform 24 to monitor the second response time of data processing within the second sliding time window. It can be understood that the second response time is less than or equal to the first response time, that is, adjusting the dynamic parameter set through the hierarchical optimization strategy can reduce the response time to improve data processing efficiency.
[0186] Similarly, after the pre-processing engine 21 completes the processing of the business data to be processed, the processing results of all the subject data in the business data to be processed may be merged.
[0187] Thus, the business processing method provided by the present application dynamically adjusts one or more dynamic parameters that affect the processing efficiency of the computing rule service, such as the number of threads and the number of shards, etc., to ensure high processing efficiency of the computing rule service while achieving economical and efficient use of hardware resources.
[0188] In some embodiments, reference Figure 7B As shown, the numerical adjustment process of the parameters in the first dynamic parameter set in S706 is specifically implemented by the following steps:
[0189] S1: adjusting the value of the i-th parameter in the first dynamic parameter set according to the priority indicated by the first order to update the first dynamic parameter set.
[0190] In some embodiments, the pre-processing engine 21 in the above S1 can input the second type parameter set corresponding to the business data to be processed, the remaining parameters in the first parameter set except the i-th parameter, and the response time of data processing in the sliding time window corresponding to the i-th parameter into the i-th prediction model to output the i-th prediction value, wherein each parameter in the second type parameter set is used to indicate the content of the business data to be processed; and the i-th prediction value is used to update the numerical value of the i-th parameter in the first parameter set to update the first parameter set.
[0191] S2: In the sliding time window corresponding to the i-th parameter, the updated first parameter set is used to perform data processing on the service data to be processed.
[0192] At this time, the value of the i-th parameter in the updated first parameter set has been updated.
[0193] S3: If the response time of data processing in the sliding time window corresponding to i<N and the i-th parameter is greater than the preset response time, the value of i is increased by 1.
[0194] Furthermore, after executing S706c, S706a may be executed again, that is, the value of the (i+1)th parameter in the first parameter set is adjusted according to the priority indicated by the first order, so as to re-update the first dynamic parameter set.
[0195] S4: If the response time of data processing in the sliding time window corresponding to i≤N and corresponding to the i-th parameter is less than or equal to the preset response time, the updated first parameter set is used as the second dynamic parameter set.
[0196] S5: If the response time of data processing in the sliding time window corresponding to i=N and the i-th parameter is greater than the preset response time, the updated first dynamic parameter set is used as the second dynamic parameter set, and prompt information is output.
[0197] For example, the prompt message is "Business optimization failed".
[0198] In this way, the present application adjusts the data of each parameter in the first dynamic parameter set in order from high to low priority indicated by the first order to update the first dynamic parameter set, thereby improving the efficiency of data processing of business data by the updated dynamic parameter set.
[0199] Furthermore, the processes of the first-level adjustment, the second-level adjustment and the third-level adjustment in the hierarchical optimization strategy are described in detail. Figure 8 As shown above Fig. 7A The illustrated S706 may include the following steps:
[0200] Level 1 Adjustment Process (S801-S810)
[0201] S801: The pre-processing engine 21 calls the prediction model M1 in the configuration center 23 to adjust the value of the number of threads in the first dynamic parameter set Y1 to obtain the second dynamic parameter set Y2.
[0202] It is understandable that for the convenience of description, Figure 8 The names of parameters such as preset models, sliding time windows, and dynamic parameter sets are simplified. For example, the prediction model M1 is referred to as model M1, and the two dynamic parameter sets Y2 are referred to as sets Y2, etc. However, these are only name changes and will not affect the essence of these parameters. They will not be repeated in the following embodiments.
[0203] The first dynamic parameter set is the first dynamic parameter set, such as the default dynamic parameter set. In addition, the pre-processing engine 21 calls the model M1 by calling API1.
[0204] For the convenience of description, in the following embodiments, the number of threads, the number of shards, the RAM parameter of the calculation rule engine, the RAM parameter of the pre-processing engine, and the CPU parameter of the pre-processing engine in the dynamic parameter set can be recorded as parameters W1, W2, W3, W4, and W5, respectively. For example, the first dynamic parameter set can be recorded as {W1:4, W2:10, W3:8, W4:8, W5:4}, in which case the unit of the RAM parameter can be GB, and the unit of the CPU parameter can be core.
[0205] As an example, in S801, the input variables of the prediction model M1 may include: the number of objects of the business data to be processed, such as 100,000, the complexity of the calculation rules, such as 2, the preset response time, such as 1000ms, and the number of shards in the first dynamic parameter set, the RAM parameter of the calculation rule engine, the RAM parameter of the pre-processing engine, and the CPU parameter of the pre-processing engine. The output variable of the model M1 is the predicted value of the number of threads, such as 6. At this time, the value of the number of threads in the first dynamic parameter set is replaced with 6, and the second dynamic parameter set {W1: 6, W2: 10, W3: 8, W4: 8, W5: 4} is obtained.
[0206] S802: The pre-processing engine 21 calls the service API in the calculation rule engine 22 to continue processing the pending business data using the second dynamic parameter set Y2 within the first sliding time window S1.
[0207] It can be understood that the number of threads is the first parameter in the first dynamic parameter set (ie, the first dynamic parameter set Y1), and the corresponding first sliding time window S1 is the sliding time window corresponding to the first parameter.
[0208] S803: The pre-processing engine 21 calls the monitoring API in the monitoring platform 24 to monitor the first response time t1 of data processing in the first sliding time window S1.
[0209] S804: The pre-processing engine 21 determines whether the first response time t1 is greater than a preset response time.
[0210] If the first response time t1 is 1700ms, it is determined to be yes, and the process goes to S806 to continue the first-level adjustment process; if the first response time t1 is 800ms, it is determined to be no, indicating that the current adjusted response time has met the performance requirements, and the process goes to S805.
[0211] S805: The pre-processing engine 21 calls the service API in the calculation rule engine 22 and uses the second dynamic parameter set Y2 to continue processing the pending business data.
[0212] Similarly, this continues until the pending business data is processed.
[0213] At this time, the second dynamic parameter set Y2 may be the above-mentioned second dynamic parameter set, and the first sliding time window may be the above-mentioned second sliding time window.
[0214] S806: The pre-processing engine 21 calls the prediction model M2 in the configuration center 23 to adjust the value of the number of shards in the second dynamic parameter set Y2 to obtain the third dynamic parameter set Y3.
[0215] It can be understood that the number of shards is the second parameter in the updated first dynamic parameter set (ie, the second dynamic parameter set Y2), and the corresponding second sliding time window S2 is the sliding time window corresponding to the second parameter.
[0216] The pre-processing engine 21 calls the model M2 by calling API2.
[0217] As an example, in S806, the input variables of the prediction model M2 may include: the number of subject matters of the business data to be processed, such as 100,000, the complexity of the calculation rules, such as 2, the preset response time, such as 1000ms, and the number of threads in the second dynamic parameter set, the RAM parameter of the calculation rule engine, the RAM parameter of the pre-processing engine, and the CPU parameter of the pre-processing engine, and the output variable of the model M2 is the predicted value of the number of shards, such as 15. At this time, the adjusted third dynamic parameter set can be {W1: 6, W2: 15, W3: 8, W4: 8, W5: 4}.
[0218] S807: The pre-processing engine 21 calls the service API in the calculation rule engine 22 to continue processing the pending business data using the third dynamic parameter set Y3 within the second sliding time window S2.
[0219] S808: The pre-processing engine 21 calls the monitoring API in the monitoring platform 24 to monitor the second response time t2 of data processing in the second sliding time window S2.
[0220] S809: The pre-processing engine 21 determines whether the second response time t2 is greater than a preset response time.
[0221] If the second response time t2 is 1300ms, it is judged as yes and enters S811 to continue the secondary adjustment process; if the second response time t2 is 800ms, it is judged as no, indicating that the response time after the first-level adjustment meets the performance requirements and there is no need to enter the second-level adjustment process, and enters S810.
[0222] S810: The pre-processing engine 21 calls the service API in the calculation rule engine 22 and uses the third dynamic parameter set Y3 to continue processing the pending business data.
[0223] This continues until the process is complete.
[0224] At this time, the third dynamic parameter set Y3 may be the above-mentioned second dynamic parameter set, and the second sliding time window S2 may be the above-mentioned second sliding time window.
[0225] Secondary adjustment process (S811-S815)
[0226] S811: The pre-processing engine 21 calls the prediction model M3 in the configuration center 23 to adjust the values of the RAM parameters of the calculation rule engine in the third dynamic parameter set Y3 to obtain the fourth dynamic parameter set Y4.
[0227] It can be understood that the RAM parameter of the calculation rule engine is the third parameter in the updated first dynamic parameter set (ie, the third dynamic parameter set Y3), and the corresponding third sliding time window S3 is the sliding time window corresponding to the third parameter.
[0228] The pre-processing engine 21 calls the model M3 by calling API3.
[0229] As an example, in S811, the input variables of the prediction model M3 may include: the number of subject matters of the business data to be processed, such as 100,000, the complexity of the calculation rule, such as 2, the preset response time, such as 1000ms, and the number of threads, the number of shards, the RAM parameter of the pre-processing engine, and the CPU parameter of the pre-processing engine in the third dynamic parameter set, and the output variable of the model M3 is the predicted value of the RAM parameter of the calculation rule engine, such as 12. For example, the adjusted fourth dynamic parameter set may be {W1:6, W2:15, W3:12, W4:8, W5:4}.
[0230] S812: The pre-processing engine 21 calls the secondary device interface (ie, the secondary device API) and uses the fourth dynamic parameter set Y4 to adjust the RAM configuration of the device where the calculation rule engine is located.
[0231] The secondary device interface may be an interface such as an API of a software development kit (SDK) provided by the serverless device where the computing rule engine is located. That is, the present application dynamically adjusts the memory configuration of the serverless device through the SDK provided by the serverless end.
[0232] S813: The pre-processing engine 21 calls the service API in the calculation rule engine 22 to continue processing the pending business data using the fourth dynamic parameter set Y4 within the third sliding time window S3.
[0233] S814: The pre-processing engine 21 calls the monitoring platform 24 to monitor the third response time t3 of data processing in the third sliding time window S3.
[0234] S815: The pre-processing engine 21 determines whether the third response time t3 is greater than the preset response time.
[0235] If the third response time t3 is 1200ms, it is judged as yes and enters S817 to continue the three-level adjustment process; if the third response time t3 is 800ms, it is judged as no, indicating that the response time after the second-level adjustment meets the performance requirements and there is no need to enter the third-level adjustment process, and enters S816.
[0236] S816: The pre-processing engine 21 calls the service API in the calculation rule engine 22 and uses the fourth dynamic parameter set Y4 to continue processing the pending business data.
[0237] This continues until the processing is complete.
[0238] At this time, the fourth dynamic parameter set Y4 may be the second dynamic parameter set mentioned above, and the third sliding time window S3 may be the second sliding time window mentioned above.
[0239] Three-level adjustment process (S817-S829)
[0240] S817: The pre-processing engine 21 calls the prediction model M4 in the configuration center 23 to adjust the values of the RAM parameters of the pre-processing engine in the fourth dynamic parameter set Y4 to obtain the fifth dynamic parameter set Y5.
[0241] It can be understood that the RAM parameter of the pre-processing engine is the 4th parameter in the updated first dynamic parameter set (ie, the 4th dynamic parameter set Y4), and the corresponding 4th sliding time window S4 is the sliding time window corresponding to the 4th parameter.
[0242] The pre-processing engine 21 calls the model M4 by calling API4.
[0243] As an example, in S816, the input variables of the prediction model M4 may include the number of subject matters of the business data to be processed, such as 100,000, the complexity of the calculation rules, such as 2, the preset response time, such as 1000ms, and the number of threads, the number of shards, the RAM parameter of the calculation rule engine, and the CPU parameter of the pre-processing engine in the fourth dynamic parameter set, and the output variable of the model M4 is the predicted value of the RAM parameter of the pre-processing engine, such as 12. At this time, the adjusted fifth dynamic parameter set is {W1:6, W2:15, W3:12, W4:12, W5:4}.
[0244] S818: The pre-processing engine 21 calls the third-level device interface to use the fifth dynamic parameter set Y5 to adjust the RAM configuration of the device where the pre-processing engine is located.
[0245] Among them, the above-mentioned third-level device interface can be an interface of the K8S cluster where the front-end processing engine is located, such as an API.
[0246] S819: The pre-processing engine 21 calls the service API in the calculation rule engine 22 to continue processing the pending business data using the fifth dynamic parameter set Y5 within the fourth sliding time window S4.
[0247] S820: The pre-processing engine 21 calls the monitoring API in the monitoring platform 24 to monitor the 4th response time t4 of data processing in the 4th sliding time window S4.
[0248] S821: The pre-processing engine 21 determines whether the fourth response time t4 is greater than a preset response time.
[0249] If the fourth response time is 1050ms, it is determined to be yes, and the process goes to S823 to continue the three-level adjustment process; if the fourth response time is 800ms, it is determined to be no, indicating that the current adjusted response time has met the performance requirements, and the process goes to S822.
[0250] S822: The pre-processing engine 21 calls the service API in the calculation rule engine 22 and uses the fifth dynamic parameter set Y5 to continue processing the business data to be processed, and so on until the processing is completed.
[0251] At this time, the fifth dynamic parameter set Y5 may be the second dynamic parameter set mentioned above, and the fourth sliding time window S4 may be the second sliding time window mentioned above.
[0252] S823: The pre-processing engine 21 calls the prediction model M5 in the configuration center 23 to adjust the values of the CPU parameters of the pre-processing engine in the fifth dynamic parameter set Y5 to obtain the sixth dynamic parameter set Y6.
[0253] It can be understood that the CPU parameter of the pre-processing engine is the fifth parameter in the updated first dynamic parameter set (ie, the fifth dynamic parameter set Y5), and the corresponding fifth sliding time window S5 is the sliding time window corresponding to the fifth parameter.
[0254] The pre-processing engine 21 calls the model M5 by calling API5.
[0255] As an example, in S821, the input variables of the prediction model M5 may include: the number of subject matters of the business data to be processed, such as 100,000, the complexity of the calculation rule, such as 2, the preset response time, such as 1000ms, and the number of threads, the number of shards, the RAM parameter of the calculation rule engine, and the RAM parameter of the pre-processing engine in the fifth dynamic parameter set. The output variable of the model M5 is the predicted value of the CPU parameter of the pre-processing engine, such as 6 (i.e., 6 cores). For example, the adjusted sixth dynamic parameter set may be {W1: 6, W2: 15, W3: 12, W4: 12, W5: 6}.
[0256] S824: the pre-processing engine 21 calls the third-level device interface (ie, the third-level device API) and uses the sixth dynamic parameter set Y6 to adjust the CPU configuration of the device where the pre-processing engine is located.
[0257] S825: The pre-processing engine 21 calls the service API in the calculation rule engine 22 to continue processing the pending business data using the sixth dynamic parameter set Y6 within the fifth sliding time window S5.
[0258] S826: The pre-processing engine 21 calls the monitoring API in the monitoring platform 24 to monitor the fifth response time t5 of the data processing in the fifth sliding time window S5.
[0259] S827: The pre-processing engine 21 determines whether the fifth response time t5 is greater than a preset response time.
[0260] If the fifth response time t5 is 1010ms, it is judged as yes, and enter S829 to continue the three-level adjustment process; if the fifth response time t5 is 800ms, it is judged as no, indicating that the current adjusted response time has met the performance requirements, and enter S828.
[0261] S828: The pre-processing engine 21 calls the service API in the calculation rule engine 22 and uses the sixth dynamic parameter set Y6 to continue processing the business data to be processed, and so on until the processing is completed.
[0262] At this time, the sixth dynamic parameter set Y6 may be the second dynamic parameter set mentioned above, and the fifth sliding time window S5 may be the second sliding time window mentioned above.
[0263] S829: The pre-processing engine 21 calls the service API in the calculation rule engine 22 and uses the sixth dynamic parameter set Y6 to continue processing the business data to be processed, and outputs prompt information, and so on, until the processing is completed.
[0264] It can be understood that after completing the three-level adjustment, the response time under the sixth dynamic parameter set does not meet the performance requirements, indicating that the hardware upgrade corresponding to the pre-processing engine and / or the calculation rule engine has failed, or the models in the above models M1 to M5 need to re-prepare training data for model training.
[0265] In some embodiments, the device where the pre-processing engine 21 is located can display the above prompt information, such as the prompt information "Business optimization failed". In this way, relevant technicians can check and upgrade relevant hardware or models in a timely manner based on the prompt information to ensure the performance of subsequent business processing.
[0266] In this way, the business processing method provided by the present application can automatically adjust the relevant parameters of the business processing system online in real time without the need to continue parameter adjustment through manual testing, so that the performance of the calculation rule engine is better and the degree of intelligence is higher.
[0267] In some embodiments, the hardware structure of an electronic device such as a server where the business processing system provided by the present application is located is described.
[0268] Reference now Fig. 9 , shows a block diagram of an electronic device 1400 according to an embodiment of the present application. Fig. 9 An example electronic device 1400 is schematically illustrated in accordance with various embodiments. In one embodiment, the electronic device 1400 may include one or more processors 1404, a system control logic 1408 coupled to at least one of the processors 1404, a system memory 1412 coupled to the system control logic 1408, a non-volatile memory (NVM) 1416 coupled to the system control logic 1408, and a network interface 1420 coupled to the system control logic 1408.
[0269] In some embodiments, the processor 1404 may include one or more single-core or multi-core processors. In some embodiments, the processor 1404 may include any combination of a general-purpose processor and a dedicated processor (e.g., a graphics processor, an application processor, a baseband processor, etc.). In an embodiment where the electronic device 1400 uses an enhanced base station (Evolved NodeB, eNB) or a radio access network (Radio Access Network, RAN) controller, the processor 1404 may be configured to execute various compliant embodiments, for example, the embodiments shown in Figures 7 or 8.
[0270] In some embodiments, system control logic 1408 may include any suitable interface controller to provide any suitable interface to at least one of processors 1404 and / or any suitable device or component in communication with system control logic 1408 .
[0271] In some embodiments, the system control logic 1408 may include one or more memory controllers to provide an interface to the system memory 1412. The system memory 1412 may be used to load and store data and / or instructions. In some embodiments, the system memory 1412 of the electronic device 1400 may include any suitable volatile memory, such as a suitable dynamic random access memory (DRAM).
[0272] NVM / memory 1416 may include one or more tangible, non-transitory computer-readable media for storing data and / or instructions. In some embodiments, NVM / memory 1416 may include any suitable non-volatile memory such as flash memory and / or any suitable non-volatile storage device, such as a hard disk drive (HDD), a compact disc (CD) drive, and a digital versatile disc (DVD) drive.
[0273] NVM / storage 1416 may include a portion of storage resources on a device on which electronic device 1400 is installed, or it may be accessible by the device but not necessarily a portion of the device. For example, NVM / storage 1416 may be accessed over a network via network interface 1420.
[0274] In particular, system memory 1412 and NVM / storage 1416 may include, respectively, a temporary copy and a permanent copy of instructions 1424. Instructions 1424 may include instructions that, when executed by at least one of processors 1404, cause electronic device 1400 to implement the following: Figure 4 , Fig. 7A , Figure 7B , Figure 8 In some embodiments, instructions 1424, hardware, firmware, and / or software components thereof may additionally / alternatively be placed in system control logic 1408, network interface 1420, and / or processor 1404.
[0275] The network interface 1420 may include a transceiver for providing a radio interface for the electronic device 1400, thereby communicating with any other suitable device (such as a front-end module, an antenna, etc.) through one or more networks. In some embodiments, the network interface 1420 may be integrated with other components of the electronic device 1400. For example, the network interface 1420 may be integrated with at least one of the processor 1404, the system memory 1412, the NVM / storage 1416, and a firmware device (not shown) having instructions. When at least one of the processors 1404 executes the instructions, the electronic device 1400 implements the following. Figure 4 , Fig. 7A , Figure 7B , Figure 8 The method shown.
[0276] The network interface 1420 may further include any suitable hardware and / or firmware to provide a multi-input multi-output radio interface. For example, the network interface 1420 may be a network adapter, a wireless network adapter, a telephone modem and / or a wireless modem. For example, the network interface 1402 may be used to return the processing results of the business data to the business end, such as the insurance policy supplementary recording results and the insurance policy issuance results.
[0277] In one embodiment, at least one of the processors 1404 may be packaged together with logic for one or more controllers of the system control logic 1408 to form a system in package (SiP). In one embodiment, at least one of the processors 1404 may be integrated on the same die with logic for one or more controllers of the system control logic 1408 to form a system on a chip (SoC).
[0278] The electronic device 1400 may further include an input / output (I / O) device 1432. The I / O device 1432 may include a user interface to enable a user to interact with the electronic device 1400; the design of the peripheral component interface enables the peripheral components to interact with the electronic device 1400. In some embodiments, the electronic device 1400 further includes a sensor for determining at least one of an environmental condition and location information related to the electronic device 1400.
[0279] In some embodiments, the user interface may include, but is not limited to, a display (e.g., an LCD display, a touch screen display, etc.), a speaker, a microphone, one or more cameras (e.g., a still image camera and / or a video camera), a flashlight (e.g., an LED flash), and a keyboard.
[0280] In some embodiments, the peripheral component interface may include, but is not limited to, a non-volatile memory port, an audio jack, and a power interface.
[0281] In some embodiments, the sensors may include, but are not limited to, gyroscope sensors, accelerometers, proximity sensors, ambient light sensors, and positioning units. The positioning unit may also be part of or interact with the network interface 1420 to communicate with components of a positioning network (e.g., global positioning system (GPS) satellites).
[0282] In some embodiments, the present application provides a readable medium having instructions stored thereon, which, when executed on an electronic device, enables the electronic device to execute the routing service method in the present application.
[0283] The various embodiments of the mechanism disclosed in the present application can be implemented in hardware, software, firmware or a combination of these implementation methods. The embodiments of the present application can be implemented as a computer program or program code executed on a programmable system, which includes at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device and at least one output device.
[0284] Program code can be applied to input instructions to perform the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, a processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.
[0285] Program code can be implemented with high-level programming language or object-oriented programming language to communicate with the processing system. When necessary, program code can also be implemented with assembly language or machine language. In fact, the mechanism described in this application is not limited to the scope of any specific programming language. In either case, the language can be a compiled language or an interpreted language.
[0286] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, instructions may be distributed over a network or through other computer-readable media. Therefore, machine-readable media may include any mechanism for storing or transmitting information in a machine (e.g., computer) readable form, including, but not limited to, floppy disks, optical disks, optical disks, read-only memories (CD-ROMs), magneto-optical disks, read-only memories (ROMs), random access memories (RAMs), erasable programmable read-only memories (EPROMs), electrically erasable programmable read-only memories (EEPROMs), magnetic or optical cards, flash memory, or a tangible machine-readable memory for transmitting information (e.g., carrier waves, infrared signals, digital signals, etc.) using the Internet in electrical, optical, acoustic, or other forms of propagation signals. Therefore, machine-readable media include any type of machine-readable media suitable for storing or transmitting electronic instructions or information in a machine (e.g., computer) readable form.
[0287] In the accompanying drawings, some structural or method features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be required. Instead, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. In addition, the inclusion of structural or method features in a particular figure does not mean that such features are required in all embodiments, and in some embodiments, these features may not be included or may be combined with other features.
[0288] It should be noted that the units / modules mentioned in the various device embodiments of the present application are all logical units / modules. Physically, a logical unit / module can be a physical unit / module, or a part of a physical unit / module, or can be implemented as a combination of multiple physical units / modules. The physical implementation method of these logical units / modules themselves is not the most important. The combination of functions implemented by these logical units / modules is the key to solving the technical problems proposed by the present application. In addition, in order to highlight the innovative part of the present application, the above-mentioned device embodiments of the present application do not introduce units / modules that are not closely related to solving the technical problems proposed by the present application, which does not mean that there are no other units / modules in the above-mentioned device embodiments.
[0289] It should be noted that in the examples and description of this patent, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "including one" do not exclude the existence of other identical elements in the process, method, article or device including the above elements.
[0290] Although the present application has been illustrated and described with reference to certain embodiments thereof, it will be apparent to those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present application.
Claims
1. A business processing method, applied to a business processing system, characterized in that: The method comprises: Acquire business data to be processed, wherein the business data to be processed includes a plurality of subject matter data; Determining a first parameter set for performing data processing on the service data to be processed as a first parameter set, wherein parameters in the first parameter set have an impact on a response time of data processing of the service data to be processed; Within a first sliding time window, performing data processing on the to-be-processed service data based on the first parameter set; Determining that a first response time for data processing within the first sliding time window is greater than a preset response time, and adjusting a value of at least one parameter in the first parameter set to obtain a second parameter set; Based on the second parameter set, data processing is performed on the service data to be processed.
2. The method according to claim 1, characterized in that The parameters in the first parameter set include at least one of the following: The number of shards for parallel processing of the target data, the number of threads for parallel processing of the target data, and the hardware configuration parameters for parallel processing of the target data. Wherein, each slice of the target object data processed in parallel includes at least one target object data.
3. The method according to claim 2, characterized in that The parameters in the first parameter set are arranged in a first order, and, The adjusting the value of at least one parameter in the first parameter set to obtain a second parameter set includes: According to the priority indicated by the first order, the value of at least one parameter in the first parameter set is adjusted to obtain the second parameter set.
4. The method according to claim 3, characterized in that The number of parameters in the first parameter set is N, and, The step of adjusting the value of at least one parameter in the first parameter set according to the priority indicated by the first sequence to obtain the second parameter set includes: adjusting, according to the priority indicated by the first order, a value of an i-th parameter in the first parameter set to update the first parameter set; In a sliding time window corresponding to the i-th parameter, using the updated first parameter set to process the to-be-processed service data; If the response time of data processing in the sliding time window corresponding to i<N and the i-th parameter is greater than the preset response time, the value of i is added by 1.
5. The method according to claim 4, characterized in that The method further comprises: If the response time of data processing in the sliding time window corresponding to i≤N and corresponding to the i-th parameter is less than or equal to the preset response time, the updated first parameter set is used as the second parameter set.
6. The method according to claim 4, characterized in that The method further comprises: If the response time of data processing in the sliding time window corresponding to i=N and corresponding to the i-th parameter is greater than the preset response time, the updated first parameter set is used as the second parameter set, and prompt information is output.
7. The method according to claim 4, characterized in that The adjusting, according to the priority indicated by the first sequence, the value of the i-th parameter in the first parameter set to update the first parameter set includes: Inputting the second parameter set corresponding to the service data to be processed, the remaining parameters in the first parameter set except the i-th parameter, and the preset response time into the i-th prediction model to output the i-th prediction value, wherein each parameter in the second parameter set is used to indicate the content of the service data to be processed; The i-th predicted value is used to update the value of the i-th parameter in the first parameter set, so as to update the first parameter set.
8. The method according to claim 7, characterized in that The parameters in the second type of parameter set include at least one of the following parameters: the number of target objects and the complexity of the calculation rules of the target object data.
9. The method according to claim 8, characterized in that The business processing system includes a pre-processing engine and a calculation rule engine, wherein: The pre-processing engine is used to perform sharding and threading on the target object data, and the calculation rule engine is used to perform calculation rule services on the target object data; and, The hardware configuration parameters include hardware configuration parameters of the pre-processing engine and hardware configuration parameters of the calculation rule engine.
10. The method according to claim 9, characterized in that The pre-processing engine is implemented by the first type of device or the second type of device, and the calculation rule engine is implemented by the first type of device or the second type of device; Wherein, the hardware configuration parameters of the first type of equipment include random access memory RAM parameters; The hardware configuration parameters of the second type of equipment include central processing unit CPU parameters and RAM parameters.
11. The method according to claim 10, characterized in that In the priorities indicated in the first order, the priority of the number of shards and the priority of the number of threads are higher than the priority of the hardware configuration parameters of the first category of devices, and the priority of the hardware configuration parameters of the first category of devices is higher than the priority of the hardware configuration parameters of the second category of devices.
12. The method according to claim 11, characterized in that The pre-processing engine is implemented by the second type of device, and the second type of device is a device in the kubernetes cluster, and, The computing rule engine is implemented by the first type of device, and the first type of device is a device of the serverless platform.
13. The method according to claim 12, characterized in that The method for determining the parameters in the first parameter set includes: Determine the parameters in the first type parameter set from at least one first characteristic parameter; The at least one first characteristic parameter includes at least one of the following: The user's geographic location, the user's device type, the user's browser type and version, the business type of the business data requested to perform data processing, the number of objects of the business data requested to perform data processing, the computational complexity and / or rule verification complexity of the object data, the number of shards for parallel processing of the object data, the number of threads for parallel processing of the object data, the CPU parameters of the pre-processing engine, the RAM parameters of the pre-processing engine, the RAM parameters of the calculation rule engine, the vendor type of the calculation rule engine, the timestamp of the business data requested to perform data processing, and the network delay parameters.
14. The method according to claim 13, characterized in that The determining of the parameters in the first type parameter set from at least one first characteristic parameter includes: Acquire a first training data set, wherein the first training data set includes a plurality of training data, and each training data includes a business data, a corresponding response time, and a corresponding value of at least one first characteristic parameter; Input the first training data set into the first screening model, and output at least one second characteristic parameter and a first coefficient corresponding to each second characteristic parameter through the first screening model, wherein the at least one second characteristic parameter includes: the number of subject matters, the complexity of the calculation rule of the subject matter data, the number of shards for parallel processing of the subject matter data, the number of threads for parallel processing of the subject matter data, the CPU parameter of the pre-processing engine, the RAM parameter of the pre-processing engine, and the RAM parameter of the calculation rule engine; the at least one second characteristic parameter is a characteristic parameter of the at least one first characteristic parameter that has a greater impact on the response time of data processing of business data, and the second characteristic parameter corresponding to the larger value of the first coefficient has a greater degree of impact on the response time of data processing of business data; Parameters in the first type parameter set are filtered out from the at least one second characteristic parameter.
15. The method according to claim 14, characterized in that The filtering out parameters in the first type parameter set from the at least one second characteristic parameter includes: using the data corresponding to the at least one second characteristic parameter in the first training data set as a second training data set; Inputting the second training data set into a second screening model, outputting at least one third characteristic parameter and a second coefficient corresponding to each of the third characteristic parameters through the second screening model, wherein the at least one third characteristic parameter is a characteristic parameter that has a greater impact on the response time of data processing of business data among the at least one second characteristic parameter, and the third characteristic parameter corresponding to the second coefficient having a larger value has a greater degree of impact on the response time of data processing of business data; Parameters in the first parameter set are screened out from the at least one third characteristic parameter, and the priority of each parameter is determined.
16. The method according to claim 14, characterized in that The method further comprises: Preprocessing each training data in the first training data set, wherein the preprocessing method includes at least one of the following methods: Data cleaning, outlier removal, missing value processing, removal of training data corresponding to business data with response time above the median, normalization of the number of subject matters in different business data, and classification of the complexity of calculation rules corresponding to different business data.
17. A business processing system, characterized in that: The system includes: a pre-processing engine, a monitoring center, and a calculation rule engine; The pre-processing engine is used to obtain the business data to be processed, wherein the business data to be processed includes a plurality of subject data; determine a first type of parameter set used for data processing of the business data to be processed as a first parameter set, wherein the parameters in the first type of parameter set have an impact on the response time of the data processing of the business data to be processed; The calculation rule engine is used to perform data processing on the to-be-processed business data based on the first parameter set within a first sliding time window; The monitoring center is used to determine a first response time for data processing within the first sliding time window; The pre-processing engine is used to determine that a first response time for data processing in the first sliding time window is greater than a preset response time, and adjust a value of at least one parameter in the first parameter set to obtain a second parameter set; The calculation rule engine is further used to perform data processing on the business data to be processed based on the second parameter set.
18. A readable medium, characterized in that The readable medium stores instructions, and when the instructions are executed on the electronic device, the electronic device executes the business processing method according to any one of claims 1 to 16.
19. An electronic device, characterized in that: include: A memory for storing instructions executed by one or more processors of an electronic device, and a processor, which is one of the processors of the electronic device, for executing the business processing method described in any one of claims 1 to 16.
Citation Information
Cited By
Rule engine dynamic optimization method and system based on real-time service requirements
CN120410303A
Rule engine dynamic optimization method and system based on real-time service requirements
CN120410303B
