Data management statistics method based on dynamic open-point line segment tree and related device thereof

By managing insurance recommendation data through a dynamic open-point line segment tree structure, the problems of computing resource waste and low efficiency under big data are solved, and efficient management statistics between insurance sales prices and sales volumes are achieved.

CN119671649BActive Publication Date: 2025-10-10CHINA PING AN LIFE INSURANCE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411566638.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-05
Publication Date
2025-10-10
Estimated Expiration
2044-11-05

AI Technical Summary

Technical Problem

When making insurance recommendations in a big data environment, existing technologies lead to a waste of computing resources, low processing efficiency, and easily cause excessive pressure on the algorithm server.

Method used

A data management and statistical method based on a dynamic open-point segment tree is adopted. By obtaining task indicator data from the source database, filtering the maximum and minimum values, creating the root node of the dynamic open-point segment tree, and performing binary division layer by layer, the location information of the inserted data in the tree is identified, and the statistical results are updated.

Benefits of technology

The time complexity of data statistical analysis is reduced from O(N) to O(logN), which improves the efficiency of managing statistics between insurance sales prices and sales volumes, and significantly improves analysis efficiency, especially under the scale of big data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119671649B_ABST
    Figure CN119671649B_ABST
Patent Text Reader

Abstract

The embodiment of the application belongs to the technical field of research and development design, is applied to the data management and statistics scene under the big data scale, relates to a data management and statistics method based on a dynamic open point line segment tree and related equipment thereof, all task index data in the source database is arranged and analyzed by the dynamic open point line segment tree data structure, when secondary analysis is performed on all task index data in the source database subsequently, the arrangement and summary results of the dynamic open point line segment tree data structure can be directly used for secondary analysis, compared with direct analysis from the source database, the time complexity of query and update is reduced from O(N) to O(logN), and the analysis efficiency of subsequent secondary analysis is improved. The application can be applied to the management and statistics between insurance sales prices and sales, the insurance sales price is taken as task index data, and the sales is taken as the statistical result at different nodes, so that the statistical analysis efficiency between the insurance sales price and the sales is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of R&D and design technology, and is applied to data management and statistics scenarios under large-scale data, and in particular to a data management and statistics method based on a dynamic open-point segment tree and related equipment. Background Art

[0002] When making insurance recommendations, data analysis is required, often based on the relationship between price and sales volume. Traditionally, this approach involves encapsulating the insurance product's premium price and sales count into a two-tuple (price, count) and persisting it in a database. To query the premium price for the most sold policies within a certain premium range, one must first retrieve all the data and traverse it from beginning to end, requiring a time complexity of O(N), where N is the total amount of data.

[0003] However, with the surge in insurance business volume and the number of users, the insurance policy data generated has also surged. If the above method is still used to recommend insurance, this will lead to continuous traversal and recommendation in the big data state, resulting in a waste of computing resources. The more data there is, the lower the processing efficiency, which can easily cause excessive pressure on the algorithm server. Summary of the Invention

[0004] The purpose of the embodiments of the present application is to propose a data management statistical method based on a dynamic open-point segment tree and related equipment to solve the problem that the existing insurance recommendation method uses the above-mentioned method, which causes a waste of computing resources, and the more data, the lower the processing efficiency, which easily causes excessive pressure on the algorithm server.

[0005] In order to solve the above technical problems, the embodiment of the present application provides a data management and statistics method based on a dynamic open-point segment tree, which adopts the following technical solutions:

[0006] The data management and statistical method based on the dynamic open-point segment tree includes the following steps:

[0007] Obtaining task indicator data of all historical users in the source database, wherein the task indicator data is numerical data;

[0008] Filter out the maximum and minimum values ​​from all task indicator data;

[0009] Create and initialize a root node of a dynamic open-point line segment tree, set the minimum value as the left endpoint value of the root node, and set the maximum value as the right endpoint value of the root node;

[0010] Perform binary division layer by layer according to the left endpoint value and the right endpoint value, create multi-level child nodes of the root node, and set the left and right endpoint values ​​of all nodes in the multi-level child nodes;

[0011] Selecting task indicator data of different users in turn from all the task indicator data as current insertion data;

[0012] According to the left and right endpoint values ​​of all nodes, identifying the node position information corresponding to each of the currently inserted data at all levels of the dynamic open-point segment tree;

[0013] According to the node position information corresponding to all inserted data at all levels of the dynamic open-point segment tree, the statistical results of the multi-level child nodes of the dynamic open-point segment tree are updated to complete the management statistics of all task indicator data.

[0014] Furthermore, the step of filtering out the maximum and minimum values ​​from all task indicator data specifically includes:

[0015] Record the values ​​corresponding to all task indicator data to obtain the value recording results. When recording, repeated values ​​are recorded only once.

[0016] Comparing all the values ​​in the numerical record results in pairs;

[0017] The maximum value and the minimum value are determined based on the results of pairwise comparison of the size relationships.

[0018] Furthermore, the step of performing binary division layer by layer based on the left endpoint value and the right endpoint value, creating multi-level child nodes of the root node, and setting the left and right endpoint values ​​of all nodes in the multi-level child nodes specifically includes:

[0019] According to the preset first function: Calculate the right endpoint value of the left node of the lower layer layer by layer, where left represents the left endpoint value of the current root node, len represents the length of the numerical range between the left and right endpoint values ​​of the current root node, len=right-left+1, and right represents the right endpoint value of the current root node;

[0020] According to the preset second function: Calculate the left endpoint value of the right node of the lower layer layer by layer, where left represents the left endpoint value of the current root node, len represents the length of the numerical range between the left and right endpoint values ​​of the current root node, len=right-left+1, and right represents the right endpoint value of the current root node.

