A financial data migration method and device based on database
By dividing the migration graph and performing batch processing, the problems of excessive resource occupation and difficulty in positioning in traditional financial data migration are solved, and efficient and intuitive migration of financial data is achieved.
Patent Information
- Application Number
- CN202410882950.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-03
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2044-07-03
AI Technical Summary
Traditional financial data migration methods have problems such as excessive resource occupation, data transmission interruption and positioning difficulties when processing large-scale financial data, resulting in an unintuitive and inefficient migration process.
By obtaining the migration diagram, dividing multiple migration areas, performing batch processing and even division, and performing data analysis based on analysis strategies, we can achieve customized migration and intuitive processing of financial data.
It improves the efficiency and intuitiveness of financial data migration, reduces data processing volume and traversal time, and ensures the accuracy and efficiency of the migration process.
Smart Images

Figure CN118427185B
Abstract
Description
Technical Field
[0001] The present invention relates to data processing technology, and in particular to a financial data migration method and device based on a database. Background Art
[0002] With the development of financial technology, financial institutions have higher and higher requirements for data processing, storage and migration. Database-based financial data migration has become a common data management method, which involves migrating financial data from one database system to another to meet the needs of business expansion, system upgrade or data integration.
[0003] In traditional financial data migration methods, data is often migrated at one time or in a simple order. This method has obvious limitations when processing large-scale financial data. First, a one-time migration may cause excessive occupation of system resources, affecting normal business operations. Second, the overall migration data volume is large, and data transmission interruptions and confusions are prone to occur. It is impossible to intuitively locate the location of the interruption or confusion, and multiple repeated migrations are required.
[0004] Therefore, how to customize the migration of financial data to make the migration process more intuitive has become an urgent problem to be solved. Summary of the invention
[0005] The present invention provides a database-based financial data migration method and device, which can perform customized migration of financial data, thereby making the migration process more intuitive.
[0006] A first aspect of the present invention provides a financial data migration method based on a database, comprising:
[0007] Obtaining a migration map of the migrated financial data, dividing the migration map according to a batch migration strategy to obtain a plurality of migration regions, wherein the migration map has migration positions corresponding to the migrated individuals;
[0008] Counting the migration financial data of the migrating individuals in the migration area to obtain migration data segments, and performing migration processing on the migration data segments in batches;
[0009] Evenly dividing the migration area to obtain a plurality of sub-migration areas corresponding to the migration area;
[0010] An analysis area input by an analysis terminal is received, and data analysis is performed on a sub-migration area in the analysis area according to a regional analysis strategy to obtain financial analysis data corresponding to the analysis area.
[0011] Optionally, in a possible implementation manner of the first aspect, the obtaining of a migration graph of migrated financial data, dividing the migration graph according to a batch migration strategy to obtain a plurality of migration areas, includes:
[0012] Acquire a migration graph of the migration financial data, and construct a virtual positioning frame containing the migration graph according to the minimum longitude coordinate, the minimum latitude coordinate, the maximum longitude coordinate, and the maximum latitude coordinate corresponding to the migration graph;
[0013] Obtaining any vertex in the virtual positioning frame as an extreme point corresponding to the migration graph;
[0014] An edge point in the migration graph that is closest to the extreme point is determined as a starting positioning point, and the migration graph is divided according to the starting positioning point to obtain a plurality of migration regions.
[0015] Optionally, in a possible implementation manner of the first aspect, determining an edge point in the migration graph that is closest to the extreme value point as a starting positioning point, and dividing the migration graph according to the starting positioning point to obtain a plurality of migration regions includes:
[0016] Determine an edge point in the migration graph that is closest to the extreme point as a starting positioning point, and count the migration individuals in the migration graph to obtain a migration set corresponding to the migration graph;
[0017] Acquire the position information of the starting positioning point to obtain the starting position, and calculate according to the starting position and the migration positions of the migration individuals in each migration set to obtain the selection distance corresponding to the starting positioning point;
[0018] Sort the migration set in ascending order based on the selection distance to obtain a migration sequence;
[0019] Selecting migration individuals in the migration sequence as batch individuals in turn according to a preset selection quantity, deleting and updating the migration set based on the batch individuals to obtain a current migration set;
[0020] Determine the migration position corresponding to the batch individuals as the batch position, and use the last selected batch individuals as the current starting positioning point, construct a migration area including the batch individuals according to the batch position, and repeat the steps of obtaining the migration area until the current migration set is an empty set, thereby obtaining multiple migration areas.
[0021] Optionally, in a possible implementation manner of the first aspect, constructing a migration area including the batch of individuals according to the batch positions includes:
[0022] Calculate the mean of the minimum longitude coordinate and the maximum longitude coordinate in the batch position to obtain the center longitude coordinate;
[0023] Calculate the mean based on the minimum latitude coordinate and the maximum latitude coordinate in the batch position to obtain the center latitude coordinate;
[0024] Obtaining center positions corresponding to the plurality of batches of individuals according to the center longitude coordinates and the center latitude coordinates;
[0025] A migration area including the batch of individuals is constructed according to the central position and the batch positions.
[0026] Optionally, in a possible implementation manner of the first aspect, constructing a migration area including the batch of individuals according to the central position and the batch position includes:
[0027] Obtaining the distance between the center position and each of the batch positions as a construction distance, and selecting the largest construction distance as an initial radius;
[0028] Obtaining a migration radius according to a sum of the initial radius and a preset additional distance, and constructing an initial area based on the migration radius and the center position;
[0029] When it is determined that there are no other migrating individuals except the batch of individuals in the initial area, the corresponding initial area is used as a migrating area containing the batch of individuals;
[0030] When it is determined that there are other migrating individuals other than the batch individuals in the initial area, the corresponding migrating individuals are used as removed individuals, and the migration positions of the removed individuals are used as removed positions;
[0031] The initial area is adjusted according to the removal position and the center position to obtain a migration area including the batch of individuals.
[0032] Optionally, in a possible implementation manner of the first aspect, performing regional adjustment on the initial region according to the removal position and the center position to obtain a migration region including the batch of individuals includes:
[0033] A removal line is obtained according to a line connecting the removal position and the center position, a radius of the removal line is determined as a removal radius, and an intersection of the removal radius and the initial area is used as a positioning point;
[0034] Taking the positioning point as the center point, intercepting the region edge line of the initial region based on a preset arc length, to obtain two first fan-shaped connection points after interception;
[0035] Based on the preset removal distance, determine the second fan-shaped connection point along the removal line pointing to the center position with the removal position as the starting point;
[0036] Connecting the second fan-shaped connection points with the first fan-shaped connection points respectively to obtain a removed fan-shaped area corresponding to the removed individual;
[0037] The initial area is deleted and updated according to the removed sector area to obtain a migration area containing the batch of individuals.
[0038] Optionally, in a possible implementation manner of the first aspect, the evenly dividing the migration area to obtain a plurality of sub-migration areas corresponding to the migration area includes:
[0039] Obtain the distance between the batch positions corresponding to any two batch individuals in the migration area as the direction positioning distance, select the two batch individuals corresponding to the largest direction positioning distance as the direction positioning individuals, and obtain the direction positioning line according to the connecting line of the direction positioning individuals;
[0040] Determine the sub-division area of the migration region according to a preset number of divisions, construct a sub-division line perpendicular to the direction positioning line in the migration region based on the sub-division area, divide the migration region according to the sub-division line, and obtain a plurality of sub-migration areas corresponding to the migration region;
[0041] Obtaining a sub-migration area located at an edge position of any one of the migration areas as a starting sub-area, sequentially numbering the sub-migration areas with the starting sub-area as the starting position to obtain a sub-number corresponding to each of the sub-migration areas, and sorting the sub-numbers in ascending order to obtain a number sequence of the migration areas;
[0042] Sequentially counting the migration financial data of the migrating individuals in the sub-migration area corresponding to each sub-number in the numbering sequence to obtain the sub-migration data segment corresponding to the sub-number;
[0043] The corresponding sub-migration data segments in the migration data segment are sorted according to the order of the sub-numbers in the numbering sequence to obtain a data segment sequence corresponding to the migration area.
[0044] Optionally, in a possible implementation manner of the first aspect, the receiving the analysis area input by the analysis end, performing data analysis on the sub-migration area in the analysis area according to the regional analysis strategy, and obtaining financial analysis data corresponding to the analysis area includes:
[0045] Receiving an analysis region inputted by an analysis terminal, and obtaining a sub-migration region having an overlapping area with the analysis region as a sub-region to be screened;
[0046] Obtaining the overlapping area between the sub-region to be screened and the analysis region, and the sub-region area of the sub-region to be screened;
[0047] When it is determined that the overlapping area is equal to the sub-region area, the corresponding sub-region to be screened is used as the analysis sub-region;
[0048] When it is determined that the overlapping area is smaller than the area of the sub-region, the corresponding sub-region to be screened is used as a local coverage area;
[0049] Obtaining the number of migrating individuals in the local coverage area as a calculated number, and obtaining a density ratio according to the calculated number and a ratio of the area of the corresponding sub-area;
[0050] Calculating according to the overlapping area of the local coverage area and the density ratio to obtain a determination coefficient corresponding to the local coverage area;
[0051] When it is determined that the judgment coefficient is greater than the preset coefficient, the corresponding local coverage area is used as an analysis sub-area;
[0052] The migration financial data of the migration individuals in the sub-migration data segment corresponding to the analysis sub-area are statistically analyzed to obtain financial analysis data.
[0053] Optionally, in a possible implementation of the first aspect, the determination coefficient may be obtained by the following formula:
[0054]
[0055] in, is the judgment coefficient, is the area weight value, is the overlapping area, is the preset area, is the density weight value, is the density ratio, It is the preset density ratio.
[0056] A second aspect of the present invention provides a financial data migration device based on a database, comprising:
[0057] An acquisition module, used to acquire a migration map of the migrated financial data, divide the migration map according to a batch migration strategy to obtain a plurality of migration areas, the migration map having migration positions corresponding to the migrated individuals;
[0058] A migration module, used for collecting statistics of the migration financial data of the migrating individuals in the migration area to obtain migration data segments, and performing migration processing on the migration data segments in batches;
[0059] A division module, used for evenly dividing the migration area to obtain a plurality of sub-migration areas corresponding to the migration area;
[0060] The analysis module is used to receive the analysis area input by the analysis terminal, perform data analysis on the sub-migration area in the analysis area according to the regional analysis strategy, and obtain financial analysis data corresponding to the analysis area.
[0061] According to a third aspect of the present invention, there is provided an electronic device, comprising: a memory, a processor and a computer program, wherein the computer program is stored in the memory, and the processor runs the computer program to execute the first aspect of the present invention and various methods that may be involved in the first aspect.
[0062] According to a fourth aspect of the present invention, a storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, it is used to implement the first aspect of the present invention and various methods that may be involved in the first aspect.
[0063] The beneficial effects of the present invention are as follows:
[0064] 1. The present invention can perform customized migration of financial data, thereby making the migration process more intuitive. The present invention can divide the migration graph of the migrated financial data, so that when the migration financial data of the analysis area is subsequently retrieved, the migration financial data of the corresponding area can be directly retrieved, reducing the time for data traversal query of all migration individuals, thereby improving the efficiency of data retrieval. The present invention can obtain the selection distance between the starting positioning point and the migration individual, and then sort it to obtain the migration sequence, so that the migration individuals can be divided into migration areas more reasonably.
[0065] 2. The present invention can update and adjust the initial area to achieve accurate regional division of the migration map. Among them, the present invention can judge the migration individuals in the initial area. When the initial area contains migration individuals that do not belong to the batch individuals, the corresponding migration individuals can be used as removal individuals, so that the removal fan-shaped area can be determined according to the corresponding removal position, and then the initial area is deleted and updated to obtain the corresponding migration area, so that when the analysis area is subsequently analyzed for financial data, it can be accurately located in the specific migration area, so that the corresponding migration financial data can be directly retrieved, thereby improving the efficiency of data retrieval.
[0066] 3. The present invention can divide the region into fine parts and number the sub-migration areas. At the same time, the migration financial data of the migrating individuals in the sub-migration areas corresponding to each sub-number in the numbering sequence are counted in turn to obtain the sub-migration data segments corresponding to the sub-numbers. There is no need to bind the financial data of the enterprise to each position. Therefore, when the financial situation of a certain area is counted, the sub-migration area involved in the area of the statistical financial data can be quickly determined according to the migration map, so that the corresponding sub-migration data segments can be directly retrieved according to the corresponding sub-numbers, which reduces the data processing volume and greatly improves the data processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] Figure 1 A flowchart of a database-based financial data migration method provided by the present invention;
[0068] Figure 2 A schematic diagram of a virtual positioning frame provided by the present invention;
[0069] Figure 3 A schematic diagram of removing a sector-shaped area provided by the present invention;
[0070] Figure 4 A schematic diagram of the structure of a financial data migration device based on a database provided by the present invention;
[0071] Figure 5 A schematic diagram of the hardware structure of an electronic device provided by the present invention. DETAILED DESCRIPTION
[0072] The technical solution of the present invention is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0073] like Figure 1 As shown, the present invention provides a financial data migration method based on a database, comprising:
[0074] S1, obtaining a migration map of migrated financial data, dividing the migration map according to a batch migration strategy to obtain a plurality of migration areas, wherein the migration map has migration positions corresponding to migrated individuals.
[0075] It can be understood that the migrated financial data is the amount data that needs to be migrated, the migration map is a map containing the migrated individuals, the migrated individuals are individuals with financial data, which can be enterprises, units, etc., and are not limited here. The migration area is the area where migration is carried out in batches, which can be a larger area in the migration map divided into multiple small areas, and the migration position is the position of the migrated individual in the migration map.
[0076] It should be noted that in order to avoid a one-time migration that may cause excessive occupation of system resources and affect normal business operations, and secondly, the overall migration data volume is large, when data transmission interruption, confusion, etc. are prone to occur, the location of the interruption or confusion cannot be located intuitively, and multiple repeated migrations are required. Therefore, the present invention will customize the migration map to obtain multiple migration areas, and migrate the data in the migration area in batches.
[0077] Subsequently, there may be many migration individuals in the migration map, and each migration individual has a one-to-one corresponding position in the migration map. When it is necessary to count the financial data of multiple migration individuals in the migration area and obtain the financial data of the corresponding migration area, when calculating the financial data of different areas, it is necessary to traverse the data of all migration individuals, thereby increasing the amount of data processing. Therefore, the corresponding migration financial data can be directly retrieved for the migration individuals in the area to be calculated according to the migration map, which can reduce the amount of data processing and the traversal time, thereby improving the data retrieval efficiency.
[0078] In some embodiments, step S1 (obtaining a migration graph of migrated financial data, and dividing the migration graph according to a batch migration strategy to obtain multiple migration areas) specifically includes:
[0079] S11, obtaining a migration graph of the migration financial data, and constructing a virtual positioning frame including the migration graph according to the minimum longitude coordinate, the minimum latitude coordinate, the maximum longitude coordinate and the maximum latitude coordinate corresponding to the migration graph.
[0080] It can be understood that each migrating individual in the migration map has a corresponding migration position, which can be a longitude and latitude coordinate. For example, the migration position corresponding to migrating individual 1 is 40° north latitude and 116° east longitude. In order to divide the area where the migrating individuals in the migration map are located and facilitate the subsequent retrieval of migration financial data, the minimum longitude coordinate, minimum latitude coordinate, maximum longitude coordinate and maximum latitude coordinate in the migration map can be obtained, thereby determining a virtual positioning frame for the subsequent regional division of the migration map.
[0081] Among them, the minimum longitude coordinate is the minimum longitude coordinate value, the minimum latitude coordinate is the minimum latitude coordinate value, the maximum longitude coordinate is the maximum longitude coordinate value, the maximum latitude coordinate is the maximum latitude coordinate value, and the virtual positioning frame is a virtual frame used for position positioning.
[0082] It is not difficult to understand that if Figure 2 As shown, the minimum longitude coordinate, minimum latitude coordinate, maximum longitude coordinate and maximum latitude coordinate of the migration map are obtained, and straight lines are established according to the minimum longitude coordinate, the minimum latitude coordinate, the maximum longitude coordinate and the maximum latitude coordinate, respectively. The four straight lines are connected to construct a virtual positioning frame of the migration map.
[0083] Through the above implementation, the present invention can obtain the virtual positioning frame corresponding to the transition graph, so as to facilitate the subsequent regional division of the transition graph.
[0084] S12, obtaining any vertex in the virtual positioning frame as an extreme point corresponding to the migration graph.
[0085] It can be understood that the extreme point is any vertex in the virtual positioning frame, which is a position point used to divide the migration map into regions. For example, the vertex in the upper right corner of the virtual positioning frame can be used as the extreme point.
[0086] S13, determining an edge point in the migration graph that is closest to the extreme point as a starting positioning point, and dividing the migration graph according to the starting positioning point to obtain a plurality of migration regions.
[0087] It can be understood that the edge point is the point on the edge line of the migration graph. The edge point in the migration graph that is closest to the extreme point is used as the starting positioning point. The position between the extreme point and any point on the edge line of the migration graph can be calculated to select the nearest edge point. This is the prior art. The migration graph is divided from the starting positioning point to obtain multiple migration areas, so that the corresponding migration individuals can be quickly determined according to the migration area in the future, and the corresponding migration financial data can be retrieved in time, reducing the amount of data processing and improving data retrieval efficiency. At the same time, it can be transmitted in batches through the migration area.
[0088] In some embodiments, step S13 (determining the edge point in the migration graph closest to the extreme point as the starting positioning point, and dividing the migration graph according to the starting positioning point to obtain multiple migration areas) specifically includes:
[0089] S131, determining the edge point closest to the extreme point in the migration graph as the starting positioning point, and counting the migration individuals in the migration graph to obtain a migration set corresponding to the migration graph.
[0090] It can be understood that the migration set is a set of migration individuals. For example, the migration graph contains multiple enterprises, and statistics are performed to obtain a set containing migration individuals.
[0091] Through the above implementation, the present invention can obtain the migration set corresponding to the migration graph, so that the migration individuals can be selected and divided according to the migration set later.
[0092] S132, acquiring the position information of the starting positioning point to obtain the starting position, and performing calculation according to the starting position and the migration positions of the migration individuals in each migration set to obtain a selection distance corresponding to the starting positioning point.
[0093] It can be understood that the starting position is the position of the starting positioning point, for example, the position of the starting positioning point is 55° north latitude and 135° east longitude.
[0094] It is not difficult to understand that after determining the starting position information of the starting positioning point, the selection distance between the starting positioning point and each migrating individual can be calculated according to the starting position of the starting positioning point and the position information of the migrating individuals in the migration set, so that a large number of migrating individuals can be divided into regions according to the selection distance, and the distance can be calculated by the latitude and longitude coordinate information.
[0095] The selection distance is the distance between the starting point and each migrating individual, which is used to select migrating individuals with similar distances for regional division.
[0096] S133, sorting the migration set in ascending order based on the selection distance to obtain a migration sequence.
[0097] It should be noted that the migratory individuals in the migration graph may be scattered in multiple locations. Therefore, in order to divide multiple adjacent migratory individuals, and the multiple migratory individuals after division can be in a closer position range, the migration set can be sorted in ascending order according to the selection distance, so as to facilitate the subsequent regional division of the migratory individuals in the migration graph, thereby facilitating data migration and subsequent analysis of financial data in the region.
[0098] It can be understood that the migration sequence is a sequence obtained by sorting the migration individuals in the migration set in ascending order according to the selection distance.
[0099] S134, selecting migration individuals in the migration sequence as batch individuals in turn according to a preset selection quantity, and deleting and updating the migration set based on the batch individuals to obtain a current migration set.
[0100] It should be noted that when migrating financial data, data loss may occur due to the large amount of financial data to be migrated. Therefore, the migrated individuals can be divided into batches, so that the migrated financial data can be migrated in batches according to the migration map later, thereby improving the migration efficiency and security of the financial data.
[0101] It can be understood that the preset selection number is the number of selected migratory individuals, which is used to divide the migratory individuals in the migration map. For example, when there are 100 migratory individuals in the migration map, the preset selection number can be 10, and 10 migratory individuals are divided into a group.
[0102] Among them, batch individuals are migration individuals of a preset number selected from the migration sequence. For example, when the preset selection number is 10, the first 10 migration individuals can be selected in the migration sequence, and the selected migration individuals can be used as batch individuals. The current migration set is the migration set after deleting the batch individuals.
[0103] It is not difficult to understand that after batch individuals are selected in the migration sequence and migrated, the migrated batch individuals can be deleted from the migration set to prevent the selected batch individuals from being repeatedly selected when the remaining migrated individuals are subsequently divided, thereby affecting the division results.
[0104] S135, determine the migration position corresponding to the batch individuals as the batch position, and use the last selected batch individuals as the current starting positioning point, construct a migration area including the batch individuals according to the batch position, and repeat the step of obtaining the migration area until the current migration set is an empty set, and obtain multiple migration areas.
[0105] It can be understood that the batch position is the migration position corresponding to the batch individual. For example, when migration individual 1, migration individual 2... migration individual 10 are selected as batch individuals for the first time, the migration positions corresponding to these 10 batch individuals are the batch positions. In order to divide the remaining migration individuals, the last selected batch individual in the batch individuals can be used as the current starting positioning point. For example, when migration individual 10 is the last selected batch individual, migration individual 10 can be used as the current starting positioning point, so that the selection distance between the remaining migration individuals and the current starting positioning point can be continued to be calculated, and sorted according to the selection distance, and batch individuals are selected in the sorted migration sequence until the current migration set is an empty set, and the division of the migration individuals is completed, thereby obtaining multiple migration areas.
[0106] It is not difficult to understand that when a preset number of migratory individuals are selected for division, if the number of migratory individuals remaining in the migration set is less than the preset number, the area where the remaining migratory individuals are located can be used as a migration area.
[0107] In some embodiments, step S135 (constructing a migration area including the batch of individuals according to the batch positions) specifically includes:
[0108] S1351, calculate the mean value of the minimum longitude coordinate and the maximum longitude coordinate in the batch position to obtain the center longitude coordinate.
[0109] It should be noted that after screening out the migrating individuals, when dividing the location area where the batch individuals are located, the corresponding central longitude coordinate and central latitude coordinate can be determined according to the batch position, so that the position of the center of the area where the multiple batch individuals after screening are located can be determined, thereby further determining the migration area.
[0110] It can be understood that the central longitude coordinate is the longitude coordinate of the central location point.
[0111] For example: when the minimum longitude coordinate is 134.94° east longitude and the maximum longitude coordinate is 135° east longitude, the center longitude coordinate is (134.94°+135°) / 2=134.97°.
[0112] S1352, performing mean calculation based on the minimum latitude coordinate and the maximum latitude coordinate in the batch position to obtain the center latitude coordinate.
[0113] It can be understood that the central latitude coordinate is the latitude coordinate of the central location point.
[0114] For example: when the minimum latitude coordinate is 49.90° north latitude and the maximum latitude coordinate is 50° north latitude, the center latitude coordinate can be obtained as (49.90°+50°) / 2=49.95°.
[0115] S1353, obtaining the center position corresponding to the plurality of batch individuals according to the center longitude coordinate and the center latitude coordinate.
[0116] It can be understood that after obtaining multiple center longitude coordinates and center latitude coordinates, the center position corresponding to each batch of selected batch individuals can be determined.
[0117] For example, when the central longitude coordinate obtained according to the batch positions corresponding to migrating individuals 1, migrating individuals 2...migrating individuals 10 is 134.97° east longitude and the central latitude coordinate is 49.95° north latitude, then the corresponding central position of the batch of individuals is the position corresponding to (134.97° east longitude, 49.95° north latitude).
[0118] Through the above implementation, the present invention can determine the center positions corresponding to individuals in different batches, thereby determining the migration areas of the corresponding batches of individuals.
[0119] S1354: Construct a migration area including the batch of individuals according to the central position and the batch positions.
[0120] It can be understood that after the center position of the batch individuals is determined, an area including all batch positions can be constructed by extending outward from the center position.
[0121] In some embodiments, step S1354 (constructing a migration area including the batch of individuals according to the central position and the batch position) specifically includes:
[0122] S13541, obtaining the distance between the center position and each of the batch positions as the construction distance, and selecting the largest construction distance as the initial radius.
[0123] It can be understood that in order to include all the migrating individuals in the batch individuals in the same area, the maximum construction distance can be selected as the initial radius, so as to ensure that all the migrating individuals in the batch individuals are within the constructed area.
[0124] Among them, the construction distance is the distance between the center position and the position of each migrating individual. For example, when the center position is (134.97° east longitude, 49.95° north latitude), the migration position of migrating individual 1 is (135° east longitude, 49.99° north latitude), the migration position of migrating individual 2 is (134.96° east longitude, 49.96° north latitude)... the migration position of migrating individual 10 is (134.93° east longitude, 49.91° north latitude), then the construction distance between the center position and migrating individual 1 is 5 kilometers, the construction distance between the center position and migrating individual 2 is 3 kilometers... The construction distance between the center position and migrating individual 10 is 6 kilometers. Among them, the maximum construction distance is 6 kilometers, and the construction distance of 6 kilometers is used as the initial radius to facilitate the subsequent determination of the migration area.
[0125] S13542: Obtain a migration radius according to the sum of the initial radius and the preset additional distance, and construct an initial area based on the migration radius and the center position.
[0126] It can be understood that the preset additional distance is a distance value that extends the initial radius in order to avoid the migrating individuals being on the edge line of the construction area. Therefore, an additional distance is set in advance so that all the migrating individuals can be within the construction area. The preset additional distance is generally small.
[0127] Among them, the migration radius is the distance radius value for constructing the migration area, which can be obtained by adding the initial radius and the preset additional distance. For example, when the initial radius is 6 kilometers and the preset additional distance is 100 meters, the migration radius is 6000+100=6100 meters. The initial area is a circular area containing the individual positions of the batch, with the center position as the center and the radius as the migration radius. For ease of understanding, only examples are given here.
[0128] S13543: When it is determined that the initial area does not contain any other migrating individuals except the batch individuals, the corresponding initial area is used as a migrating area including the batch individuals.
[0129] It can be understood that when the initial area does not contain any migration individuals other than the batch individuals, the initial area can be used as a migration area containing the batch individuals.
[0130] For example, when there are no other migratory individuals in the initial area constructed for migratory individuals 1, migratory individuals 2, ..., migratory individuals 10, the initial area can be used as the migration area.
[0131] S13544, when it is determined that there are other migrating individuals other than the batch individuals in the initial area, the corresponding migrating individuals are used as removed individuals, and the migration positions of the removed individuals are used as removed positions.
[0132] It is understandable that when the positions of multiple migrating individuals are relatively close, the initial area constructed for the batch individuals may include other migrating individuals that do not belong to the batch individuals. Therefore, it is necessary to remove the positions of other migrating individuals that do not belong to the batch individuals to ensure that the obtained migration area only contains migrating individuals from the corresponding batch individuals.
[0133] Therefore, the migrating individuals other than the batch individuals can be treated as removed individuals. For example, when the initial area corresponding to the migrating individuals 1, 2, ... 10 contains the migrating individual 12, the migrating individual 12 can be treated as a removed individual, and the migration position of the migrating individual 12 can be used as the removed position.
[0134] The removed individual is a migration individual that needs to be removed from the initial area, and the removed position is the migration position corresponding to the removed individual.
[0135] Through the above implementation, the present invention can determine the removal individuals and the corresponding removal positions, so as to subsequently remove the corresponding positions in the initial area, so that the area after removal only contains the corresponding batch of individuals.
[0136] S13545, performing regional adjustment on the initial area according to the removal position and the center position to obtain a migration area including the batch of individuals.
[0137] It is understandable that the initial area is adjusted so that the positions of other migrating individuals in the initial area are adjusted outside the area, thereby obtaining a migration area containing only batch individuals.
[0138] In some embodiments, step S13545 (adjusting the initial area according to the removal position and the center position to obtain a migration area including the batch of individuals) specifically includes:
[0139] S135451, obtain a removal line based on a line connecting the removal position and the center position, determine the radius of the removal line as the removal radius, and use the intersection of the removal radius and the initial area as a positioning point.
[0140] It can be understood that the removal line is the line connecting the removal position and the center position, the removal radius is the radius on the removal line that includes the removed individual, and the positioning point is the intersection of the removal radius and the initial area, for example, Figure 3As shown, the positioning point is obtained by removing the intersection point of the radius and the initial area.
[0141] Through the above implementation, the present invention can obtain the positioning points corresponding to the removed individuals, so as to determine the interception area according to the positioning points later, thereby removing the removed individuals from the initial area.
[0142] S135452, intercepting the region edge line of the initial region based on a preset arc length with the positioning point as the center point, to obtain two first fan-shaped connection points after interception.
[0143] It can be understood that the preset arc length is a preset arc length that will be used to remove the individual outside the initial area. Based on the preset arc length, two corresponding position points can be determined on both sides of the positioning point, and the area edge line is the edge line of the initial area.
[0144] The first fan-shaped connection point is a point at a preset arc length at both ends of the positioning point on the edge line of the region.
[0145] For example, Figure 3 As shown, the first fan connection point 1 and the first fan connection point 2 are respectively obtained at the preset arc lengths at both ends of the positioning point on the area edge line.
[0146] Through the above implementation, the present invention can obtain two first fan-shaped connection points so as to be subsequently connected with the second fan-shaped connection points, thereby adjusting the initial area and obtaining the migration area corresponding to the batch individuals.
[0147] S135453, based on the preset removal distance, determine the second fan-shaped connection point along the direction of the removal line pointing to the center position with the removal position as the starting point.
[0148] It can be understood that the preset removal distance is a distance set in advance for removing individuals outside the migration area, and the preset removal distance is a smaller distance to prevent the subsequently obtained removal sector area from being larger and thus including batch individuals. When the removal sector area is deleted and updated, the deletion of batch individuals is avoided. The second sector connection point is a position point on the removal line close to the center position at a preset removal distance from the removal position, which is used to remove the removal position where the removal individual is located outside the migration area corresponding to the batch individual.
[0149] S135454, connect the second fan-shaped connection points with the first fan-shaped connection points respectively to obtain a removed fan-shaped area corresponding to the removed individual.
[0150] It can be understood that the removed sector area is the area where the removed individual is removed, and can be obtained by connecting the second sector connection point with the two first sector connection points, such as Figure 3As shown, the second fan-shaped connection point is connected to the two first fan-shaped connection points respectively, and the enclosed area is the removal fan-shaped area, so that the removed individual is removed outside the migration area corresponding to the batch individual.
[0151] Through the above implementation, the present invention can obtain the removed sector-shaped area, so as to facilitate the subsequent deletion and update of the removed sector-shaped area in the initial area, thereby obtaining the migration area corresponding to the batch individual, and then facilitating the subsequent retrieval of the corresponding migration financial data of the migration individual according to the migration area, thereby improving data migration efficiency.
[0152] S135455, delete and update the initial area according to the removed sector area to obtain a migration area including the batch of individuals.
[0153] It can be understood that after deleting and updating the removed sector-shaped area in the initial area, an irregular migration area without removed individuals can be obtained.
[0154] Through the above implementation, the present invention can obtain the migration area, so that the migration financial data of the corresponding migration individual can be retrieved according to the migration area later, thereby improving the data migration efficiency.
[0155] S2, collecting statistics on the migration financial data of the migrating individuals in the migration area to obtain migration data segments, and performing migration processing on the migration data segments in batches.
[0156] It is understandable that after the division of the migration area is completed, the migration financial data of multiple migration individuals in the migration area can be counted to obtain migration data segments, so that the subsequent migration processing of the migration data segments can be carried out in batches to improve data migration efficiency.
[0157] The migration data segment is the sum of the migration financial data of the migrating individuals in the migration area.
[0158] S3, evenly divide the migration area to obtain a plurality of sub-migration areas corresponding to the migration area.
[0159] It is understandable that when migrating financial data, since the number of migrating individuals in the migration area can be large, but the number of migrating individuals that need to migrate financial data in the migration area is small, it is necessary to retrieve the migration data segment of the entire migration area and select the migration financial data of the enterprises that need to be migrated, which will increase the data processing volume. Therefore, the migration area can be evenly divided so that when the financial data of the enterprise is subsequently retrieved, the corresponding financial data of the included enterprise can be directly retrieved through the sub-migration area, thereby reducing data processing and improving data migration efficiency.
[0160] The sub-migration area is a sub-area obtained by dividing the migration area.
[0161] In some embodiments, step S3 (the step of evenly dividing the migration region to obtain a plurality of sub-migration regions corresponding to the migration region) specifically includes:
[0162] S31, obtaining the distance between the batch positions corresponding to any two batch individuals in the migration area as the direction positioning distance, selecting the two batch individuals corresponding to the largest direction positioning distance as the direction positioning individuals, and obtaining the direction positioning line according to the connecting line of the direction positioning individuals.
[0163] It can be understood that the directional positioning distance is the distance between the batch positions corresponding to any two batch individuals in the migration area. For example, when the distance between batch individual 1 and batch individual 2 in the migration area is 500 meters, the corresponding directional positioning distance is 500 meters, so that the two batch individuals corresponding to the largest directional positioning distance in the migration area are used as directional positioning individuals. For example, when the directional positioning distance between batch individual 3 and batch individual 4 in the migration area is the maximum directional positioning distance of 1000 meters, the corresponding batch individual 3 and batch individual 4 can be used as directional positioning individuals.
[0164] The direction positioning individuals are two batches of individuals corresponding to the maximum direction positioning distance, and the direction positioning line is the connecting line between the two direction positioning individuals.
[0165] It is worth mentioning that when the migration area is evenly divided in the prior art, the area is usually divided according to a predetermined horizontal or vertical direction, but the present invention can customize the direction positioning line according to the actual position of the batch individuals, and the direction positioning line can be an inclined direction of any angle, a horizontal direction, or a vertical direction.
[0166] Through the above implementation, the present invention can obtain the direction positioning line, so that the migration area can be divided according to the direction positioning line later.
[0167] S32, determining the sub-division area of the migration region according to a preset number of divisions, constructing sub-division lines perpendicular to the direction positioning line in the migration region based on the sub-division areas, dividing the migration region according to the sub-division lines, and obtaining a plurality of sub-migration areas corresponding to the migration region.
[0168] It can be understood that the preset number of divisions is the number of times the migration area is divided, which can be manually preset, for example, it can be 3 times, that is, the migration area is divided 3 times to obtain 4 sub-migration areas, so that the area of the sub-migration divided by the migration area can be determined, wherein the sub-division area is the area of the sub-migration area obtained after dividing the migration area, for example, when the area of the migration area is 1000 square meters, the sub-division area can be 1000÷4=250 square meters.
[0169] It is not difficult to understand that, according to the sub-division area, a sub-division line perpendicular to the direction positioning line is constructed in the migration area, so as to divide the migration area into a plurality of sub-migration areas with the same area.
[0170] The sub-division line is a line that evenly divides the migration area.
[0171] Through the above implementation, the present invention can perform customized division according to the distance of the migrating individuals in the migration area, so that the positions of the migrating individuals in the divided sub-migration areas are more concentrated, avoiding the situation where multiple migrating individuals in the sub-migration areas are far apart.
[0172] S33, obtaining a sub-migration area located at an edge position in any one of the migration areas as a starting sub-area, numbering the sub-migration areas in sequence with the starting sub-area as the starting position, obtaining sub-numbers corresponding to each of the sub-migration areas, and sorting the sub-numbers in ascending order to obtain a numbering sequence of the migration areas.
[0173] It is understandable that in order to facilitate the subsequent retrieval and statistics of the migration financial data of the migrating individuals according to the map, the divided sub-migration areas can be numbered, so that when the migration financial data corresponding to the migrating individuals are subsequently migrated, the efficiency of retrieval of the migration financial data can be improved.
[0174] It is not difficult to understand that when numbering the divided sub-migration areas, numbering can start from the sub-migration area at the edge position of the migration area. Thus, the sub-migration area located at the edge position can be used as the starting sub-area, and then the divided sub-migration areas can be numbered in sequence, and the sub-numbers corresponding to the sub-migration areas can be sorted in ascending order to obtain the numbering sequence of the migration area, so that when data is retrieved later, the specific migration individual can be located more accurately, thereby realizing rapid data retrieval and migration.
[0175] The starting sub-region is a sub-migration region located at an edge position in the migration region, the sub-number is a number corresponding to the sub-migration region, and the number sequence is a sequence obtained by arranging the numbers in ascending order.
[0176] For example: when the migration area is divided into 4 sub-migration areas, the edge sub-migration area can be numbered as 1 as the starting sub-area, and then the sub-migration areas can be numbered 1, 2, 3, 4 in sequence, and after ascending sorting, the resulting numbering sequence is (1, 2, 3, 4).
[0177] S34, sequentially counting the migration financial data of the migrating individuals in the sub-migration area corresponding to each sub-number in the numbering sequence, and obtaining the sub-migration data segment corresponding to the sub-number.
[0178] It should be noted that when investigating the financial situation of a certain area, it is usually necessary to first determine the enterprises associated with the area, and then retrieve the financial data of the corresponding enterprises, so as to statistically analyze the retrieved data and obtain the financial situation of the area. However, in the process of data retrieval, the prior art needs to traverse all enterprises to find out the enterprises associated with the area, and then retrieve the financial data of the corresponding enterprises, and then calculate and process the relevant data, which greatly increases the amount of data processing and reduces the efficiency of data retrieval and processing. Therefore, the present invention can directly retrieve data through the position of the number of the area passed through, and at the same time, sequentially count the migration financial data of the migrated individuals in the sub-migration area corresponding to each sub-number in the number sequence to obtain the sub-migration data segment corresponding to the sub-number, without traversing the financial data of the enterprise and each position to complete the retrieval, so that when the financial situation of a certain area is counted, the sub-migration area involved in the area of the statistical financial data can be quickly determined according to the migration map, so that the corresponding sub-migration data segment can be directly retrieved according to the position of the corresponding sub-number, which reduces the amount of data processing and greatly improves the data processing efficiency.
[0179] It can be understood that the sub-migration data segment is the sum of the migration financial data of all migrating individuals in the sub-migration area corresponding to the sub-number.
[0180] S35, sorting the corresponding sub-migration data segments in the migration data segment according to the order of the sub-numbers in the numbering sequence to obtain a data segment sequence corresponding to the migration area.
[0181] It can be understood that the data segment sequence is a sorted data sequence of the sub-migration data segments corresponding to the sub-migration areas in the migration area.
[0182] Through the above implementation, the present invention can obtain the data segment sequence corresponding to the migration area, so as to improve the migration efficiency when the data is subsequently retrieved and migrated. The present invention sorts the corresponding position sub-migration areas after division so that they have data at corresponding positions. For example, area No. 1, which is located at the head and tail from top to bottom, has sub-migration data segments that are also located at the head and tail in the data segment sequence, which can be directly retrieved through the passed positions.
[0183] S4, receiving the analysis area input by the analysis end, performing data analysis on the sub-migration area in the analysis area according to the regional analysis strategy, and obtaining financial analysis data corresponding to the analysis area.
[0184] It can be understood that the analysis area is the area where financial data needs to be analyzed. For example, when financial analysis needs to be performed on area A, area A is the corresponding analysis area, and the area can be an area arbitrarily planned by humans, and the analysis area may involve multiple sub-migration areas, and then the relevant data is analyzed to obtain the financial analysis data corresponding to the analysis area.
[0185] The financial analysis data refers to the result data obtained after analyzing and processing the data in the analysis area.
[0186] In some embodiments, step S4 (the receiving of the analysis area input by the analysis end, and performing data analysis on the sub-migration area in the analysis area according to the regional analysis strategy to obtain financial analysis data corresponding to the analysis area) specifically includes:
[0187] S41, receiving an analysis region input by an analysis terminal, and obtaining a sub-migration region having an overlapping area with the analysis region as a sub-region to be screened.
[0188] It can be understood that the analysis end is an information terminal for analyzing and processing financial data, such as the computer or mobile phone of a financial data analyst.
[0189] It is not difficult to understand that the analysis area can be any area. Therefore, the corresponding analysis area may involve multiple sub-migration areas that require data analysis. Furthermore, the sub-migration areas in the migration diagram that have overlapping parts with the analysis area can be used as sub-areas to be screened, so that the corresponding financial data can be quickly retrieved later.
[0190] S42, obtaining an overlapping area between the sub-region to be screened and the analysis region, and a sub-region area of the sub-region to be screened.
[0191] It should be noted that when conducting financial data analysis on the analysis area, the overlapping area and the sub-area area can be obtained to determine whether it is necessary to retrieve the sub-migration data segment corresponding to the sub-area to be screened. For example, when the analysis area may only include 10 square meters of sub-area 1 to be screened, compared with the area of the entire sub-migration area of the sub-area to be screened, the overlapping area is negligible. Therefore, in order to make the obtained financial analysis data more consistent with the results in the analysis area, there is no need to retrieve and analyze the sub-migration data segment corresponding to sub-area 1 to be screened, thereby reducing the amount of data processing. Similarly, when the overlapping area is equal to the sub-area area, it can be said that the sub-area to be screened is completely within the analysis area, and the corresponding sub-migration data segment needs to be retrieved and analyzed.
[0192] It can be understood that the overlapping area is the overlapping area of the sub-region to be screened and the analysis region, and the sub-region area is the area of the sub-region to be screened.
[0193] S43: When it is determined that the overlapping area is equal to the sub-region area, the corresponding sub-region to be screened is used as an analysis sub-region.
[0194] It is understandable that when the overlapping area is equal to the sub-region area, the corresponding sub-region to be screened is used as the analysis sub-region, so that the corresponding sub-migration data segment can be quickly retrieved for analysis and processing later.
[0195] The analysis sub-region is the sub-region to be screened corresponding to the overlapping area being equal to the sub-region area. For example, when the overlapping area is 2000 square meters and the sub-region area of the sub-region to be screened 2 is 2000 square meters, since the overlapping area is equal to the sub-region area, the sub-region to be screened 2 can be used as the analysis sub-region.
[0196] S44: When it is determined that the overlapping area is smaller than the sub-region area, the corresponding sub-region to be screened is used as a local coverage area.
[0197] It can be understood that when the overlapping area is smaller than the sub-region area, the corresponding sub-region to be screened is taken as a local coverage area, which means that the analysis area does not completely contain the sub-region to be screened. Therefore, it can be taken as a local coverage area to facilitate further judgment of the local coverage area and retrieve the relevant sub-migration data.
[0198] The local coverage area is the sub-region to be screened corresponding to when the overlapping area is smaller than the sub-region area. For example, when the overlapping area is 100 square meters and the sub-region area of sub-region 1 to be screened is 1000 square meters, since the overlapping area is smaller than the sub-region area, sub-region 1 to be screened can be used as the local coverage area.
[0199] S45, obtaining the number of migrating individuals in the local coverage area as a calculated number, and obtaining a density ratio according to the calculated number and the area ratio of the corresponding sub-area.
[0200] It should be noted that the number of migration individuals in each sub-migration area may be inconsistent. For example, there are 10 migration individuals in the local coverage area 1 and 1 migration individual in the local coverage area 4. Therefore, when judging whether it is necessary to retrieve the sub-migration data segment corresponding to the local coverage area, the density ratio in the local coverage area can be calculated. When the number of migration individuals in the local coverage area is greater and the corresponding density ratio is greater, the corresponding migration financial data will have a greater impact on the financial analysis data of the analysis area. In turn, the sub-migration data segment of the corresponding sub-migration area can be retrieved and analyzed. When the number of migration individuals in the local coverage area is smaller and the corresponding density ratio is smaller, the corresponding migration financial data will have a smaller impact on the financial analysis data of the analysis area. In this way, the corresponding sub-migration data segment may not be retrieved, thereby reducing the amount of data processing and improving the efficiency of financial data analysis.
[0201] It can be understood that the calculated number is the number of migrant individuals in the local coverage area, and the density ratio is the density value of the migrant individuals in the local coverage area. For example, when the calculated number is 200 and the sub-area area is 1000 square meters, the corresponding density ratio is 200÷1000=1 / 5.
[0202] S46, performing calculation according to the overlapping area of the local coverage area and the density ratio to obtain a determination coefficient corresponding to the local coverage area.
[0203] It can be understood that the judgment coefficient corresponding to the local coverage area can be calculated based on the overlapping area and density ratio, and then the local coverage area can be determined as the analysis sub-area based on the judgment coefficient, so that the corresponding sub-migration data segment can be retrieved to obtain the financial analysis data corresponding to the analysis area.
[0204] The judgment coefficient can be obtained by the following formula:
[0205]
[0206] in, is the judgment coefficient, is the area weight value, is the overlapping area, is the preset area, is the density weight value, is the density ratio, It is the preset density ratio.
[0207] Understandably, The area weight value is the weight value of the overlapping area in the judgment coefficient, which can be preset manually. The preset area is a preset area value, which is used to compare with the overlapping area and calculate the judgment coefficient. The density weight value is the weight value of the density ratio in the judgment coefficient, which can be preset manually. The preset density ratio is a preset reference value of the density ratio.
[0208] It is not difficult to understand that when the overlapping area is larger, the area weight value is larger, and the density ratio and density weight value are larger, the obtained judgment coefficient will also be larger. It can be explained that the larger the overlapping area is and the more the number of migrant individuals in the area is, the greater the impact on the financial analysis data of the analysis area is. Therefore, the corresponding local coverage area can be used as an analysis sub-area to retrieve the corresponding sub-migration data segment. When the overlapping area becomes smaller, the area weight value is smaller, and the density ratio and density weight value are smaller, the obtained judgment coefficient will also be smaller. It can be explained that the smaller the overlapping area is and the fewer the number of migrant individuals in the area, the migration financial data of the migrant individuals in the corresponding local coverage area have little impact on the financial analysis data of the analysis area. Therefore, the corresponding local coverage area can be used as a sub-area for analysis, so that the corresponding sub-migration data segment is not retrieved, which can reduce the amount of data processing and facilitate the analysis area to obtain accurate financial analysis data.
[0209] S47, when it is determined that the judgment coefficient is greater than the preset coefficient, the corresponding local coverage area is used as an analysis sub-area.
[0210] It can be understood that the preset coefficient is a determination coefficient used to determine whether the local coverage area can be used as an analysis sub-area, and can be preset manually.
[0211] It is not difficult to understand that when the judgment coefficient is greater than the preset coefficient, it can be explained that the data in the local coverage area has a greater reference to the results of the financial data analysis in the analysis area. Therefore, the local coverage area can be used as an analysis sub-area so that the sub-migration data segment of the corresponding sub-migration area can be retrieved to perform data analysis and increase the accuracy of the financial analysis data.
[0212] S48, collecting statistics on the migration financial data of the migration individuals in the sub-migration data segment corresponding to the analysis sub-region to obtain financial analysis data.
[0213] It can be understood that the migration financial data of the migrating individuals in the sub-migration data segments corresponding to the analysis sub-regions are summed up, so that the financial analysis data required by the analysis region can be obtained.
[0214] Through the above-mentioned implementation mode, the present invention can statistically analyze the migration financial data of the corresponding migrating individuals to obtain financial analysis data, realize financial analysis of the analysis data, and can calculate the overall financial data in the area by summing up, or can calculate the average financial data by averaging. The specific calculation is based on the actual situation. The present invention can quickly retrieve relevant data through the location of the passed area without traversing the entire database, thereby reducing the amount of data processing.
[0215] See also Figure 4 , is a schematic diagram of a structure of a financial data migration device based on a database provided by an embodiment of the present invention, the device comprising:
[0216] The acquisition module is used to obtain a migration map of migrated financial data, divide the migration map according to a batch migration strategy, and obtain multiple migration areas. The migration map has migration positions corresponding to migrated individuals.
[0217] The migration module is used to collect statistics on the migration financial data of the migrating individuals in the migration area to obtain migration data segments, and perform migration processing on the migration data segments in batches.
[0218] A division module is used to evenly divide the migration area to obtain a plurality of sub-migration areas corresponding to the migration area.
[0219] The analysis module is used to receive the analysis area input by the analysis terminal, perform data analysis on the sub-migration area in the analysis area according to the regional analysis strategy, and obtain financial analysis data corresponding to the analysis area.
[0220] like Figure 5 FIG. 1 is a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present invention. The electronic device 50 includes: a processor 51, a memory 52 and a computer program; wherein
[0221] The memory 52 is used to store the computer program, which may also be a flash memory. The computer program is, for example, an application program, a functional module, etc. for implementing the above method.
[0222] The processor 51 is used to execute the computer program stored in the memory to implement each step performed by the device in the above method. For details, please refer to the relevant description in the above method embodiment.
[0223] Optionally, the memory 52 may be independent or integrated with the processor 51 .
[0224] When the memory 52 is a device independent of the processor 51, the device may further include:
[0225] The bus 53 is used to connect the memory 52 and the processor 51 .
[0226] The present invention also provides a readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, it is used to implement the methods provided by the various embodiments described above.
[0227] Among them, the readable storage medium can be a computer storage medium or a communication medium. The communication medium includes any medium that facilitates the transmission of a computer program from one place to another. The computer storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer. For example, a readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application-specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). In addition, the ASIC can be located in a user device. Of course, the processor and the readable storage medium can also exist in a communication device as discrete components. The readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device, etc.
[0228] The present invention also provides a program product, which includes an execution instruction, which is stored in a readable storage medium. At least one processor of a device can read the execution instruction from the readable storage medium, and at least one processor executes the execution instruction so that the device implements the methods provided in the above various embodiments.
[0229] In the embodiments of the above-mentioned devices, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the present invention may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.
[0230] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A financial data migration method based on a database, characterized in that: include: Obtaining a migration map of the migrated financial data, dividing the migration map according to a batch migration strategy to obtain a plurality of migration regions, wherein the migration map has migration positions corresponding to the migrated individuals; Counting the migration financial data of the migrating individuals in the migration area to obtain migration data segments, and performing migration processing on the migration data segments in batches; Evenly dividing the migration area to obtain a plurality of sub-migration areas corresponding to the migration area; Receiving the analysis area input by the analysis end, performing data analysis on the sub-migration area in the analysis area according to the regional analysis strategy, and obtaining financial analysis data corresponding to the analysis area; The migration map of the migrated financial data is obtained, and the migration map is divided according to the batch migration strategy to obtain multiple migration areas, including: Acquire a migration graph of the migration financial data, and construct a virtual positioning frame containing the migration graph according to the minimum longitude coordinate, the minimum latitude coordinate, the maximum longitude coordinate, and the maximum latitude coordinate corresponding to the migration graph; Obtaining any vertex in the virtual positioning frame as an extreme point corresponding to the migration graph; Determine the edge point in the migration graph that is closest to the extreme point as the starting positioning point, and divide the migration graph according to the starting positioning point to obtain multiple migration areas; The step of determining the edge point in the migration graph that is closest to the extreme point as the starting positioning point, and dividing the migration graph according to the starting positioning point to obtain a plurality of migration regions includes: Determine an edge point in the migration graph that is closest to the extreme point as a starting positioning point, and count the migration individuals in the migration graph to obtain a migration set corresponding to the migration graph; Acquire the position information of the starting positioning point to obtain the starting position, and calculate according to the starting position and the migration positions of the migration individuals in each migration set to obtain the selection distance corresponding to the starting positioning point; Sort the migration set in ascending order based on the selection distance to obtain a migration sequence; Selecting migration individuals in the migration sequence as batch individuals in turn according to a preset selection quantity, deleting and updating the migration set based on the batch individuals to obtain a current migration set; Determine the migration position corresponding to the batch individuals as the batch position, and use the last selected batch individuals as the current starting positioning point, construct a migration area containing the batch individuals according to the batch position, repeat the above steps of constructing the migration area until the current migration set is an empty set, and obtain multiple migration areas; The evenly dividing the migration area to obtain a plurality of sub-migration areas corresponding to the migration area includes: Obtain the distance between the batch positions corresponding to any two batch individuals in the migration area as the direction positioning distance, select the two batch individuals corresponding to the largest direction positioning distance as the direction positioning individuals, and obtain the direction positioning line according to the connecting line of the direction positioning individuals; Determine the sub-division area of the migration region according to a preset number of divisions, construct a sub-division line perpendicular to the direction positioning line in the migration region based on the sub-division area, divide the migration region according to the sub-division line, and obtain a plurality of sub-migration areas corresponding to the migration region; Obtaining a sub-migration area located at an edge position of any one of the migration areas as a starting sub-area, sequentially numbering the sub-migration areas with the starting sub-area as the starting position to obtain a sub-number corresponding to each of the sub-migration areas, and sorting the sub-numbers in ascending order to obtain a number sequence of the migration areas; Sequentially counting the migration financial data of the migrating individuals in the sub-migration area corresponding to each sub-number in the numbering sequence to obtain the sub-migration data segment corresponding to the sub-number; The corresponding sub-migration data segments in the migration data segment are sorted according to the order of the sub-numbers in the numbering sequence to obtain a data segment sequence corresponding to the migration area.
2. The method according to claim 1, characterized in that The step of constructing a migration area including the batch of individuals according to the batch positions includes: Calculate the mean of the minimum longitude coordinate and the maximum longitude coordinate in the batch position to obtain the center longitude coordinate; Calculate the mean based on the minimum latitude coordinate and the maximum latitude coordinate in the batch position to obtain the center latitude coordinate; Obtaining center positions corresponding to the plurality of batches of individuals according to the center longitude coordinates and the center latitude coordinates; A migration area including the batch of individuals is constructed according to the central position and the batch positions.
3. The method according to claim 2, characterized in that The step of constructing a migration area including the batch of individuals according to the central position and the batch positions includes: Obtaining the distance between the center position and each of the batch positions as a construction distance, and selecting the largest construction distance as an initial radius; Obtaining a migration radius according to a sum of the initial radius and a preset additional distance, and constructing an initial area based on the migration radius and the center position; When it is determined that there are no other migrating individuals except the batch of individuals in the initial area, the corresponding initial area is used as a migrating area containing the batch of individuals; When it is determined that there are other migrating individuals other than the batch individuals in the initial area, the corresponding migrating individuals are used as removed individuals, and the migration positions of the removed individuals are used as removed positions; The initial area is adjusted according to the removal position and the center position to obtain a migration area including the batch of individuals.
4. The method according to claim 3, characterized in that The step of performing regional adjustment on the initial region according to the removal position and the center position to obtain a migration region including the batch of individuals comprises: A removal line is obtained according to a line connecting the removal position and the center position, a radius of the removal line is determined as a removal radius, and an intersection of the removal radius and the initial area is used as a positioning point; Taking the positioning point as the center point, intercepting the region edge line of the initial region based on a preset arc length, to obtain two first fan-shaped connection points after interception; Based on the preset removal distance, determine the second fan-shaped connection point along the removal line pointing to the center position with the removal position as the starting point; Connecting the second fan-shaped connection points with the first fan-shaped connection points respectively to obtain a removed fan-shaped area corresponding to the removed individual; The initial area is deleted and updated according to the removed sector area to obtain a migration area containing the batch of individuals.
5. The method according to claim 1, characterized in that The receiving analysis area input by the analysis terminal, performing data analysis on the sub-migration area in the analysis area according to the regional analysis strategy, and obtaining financial analysis data corresponding to the analysis area, including: Receiving an analysis region inputted by an analysis terminal, and obtaining a sub-migration region having an overlapping area with the analysis region as a sub-region to be screened; Obtaining the overlapping area between the sub-region to be screened and the analysis region, and the sub-region area of the sub-region to be screened; When it is determined that the overlapping area is equal to the sub-region area, the corresponding sub-region to be screened is used as the analysis sub-region; When it is determined that the overlapping area is smaller than the area of the sub-region, the corresponding sub-region to be screened is used as a local coverage area; Obtaining the number of migrating individuals in the local coverage area as a calculated number, and obtaining a density ratio according to the calculated number and a ratio of the area of the corresponding sub-area; Calculating according to the overlapping area of the local coverage area and the density ratio to obtain a determination coefficient corresponding to the local coverage area; When it is determined that the judgment coefficient is greater than the preset coefficient, the corresponding local coverage area is used as an analysis sub-area; The migration financial data of the migration individuals in the sub-migration data segment corresponding to the analysis sub-area are statistically analyzed to obtain financial analysis data.
6. The method according to claim 1, characterized in that The judgment coefficient is obtained by the following formula: in, is the judgment coefficient, is the area weight value, is the overlapping area, is the preset area, is the density weight value, is the density ratio, It is the preset density ratio.
7. A financial data migration device based on a database, characterized in that: include: An acquisition module, used to acquire a migration map of the migrated financial data, divide the migration map according to a batch migration strategy to obtain a plurality of migration areas, the migration map having migration positions corresponding to the migrated individuals; A migration module, used for collecting statistics of the migration financial data of the migrating individuals in the migration area to obtain migration data segments, and performing migration processing on the migration data segments in batches; A division module, used for evenly dividing the migration area to obtain a plurality of sub-migration areas corresponding to the migration area; An analysis module, for receiving an analysis area input by an analysis terminal, performing data analysis on a sub-migration area in the analysis area according to a regional analysis strategy, and obtaining financial analysis data corresponding to the analysis area; The migration map of the migrated financial data is obtained, and the migration map is divided according to the batch migration strategy to obtain multiple migration areas, including: Acquire a migration graph of the migration financial data, and construct a virtual positioning frame containing the migration graph according to the minimum longitude coordinate, the minimum latitude coordinate, the maximum longitude coordinate, and the maximum latitude coordinate corresponding to the migration graph; Obtaining any vertex in the virtual positioning frame as an extreme point corresponding to the migration graph; Determine the edge point in the migration graph that is closest to the extreme point as the starting positioning point, and divide the migration graph according to the starting positioning point to obtain multiple migration areas; The step of determining the edge point in the migration graph that is closest to the extreme point as the starting positioning point, and dividing the migration graph according to the starting positioning point to obtain a plurality of migration regions includes: Determine an edge point in the migration graph that is closest to the extreme point as a starting positioning point, and count the migration individuals in the migration graph to obtain a migration set corresponding to the migration graph; Acquire the position information of the starting positioning point to obtain the starting position, and calculate according to the starting position and the migration positions of the migration individuals in each migration set to obtain the selection distance corresponding to the starting positioning point; Sort the migration set in ascending order based on the selection distance to obtain a migration sequence; Selecting migration individuals in the migration sequence as batch individuals in turn according to a preset selection quantity, deleting and updating the migration set based on the batch individuals to obtain a current migration set; Determine the migration position corresponding to the batch individuals as the batch position, and use the last selected batch individuals as the current starting positioning point, construct a migration area containing the batch individuals according to the batch position, repeat the above steps of constructing the migration area until the current migration set is an empty set, and obtain multiple migration areas; The evenly dividing the migration area to obtain a plurality of sub-migration areas corresponding to the migration area includes: Obtain the distance between the batch positions corresponding to any two batch individuals in the migration area as the direction positioning distance, select the two batch individuals corresponding to the largest direction positioning distance as the direction positioning individuals, and obtain the direction positioning line according to the connecting line of the direction positioning individuals; Determine the sub-division area of the migration region according to a preset number of divisions, construct a sub-division line perpendicular to the direction positioning line in the migration region based on the sub-division area, divide the migration region according to the sub-division line, and obtain a plurality of sub-migration areas corresponding to the migration region; Obtaining a sub-migration area located at an edge position of any one of the migration areas as a starting sub-area, sequentially numbering the sub-migration areas with the starting sub-area as the starting position to obtain a sub-number corresponding to each of the sub-migration areas, and sorting the sub-numbers in ascending order to obtain a number sequence of the migration areas; Sequentially counting the migration financial data of the migrating individuals in the sub-migration area corresponding to each sub-number in the numbering sequence to obtain the sub-migration data segment corresponding to the sub-number; The corresponding sub-migration data segments in the migration data segment are sorted according to the order of the sub-numbers in the numbering sequence to obtain a data segment sequence corresponding to the migration area.
