A method for optimizing the distribution of emergency resources
By processing first aid site data and historical scheduling data, using Gaussian distance attenuation function and demand selection supply probability, and combining clustering algorithms to optimize first aid resource distribution, the problem of improper resource allocation in the existing technology is solved, and more accurate resource distribution and spatial optimization are achieved.
Patent Information
- Application Number
- CN202410448931.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-15
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2044-04-15
AI Technical Summary
The existing two-step mobile search method has fixed threshold problems in the optimization of first aid resource distribution, lacks spatial heterogeneity flexibility and parameter sensitivity, and cannot accurately reflect the characteristics and needs of different regions, resulting in improper resource allocation.
By establishing original files of first aid site data and historical scheduling data based on target administrative divisions, format conversion and geographic information system processing, applying Gaussian distance attenuation function and demand selection supply probability, combining clustering algorithms to optimize the distribution of first aid resource, drawing an arithmetic heat map and performing spatial analysis.
The accuracy and optimization effect of first aid resource distribution are improved, and it can better reflect user behavior and spatial heterogeneity, identify areas with oversupply or insufficient resources, and achieve refined resource layout adjustments.
Smart Images

Figure CN118571434B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of information processing of medical resources, and in particular relates to a method for optimizing the distribution of emergency resources. Background Art
[0002] Emergency rescue is a matter of vital importance to public safety, and governments and departments at all levels attach great importance to it. The period before an ambulance transports the injured or sick to the hospital is called the first aid phase. While significant research has been conducted in this area, establishing an efficient first aid system remains a pressing challenge.
[0003] The two-step moving search algorithm (2SFCA) is a commonly used method in the study of the spatial accessibility of public service facilities. This method uses two steps to search based on supply points and demand points, calculate the supply-demand ratio, and ultimately obtain accessibility. The first step is to calculate the supply-demand ratio with the supply point as the center within a specified threshold. The second step is to search for supply points within the range centered on the demand point, and accumulate the supply-demand ratios of all supply points to obtain accessibility. Generally, people are more likely to visit places that are close, while accessibility decreases at greater distances. The improved two-step moving search algorithm adds a distance decay function to the above algorithm, so that locations within different distance ranges contribute differently to accessibility, which is more in line with reality.
[0004] However, the two-step mobile search method gradually exposed some problems during use, such as:
[0005] Problem with fixed thresholds: The algorithm uses fixed thresholds to determine the neighborhoods of supply and demand points, which may not be applicable to different geographical areas.
[0006] Lack of flexibility to spatial heterogeneity: The system has poor adaptability to spatial heterogeneity and may not fully consider the spatial characteristics and differences of different regions.
[0007] Parameter sensitivity: The algorithm is sensitive to the choice of parameters. The selection of thresholds, parameters of the distance decay function, etc. may need to be fine-tuned according to the specific situation.
[0008] The above information disclosed in this Background section is only for enhancement of understanding of the background of the invention and therefore it may contain information that does not form the prior art that is already known to a person of ordinary skill in the art. Summary of the Invention
[0009] In order to solve the above problems, the present invention discloses a method for optimizing the distribution of emergency resources, which comprises the following steps:
[0010] S1. Create a corresponding raw data file based on the data of all emergency sites within the target administrative area and the historical dispatch data of successfully sending patients to any emergency site;
[0011] S2. Convert the format of the original data file to obtain a .shp format file required by the geographic information system;
[0012] S3. According to all sub-administrative divisions at any specified level within the target administrative division and the surface type data of the geometric plane corresponding to the target administrative division parsed from the .shp file, obtain the surface type data of the geometric plane of all sub-administrative divisions at that level, and further obtain the centroids and boundaries of the geometric planes of all sub-administrative divisions at that level;
[0013] S4. Based on the historical dispatch data parsed from the .shp file, after traversing all sub-administrative divisions at the same level, obtain historical dispatch data of patients successfully transported to any emergency station within the geographical scope of all sub-administrative divisions at the same level;
[0014] S5. Add the historical dispatch data of patients successfully transported to any emergency station within the geographical scope of each sub-administrative division at the level to the data of the centroid of the corresponding sub-administrative division at the level;
[0015] S6. For any sub-administrative division at the level, calculate a convenience value for patients in the sub-administrative division to reach the emergency station, and use the convenience value as accessibility data;
[0016] S7. Map the accessibility data of the sub-administrative division and the historical dispatch data of successfully sending patients to any emergency station within the geographical scope of the sub-administrative division to the interval [0, 1], obtain a difference data set based on the mapped accessibility data and historical dispatch data, and draw an arithmetic difference heat map;
[0017] S8. Perform spatial cluster analysis and visualization based on the difference data set to guide the distribution optimization of emergency resources.
[0018] The present invention has the following advantages:
[0019] 1) The present invention applies the Gaussian distance decay function, which reflects the characteristic that the longer the distance, the smaller the demand, so that locations within different distance ranges contribute differently to accessibility, which is more in line with actual conditions.
[0020] 2) By introducing the demand-selection supply probability—the probability of a demand point selecting different supply points—this method can reflect the preferences and selection probabilities of different demand points for different supply points, more realistically simulating user behavior. The demand-selection supply probability also helps improve the modeling of spatial heterogeneity, enabling the computational accessibility model to more accurately predict user selection behavior, thereby improving the model's predictive accuracy. This allows planning and decision-making for further optimization of emergency resources to be more consistent with actual conditions.
[0021] 3) The present invention can intuitively display the spatial distribution of areas with surplus and insufficient emergency resources by drawing an arithmetic difference heat map of the distribution of emergency resources.
[0022] 4) This invention applies a clustering algorithm to analyze heat maps, facilitating targeted selection of locations suitable for additional resources and spatial annotation. This effectively addresses the resource misallocation issues that can arise from traditional methods of estimating total demand points and intuitively selecting emergency sites, facilitating refined adjustments to emergency resource layout and optimized spatial distribution.
[0023] 5) The present invention sets different service radii for the main urban area and non-main urban area, and the probability of demand points selecting supply points in different areas may vary. This enables the present invention to more comprehensively reflect the spatial complexity of emergency resources and be more in line with actual conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 A schematic diagram of a flow chart of the method for optimizing the distribution of emergency resources in one embodiment of the present invention;
[0025] Figure 2 A schematic diagram of sub-administrative divisions and their centroids in one embodiment of the present invention;
[0026] Figure 3 A schematic diagram of patient geographic locations corresponding to sub-administrative divisions and their historical dispatch data in one embodiment of the present invention;
[0027] Figure 4A 、 Figure 4B A schematic diagram of a circle with an emergency site as its center and a circle with a sub-administrative division as its center in a target administrative division in one embodiment of the present invention;
[0028] Figure 5 A schematic diagram of accessibility in one embodiment of the present invention;
[0029] Figure 6 A schematic diagram of an arithmetic difference heat map in one embodiment of the present invention;
[0030] Figure 7 A schematic diagram of K-means clustering in one embodiment of the present invention;
[0031] Figure 8 This is a schematic diagram of mean shift clustering in one embodiment of the present invention. DETAILED DESCRIPTION
[0032] Specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Although specific embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present invention and to fully convey the scope of the present invention to those skilled in the art.
[0033] It should be noted that certain words are used in the specification and claims to refer to specific components. Those skilled in the art should understand that technicians may use different nouns to refer to the same component. This specification and claims do not use the difference in nouns as a way to distinguish components, but use the difference in the functions of the components as the criterion for distinction. As mentioned throughout the specification and claims, "including" or "comprising" is an open term, so it should be interpreted as "including but not limited to". The subsequent description of the specification is a preferred embodiment of the present invention, but the description is based on the general principles of the specification and is not intended to limit the scope of the invention. The scope of protection of the present invention shall be as defined in the attached claims.
[0034] To facilitate understanding of the embodiments of the present invention, further explanation will be given below using specific embodiments as examples in conjunction with the accompanying drawings, and the accompanying drawings do not constitute a limitation on the embodiments of the present invention.
[0035] See also Figure 1 In one embodiment, the present invention discloses a method for optimizing the distribution of emergency resources, the method comprising the following steps:
[0036] S1. Create a corresponding raw data file based on the data of all emergency sites within the target administrative area and the historical dispatch data of successfully sending patients to any emergency site;
[0037] Exemplarily, the emergency site data includes at least the latitude and longitude of the emergency site; the historical dispatch data includes at least the geographic location of the patient when the health emergency occurs, that is, the on-site address later. In addition, the historical dispatch data also includes the departure station and the destination, that is, the location of the emergency site to which the patient is sent. See later for details.
[0038] Creating the corresponding raw data file includes preprocessing all emergency site data and all medical emergency call data within the target administrative area. Preferably, this data preprocessing includes data desensitization, data integration, geocoding services, and data cleansing. Data desensitization is used in scenarios where data is sent externally. This one-time processing ensures that sensitive information is not exposed when the data leaves the secure environment.
[0039] Exemplarily, the data integration includes integrating the data of first aid stations and dividing the regions to which the first aid stations belong.
[0040] The example data is shown in Table 1 below, where "station" represents the name of the first aid station; "type" represents the region to which it belongs, and this region is a designated hierarchical sub-administrative region of the target administrative division. For example, it is the first-level sub-administrative region of the city, that is, the district:
[0041] Table 1: Integrated data of first aid stations
[0042] station type j1 Main urban area j2 Main urban area j3 Non-main urban area j4 Non-main urban area j5 Non-main urban area j6 Non-main urban area j7 Main urban area j8 Main urban area
[0043] Regarding data desensitization: For sensitive information such as names and phone numbers contained in historical dispatch data, the data is desensitized and the sensitive information is deleted. The desensitized dispatch data is shown in Table 2:
[0044] Table 2: Desensitized dispatch data
[0045] Departure station Site address Delivery location j1 xx x County J1 j3 xx Taken back to our hospital j3 xx Taken back to our hospital j8 xx Taken back to our hospital j2 xx j1 j1 xx Return the car
[0046] Among them, "departure sub-station" indicates which first aid station dispatches a vehicle to pick up the patient; "scene address" indicates the address where the patient is located; "destination" indicates which first aid station the patient is sent to for medical treatment.
[0047] Since the content of the "destination" column in the desensitized data contains data such as "pick up and return to our hospital", this data needs to be regularized to be consistent with the data of the "departure sub-station". This step needs to be refined according to the actual data. For example, using the string processing functions of the known pandas and numpy, the data in the "destination" column can be replaced and cleaned according to different conditions.
[0048] Further data normalization:
[0049] Use the known np.where function to implement that if "destination" contains "our hospital", it is replaced with the value of "departure sub-station", otherwise the original value is retained; and, apply the string replacement method str.replace for unified processing, and uniformly replace the content of "x County j1" in the "destination" of the above example data with "j1". Many similar data can be processed using this method. After processing the data, it is further saved to a new data column, for example, saved to the "destination 1" column. The example is as follows:
[0050] Table 3: Dispatch data obtained by standardizing and unifying the destination
[0051] Departure station Site address Delivery location Deliver to location 1 j1 xx x County J1 j1 j3 xx Taken back to our hospital j3 j3 xx Taken back to our hospital j3 j8 xx Taken back to our hospital j8 j2 xx j1 j1 j1 xx Return the car Other situations
[0052] As for geocoding, for example, it is the process of converting an address (such as "Beijing") into longitude and latitude coordinates (such as 116.407387, 39.904179). To implement geocoding, you can call the API of the map service provider. For example, use a known map API. These APIs provide address resolution functions, which can send an address and return coordinates. If georeverse coding is involved, it means converting longitude and latitude coordinates into actual addresses. Similarly, call a known reverse geocoding API, send longitude and latitude coordinates, and the API will return address information containing the coordinates, such as detailed addresses such as province / city, district / county, and street.
[0053] In summary, the present invention can implement geocoding services through exemplary APIs in geocoding or georeverse coding.
[0054] For example, see the table below:
[0055] Table 4: Data integrated from pre-hospital emergency sites with geocoded latitude and longitude data
[0056] station type longitude_latitude longitude latitude j1 Main urban area 1xx.52x64, x6.58x125 1xx.52x64 x6.58x125 j2 Main urban area 1xx.49x491, x6.60x531 1xx.49x491 x6.60x531 j3 Non-main urban area 1xx.53, x6.62 1xx.53 x6.62 j4 Non-main urban area 1xx.50x817, x6.76x791 1xx.50x817 x6.76x791 j5 Non-main urban area 1xx.59x86, x6.31x138 1xx.59x86 x6.31x138 j6 Non-main urban area 1xx.48x109, x6.59x978 1xx.48x109 x6.59x978 j7 Main urban area 1xx.48x452, x6.64x129 1xx.48x452 x6.64x129 j8 Main urban area 1xx.12x489, x6.29x432 1xx.12x489 x6.29x432
[0057] Regarding the data preprocessing of the historical scheduling data, see the following table:
[0058] Table 5: Adding the longitude and latitude information of the patient's on-site address to Table 3
[0059]
[0060] About data cleaning:
[0061] Under the premise that the dispatch data of emergency stations are normally dispatched and effectively dispatched, and that the vehicles are normally delivered to the emergency stations, the data cleaning can be completed by using the known drop_duplicates method to delete duplicate rows and data that does not meet the above premise. For example, see Table 6:
[0062]
[0063] S2. Convert the format of the original data file to obtain a .shp format file required by the geographic information system;
[0064] For example, if the original data file is an Excel file, convert it to the .shp format required by the GIS. It's important to keep the column names in English before converting to avoid errors. It's understandable that both emergency station data and historical dispatch data contain longitude and latitude information, which is displayed as point data on a map. Naturally, the original data file can also be a .txt, .csv, or .json file.
[0065] See Table 7 for an example of data information in a .shp format file:
[0066]
[0067] The geometry data represents a point geometry, or in other words, a point in the geometric plane corresponding to the target administrative division. Such a point represents a specific geographic location and is represented by a pair of coordinates.
[0068] In another embodiment, regarding converting an EXCEL data file into a .shp format file:
[0069] Using the known gpd.points_from_xy method, two GeoPandas GeoSeries are created based on the longitude and latitude information of the site and demand data. These GeoSeries store the point data of the emergency sites and the patient locations involved in the historical dispatch data, i.e., Point objects. These Point objects represent point data in the geometric plane of the target administrative division.
[0070] Use the gpd.GeoDataFrame() method to merge the patient location data associated with the site and historical dispatch data with the corresponding sub-administrative division geometry objects, forming two GeoDataFrames, gdf_sites and gdf_demands. The geometry objects are added as geometry columns to the GeoDataFrame, integrating geographic information and attribute data.
[0071] Through gdf_sites.crs and gdf_demands.crs, the initial coordinate system of GeoDataFrames is set to WGS 84 (latitude and longitude), that is, the EPSG code is "epsg:4326". This is to ensure that the initial coordinate system of the data is correct before performing the projected coordinate system conversion;
[0072] Use the to_crs method to convert the geometry objects in the GeoDataFrames of the site and requirements to the specified projection coordinate system ("epsg:2366"). Data is converted from the WGS 84 coordinate system to EPSG
[0073] 2366 coordinate system for further spatial analysis or visualization. It should be noted that the initial coordinates are set to WGS84 (EPSG:4326). Based on longitude and latitude positioning, distance calculations are required later and then converted to the EPSG:2366 coordinate system. The former is a geographic coordinate system, while the latter is a projected coordinate system.
[0074] Table 8 shows the data of the emergency stations in the projected coordinate system:
[0075]
[0076] Tables 9 and 10 show the data in the EXCEL data file before conversion and the data after conversion to the .shp format file:
[0077] Table 9:
[0078] place longitude latitude Beijing 116.407387 39.904179 Shanghai 121.473667 31.230525 Guangzhou 113.264499 23.130061
[0079] Table 10:
[0080] place longitude latitude geometry Beijing 116.407387 39.904179 POINT(41679032.078 4463205.877) Shanghai 121.473667 31.230525 POINT(42068550.212 3465382.078) Guangzhou 113.264499 23.130061 POINT(41188066.596 2616869.777)
[0081] Among them, the longitude and latitude displayed by "longitude and latitude" are quantities in the geographic coordinate system, and the unit is degree; "geometry" is based on the projected coordinate system, and the unit is meter. The coordinate system conversion is required for the calculation of distance in the present invention.
[0082] S3. According to all sub-administrative divisions at any specified level within the target administrative division and the surface type data of the geometric plane corresponding to the target administrative division parsed from the .shp file, obtain the surface type data of the geometric plane of all sub-administrative divisions at that level, and further obtain the centroids and boundaries of the geometric planes of all sub-administrative divisions at that level;
[0083] Regarding all sub-administrative divisions of any specified level, for example, Community C in District B of City A and Village E in County D of City A, Community C and Village E can be the sub-administrative divisions of the specified level in the present invention; although the corresponding District B and County D are the directly superior sub-administrative divisions of Community C and Village E respectively, District B and County D can also be the sub-administrative divisions of the specified level in the present invention.
[0084] After converting the target administrative division's polygon data into sub-administrative division point and line data, the centroid and boundary of the geometric plane of a specific sub-administrative division at any level can be obtained based on the administrative division affiliation between sub-administrative divisions at each level. For example, the centroid and boundary of District B and County D can be obtained, as well as the centroid and boundary of Community C and Village E. It should be noted that the administrative division data involved in the polygon data can be purchased from a third party. During conversion, for example, the GeoPandas spatial methods .boundary and .centroid are used to convert the polygon data representing the region into point data representing the region's boundary and center. GeoPandas is a Pandas-based Python library for processing geospatial data with geometric (point, line, polygon) attributes. GeoSeries is a core data structure in the GeoPandas library. GeoSeries can be seen as a spatial data extension of the Pandas Series object. A GeoSeries object consists of two parts: a regular Pandas Series that stores non-spatial data, and a "geometry" array that stores the corresponding spatial data (geometric objects such as points, lines, and polygons). .boundary is an attribute of GeoSeries that returns a new GeoSeries in which each geometric object is replaced with the boundary line of the object. By using the .boundary attribute, the linear ring that constitutes the periphery of the original surface geometric object (such as a polygon) can be extracted as a new linear geometric object. .centroid is another attribute of GeoSeries that returns a new GeoSeries in which each geometric object is replaced with the geometric center point (centroid) of the object. By using the .centroid attribute, the corresponding centroid can be calculated and extracted from the original point, line, and surface geometric objects.
[0085] See also Figure 2 , assuming it represents the target administrative division of a city, Figure 2 For multiple areas in the network, the geometric planes and boundaries of the sub-administrative divisions at any specified level (for example, the sub-administrative divisions at any specified level refer to the sub-administrative divisions at the community or village level; it can be understood that the present invention is not limited to the sub-administrative divisions at the community or village level. If necessary, the present invention can also be used for sub-administrative divisions at the street or township level in the city), as well as the corresponding centroids O1 to O8. According to geometry, no matter whether the geometric plane is standardized or not, a specific geometric plane must have a centroid. It should be noted that the centroid is obtained for the subsequent calculation of accessibility.
[0086] For example, the surface type data is shown in Table 11:
[0087]
[0088] Among them, FID represents a unique identifier, used to uniquely identify each record (number); BSM is a code that uniquely identifies an entity within a certain feature type; XZQDM is a numeric code that uniquely identifies an administrative region; XZQMC is the official name of the administrative region; SHAPE_Leng is the length of the polygon boundary; SHAPE_Area is the area of the polygon; and geometry describes the polygon's geometry and boundary coordinates. The letter 'Z' after polygon indicates that the geometry is 3D and includes a Z coordinate. However, in this table, all Z coordinates are 0, indicating that only 2D coordinates are used. The geometry column uses the EPSG:4326 coordinate system, a standard coordinate reference system used by the Global Positioning System, commonly known as WGS 84. In this system, coordinates are expressed in longitude and latitude, with units of degrees. The POLYGON column in the "geometry" column represents the polygon type data for the sub-administrative region, using the EPSG:4326 coordinate system.
[0089] For example, the output boundary line type data is as shown in Table 12:
[0090]
[0091] The coordinate system used is epsg = 2366. Geometry is used for geometric descriptions, where LINESTRINGZ represents a 3D line geometry type, where points are arranged in sequence, and a series of points are connected to form a line.
[0092] Further, exemplary, regarding point type data, see Table 13 below:
[0093]
[0094] Among them, the POINT in "geometry" is the point type data of the centroid of the corresponding sub-administrative division, and the coordinates in the brackets refer to the position of the point on the map. The EPSG:2366 coordinate system is used to provide a framework for map projection, so as to accurately represent the characteristics of the earth's curved surface on a flat map. In this system, coordinates are usually in meters. It should be noted that each sub-administrative division, regardless of its level, must include a lot of point type data. For the present invention, what is of concern is the point type data of the centroid, the point type data of the emergency station, etc.
[0095] S4. Based on the historical dispatch data parsed from the .shp file, after traversing all sub-administrative divisions at the same level, obtain historical dispatch data of patients successfully transported to any emergency station within the geographical scope of all sub-administrative divisions at the same level;
[0096] For example, the geometric spatial relationship judgment and aggregation functions in GeoPandas are used to calculate the number of point type data (dispatch data) contained in the polygon represented by each geometric plane. For example, through the known iterrows() iteration, traverse each polygon specifically indicated by each row in the GeoDataFrame (note: it represents all polygons); then use within() to determine whether the geometric attributes of the geographic location points in each historical dispatch data are within the geometric attributes of the current polygon; this judgment will generate a Boolean Series, and use sum() to calculate the number of True values, that is, to obtain the number of points inside the current polygon; save this count in the count column of the GeoDataFrame through at[] assignment; after the iteration is completed, the count column of each area in the polygon data is the summary of the number of historical dispatch data in that area;
[0097] For example, Figure 3 Taking the illustrated multiple sub-administrative divisions and the patient geographic locations corresponding to the historical scheduling data therein as an example, Table 14 below is an example of the area type data of the sub-administrative divisions, which is used as part of the input in the method process of the present invention:
[0098]
[0099] Table 15 below is an example of historical scheduling data that is input as part of the method process of the present invention:
[0100]
[0101] Among them, station represents the departure station, scene represents the on-site address, sendAddr represents the destination, sendAddr1 represents the destination 1, longitude_latitude, longitude, and latitude represent the latitude and longitude data respectively.
[0102] Table 16 below is a portion of the output during the method of the present invention:
[0103]
[0104] It can be found that a new column "count" has been added to the surface type data. This column stores the historical dispatch data of emergency resources for the corresponding sub-administrative division.
[0105] S5. Add the historical dispatch data of patients successfully transported to any emergency station within the geographical scope of each sub-administrative division at the level to the data of the centroid of the corresponding sub-administrative division at the level;
[0106] For the data shown in Table 16, assume that the centroid is as shown in Table 17:
[0107]
[0108] Table 18 shows the situation after the historical dispatch data is added to the data of the centroid of the corresponding lowest-level sub-administrative division:
[0109]
[0110] S6. For any sub-administrative division at the level, calculate a convenience value for patients in the sub-administrative division to reach the emergency station, and use the convenience value as accessibility data;
[0111] Specifically, the reachability data is calculated using a distance decay function, a demand-supply selection probability, and a two-step mobile search algorithm, specifically including the following steps:
[0112] First, all emergency stations are divided according to their type and the total number L of all emergency stations is counted to determine the different values of the service radius of each emergency station. The types include main urban area type and non-main urban area type. The service radius of the main urban area type emergency station is smaller than the service radius of the non-main urban area type emergency station.
[0113] Furthermore, let the total number of all sub-administrative divisions at this level be M, and the sub-administrative division with the centroid point k among the M sub-administrative divisions be recorded as the kth sub-administrative division, where the value of k ranges from 1 to M;
[0114] Then, for any emergency site j, take emergency site j as the supply point, and with emergency site j as the center, count the number of historical dispatch data of patients successfully sent to any emergency site within the geographical scope of the kth sub-administrative division in the M sub-administrative divisions, and use it as the emergency demand D of the sub-administrative division. k ;
[0115] According to the distance decay function, G(d kj , d0):
[0116]
[0117] Among them, e is a natural constant, d0 is the service radius of emergency station j, d kjis the distance between the first aid station j and the centroid indicated by point k, and the value of j ranges from 1 to L;
[0118] Further calculate the probability P of demand choosing supply kj :
[0119]
[0120] Wherein, λ is selected as a suitable parameter; according to the inventor's practice, λ can be 2, 2.2, 2.4, 2.6, 2.8, or 3.
[0121] Therefore, with the emergency station j as the center and d0 as the radius of the circle, the supply-demand ratio R is further calculated. j :
[0122]
[0123] Among them, S j is the supply level of the emergency site, indicating the overall service level of the medical facility. The supply-demand ratio R j Reflects the supply and demand situation of the emergency site j.
[0124] See also Figure 4A , which shows a schematic diagram of a circle with the emergency site as the center in the target administrative division, which helps to understand the above calculation of the supply-demand ratio R under the condition that the emergency site j is the center and d0 is the radius of the circle. j The complete process above.
[0125] Exemplarily, in another embodiment,
[0126] Supply level S for first aid sites j , assuming that for any emergency site j, all emergency sites are fully examined, and the supply level of all emergency sites is the same. For the convenience of calculation, for example, S j The value is 1000.
[0127] Furthermore, the method further comprises the following steps:
[0128] The sub-administrative division with the centroid i among the M sub-administrative divisions is recorded as the i-th sub-administrative division, and the value of i ranges from 1 to M;
[0129] For any emergency site j, take the emergency site j as the supply point, and count the number of historical dispatch data of patients successfully sent to any emergency site within the geographical scope of the i-th sub-administrative division in the M sub-administrative divisions, as the emergency demand D of the sub-administrative division. i ;
[0130] According to the distance decay function, G(d ij , d1):
[0131]
[0132] Where d1 is the radius of the circle with the centroid indicated by point i as the center, d ij is the distance between the first aid station j and the centroid indicated by point i, where i ranges from 1 to M; point i is considered as a demand point relative to the supply point indicated by first aid station j;
[0133] Further calculate the probability P of demand choosing supply ij :
[0134]
[0135] Among them, λ selects a suitable parameter;
[0136] Therefore, under the condition that the centroid indicated by point i is the center of the circle and d1 is the radius of the circle, the accessibility data A of the patients in the i-th sub-administrative division to the emergency station is further calculated. i :
[0137]
[0138] It should be noted that whether it is d ij Or d kj In the present invention, the distance between any two points can be calculated using the Euclidean distance formula. Assuming that the distance between any two points is d, and the coordinates of any two points are: (x1, y1) and (x2, y2), the Euclidean distance formula for the distance d is as follows:
[0139]
[0140] See also Figure 4B , which shows a schematic diagram of a circle with the centroid of the sub-administrative division as the center in the target administrative division, which helps to understand the accessibility data A of patients in the i-th sub-administrative division to the emergency station under the condition that the i-th sub-administrative division is the center of the circle and d1 is the radius. i For example, assuming the coordinates of the emergency station j1 are (x1, y1) and the coordinates of the centroid O1 are (x2, y2), x1 = 41x68x81.268, y1 = 41x28x0.087, x2 = 41x44x59.186, y2 = 41x20x6.650, and substituting them into the above Euclidean distance formula, the distance between the emergency station j1 and the centroid O1 can be solved.
[0141] For example, Table 19 is a table showing the i After the data:
[0142]
[0143] In another embodiment,
[0144] λ takes values of 2, 2.2, 2.4, 2.6, 2.8 and 3 respectively, and calculates the corresponding A under these 6 λ values i , and then the corresponding A under the 6 λ values i Calculate the average value as the final accessibility data A i , replacing the reachability data under 6 optional single λ values. It can be understood that this optional implementation method can obtain a more compromised and more universal A i .
[0145] S7. Map the accessibility data of the sub-administrative division and the historical dispatch data of successfully sending patients to any emergency station within the geographical scope of the sub-administrative division to the interval [0, 1], obtain a difference data set based on the mapped accessibility data and historical dispatch data, and draw an arithmetic difference heat map;
[0146] For example, the number of historical dispatch data D that successfully sent patients to any emergency station within the geographical scope of the i-th sub-administrative division is i Normalize to get D and use D as the normalization requirement, mapping it to the interval [0,1], where 0 represents the area with the least population and 1 represents the area with the most population;
[0147] Similarly, the accessibility data A of patients in the i-th sub-administrative division to the emergency station i Also normalized to get A i ', so that it is mapped to the interval [0,1], 0 represents the area with the lowest accessibility, and 1 represents the area with the highest accessibility; it should be noted that, as mentioned above, the accessibility data A i It can be the reachability data under the six optional single λ values mentioned above; the reachability data A i It can also be the corresponding A under 6 kinds of λ values i The average value of .
[0148] For the above standardized data, calculate A i '-D, and the difference between the standardized accessibility and the standardized demand of the i-th sub-administrative division is obtained.
[0149] For example, Figure 5 The accessibility diagram is drawn. Figure 6 The plot is an arithmetic heat map. Figure 5 The color depth represents the ease with which each area can obtain pre-hospital emergency resources. The higher the color, the easier it is to obtain resources. Figure 6The arithmetic heat map shown is the difference between the demand and accessibility of the area. The higher the value, the more resources there are than the demand. A negative value means that there is demand but emergency resources are not available.
[0150] About A i and D i For example, the following formula is used for standardization:
[0151]
[0152] S8. Perform spatial cluster analysis and visualization based on the difference data set to guide the distribution optimization of emergency resources.
[0153] For example, Table 20 shows the A before and after normalization. i and D i The values and differences of
[0154]
[0155] Through the Geographic Information System (GIS) software, the visualization function of the heat map is used to intuitively draw the A i The color range in the heat map can be set as a gradient from the negative area to the positive area to indicate the difference. Figure 6 As shown, based on the color distribution of the heat map, we can clearly see which areas have excess (areas with large and positive differences) and which areas have insufficient (areas with large and negative differences).
[0156] In another embodiment, regarding K-means cluster analysis:
[0157] Create two new GeoDataFrames (e.g. shape1 and shape2), each containing A i '-D difference is less than 0 and greater than 0.8. df_filtered contains the combined value of these two conditions. Among them, df_filtered.geometry.centroid is used to obtain the centroid coordinates of each geometric object in GeoDataFrame
[0158] Use the well-known scikit-learn library's KMeans to implement K-means clustering and store the clustering results in a new column 'Cluster'. For example, use the fit_predict method to cluster the centroid coordinates and store the results in the 'Cluster' column.
[0159] Use the known matplotlib library to create graphics and coordinate axes, draw the original map and clustering results. Also, use the known scatter function to mark the cluster center points on the map and use red circles to represent them. At the same time, use the known tick_params to hide the coordinate axis labels to make the graph clearer. Finally, use plt.show() to display the graph, as shown in the following example: Figure 7 shown.
[0160] In another embodiment, regarding Mean shift cluster analysis:
[0161] Use the MeanShift clustering algorithm to cluster the data in the given DataFrame and return the clustering results and the coordinates of the center point. Figure 8 As shown, a scatter plot of two clustering results is drawn on the map, and the center point of the cluster is marked on the map. The red dot represents A i The difference of '-D' is less than 0, and the green stars indicate the clustering results of the data that is greater than 0.8.
[0162] It can be found that by using spatial cluster analysis, the present invention can further identify areas with excess and insufficient emergency resources, thereby more comprehensively and accurately evaluating the surplus and shortage of regions, and providing decision makers with more effective information to formulate reasonable public service facility plans and policies.
[0163] The above is a general description of the present invention and a description of its specific embodiments, and should not be construed as limiting the technical solutions of the invention. Based on the disclosure of the present invention, those skilled in the art may, without violating the constituent elements of the invention involved, add, subtract, or combine the disclosed technical features in the above general description and / or specific embodiments (including examples) to form other technical solutions within the scope of protection of the present invention.
Claims
1. A method for optimizing the distribution of emergency resources, characterized in that: The method comprises the following steps: S1. Create a corresponding raw data file based on the data of all emergency sites within the target administrative area and the historical dispatch data of successfully sending patients to any emergency site; S2. Convert the format of the original data file to obtain a .shp format file required by the geographic information system; S3. According to all sub-administrative divisions at any specified level within the target administrative division and the surface type data of the geometric plane corresponding to the target administrative division parsed from the .shp file, obtain the surface type data of the geometric plane of all sub-administrative divisions at that level, and further obtain the centroids and boundaries of the geometric planes of all sub-administrative divisions at that level; S4. Based on the historical dispatch data parsed from the .shp file, after traversing all sub-administrative divisions at the same level, obtain historical dispatch data of patients successfully transported to any emergency station within the geographical scope of all sub-administrative divisions at the same level; S5. Add the historical dispatch data of patients successfully transported to any emergency station within the geographical scope of each sub-administrative division at the level to the data of the centroid of the corresponding sub-administrative division at the level; S6. For any sub-administrative division at the level, calculate the convenience value for patients in the sub-administrative division to reach the emergency station, and use the convenience value as accessibility data, including the following steps: First, all emergency stations are divided according to their types and the total number L of all emergency stations is counted to determine the different values of the service radius of each emergency station. Furthermore, let the total number of all sub-administrative divisions at this level be M, and the sub-administrative division with the centroid point k among the M sub-administrative divisions be recorded as the kth sub-administrative division, where the value of k ranges from 1 to M; Then, for any emergency site j, take emergency site j as the supply point, and with emergency site j as the center, count the number of historical dispatch data of patients successfully sent to any emergency site within the geographical scope of the kth sub-administrative division in the M sub-administrative divisions, and use it as the emergency demand D of the sub-administrative division. k ; Further calculate the probability P of demand choosing supply kj : Among them, λ selects a suitable parameter; The sub-administrative division with the centroid i among the M sub-administrative divisions is recorded as the i-th sub-administrative division, and the value of i ranges from 1 to M; For any emergency site j, take the emergency site j as the supply point, and count the number of historical dispatch data of patients successfully sent to any emergency site within the geographical scope of the i-th sub-administrative division in the M sub-administrative divisions, as the emergency demand D of the sub-administrative division. i ; Further calculate the probability P of demand choosing supply ij : Among them, λ selects a suitable parameter; Calculating the reachability data by using a distance decay function, a demand-supply selection probability, and a two-step mobile search algorithm; S7. Map the accessibility data of the sub-administrative division and the historical dispatch data of successfully sending patients to any emergency station within the geographical scope of the sub-administrative division to the interval [0, 1], obtain a difference data set based on the mapped accessibility data and historical dispatch data, and draw an arithmetic difference heat map; S8. Perform spatial cluster analysis and visualization based on the difference data set to guide the distribution optimization of emergency resources.
2. The method according to claim 1, characterized in that In step S1, The original data file is an EXCEL data file.
3. The method according to claim 1, characterized in that In step S1, Establishing the corresponding raw data file includes: pre-processing all emergency site data and all medical emergency call data within the target administrative area, where: The data preprocessing includes: data desensitization, data integration, geocoding, and data cleaning.
4. The method according to claim 3, characterized in that The data desensitization is used in scenarios where data is sent out. By performing a one-time processing on the data, it is ensured that sensitive information is not exposed when the data leaves the secure environment.
5. The method according to claim 3, characterized in that The data integration includes integrating the emergency site data and dividing the areas to which the emergency sites belong.
6. The method according to claim 1, characterized in that Calculating the reachability data using the distance decay function, the demand selection supply probability, and the two-step mobile search algorithm further includes the following steps: According to the distance decay function, G(d kj , d0) Among them, e is a natural constant, d0 is the service radius of emergency station j, d kj is the distance between the first aid station j and the centroid indicated by point k, and the value of j ranges from 1 to L; Further calculate the probability P of demand choosing supply kj ; Therefore, with the emergency station j as the center and d0 as the radius of the circle, the supply-demand ratio R is further calculated. j : Among them, S j is the supply level of the emergency site, indicating the overall service level of medical facilities. The supply-demand ratio R j Reflects the supply and demand situation of the emergency site j.
7. The method according to claim 6, characterized in that Calculating the reachability data using the distance decay function, the demand selection supply probability, and the two-step mobile search algorithm further includes the following steps: According to the distance decay function, G(d ij , d1): Where d1 is the radius of the circle with the centroid indicated by point i as the center, d ij is the distance between the first aid station j and the centroid indicated by point i, where the value of i ranges from 1 to M; Further calculate the probability P of demand choosing supply ij ; Therefore, under the condition that the centroid indicated by point i is the center of the circle and d1 is the radius of the circle, the accessibility data A of the patients in the i-th sub-administrative division to the emergency station is further calculated. i :
8. The method according to claim 7, characterized in that Step S7 includes: The number of historical dispatch data D that successfully sent patients to any emergency station within the geographical scope of the i-th sub-administrative division i Normalize to get D and use D as the normalization requirement, mapping it to the interval [0,1], where 0 represents the area with the least population and 1 represents the area with the most population; Similarly, the accessibility data A of patients in the i-th sub-administrative division to the emergency station i Also normalized to get A i ', so that it is mapped to the interval [0,1], where 0 represents the area with the lowest accessibility and 1 represents the area with the highest accessibility; For the above standardized data, calculate A i '-D, and the difference between the standardized accessibility and the standardized demand of the i-th sub-administrative division is obtained.
9. The method according to claim 1, characterized in that In step S8, the spatial cluster analysis algorithm includes: K-means clustering algorithm and Mean shift clustering algorithm.
Citation Information
Patent Citations
Reachability-based medical resource supply and demand matching relationship acquisition method
CN114462503A
Method of siting emergency medical service facilities in mountain villages
US20240054725A1