[0021] Furthermore, the step of sequentially selecting task indicator data of different users from all the task indicator data as the currently inserted data specifically includes:

[0022] According to the user distinguishing mark, task indicator data of different users is selected from the all task indicator data as current insertion data in turn.

[0023] Further, the step of identifying the node position information corresponding to the current insertion data in all levels of the dynamic open point line segment tree according to the left and right endpoint values of all nodes, specifically comprises:

[0024] Setting the left and right endpoint values of all nodes in the dynamic open point line segment tree as the numerical interval range of the corresponding node;

[0025] Judging the inclusion relation between the current insertion data and the numerical interval range of each node;

[0026] If the current insertion data is contained in the numerical interval range of the current node, the node position information corresponding to the current insertion data in the dynamic open point line segment tree contains the current node;

[0027] If the current insertion data is not contained in the numerical interval range of the current node, the node position information corresponding to the current insertion data in the dynamic open point line segment tree does not contain the current node.

[0028] Further, the step of updating the statistical result of the multi-level child nodes of the dynamic open point line segment tree according to the node position information corresponding to all insertion data in all levels of the dynamic open point line segment tree, and completing the management and statistics of all task indicator data, specifically comprises:

[0029] Initializing the data amount of the task indicator data currently statistically counted by all nodes as 0;

[0030] According to the node position information corresponding to all insertion data in all levels of the dynamic open point line segment tree, determining all nodes respectively corresponding to all insertion data in the dynamic open point line segment tree;

[0031] Each time a current node corresponding to an insertion data is identified, a preset accumulation function is executed in an iterative manner, so that the data amount of the task indicator data currently statistically counted by the current node is accumulated by 1;

[0032] Until the identification is completed, the iterative accumulation is stopped, and the data amount of the task indicator data respectively corresponding to all nodes is obtained;

[0033] According to the data amount of the task indicator data respectively corresponding to all nodes, the statistical result of the multi-level child nodes of the dynamic open point line segment tree is obtained.

[0034] Furthermore, the step of obtaining statistical results of the multi-level child nodes of the dynamic open-point segment tree according to the data volume of the task indicator data corresponding to all nodes specifically includes:

[0035] Determine whether there is a node among all the nodes whose task indicator data volume is 0;

[0036] If there is no node with a data volume of 0 task indicator data among all the nodes, the data volume of the task indicator data corresponding to all the nodes is used as the statistical result of the multi-level child nodes of the dynamic open-point segment tree;

[0037] If there are nodes with a data volume of 0 in task indicator data among all the nodes, then the nodes with a data volume of 0 in task indicator data are screened out as nodes to be deleted through a screening method, and all nodes to be deleted are deleted, and the data volume of the task indicator data corresponding to all the nodes that have not been deleted is used as the statistical result of the multi-level child nodes of the dynamic open-point segment tree.

[0038] In order to solve the above technical problems, the embodiment of the present application also provides a data management and statistics device based on a dynamic open-point segment tree, which adopts the following technical solution:

[0039] The data management and statistical device based on the dynamic open-point segment tree includes:

[0040] A task indicator data acquisition module is used to obtain the task indicator data of all historical users in the source database, wherein the task indicator data is numerical data;

[0041] Maximum and minimum value screening modules are used to screen out the maximum and minimum values ​​from all task indicator data;

[0042] A root node creation module is used to create and initialize the root node of the dynamic open-point line segment tree, and set the minimum value as the left endpoint value of the root node, and set the maximum value as the right endpoint value of the root node;

[0043] A multi-level child node creation module, configured to perform binary division layer by layer based on the left endpoint value and the right endpoint value, create multi-level child nodes of the root node, and set the left and right endpoint values ​​of all nodes in the multi-level child nodes;

[0044] A currently inserted data selection module is used to sequentially select task indicator data of different users from all the task indicator data as currently inserted data;

[0045] A node position information identification module is used to identify the node position information corresponding to each of the currently inserted data at all levels of the dynamic open-point segment tree according to the left and right endpoint values ​​of all nodes;

[0046] The statistical result update module is used to update the statistical results of the multi-level child nodes of the dynamic open-point segment tree according to the node position information corresponding to all inserted data at all levels of the dynamic open-point segment tree, and complete the management statistics of all task indicator data.

[0047] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution:

[0048] A computer device includes a memory and a processor, wherein the memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, the steps of the data management and statistical method based on the dynamic open-point segment tree are implemented.

[0049] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:

[0050] A computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the data management and statistics method based on the dynamic open-point segment tree as described above.

[0051] Compared with the prior art, the embodiments of the present application have the following beneficial effects:

[0052] The data management and statistical method based on the dynamic open-point segment tree described in the embodiment of the present application organizes and summarizes all the task indicator data in the source database through the dynamic open-point segment tree data structure, so that when all the task indicator data in the source database are subsequently subjected to secondary analysis, the organized and summarized results of the dynamic open-point segment tree data structure can be directly used for secondary analysis. Compared with directly analyzing from the source database, the time complexity of query and update is reduced from O(N) to O(logN), thereby improving the analysis efficiency of the subsequent secondary analysis. The present invention can be applied to the management statistics between insurance sales prices and sales volumes. By taking the insurance sales price as the task indicator data and the sales volume as the statistical results at different nodes, the management statistics between insurance sales prices and sales volumes can be achieved. Especially in the insurance sales scenario under large data scale, the management and statistical method disclosed by the present invention is adopted, which greatly reduces the time complexity of data statistical analysis and improves the efficiency of statistical analysis. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the solutions in this application, a brief introduction will be given below to the drawings required for use in the description of the embodiments of this application. Obviously, the drawings described below are some embodiments of this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0054] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;

