Car insurance pricing model testing method and device, server and storage medium
By using real-world auto insurance policies in the production environment for testing the auto insurance pricing model, a standard model was built and premium pricing information was compared. This solved the problem that the updated auto insurance pricing model could not be accurate in the real environment, and achieved higher testing accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA PING AN PROPERTY INSURANCE CO LTD
- Filing Date
- 2022-06-28
- Publication Date
- 2026-05-01
AI Technical Summary
The existing auto insurance pricing model cannot guarantee accuracy in the actual production environment after the update because the test uses historical auto insurance policies and is conducted in a test environment, resulting in insufficient test accuracy.
By constructing a standard auto insurance pricing model and testing it using auto insurance policies in a real production environment, the premium pricing information of the standard model and the model under test is compared to improve the accuracy of the test.
To ensure the accuracy of the auto insurance pricing model under test in a real production environment, the accuracy of the test was improved by directly using auto insurance policies in a real production environment for testing.
Smart Images

Figure CN115082249B_ABST
Abstract
Description
Auto insurance pricing model testing methods, devices, servers, and storage media Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a method, apparatus, server and storage medium for testing a car insurance pricing model. Background Technology
[0002] Currently, when a user purchases car insurance, the server can calculate the premium based on the car insurance pricing model. To calculate the premium more accurately, insurance companies update the pricing model periodically. However, before launching the updated pricing model, it needs to be tested. The testing of the pricing model uses historical car insurance policies with already calculated premiums and is conducted in a test environment, which differs from the actual production environment. This makes it impossible to guarantee the accuracy of the testing, and consequently, the accuracy of the updated pricing model in the actual production environment. Therefore, improving the testing accuracy of the car insurance pricing model is a pressing issue. Summary of the Invention
[0003] This application provides a method, apparatus, server, and storage medium for testing auto insurance pricing models, aiming to improve the testing accuracy of auto insurance pricing models.
[0004] In a first aspect, embodiments of this application provide a method for testing a vehicle insurance pricing model, including:
[0005] Obtain a model test request, the model test request including model building information, the model building information including multiple model nodes and the connection relationships between each model node;
[0006] A standard auto insurance pricing model is constructed based on the code file corresponding to each model node and the connection relationship between each model node.
[0007] Obtain multiple car insurance policies;
[0008] The standard auto insurance pricing model is run to price the premium for each auto insurance policy, resulting in the first premium pricing information for each auto insurance policy.
[0009] Run the vehicle insurance pricing model under test to price the premium for each of the vehicle insurance policies, and obtain the second premium pricing information for each of the vehicle insurance policies;
[0010] The first premium pricing information is compared with the second premium pricing information to obtain the test results of the vehicle insurance pricing model under test.
[0011] Secondly, embodiments of this application also provide a vehicle insurance pricing model testing device, the vehicle insurance pricing model testing device comprising:
[0012] The acquisition module is used to acquire model test requests, which include model building information, including multiple model nodes and the connection relationships between each model node.
[0013] The model building module is used to build a standard auto insurance pricing model based on the code file corresponding to each model node and the connection relationship between each model node;
[0014] The acquisition module is also used to acquire multiple vehicle insurance policies;
[0015] The model running module is used to run the standard auto insurance pricing model to price the premium for each auto insurance policy and obtain the first premium pricing information for each auto insurance policy.
[0016] The model running module is also used to run the vehicle insurance pricing model under test to price the premium for each vehicle insurance policy and obtain the second premium pricing information for each vehicle insurance policy.
[0017] The comparison module is used to compare the first premium pricing information with the second premium pricing information to obtain the test results of the vehicle insurance pricing model under test.
[0018] Thirdly, embodiments of this application also provide a server, the server including a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, it implements the vehicle insurance pricing model testing method as described above.
[0019] Fourthly, embodiments of this application also provide a storage medium storing a computer program, wherein when the computer program is executed by a processor, it implements the vehicle insurance pricing model testing method described above.
[0020] This application provides a method, apparatus, server, and storage medium for testing a car insurance pricing model. The method constructs a standard car insurance pricing model by using the code file corresponding to each model node and the connection relationships between these nodes. Then, it retrieves multiple car insurance policies from a data platform and runs the standard model to price the premium for each policy, obtaining the first premium pricing information for each policy. Simultaneously, it runs the car insurance pricing model under test to price the premium for each policy, obtaining the second premium pricing information. Finally, it compares the first and second premium pricing information. This entire process does not require using historical car insurance policies with pre-calculated premiums; instead, it directly uses car insurance policies from the actual production environment for testing. This improves the accuracy of the car insurance pricing model under test, thereby ensuring its accuracy in the actual production environment. Attached Figure Description
[0021] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 is a schematic diagram of a scenario for implementing the vehicle insurance pricing model testing method provided in the embodiments of this application;
[0023] Figure 2 is a flowchart illustrating a vehicle insurance pricing model testing method provided in an embodiment of this application;
[0024] Figure 3 is a schematic diagram of the connection relationship between model node components in an embodiment of this application;
[0025] Figure 4 is a schematic block diagram of a vehicle insurance pricing model testing device provided in an embodiment of this application;
[0026] Figure 5 is a schematic block diagram of the structure of a server provided in an embodiment of this application.
[0027] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and the accompanying drawings. Detailed Implementation
[0028] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0029] The flowchart shown in the attached diagram is for illustrative purposes only and does not necessarily include all content and operations / steps, nor does it necessarily have to be performed in the order described. For example, some operations / steps can be broken down, combined, or partially merged, so the actual execution order may change depending on the actual situation.
[0030] Currently, when a user purchases car insurance, the server can calculate the premium based on the car insurance pricing model. To calculate the premium more accurately, insurance companies update the pricing model periodically. However, before launching the updated pricing model, it needs to be tested. The testing of the pricing model uses historical car insurance policies with already calculated premiums and is conducted in a test environment, which differs from the actual production environment. This makes it impossible to guarantee the accuracy of the testing, and consequently, the accuracy of the updated pricing model in the actual production environment. Therefore, improving the testing accuracy of the car insurance pricing model is a pressing issue.
[0031] To address the aforementioned issues, this application provides a method, apparatus, server, and storage medium for testing auto insurance pricing models. The method constructs a standard auto insurance pricing model by establishing the code file corresponding to each model node and the connections between these nodes. Then, it retrieves multiple auto insurance policies from a data platform and runs the standard model to price the premium for each policy, obtaining the first premium pricing information for each policy. Simultaneously, it runs the auto insurance pricing model under test to price the premium for each policy, obtaining the second premium pricing information. Finally, it compares the first and second premium pricing information. This entire process does not require using historical auto insurance policies with pre-calculated premiums; instead, it directly uses auto insurance policies from the actual production environment for testing. This improves the accuracy of the testing of the auto insurance pricing model under test, thereby ensuring its accuracy in the actual production environment.
[0032] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0033] Please refer to Figure 1, which is a schematic diagram of a scenario for implementing the vehicle insurance pricing model testing method provided in the embodiments of this application. As shown in Figure 1, the scenario includes a terminal device 100, a server 200, and a data platform 300. The terminal device 100 is communicatively connected to the server 200, and the server 200 is communicatively connected to the data platform 300. The data platform 300 is used to store vehicle insurance policies.
[0034] In one embodiment, terminal device 100 displays a model building page, which includes a menu bar and a model building window. The menu bar includes multiple model node components. In response to a user's drag-and-drop operation on a model node component in the menu bar, the dragged model node component is displayed in the model building window. The connection relationships configured by the user for the model node components in the model building window are obtained. In response to a user's trigger operation on the test start icon in the model building page, a model test request is generated. The model test request includes model building information, which includes multiple model nodes and the connection relationships between each model node. The model test request is then sent to server 200.
[0035] After receiving the model test request sent by the terminal device 100, the server 200 constructs a standard auto insurance pricing model based on the code file corresponding to each model node and the connection relationship between each model node; it obtains multiple auto insurance policies from the data platform 300 and runs the standard auto insurance pricing model to price the premium for each auto insurance policy, obtaining the first premium pricing information for each auto insurance policy; at the same time, it runs the auto insurance pricing model under test to price the premium for each auto insurance policy, obtaining the second premium pricing information for each auto insurance policy; it compares the first premium pricing information with the second premium pricing information to obtain the test result of the auto insurance pricing model under test, and sends the test result to the terminal device 100.
[0036] Understandably, developers pre-define a standard auto insurance pricing model and break it down into multiple model nodes. For each model node, developers write one or more code files, and for each code file, they write corresponding model node components. That is, a model node can have different code files, and different code files correspond to different model node components. Then, a correspondence table between model nodes, model node components, and code files is established, and the server stores the correspondence table between model nodes, model node components, and code files.
[0037] The terminal device 100 may include mobile phones, tablets, laptops, desktop computers, etc. The server 200 may be a standalone server or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. The data platform 300 may consist of a single server or a server cluster.
[0038] The following will describe in detail the vehicle insurance pricing model testing method provided by the embodiments of this application, with reference to the scenario shown in Figure 1. It should be noted that the scenario in Figure 1 is only used to explain the vehicle insurance pricing model testing method provided by the embodiments of this application, but does not constitute a limitation on the application scenarios of the vehicle insurance pricing model testing method provided by the embodiments of this application.
[0039] Please refer to Figure 2, which is a flowchart illustrating a method for testing a car insurance pricing model according to an embodiment of this application. This method can be applied to a server to improve the testing accuracy of the car insurance pricing model under test.
[0040] As shown in Figure 2, the test method for the auto insurance pricing model includes steps S101 to S106.
[0041] Step S101: Obtain the model test request.
[0042] The model test request includes model building information, which includes multiple model nodes and the connections between each model node. When it is necessary to test the auto insurance pricing model to be tested, the user can configure the model building information, total number of sample tests, and set of fields to be compared, etc., of the standard auto insurance pricing model through the model building page displayed on the terminal device, and then send a model test request carrying the model building information, total number of sample tests, and set of fields to be compared to the server.
[0043] In one embodiment, the model test request includes model building information, the model test request includes model building information and the total number of sample tests, the model test request includes model building information and a set of fields to be compared, or the model test request includes model building information, the total number of sample tests, and a set of fields to be compared.
[0044] For example, the terminal device displays a model building page, which includes a menu bar and a model building window. The menu bar includes multiple model node components. In response to a user's drag-and-drop operation on a model node component in the menu bar, the dragged model node component is displayed in the model building window. The connection relationships configured by the user for the model node components in the model building window are obtained. In response to a user's trigger operation on the test start icon in the model building page, a model test request is generated. The model test request includes model building information, which includes multiple model nodes and the connection relationships between each model node. The model test request is then sent to the server.
[0045] Step S102: Construct a standard auto insurance pricing model based on the code file corresponding to each model node and the connection relationship between each model node.
[0046] The server stores a table of correspondences between model nodes, model node components, and code files. This table can be set by the user, and this embodiment does not impose any specific limitations on it.
[0047] For example, developers pre-define a standard auto insurance pricing model and break it down into multiple model nodes. For each model node, developers write one or more code files, and for each code file, developers write a corresponding model node component. That is, a model node can have different code files, and different code files correspond to different model node components. The correspondence between model nodes, model node components and code files is shown in Table 1.
[0048] Table 1
[0049]
[0050]
[0051] In one embodiment, the concatenation order of the code files corresponding to each model node is determined based on the connection relationships between each model node. The code files corresponding to each model node are then concatenated according to this concatenation order to obtain a standard auto insurance pricing model. For example, as shown in Figure 3, the connection relationships between the components selected by the user are: component A4 is connected to component C1, and component C1 is connected to component B2. Table 1 shows that model node A is connected to model node C, and model node C is connected to model node B. Therefore, code file A14 is concatenated with code file C11, and then the concatenated code file is concatenated with code file B12 to obtain the standard auto insurance pricing model.
[0052] Step S103: Obtain multiple car insurance policies.
[0053] For example, a preset number of auto insurance policies are retrieved from a data platform. The data platform is a server or server cluster that stores auto insurance policies. These policies are generated when a customer purchases auto insurance online. The preset number can be set based on actual circumstances, and this embodiment does not impose a specific limitation on it. For example, the preset number could be 500.
[0054] In one embodiment, the total number of sample tests is obtained from the model test request; then, the total number of auto insurance policies corresponding to the total number of sample tests is obtained. The total number of sample tests in the model test request is input or selected by the user on the model building page of the terminal device, and the total number of auto insurance policies corresponding to the total number of sample tests can be obtained from the data platform.
[0055] Step S104: Run the standard auto insurance pricing model to price the premium for each auto insurance policy and obtain the first premium pricing information for each auto insurance policy.
[0056] The first premium pricing information includes the first auto insurance premium of the auto insurance policy or the first premium pricing information includes the first auto insurance premium of the auto insurance policy and the first value corresponding to each comparison field in the comparison field set. Each comparison field in the comparison field set can be configured by the user on the model building page of the terminal device.
[0057] For example, the vehicle insurance application information is obtained from the vehicle insurance policy, and a standard vehicle insurance pricing model is run to process the information to obtain the first premium pricing information for the vehicle insurance policy. This vehicle insurance application information includes the vehicle price, number of seats, and claim amount.
[0058] Step S105: Run the vehicle insurance pricing model to be tested to price the premium for each vehicle insurance policy and obtain the second premium pricing information for each vehicle insurance policy.
[0059] The second premium pricing information includes the second auto insurance premium of the auto insurance policy or the second premium pricing information includes the second auto insurance premium of the auto insurance policy and the second value corresponding to each field to be compared in the set of fields to be compared.
[0060] For example, car insurance policy information is obtained from the car insurance application, and the car insurance pricing model under test is run to process the car insurance policy information to obtain the second premium pricing information of the car insurance policy. The car insurance policy information includes the vehicle price, number of seats, and claim amount in case of an accident.
[0061] In one embodiment, for each auto insurance policy, a first thread is invoked to run the auto insurance pricing model under test to price the premium for the auto insurance policy, and a second thread is invoked to run the auto insurance pricing model under test to price the premium for each auto insurance policy, thereby obtaining the first premium pricing information and the second premium pricing information for the auto insurance policy.
[0062] Step S106: Compare the first premium pricing information with the second premium pricing information to obtain the test results of the vehicle insurance pricing model to be tested.
[0063] The test results of the car insurance pricing model under test include the number of car insurance policies corresponding to the matching of the first premium pricing information and the second premium pricing information, the number of car insurance policies corresponding to the mismatch between the first premium pricing information and the second premium pricing information, and the pricing success rate of the car insurance pricing model under test. The pricing success rate is the percentage of the number of car insurance policies corresponding to the matching to the total number of car insurance policies participating in the test.
[0064] In one embodiment, for each auto insurance policy, the error between the first auto insurance premium and the second auto insurance premium is calculated; the number of auto insurance policies with an error less than or equal to a preset error threshold is determined to obtain the number of first policies; the number of auto insurance policies with an error greater than the preset error threshold is determined to obtain the number of second policies; the number of first policies is divided by the total number of auto insurance policies to obtain the pricing success rate of the auto insurance pricing model under test; the number of first policies, the number of second policies, and the pricing success rate are used as the test results of the auto insurance pricing model under test. The preset error threshold can be set based on actual conditions, and this embodiment does not specifically limit it. The error between the first and second auto insurance premiums can measure the consistency between the first and second premium pricing information, thereby accurately calculating the test results of the auto insurance pricing model under test.
[0065] For example, calculating the error between the first auto insurance premium and the second auto insurance premium may include: calculating the relative error or absolute error between the first auto insurance premium and the second auto insurance premium. Calculating the relative error between the first auto insurance premium and the second auto insurance premium may include: calculating the absolute error between the first auto insurance premium and the second auto insurance premium; dividing the absolute error between the first auto insurance premium and the second auto insurance premium by the first auto insurance premium to obtain the relative error between the first auto insurance premium and the second auto insurance premium.
[0066] In one embodiment, for each auto insurance policy, the error between the first auto insurance premium and the second auto insurance premium is calculated, and the error between the first value and the corresponding second value for each comparison field is calculated. The number of auto insurance policies for which each error is less than or equal to a preset error threshold is determined, resulting in the third number of policies. The number of auto insurance policies for which at least one error is greater than the preset error threshold is determined, resulting in the fourth number of policies. The third number of policies is divided by the total number of auto insurance policies to obtain the pricing success rate of the auto insurance pricing model under test. The third number of policies, the fourth number of policies, and the pricing success rate are used as the test results of the auto insurance pricing model under test. By using the error between the first value and the corresponding second value for each comparison field, and the error between the first auto insurance premium and the second auto insurance premium, the consistency between the first premium pricing information and the second premium pricing information can be further measured more accurately. This allows for a more accurate calculation of the test results of the auto insurance pricing model under test, improving the test accuracy of the auto insurance pricing model.
[0067] For example, the relative or absolute error between the first auto insurance premium and the second auto insurance premium is calculated; the relative or absolute error between the first value and the corresponding second value for each comparison field is calculated. Specifically, calculating the relative error between the first value and the corresponding second value for the comparison field may include: calculating the absolute error between the first value and the corresponding second value for the comparison field, and dividing the absolute error by the first value for the comparison field to obtain the relative error between the first value and the corresponding second value for the comparison field.
[0068] The vehicle insurance pricing model testing method provided in the above embodiments constructs a standard vehicle insurance pricing model through the code file corresponding to each model node and the connection relationship between each model node. Then, it obtains multiple vehicle insurance policies from the data platform and runs the standard vehicle insurance pricing model to price the premium for each vehicle insurance policy, obtaining the first premium pricing information for each vehicle insurance policy. At the same time, it runs the vehicle insurance pricing model under test to price the premium for each vehicle insurance policy, obtaining the second premium pricing information for each vehicle insurance policy. Finally, it compares the first premium pricing information with the second premium pricing information. The entire process does not require the use of historical vehicle insurance policies with calculated premiums, but directly uses vehicle insurance policies in the actual production environment for testing. This can improve the testing accuracy of the vehicle insurance pricing model under test, thereby ensuring the accuracy of the vehicle insurance pricing model under test in the actual production environment.
[0069] Please refer to Figure 4, which is a schematic block diagram of a vehicle insurance pricing model testing device provided in an embodiment of this application.
[0070] As shown in Figure 4, the auto insurance pricing model testing device 400 includes:
[0071] The acquisition module 410 is used to acquire a model test request, the model test request including model building information, the model building information including multiple model nodes and the connection relationship between each model node;
[0072] The model building module 420 is used to build a standard auto insurance pricing model based on the code file corresponding to each model node and the connection relationship between each model node.
[0073] The acquisition module 410 is also used to acquire multiple vehicle insurance policies;
[0074] The model running module 430 is used to run the standard auto insurance pricing model to price the premium for each auto insurance policy and obtain the first premium pricing information for each auto insurance policy.
[0075] The model running module is also used to run the vehicle insurance pricing model under test to price the premium for each vehicle insurance policy and obtain the second premium pricing information for each vehicle insurance policy.
[0076] The comparison module 440 is used to compare the first premium pricing information with the second premium pricing information to obtain the test results of the vehicle insurance pricing model under test.
[0077] In one embodiment, the model building module 420 is further configured to:
[0078] Based on the connection relationships between each model node, determine the concatenation order of the code files corresponding to each model node;
[0079] The code files corresponding to each model node are concatenated according to the concatenation order to obtain the standard auto insurance pricing model.
[0080] In one embodiment, the acquisition module 410 is further configured to:
[0081] Obtain the total number of sample tests from the model test request;
[0082] Obtain the total number of car insurance policies tested in the sample.
[0083] In one embodiment, the first premium pricing information includes a first auto insurance premium, and the second premium pricing information includes a second auto insurance premium. The comparison module 440 is further configured to:
[0084] For each of the aforementioned auto insurance policies, calculate the error between the first auto insurance premium and the second auto insurance premium;
[0085] The number of car insurance policies corresponding to errors less than or equal to a preset error threshold is determined to obtain the first number of policies;
[0086] The number of auto insurance policies corresponding to errors greater than the preset error threshold is determined to obtain the second number of policies;
[0087] Divide the number of the first insurance policies by the total number of car insurance policies to obtain the pricing success rate of the car insurance pricing model under test;
[0088] The number of the first policy, the number of the second policy, and the pricing success rate are used as the test results of the auto insurance pricing model under test.
[0089] In one embodiment, the model testing request further includes a set of fields to be compared, wherein the first premium pricing information includes a first auto insurance premium and a first value corresponding to each field to be compared in the set of fields to be compared, and the second premium pricing information includes a second auto insurance premium and a first value corresponding to each field to be compared in the set of fields to be compared, and the comparison module 440 is further configured to:
[0090] Calculate the error between the first vehicle insurance premium and the second vehicle insurance premium, and calculate the error between the first value and the corresponding second value for each of the fields to be compared;
[0091] The number of car insurance policies corresponding to each error being less than or equal to a preset error threshold is determined to obtain the third number of policies;
[0092] The number of auto insurance policies corresponding to at least one error greater than the preset error threshold is determined to obtain the fourth number of policies;
[0093] The pricing success rate of the test vehicle insurance pricing model is obtained by dividing the number of the third insurance policies by the total number of vehicle insurance policies.
[0094] The number of third and fourth policies and the pricing success rate are used as the test results of the auto insurance pricing model under test.
[0095] In one embodiment, the comparison module 440 is further configured to:
[0096] Calculate the relative or absolute error between the first vehicle insurance premium and the second vehicle insurance premium;
[0097] Calculate the relative error or absolute error between the first value and the corresponding second value for each of the fields to be compared.
[0098] In one embodiment, the comparison module 440 is further configured to:
[0099] Calculate the absolute error between the first auto insurance premium and the second auto insurance premium;
[0100] The relative error between the first and second vehicle insurance premiums is obtained by dividing the absolute error between the first and second vehicle insurance premiums by the first vehicle insurance premium.
[0101] It should be noted that those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the device and its modules and units described above can be referred to the corresponding processes in the aforementioned embodiments of the vehicle insurance pricing model testing method, and will not be repeated here.
[0102] The apparatus provided in the above embodiments can be implemented as a computer program that can run on the server shown in FIG5.
[0103] Please refer to Figure 5, which is a schematic block diagram of the structure of a server provided in an embodiment of this application.
[0104] As shown in Figure 5, the server includes a processor, a memory, and a network interface connected via a system bus. The memory may include storage media and internal memory.
[0105] The storage medium may store an operating system and a computer program. The computer program includes program instructions that, when executed, cause the processor to perform any vehicle insurance pricing model testing method.
[0106] The processor provides computing and control capabilities to support the operation of the entire server.
[0107] This network interface is used for network communication, such as sending assigned tasks. Those skilled in the art will understand that the structure shown in Figure 5 is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the server to which the present application is applied. A specific server may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.
[0108] It should be understood that the processor can be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among these, a general-purpose processor can be a microprocessor or any conventional processor.
[0109] In one embodiment, the processor is used to run a computer program stored in memory to perform the following steps:
[0110] Obtain a model test request, the model test request including model building information, the model building information including multiple model nodes and the connection relationships between each model node;
[0111] A standard auto insurance pricing model is constructed based on the code file corresponding to each model node and the connection relationship between each model node.
[0112] Obtain multiple car insurance policies;
[0113] The standard auto insurance pricing model is run to price the premium for each auto insurance policy, resulting in the first premium pricing information for each auto insurance policy.
[0114] Run the vehicle insurance pricing model under test to price the premium for each of the vehicle insurance policies, and obtain the second premium pricing information for each of the vehicle insurance policies;
[0115] The first premium pricing information is compared with the second premium pricing information to obtain the test results of the vehicle insurance pricing model under test.
[0116] In one embodiment, when the processor constructs a standard auto insurance pricing model based on the code file corresponding to each model node and the connection relationships between each model node, it is configured to:
[0117] Based on the connection relationships between each model node, determine the concatenation order of the code files corresponding to each model node;
[0118] The code files corresponding to each model node are concatenated according to the concatenation order to obtain the standard auto insurance pricing model.
[0119] In one embodiment, when the processor retrieves multiple auto insurance policies from the data platform, it is configured to:
[0120] Obtain the total number of sample tests from the model test request;
[0121] Obtain the total number of car insurance policies tested in the sample.
[0122] In one embodiment, the first premium pricing information includes a first auto insurance premium, and the second premium pricing information includes a second auto insurance premium. When the processor compares the first premium pricing information with the second premium pricing information to obtain the test result of the auto insurance pricing model under test, it is configured to:
[0123] For each of the aforementioned auto insurance policies, calculate the error between the first auto insurance premium and the second auto insurance premium;
[0124] The number of car insurance policies corresponding to errors less than or equal to a preset error threshold is determined to obtain the first number of policies;
[0125] The number of auto insurance policies corresponding to errors greater than the preset error threshold is determined to obtain the second number of policies;
[0126] Divide the number of the first insurance policies by the total number of car insurance policies to obtain the pricing success rate of the car insurance pricing model under test;
[0127] The number of the first policy, the number of the second policy, and the pricing success rate are used as the test results of the auto insurance pricing model under test.
[0128] In one embodiment, the model test request further includes a set of comparison fields. The first premium pricing information includes a first auto insurance premium and a first value corresponding to each comparison field in the set of comparison fields. The second premium pricing information includes a second auto insurance premium and a first value corresponding to each comparison field in the set of comparison fields. When the processor compares the first premium pricing information with the second premium pricing information to obtain the test result of the auto insurance pricing model under test, it is configured to:
[0129] Calculate the error between the first vehicle insurance premium and the second vehicle insurance premium, and calculate the error between the first value and the corresponding second value for each of the fields to be compared;
[0130] The number of car insurance policies corresponding to each error being less than or equal to a preset error threshold is determined to obtain the third number of policies;
[0131] The number of auto insurance policies corresponding to at least one error greater than the preset error threshold is determined to obtain the fourth number of policies;
[0132] The pricing success rate of the test vehicle insurance pricing model is obtained by dividing the number of the third insurance policies by the total number of vehicle insurance policies.
[0133] The number of third and fourth policies and the pricing success rate are used as the test results of the auto insurance pricing model under test.
[0134] In one embodiment, when the processor calculates the error between the first vehicle insurance premium and the second vehicle insurance premium, and calculates the error between the first value and the corresponding second value for each of the fields to be compared, it is configured to:
[0135] Calculate the relative or absolute error between the first vehicle insurance premium and the second vehicle insurance premium;
[0136] Calculate the relative error or absolute error between the first value and the corresponding second value for each of the fields to be compared.
[0137] In one embodiment, when calculating the relative error between the first auto insurance premium and the second auto insurance premium, the processor is configured to:
[0138] Calculate the absolute error between the first auto insurance premium and the second auto insurance premium;
[0139] The relative error between the first and second vehicle insurance premiums is obtained by dividing the absolute error between the first and second vehicle insurance premiums by the first vehicle insurance premium.
[0140] It should be noted that those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the server described above can be referred to the corresponding process in the aforementioned embodiment of the vehicle insurance pricing model testing method, and will not be repeated here.
[0141] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a server (which may be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of this application.
[0142] This application also provides a storage medium storing a computer program, which includes program instructions. When the program instructions are executed, the method implemented can be found in various embodiments of the vehicle insurance pricing model testing method of this application.
[0143] The storage medium can be volatile or non-volatile. It can be an internal storage unit of the server as described in the foregoing embodiments, such as the server's hard drive or memory. Alternatively, it can be an external storage device of the server, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card.
[0144] Furthermore, the storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store the operating system, applications required for at least one function, etc.; and the data storage area may store data created based on the use of blockchain nodes, etc.
[0145] The blockchain referred to in this application is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Essentially, a blockchain is a decentralized database, a chain of data blocks linked together using cryptographic methods. Each data block contains information about a batch of network transactions, used to verify the validity of the information (anti-counterfeiting) and generate the next block. A blockchain can include an underlying blockchain platform, a platform product service layer, and an application service layer.
[0146] It should be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0147] It should also be understood that the term "and / or" as used in this specification and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes such combinations. It should be noted that, herein, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0148] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments. The above descriptions are merely specific implementations of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for testing a car insurance pricing model, characterized in that, Applied to a server, the method includes: obtaining a model test request sent by a terminal device, the model test request including model construction information, the model construction information including multiple model nodes and the connection relationships between each model node; constructing a standard auto insurance pricing model based on the code file corresponding to each model node and the connection relationships between each model node; obtaining multiple auto insurance policies from the actual production environment from a data platform; calling a first thread to run the standard auto insurance pricing model to price the premium for each auto insurance policy, obtaining first premium pricing information for each auto insurance policy; simultaneously calling a second thread to run the auto insurance pricing model under test to price the premium for each auto insurance policy, obtaining second premium pricing information for each auto insurance policy; comparing the first premium pricing information with the second premium pricing information to obtain the test result of the auto insurance pricing model under test; wherein, the model test request also includes a set of fields to be compared, the first premium pricing information including the first auto insurance policy... The first premium pricing information includes a first value corresponding to each comparison field in the set of comparison fields, and the second premium pricing information includes a second auto insurance premium and a second value corresponding to each comparison field in the set of comparison fields. The comparison of the first premium pricing information with the second premium pricing information to obtain the test result of the auto insurance pricing model to be tested includes: calculating the error between the first auto insurance premium and the second auto insurance premium, and calculating the error between the first value and the corresponding second value for each comparison field; determining the number of auto insurance policies corresponding to each error being less than or equal to a preset error threshold, to obtain a third number of policies; determining the number of auto insurance policies corresponding to at least one error being greater than the preset error threshold, to obtain a fourth number of policies; dividing the third number of policies by the total number of auto insurance policies to obtain the pricing success rate of the auto insurance pricing model to be tested; and using the third number of policies, the fourth number of policies, and the pricing success rate as the test result of the auto insurance pricing model to be tested.
2. The method for testing the vehicle insurance pricing model according to claim 1, characterized in that, The step of constructing a standard auto insurance pricing model based on the code file corresponding to each model node and the connection relationship between each model node includes: determining the concatenation order of the code files corresponding to each model node according to the connection relationship between each model node; and concatenating the code files corresponding to each model node according to the concatenation order of the code files corresponding to each model node to obtain the standard auto insurance pricing model.
3. The method for testing the auto insurance pricing model according to claim 1, characterized in that, The step of obtaining multiple auto insurance policies from the actual production environment from the data platform includes: obtaining the total number of sample tests from the model test request; and obtaining the total number of auto insurance policies from the actual production environment based on the total number of sample tests from the data platform.
4. The method for testing the vehicle insurance pricing model according to claim 1, characterized in that, The first premium pricing information includes a first auto insurance premium, and the second premium pricing information includes a second auto insurance premium. The step of comparing the first premium pricing information with the second premium pricing information to obtain the test result of the auto insurance pricing model under test includes: for each auto insurance policy, calculating the error between the first auto insurance premium and the second auto insurance premium; determining the number of auto insurance policies whose error is less than or equal to a preset error threshold to obtain the first policy quantity; determining the number of auto insurance policies whose error is greater than the preset error threshold to obtain the second policy quantity; dividing the first policy quantity by the total number of auto insurance policies to obtain the pricing success rate of the auto insurance pricing model under test; and using the first policy quantity, the second policy quantity, and the pricing success rate as the test result of the auto insurance pricing model under test.
5. The method for testing the vehicle insurance pricing model according to claim 1, characterized in that, The step of calculating the error between the first vehicle insurance premium and the second vehicle insurance premium, and calculating the error between the first value and the corresponding second value of each of the comparison fields, includes: calculating the relative error or absolute error between the first vehicle insurance premium and the second vehicle insurance premium; and calculating the relative error or absolute error between the first value and the corresponding second value of each of the comparison fields.
6. The method for testing the vehicle insurance pricing model according to claim 5, characterized in that, The calculation of the relative error between the first vehicle insurance premium and the second vehicle insurance premium includes: calculating the absolute error between the first vehicle insurance premium and the second vehicle insurance premium; and dividing the absolute error between the first vehicle insurance premium and the second vehicle insurance premium by the first vehicle insurance premium to obtain the relative error between the first vehicle insurance premium and the second vehicle insurance premium.
7. A testing device for a car insurance pricing model, characterized in that, The vehicle insurance pricing model testing device, applied to a server, includes: an acquisition module for acquiring a model test request sent by a terminal device, the model test request including model construction information, the model construction information including multiple model nodes and the connection relationships between each model node; a model construction module for constructing a standard vehicle insurance pricing model based on the code file corresponding to each model node and the connection relationships between each model node; the acquisition module is also used to acquire multiple vehicle insurance policies from the actual production environment from the data platform; a model running module for calling a first thread to run the standard vehicle insurance pricing model to price the premium of each vehicle insurance policy, obtaining the first premium pricing information of each vehicle insurance policy; the model running module is also used to simultaneously call the first thread to run the vehicle insurance pricing model under test to price the premium of each vehicle insurance policy, obtaining the second premium pricing information of each vehicle insurance policy; and a comparison module for comparing the first premium pricing information with the second premium pricing information to obtain the vehicle insurance pricing model under test. The test results of the insurance pricing model; wherein, the model test request also includes a set of comparison fields, the first premium pricing information includes a first auto insurance premium and a first value corresponding to each comparison field in the set of comparison fields, the second premium pricing information includes a second auto insurance premium and a second value corresponding to each comparison field in the set of comparison fields, the comparison module is further used to: calculate the error between the first auto insurance premium and the second auto insurance premium, and calculate the error between the first value and the corresponding second value of each comparison field; determine the number of auto insurance policies corresponding to each error being less than or equal to a preset error threshold, to obtain the third number of policies; determine the number of auto insurance policies corresponding to at least one error being greater than the preset error threshold, to obtain the fourth number of policies; divide the third number of policies by the total number of auto insurance policies to obtain the pricing success rate of the auto insurance pricing model under test; and use the third number of policies, the fourth number of policies and the pricing success rate as the test results of the auto insurance pricing model under test.
8. A server, characterized in that, The server includes a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, it implements the vehicle insurance pricing model testing method as described in any one of claims 1 to 6.
9. A storage medium for computer-readable storage, characterized in that, The storage medium stores a computer program, wherein when the computer program is executed by a processor, it implements the vehicle insurance pricing model testing method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Method and device for optimizing data processing model
CN107783896A
Intelligent code splicing method based on graph visualization
CN113687821A