[0055] Figure 2 is a flow chart of an embodiment of a data management and statistics method based on a dynamic open-point segment tree according to the present application;

[0056] Figure 3 yes Figure 2 A flowchart of a specific embodiment of step 202 is shown;

[0057] Figure 4 A schematic diagram of creating and setting the dynamic open-point segment tree is shown;

[0058] Figure 5 yes Figure 2 A flowchart of a specific embodiment of step 206 is shown;

[0059] Figure 6 yes Figure 2 A flowchart of a specific embodiment of step 207 is shown;

[0060] Figure 7 yes Figure 6 A flowchart of a specific embodiment of step 605 is shown;

[0061] Figure 8 This is a structural diagram of an embodiment of a data management and statistics device based on a dynamic open-point segment tree according to the present application;

[0062] Figure 9 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION

[0063] Unless otherwise defined, all technical and scientific terms used herein have the same meanings as commonly understood by those skilled in the art to which this application belongs. The terms used in the specification of the application are for the purpose of describing specific embodiments only and are not intended to limit this application. The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of this application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.

[0064] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0065] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.

[0066] like Figure 1 As shown, system architecture 100 may include a terminal device 101, a network 102, and a server 103. Terminal device 101 may be a laptop computer 1011, a tablet computer 1012, or a mobile phone 1013. Network 102 is a medium for providing a communication link between terminal device 101 and server 103. Network 102 may include various connection types, such as wired or wireless communication links or fiber optic cables.

[0067] The user can use the terminal device 101 to interact with the server 103 via the network 102 to receive or send messages, etc. Various communication client applications can be installed on the terminal device 101, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.

[0068] The terminal device 101 can be various electronic devices with a display screen and supporting web browsing. In addition to the laptop computer 1011, tablet computer 1012 or mobile phone 1013, the terminal device 101 can also be an e-book reader, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 (Moving Picture Experts Group Audio Layer IV) player, a laptop computer and a desktop computer, etc.

[0069] The server 103 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal device 101 .

[0070] It should be noted that the data management and statistics method based on the dynamic point-opening segment tree provided in the embodiment of the present application is generally executed by a server. Accordingly, the data management and statistics device based on the dynamic point-opening segment tree is generally set in the server.

[0071] It should be understood that Figure 1 The number of terminal devices, networks and servers in the above-mentioned embodiments is only illustrative. Any number of terminal devices, networks and servers can be provided according to the needs of implementation.

[0072] With reference to the above-mentioned embodiments, Figure 2 , a flow chart of one embodiment of the data management and statistical method based on the dynamic open-point line segment tree according to the present application is shown. The data management and statistical method based on the dynamic open-point line segment tree comprises the following steps:

[0073] Step 201, obtaining task index data of all historical users in a source database, wherein the task index data is numerical data.

[0074] In the present embodiment, the source database comprises an insurance business management database in an insurance company, the all historical users comprise users who have historically purchased insurance business, and the task index data comprises purchase fees of different insurance types.

[0075] The task index data of all historical users in the source database is obtained so as to manage, analyze and count all task index data in the source database.

[0076] Step 202, screening out a maximum value and a minimum value from all task index data.

[0077] In the present embodiment, the maximum value and the minimum value are screened out from the different insurance types, i.e. the maximum purchase fee and the minimum purchase fee are screened out from the purchase fees of different insurance types.

[0078] Step 203, creating and initializing a root node of a dynamic open-point line segment tree, and setting the minimum value as a left endpoint value of the root node and the maximum value as a right endpoint value of the root node.

[0079] The maximum purchase fee and the minimum purchase fee are screened out from the purchase fees of different insurance types, and the maximum purchase fee and the minimum purchase fee are set as endpoint values of the root node of the dynamic open-point line segment tree data structure, so as to subsequently arrange and summarize and analyze all task index data in the source database by using the dynamic open-point line segment tree data structure.

[0080] In this embodiment, a dynamic open-point line segment tree data structure is used to organize and summarize all task indicator data in the source database for analysis, so that when all task indicator data in the source database are subsequently subjected to secondary analysis, the organization and summary results of the dynamic open-point line segment tree data structure can be directly used for secondary analysis. Compared with directly analyzing from the source database, the time complexity of query and update is reduced from O(N) to O(logN), thereby improving the analysis efficiency of subsequent secondary analysis.

[0081] Step 204 , performing binary division layer by layer according to the left endpoint value and the right endpoint value, creating multiple levels of child nodes of the root node and setting the left and right endpoint values ​​of all nodes in the multiple levels of child nodes.

[0082] By performing binary search layer by layer based on the left endpoint value and the right endpoint value, creating multi-level child nodes of the root node and setting the left and right endpoint values ​​of all nodes in the multi-level child nodes, a binary search method is used for subsequent secondary analysis, query and update, which reduces the time complexity to O(logN).

[0083] Step 205 : Selecting task indicator data of different users in turn from all the task indicator data as current insertion data.

[0084] Step 206 : Identify the node position information corresponding to each of the currently inserted data at all levels of the dynamic open-point segment tree according to the left and right endpoint values ​​of all nodes.

[0085] Specifically, assume that there are 10 users, and the corresponding task indicator data are 100, 100, 200, 200, 300, 300, 300, 400, 500, and 500 respectively.

[0086] According to the maximum value obtained in step 202 is 500 and the minimum value is 100, then after executing step 203, the left and right endpoint values ​​of the root node of the dynamic open point line segment tree are 100 and 500. Subsequently, step 204 is executed to perform layer-by-layer binary division, that is, to create two child nodes in the lower layer for the root node. The left and right endpoint values ​​of the left child node are 100 and 300 respectively, and the left and right endpoint values ​​of the right child node are 301 and 500 respectively. The left child node is further binary divided layer by layer to create two child nodes of the left child node, and the right child node is further binary divided layer by layer to create two child nodes of the left child node. Continue to perform binary division layer by layer to create two child nodes of the right child node; at this time, assuming that the node identifiers of the two child nodes of the left child node are leftA and leftB respectively, and the node identifiers of the two child nodes of the right child node are rightA and rightB respectively, then the left and right endpoint values ​​of the node leftA are 100 and 200, the left and right endpoint values ​​of the node leftB are 201 and 300, the left and right endpoint values ​​of the node rightA are 301 and 400, and the left and right endpoint values ​​of the node rightB are 401 and 500.

[0087] Assuming that the currently inserted data is 400, since the left and right endpoint values ​​of the root node are 100 and 500, the left and right endpoint values ​​of the right child node are 301 and 500, and the left and right endpoint values ​​of the node rightA are 301 and 400, then the node position information corresponding to the currently inserted data at all levels of the dynamic open-point segment tree includes the root node, the right child node and the node rightA.

[0088] Step 207 , based on the node position information corresponding to all inserted data at all levels of the dynamic open-point segment tree, the statistical results of the multi-level child nodes of the dynamic open-point segment tree are updated to complete the management statistics of all task indicator data.

[0089] All the task indicator data in the source database are sorted and summarized and analyzed through a dynamic open-point segment tree data structure, so that when all the task indicator data in the source database are subsequently subjected to secondary analysis, the sorting and summary results of the dynamic open-point segment tree data structure can be directly used for secondary analysis. Compared with directly analyzing from the source database, the time complexity of query and update is reduced from O(N) to O(logN), thereby improving the analysis efficiency of subsequent secondary analysis. The present invention can be applied to the management statistics between insurance sales prices and sales volumes. By taking insurance sales prices as the task indicator data and taking sales volumes as statistical results at different nodes, management statistics between insurance sales prices and sales volumes can be achieved. In particular, in insurance sales scenarios under large data scales, the management statistics method disclosed by the present invention is adopted, which greatly reduces the time complexity of data statistical analysis and improves the efficiency of statistical analysis.

[0090] In this embodiment, all the task indicator data in the source database are sorted and summarized and analyzed through a dynamic open-point segment tree data structure, so that when all the task indicator data in the source database are subsequently subjected to secondary analysis, the sorting and summary results of the dynamic open-point segment tree data structure can be directly used for secondary analysis. Compared with directly analyzing from the source database, the time complexity of query and update is reduced from O(N) to O(logN), thereby improving the analysis efficiency of the subsequent secondary analysis. The present invention can be applied to the management statistics between insurance sales prices and sales volumes. By taking insurance sales prices as the task indicator data and taking sales volumes as statistical results at different nodes, management statistics between insurance sales prices and sales volumes can be achieved. In particular, in insurance sales scenarios under large data scales, the management statistics method disclosed by the present invention is adopted, which greatly reduces the time complexity of data statistical analysis and improves the efficiency of statistical analysis.

[0091] Continue to refer Figure 3 , Figure 3 yes Figure 2 The flowchart of a specific embodiment of step 202 shown includes the following steps:

[0092] Step 301: Record the values ​​corresponding to all task indicator data to obtain a value recording result, wherein repeated values ​​are recorded only once.

[0093] Step 302: compare all the values ​​in the numerical record results in pairs;

[0094] Step 303: Determine the maximum value and the minimum value based on the pairwise comparison results.

[0095] By determining the maximum value and the minimum value, the root node of the dynamic open-point line segment tree is subsequently created and initialized.

[0096] In this embodiment, the steps of performing binary division layer by layer based on the left endpoint value and the right endpoint value, creating multi-level child nodes of the root node, and setting the left and right endpoint values ​​of all nodes in the multi-level child nodes specifically include:

[0097] According to the preset first function: Calculate the right endpoint value of the left node of the lower layer layer by layer, where left represents the left endpoint value of the current root node, len represents the length of the numerical range between the left and right endpoint values ​​of the current root node, len=right-left+1, and right represents the right endpoint value of the current root node;

[0098] According to the preset second function: Calculate the left endpoint value of the right node of the lower layer layer by layer, where left represents the left endpoint value of the current root node, len represents the length of the numerical range between the left and right endpoint values ​​of the current root node, len=right-left+1, and right represents the right endpoint value of the current root node.

[0099] In the above formula, Indicates rounding up to an integer, "·" indicates or

[0100] In combination with the embodiment given in the above step 206, it is assumed that there are 10 users, and the corresponding task indicator data are 100, 100, 200, 200, 300, 300, 300, 400, 500, and 500 respectively.

[0101] According to the maximum value obtained in step 202, which is 500, and the minimum value is 100, after executing step 203, the left and right endpoint values ​​of the root node of the dynamic open-point line segment tree are 100 and 500.

[0102] Please refer to Figure 4 , Figure 4 The schematic diagram of the creation and setting of the dynamic open-point line segment tree corresponding to step 204 is shown. Perform layer-by-layer binary division, that is, create two child nodes in the lower layer for the root node, then the left endpoint value of the left child node is 100, and the right endpoint value is 300 calculated by the first function, the left endpoint value of the right child node is 301 calculated by the second function, and the right endpoint value is 500, the left child node is further divided layer by layer to create two child nodes of the left child node, and the right child node is further divided layer by layer to create two child nodes of the right child node; at this time, assuming that the node identifications of the two child nodes of the left child node are leftA and leftB respectively, and the node identifications of the two child nodes of the right child node are rightA and rightB respectively, then the left and right endpoint values ​​of node leftA are 100 and 200, the left and right endpoint values ​​of node leftB are 201 and 300, the left and right endpoint values ​​of node rightA are 301 and 400, and the left and right endpoint values ​​of node rightB are 401 and 500.

[0103] In this embodiment, the step of selecting task indicator data of different users in turn from all the task indicator data as the current insertion data specifically includes: selecting task indicator data of different users in turn from all the task indicator data as the current insertion data according to user identification identifiers.

[0104] Specifically, the user identification includes the user's unique identity, or the insurance policy number identification corresponding to each user.

[0105] Continue to refer Figure 5 , Figure 5 yes Figure 2 The flowchart of a specific embodiment of step 206 includes the following steps:

[0106] Step 501: setting the left and right endpoint values ​​of all nodes in the dynamic open-point line segment tree to the numerical range of the corresponding nodes;

[0107] Step 502: determine whether the currently inserted data is included in the value range of each node;

[0108] Step 503: If the currently inserted data is included in the value range of the current node, the node position information corresponding to the currently inserted data in the dynamic open-point segment tree includes the current node;

[0109] Step 504: If the currently inserted data is not included in the value range of the current node, the node position information corresponding to the currently inserted data in the dynamic open-point segment tree does not include the current node.

[0110] By determining the inclusion relationship between the currently inserted data and the numerical range of each node, the nodes to which all task indicator data belong in the dynamic open-point segment tree are identified, so as to facilitate the creation of the dynamic open-point segment tree.

[0111] Continue to refer Figure 6 , Figure 6 yes Figure 2 The flowchart of a specific embodiment of step 207 shown includes the following steps:

[0112] Step 601: Initialize the amount of task indicator data currently counted by all nodes to 0;

[0113] Step 602: determining all nodes corresponding to all inserted data in the dynamic point-initiated line segment tree according to the node position information corresponding to all inserted data in all levels of the dynamic point-initiated line segment tree;

[0114] Step 603: Whenever a piece of inserted data corresponding to the current node is identified, a preset accumulation function is executed in an iterative manner so that the amount of task indicator data currently counted for the current node is accumulated by 1;

[0115] Step 604: until the identification is completed, stop iterative accumulation to obtain the data volume of the task indicator data corresponding to all nodes;

[0116] Step 605 : Obtain statistical results of the multi-level child nodes of the dynamic open-point segment tree according to the data volume of the task indicator data corresponding to all nodes.

[0117] Continuing with the embodiment given in combination with the above step 206, assume that there are 10 users, and the corresponding task indicator data are 100, 100, 200, 200, 300, 300, 300, 400, 500, 500 respectively.

[0118] According to the maximum value obtained in step 202, it is 500 and the minimum value is 100. After executing step 203, the left and right endpoint values ​​of the root node of the dynamic open point segment tree are 100 and 500. Figure 4 It can be seen that the dynamic open-point line segment tree contains three levels. The first level is the root node, the nodes in the second level are the left child node and the right child node from left to right, and the nodes in the third level are leftA, leftB, rightA and rightB from left to right.

[0119] After executing steps 601 to 605, it can be obtained that the data volume of the task indicator data corresponding to the root node is 10, that is, the task indicator data corresponding to the above 10 users are all in the range of 100 to 500; the data volume of the task indicator data corresponding to the left child node is 7, that is, there are 7 users among the above 10 users whose corresponding task indicator data are in the range of 100 to 300; the data volume of the task indicator data corresponding to the right child node is 3, that is, there are 3 users among the above 10 users whose corresponding task indicator data are in the range of 301 to 500; similarly, the data volume of the task indicator data corresponding to leftA is 4, the data volume of the task indicator data corresponding to leftB is 3, the data volume of the task indicator data corresponding to rightA is 1, and the data volume of the task indicator data corresponding to rightB is 2.

[0120] It should be understood that Figure 4 The dynamic open-point segment tree given has only a three-layer structure. However, in the actual application of the present invention, the number of levels of the dynamic open-point segment tree and the left and right endpoint values ​​of each node are determined by the numerical complexity of the task indicator data. That is, the more numerical values ​​involved in the task indicator data and the larger the numerical span, the more levels there are and the more detailed the division of the left and right endpoint values ​​of the nodes.

[0121] All task indicator data in the source database are sorted and summarized for analysis through a dynamic open-point segment tree data structure, so that when all task indicator data in the source database are subsequently subjected to secondary analysis, the sorting and summary results of the dynamic open-point segment tree data structure can be directly used for secondary analysis. Compared with directly analyzing from the source database, the time complexity of query and update is reduced from O(N) to O(logN), thereby improving the analysis efficiency of subsequent secondary analysis.

[0122] Continue to refer Figure 7 , Figure 7 yes Figure 6 The flowchart of a specific embodiment of step 605 shown includes the following steps:

[0123] Step 701: determine whether there is a node with a task indicator data volume of 0 among all the nodes;

[0124] Step 702: If there is no node with a data volume of 0 task indicator data among all the nodes, the data volume of the task indicator data corresponding to all the nodes is used as the statistical result of the multi-level child nodes of the dynamic open-point segment tree;

[0125] Step 703: If there are nodes with a data volume of 0 for task indicator data among all the nodes, the nodes with a data volume of 0 for task indicator data are screened out as nodes to be deleted through a screening method, and all nodes to be deleted are deleted, and the data volume of the task indicator data corresponding to all the nodes that have not been deleted is used as the statistical result of the multi-level child nodes of the dynamic open-point segment tree.

[0126] Through screening, nodes with a data volume of 0 in task indicator data are screened out as nodes to be deleted, and all nodes to be deleted are deleted. The data volume of the task indicator data corresponding to all undeleted nodes is used as the statistical result of the multi-level child nodes of the dynamic open-point segment tree, thereby avoiding the empty nodes in the dynamic open-point segment tree occupying statistical resources.

[0127] The present application organizes and summarizes all the task indicator data in the source database through a dynamic open-point segment tree data structure, so that when all the task indicator data in the source database are subsequently analyzed for secondary analysis, the organization and summary results of the dynamic open-point segment tree data structure can be directly used for secondary analysis. Compared with directly analyzing from the source database, the time complexity of query and update is reduced from O(N) to O(logN), thereby improving the analysis efficiency of subsequent secondary analysis. The present invention can be applied to the management statistics between insurance sales prices and sales volumes. By taking insurance sales prices as the task indicator data and taking sales volumes as statistical results at different nodes, management statistics between insurance sales prices and sales volumes can be achieved. Especially in insurance sales scenarios under large data scales, the management statistics method disclosed by the present invention is adopted, which greatly reduces the time complexity of data statistical analysis and improves the efficiency of statistical analysis.

[0128] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use knowledge to achieve optimal results.

[0129] Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interaction systems, and mechatronics. AI software technologies primarily encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.

[0130] In an embodiment of the present application, all task indicator data in the source database are collated and summarized for analysis through a dynamic open-point segment tree data structure, so that when all task indicator data in the source database are subsequently subjected to secondary analysis, the collation and summary results of the dynamic open-point segment tree data structure can be directly used for secondary analysis. Compared with directly analyzing from the source database, the time complexity of query and update is reduced from O(N) to O(logN), thereby improving the analysis efficiency of subsequent secondary analysis. The present invention can be applied to the management statistics between insurance sales prices and sales volumes. By using insurance sales prices as the task indicator data and sales volumes as the statistical results at different nodes, management statistics between insurance sales prices and sales volumes can be achieved. Especially in insurance sales scenarios under large data scales, the management statistics method disclosed by the present invention is used to greatly reduce the time complexity of data statistical analysis and improve the efficiency of statistical analysis.

[0131] Further references Figure 8 , as a response to the above Figure 2 The present application provides an embodiment of a data management and statistics device based on a dynamic open point segment tree. Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0132] like Figure 8 As shown, the data management and statistics device 800 based on the dynamic open-point segment tree described in this embodiment includes: a task indicator data acquisition module 801, a maximum and minimum value screening module 802, a root node creation module 803, a multi-level child node creation module 804, a current insertion data selection module 805, a node position information identification module 806, and a statistical result update module 807. Among them:

[0133] The task indicator data acquisition module 801 is used to acquire the task indicator data of all historical users in the source database, wherein the task indicator data is numerical data;

[0134] The maximum and minimum value screening module 802 is used to screen out the maximum and minimum values ​​from all task indicator data;

[0135] A root node creation module 803 is used to create and initialize a root node of a dynamic open-point line segment tree, and set the minimum value as the left endpoint value of the root node, and set the maximum value as the right endpoint value of the root node;

[0136] A multi-level child node creation module 804 is configured to perform binary division layer by layer based on the left endpoint value and the right endpoint value, create multi-level child nodes of the root node, and set the left and right endpoint values ​​of all nodes in the multi-level child nodes;

[0137] The currently inserted data selection module 805 is used to select task indicator data of different users from all the task indicator data in sequence as currently inserted data;

[0138] A node position information identification module 806 is configured to identify the node position information corresponding to the currently inserted data at all levels of the dynamic open-point segment tree according to the left and right endpoint values ​​of all nodes;

[0139] The statistical result update module 807 is used to update the statistical results of the multi-level child nodes of the dynamic open-point segment tree according to the node position information corresponding to all inserted data at all levels of the dynamic open-point segment tree, and complete the management statistics of all task indicator data.

[0140] The present application organizes and summarizes all the task indicator data in the source database through a dynamic open-point segment tree data structure, so that when all the task indicator data in the source database are subsequently analyzed for secondary analysis, the organization and summary results of the dynamic open-point segment tree data structure can be directly used for secondary analysis. Compared with directly analyzing from the source database, the time complexity of query and update is reduced from O(N) to O(logN), thereby improving the analysis efficiency of subsequent secondary analysis. The present invention can be applied to the management statistics between insurance sales prices and sales volumes. By taking insurance sales prices as the task indicator data and taking sales volumes as statistical results at different nodes, management statistics between insurance sales prices and sales volumes can be achieved. Especially in insurance sales scenarios under large data scales, the management statistics method disclosed by the present invention is adopted, which greatly reduces the time complexity of data statistical analysis and improves the efficiency of statistical analysis.

[0141] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing related hardware via computer-readable instructions. The computer-readable instructions can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes in the above-described method embodiments. The aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0142] It should be understood that although the steps in the flowcharts of the accompanying drawings are shown in sequence as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some of the steps in the flowcharts of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.

[0143] To solve the above technical problems, the present application also provides a computer device. Figure 9 , Figure 9 This is a basic structural block diagram of the computer device in this embodiment.

[0144] The computer device 9 includes a memory 9a, a processor 9b, and a network interface 9c that are interconnected via a system bus. Figure 9 Only a computer device 9 having components such as a memory 9a, a processor 9b, and a network interface 9c is shown. However, it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead. It should be understood by those skilled in the art that a computer device herein is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to a microprocessor, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a digital signal processor (DSP), an embedded device, and the like.

[0145] The computer device may be a desktop computer, notebook computer, PDA, cloud server, etc. The computer device may interact with the user via a keyboard, mouse, remote control, touchpad, or voice control device.

[0146] The memory 9a includes at least one type of readable storage medium, including flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic storage, a magnetic disk, an optical disk, etc. In some embodiments, the memory 9a may be an internal storage unit of the computer device 9, such as the hard disk or internal memory of the computer device 9. In other embodiments, the memory 9a may also be an external storage device of the computer device 9, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash memory card, etc. equipped on the computer device 9. Of course, the memory 9a may also include both the internal storage unit of the computer device 9 and its external storage device. In this embodiment, the memory 9a is generally used to store the operating system and various application software installed on the computer device 9, such as computer-readable instructions for a data management and statistical method based on a dynamic open-point segment tree. In addition, the memory 9a can also be used to temporarily store various types of data that have been output or are to be output.

[0147] In some embodiments, the processor 9b may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip. The processor 9b is generally used to control the overall operation of the computer device 9. In this embodiment, the processor 9b is used to execute computer-readable instructions stored in the memory 9a or process data, such as executing computer-readable instructions for the data management and statistical method based on the dynamic open-point segment tree.

[0148] The network interface 9c may include a wireless network interface or a wired network interface. The network interface 9c is generally used to establish a communication connection between the computer device 9 and other electronic devices.

[0149] The computer device proposed in this embodiment belongs to the field of research and development design technology, and is applied to data management statistics scenarios under large data scale. This application organizes and summarizes all task indicator data in the source database through a dynamic open-point segment tree data structure, so that when all task indicator data in the source database are subsequently subjected to secondary analysis, the organized and summarized results of the dynamic open-point segment tree data structure can be directly used for secondary analysis. Compared with directly analyzing from the source database, the time complexity of query and update is reduced from O(N) to O(logN), thereby improving the analysis efficiency of subsequent secondary analysis. The present invention can be applied to the management statistics between insurance sales prices and sales volumes. By taking insurance sales prices as the task indicator data and taking sales volumes as statistical results at different nodes, management statistics between insurance sales prices and sales volumes can be achieved. In particular, in insurance sales scenarios under large data scale, the management statistics method disclosed by the present invention is adopted, which greatly reduces the time complexity of data statistical analysis and improves the efficiency of statistical analysis.

[0150] The present application also provides another embodiment, namely, providing a computer-readable storage medium, which stores computer-readable instructions, and the computer-readable instructions can be executed by a processor to enable the processor to perform the steps of the data management statistical method based on the dynamic open-point segment tree as described above.

[0151] The computer-readable storage medium proposed in this embodiment belongs to the field of research and development design technology and is applied to data management statistics scenarios under large data scale. This application organizes and summarizes all task indicator data in the source database through a dynamic open-point segment tree data structure, so that when all task indicator data in the source database are subsequently subjected to secondary analysis, the organized and summarized results of the dynamic open-point segment tree data structure can be directly used for secondary analysis. Compared with directly analyzing from the source database, the time complexity of query and update is reduced from O(N) to O(logN), thereby improving the analysis efficiency of subsequent secondary analysis. The present invention can be applied to the management statistics between insurance sales price and sales volume. By taking the insurance sales price as the task indicator data and the sales volume as the statistical results at different nodes, the management statistics between insurance sales price and sales volume can be achieved. In particular, in the insurance sales scenario under large data scale, the management statistics method disclosed by the present invention is adopted, which greatly reduces the time complexity of data statistical analysis and improves the efficiency of statistical analysis.

[0152] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0153] Obviously, the embodiments described above are only some of the embodiments of the present application, rather than all of the embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application has been described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions described in the aforementioned specific embodiments, or to make equivalent replacements for some of the technical features therein. Any equivalent structure made using the contents of the present application specification and the accompanying drawings, directly or indirectly used in other related technical fields, is also within the scope of patent protection of the present application.

Claims

1. A data management and statistical method based on a dynamic open-point segment tree, characterized in that: The steps include: Obtaining task indicator data of all historical users in the source database, wherein the task indicator data is numerical data; Filter out the maximum and minimum values ​​from all task indicator data; Create and initialize a root node of a dynamic open-point line segment tree, set the minimum value as the left endpoint value of the root node, and set the maximum value as the right endpoint value of the root node; Perform binary division layer by layer according to the left endpoint value and the right endpoint value, create multi-level child nodes of the root node, and set the left and right endpoint values ​​of all nodes in the multi-level child nodes; Selecting task indicator data of different users in turn from all the task indicator data as current insertion data; Identify the node position information corresponding to each of the currently inserted data at all levels of the dynamic open-point segment tree according to the left and right endpoint values ​​of all nodes; According to the node position information corresponding to all the inserted data at all levels of the dynamic open-point segment tree, the statistical results of the multi-level child nodes of the dynamic open-point segment tree are updated to complete the management statistics of all task indicator data. Specifically, Initialize the amount of task indicator data currently counted by all nodes to 0; Determine all nodes in the dynamic point-opening line segment tree to which all inserted data respectively correspond according to node position information at all levels of the dynamic point-opening line segment tree; Each time a piece of inserted data is identified for the current node, the preset accumulation function is executed iteratively to accumulate the amount of task indicator data currently counted for the current node by 1; After the identification is completed, the iterative accumulation is stopped to obtain the data volume of the task indicator data corresponding to all nodes; According to the data volume of the task indicator data corresponding to all the nodes, the statistical results of the multi-level child nodes of the dynamic open-point line segment tree are obtained. The specific implementation method is to determine whether there is a node with a data volume of 0 task indicator data among all the nodes; if there is no node with a data volume of 0 task indicator data among all the nodes, the data volume of the task indicator data corresponding to all the nodes are used as the statistical results of the multi-level child nodes of the dynamic open-point line segment tree; if there is a node with a data volume of 0 task indicator data among all the nodes, the nodes with a data volume of 0 task indicator data are screened out as nodes to be deleted through a screening method, and all the nodes to be deleted are deleted, and the data volume of the task indicator data corresponding to all the nodes that have not been deleted are used as the statistical results of the multi-level child nodes of the dynamic open-point line segment tree.

2. The data management and statistical method based on the dynamic open-point segment tree according to claim 1 is characterized in that: The step of filtering out the maximum and minimum values ​​from all task indicator data specifically includes: Record the values ​​corresponding to all task indicator data to obtain the value recording results. When recording, repeated values ​​are recorded only once. Comparing the magnitude of all the values ​​in the numerical record results in pairs; The maximum value and the minimum value are determined based on the results of pairwise comparison of the size relationships.

3. The data management and statistical method based on the dynamic open-point segment tree according to claim 1, characterized in that: The step of performing binary division layer by layer according to the left endpoint value and the right endpoint value, creating multi-level child nodes of the root node, and setting the left and right endpoint values ​​of all nodes in the multi-level child nodes specifically includes: According to the preset first function: , calculate the right endpoint value of the left node of the lower layer layer by layer, where, Indicates the left endpoint value of the current root node, Indicates the length of the numerical range between the left and right endpoint values ​​of the current root node. , Indicates the right endpoint value of the current root node; According to the preset second function: , calculate the left endpoint value of the right node of the lower layer layer by layer, where, Indicates the left endpoint value of the current root node, Indicates the length of the numerical range between the left and right endpoint values ​​of the current root node. , Indicates the right endpoint value of the current root node.

4. The data management and statistical method based on the dynamic open-point segment tree according to claim 1, characterized in that: The step of sequentially selecting task indicator data of different users from all the task indicator data as the current insertion data specifically includes: According to the user identification identifier, task indicator data of different users are selected in sequence from all the task indicator data as the current insertion data.

5. The data management and statistical method based on dynamic point-opening segment tree according to claim 1, characterized in that: The step of identifying the node position information corresponding to each of the currently inserted data at all levels of the dynamic open-point segment tree according to the left and right endpoint values ​​of all nodes specifically includes: The left and right endpoint values ​​of all nodes in the dynamic open-point line segment tree are set to the numerical range of the corresponding nodes; Determine whether the currently inserted data is included in the value range of each node; If the currently inserted data is included in the value interval of the current node, the node position information corresponding to the currently inserted data in the dynamic open-point segment tree includes the current node; If the currently inserted data is not included in the value range of the current node, the node position information corresponding to the currently inserted data in the dynamic open-point segment tree does not include the current node.

6. A data management and statistics device based on a dynamic open-point segment tree, characterized in that: include: A task indicator data acquisition module is used to obtain the task indicator data of all historical users in the source database, wherein the task indicator data is numerical data; Maximum and minimum value screening modules are used to screen out the maximum and minimum values ​​from all task indicator data; A root node creation module is used to create and initialize the root node of the dynamic open-point line segment tree, and set the minimum value as the left endpoint value of the root node, and set the maximum value as the right endpoint value of the root node; A multi-level child node creation module, configured to perform binary division layer by layer based on the left endpoint value and the right endpoint value, create multi-level child nodes of the root node, and set the left and right endpoint values ​​of all nodes in the multi-level child nodes; A currently inserted data selection module is used to sequentially select task indicator data of different users from all the task indicator data as currently inserted data; A node position information identification module is used to identify the node position information corresponding to each of the currently inserted data at all levels of the dynamic open-point segment tree according to the left and right endpoint values ​​of all nodes; The statistical result update module is used to update the statistical results of the multi-level child nodes of the dynamic open-point segment tree according to the node position information corresponding to all inserted data at all levels of the dynamic open-point segment tree, and complete the management statistics of all task indicator data. Specifically, Initialize the amount of task indicator data currently counted by all nodes to 0; Determine all nodes in the dynamic point-opening line segment tree to which all inserted data respectively correspond according to node position information at all levels of the dynamic point-opening line segment tree; Each time a piece of inserted data is identified for the current node, the preset accumulation function is executed iteratively to accumulate the amount of task indicator data currently counted for the current node by 1; After the identification is completed, the iterative accumulation is stopped to obtain the data volume of the task indicator data corresponding to all nodes; According to the data volume of the task indicator data corresponding to all the nodes, the statistical results of the multi-level child nodes of the dynamic open-point line segment tree are obtained. The specific implementation method is to determine whether there is a node with a data volume of 0 task indicator data among all the nodes; if there is no node with a data volume of 0 task indicator data among all the nodes, the data volume of the task indicator data corresponding to all the nodes are used as the statistical results of the multi-level child nodes of the dynamic open-point line segment tree; if there is a node with a data volume of 0 task indicator data among all the nodes, the nodes with a data volume of 0 task indicator data are screened out as nodes to be deleted through a screening method, and all the nodes to be deleted are deleted, and the data volume of the task indicator data corresponding to all the nodes that have not been deleted are used as the statistical results of the multi-level child nodes of the dynamic open-point line segment tree.

7. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, the steps of the data management and statistical method based on the dynamic open-point segment tree according to any one of claims 1 to 5 are implemented.

8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the data management and statistics method based on a dynamic open-point segment tree according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Data storage and query method based on classification characteristics and balanced binary tree

    CN102521334A

  • A method and device for dynamically adding a database by a strict balanced binary tree

    CN109815238A