A medical service intelligent recommendation method and system based on spatial clustering and semantic analysis, and a storage medium
By using spatial clustering and semantic analysis, medical service clusters are identified and quantitatively evaluated, solving the problem of insufficient identification of functional correlations of medical facilities in existing technologies. This enables efficient and personalized medical service recommendations, improving user experience and system reliability.
Patent Information
- Application Number
- CN202511285665.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-10
- Publication Date
- 2025-12-26
- Estimated Expiration
- 2045-09-10
AI Technical Summary
Existing technologies cannot identify and express the functional relationships between medical facilities, resulting in recommendations that lack context awareness and overall utility assessment, and thus cannot provide efficient and personalized medical service decision support.
By combining spatial clustering and semantic analysis with a multidimensional dynamic threshold model and dual semantic relationship determination, medical service clusters are identified. A hybrid evaluation model and intelligent decision tree are used for recommendation decisions, providing quantitative assessment of cluster service capabilities and personalized suggestions.
It achieves an understanding of the intrinsic structure of urban healthcare services, provides robust, personalized, and reliable recommendation results, improves user experience and decision-making efficiency, and enhances the practicality and trustworthiness of the recommendation system.
Smart Images

Figure CN120809282B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of computers, and in particular to a medical service intelligent recommendation method and system based on spatial clustering and semantic analysis, and a storage medium. BACKGROUND
[0002] In the present age, with the deepening of urbanization and the rapid development of information technology, smart cities and digital health have gone from concept to practice. Urban residents' demand for medical and health services is no longer satisfied with simple information availability, but pursues higher levels of efficiency, accuracy and personalized experience. The distribution of medical service resources in urban space is not uniform or random, but follows market rules and functional logic, showing a significant agglomeration effect. Large and core medical institutions often act like magnets, attracting functionally complementary or related secondary medical units, drug retail, rehabilitation nursing and life service facilities (such as accommodation and catering) to their periphery, forming a functional complex medical service area or medical service ecology.
[0003] How to use advanced computer technology to deeply mine and understand this objectively existing urban medical service texture and transform it into intelligent services that can guide users to make efficient and rational decisions is a key technical challenge to improve the level of digital health services, optimize medical resource guidance and improve the medical experience of the public.
[0004] Currently, the mainstream map applications (such as Baidu Map and Gaode Map), life service platforms (such as Dazhongdianping) or online medical platforms (such as Hudaifangxian) usually include the following technical solutions when providing medical institution recommendation services:
[0005] 1. Receive the geographic location and query request (such as "pediatric hospital nearby") input by the user through the device;
[0006] 2. Through keyword matching or pre-set classification filtering, retrieve the list of independent medical institution POIs that meet the conditions from the POI database;
[0007] 3. Finally, mainly according to the straight-line distance or planned path distance between each independent POI and the user's current geographic location, and combined with static user ratings, institution ratings and other information, the results are sorted and displayed to the user in the form of a list or map markers.
[0008] Drawbacks of the prior art:
[0009] There is a deep-rooted technical bias in the prior art, which treats each medical POI as an independent, atomized entity. This model seriously ignores the functional correlation and spatial clustering of service facilities in urban space, resulting in the following significant technical defects:
[0010] 1. Lack of modeling ability for functional correlation: the existing technology model cannot identify and express the internal relationship between POIs due to functional synergy (e.g., a first-class hospital and its affiliated pharmacy that specializes in handling its prescriptions) or functional complementarity (e.g., a large general hospital and a nearby specialized clinic providing specific rehabilitation services). It only knows that there is a hospital here and a pharmacy there, but it does not know that there is a close business relationship between them;
[0011] 2. Atomized recommendation results, lack of context awareness: due to the inability to identify the above functional correlation, when the user's core hospital resource (such as the number of a specific expert) is exhausted, the system cannot intelligently recommend functionally replaceable and horizontally comparable institutions in its geographical vicinity, resulting in a disruption in the user's decision-making path, and the user has to return to the previous level and perform a keyword search again, resulting in a fragmented and inefficient experience;
[0012] 3. Single decision dimension, unable to conduct overall utility evaluation: the existing technology cannot comprehensively evaluate the overall service capacity of an area, including core medical capacity, alternative resource abundance, and the convenience and economy of supporting services such as transportation, accommodation, and drug acquisition. This makes the practicality of the recommendation results and the efficiency of decision support greatly reduced, especially for out-of-town patients who need to consider the entire medical process. They care not only about whether Hospital A is good, but also whether the entire process of going to Hospital A for treatment is convenient and cost-effective. SUMMARY
[0013] To solve the problems in the prior art, the present application provides an intelligent medical service recommendation method based on spatial clustering and semantic analysis, comprising:
[0014] Step 1, data collection: collect multi-source heterogeneous data, including map POI data, geographic spatial data, professional medical data, and dynamic resource data related to medical treatment;
[0015] Step 2, data preprocessing and quality monitoring: clean, align and verify the obtained data, as follows:
[0016] a. Obtain map POI data, geographic spatial data and professional medical data from multiple data sources;
[0017] b. Through a multi-strategy entity alignment module, associate data from different sources to the same medical entity;
[0018] c. Establish a dynamic data quality monitoring mechanism to identify and label potentially outdated or incorrect data;
[0019] Step 3, medical service group identification: Combine geographic spatial data reflecting urban spatial activity intensity, determine clustering parameters through a multi-dimensional dynamic threshold model, and perform geographic spatial clustering on point of interest data; within each preliminary geographic cluster, identify functional relationships between point of interest data through a dual semantic relationship judgment module combining semantic relationship identification technology and rule engine verification, thereby constructing a medical service group;
[0020] Step 4, group service capacity assessment: For each medical service group, generate a quantitative group service capacity score through a hybrid evaluation model that combines authoritative scoring and data-driven estimation, and generate a quantitative supporting facility perfection score by comprehensively evaluating its supporting facilities;
[0021] Step 5, intelligent recommendation decision and presentation: Receive a user's medical service request, trigger group replacement or group comparison logic through an intelligent decision tree containing hierarchical replacement and intent confirmation, present the recommendation results to the user through an interpretable recommendation module, and explain the recommendation reasons in natural language and visualized manner.
[0022] As a further improvement of the present application, in step b, the multi-strategy entity alignment module adopts a comprehensive strategy for entity alignment, which combines fuzzy matching of names and geographical proximity of addresses, and introduces auxiliary information for cross-validation;
[0023] In step c, by monitoring data quality in real time, combining user feedback and rule engine, automatically marking abnormal data and triggering correction actions, forming a closed-loop feedback ecosystem; design fault tolerance and degradation mechanism, when real-time number source API call fails, the system will not interrupt the service, but will make a probabilistic prediction according to the historical data, and send a prompt to the user.
[0024] As a further improvement of the present application, in step b, the multi-strategy entity alignment module adopts a comprehensive strategy for entity alignment, which combines fuzzy matching of names and geographical proximity of addresses, and introduces auxiliary information for cross-validation;
[0025] In step c, by monitoring data quality in real time, combining user feedback and rule engine, automatically marking abnormal data and triggering correction actions, forming a closed-loop feedback ecosystem; design fault tolerance and degradation mechanism, when real-time number source API call fails, the system will not interrupt the service, but will make a probabilistic prediction according to the historical data, and send a prompt to the user.
[0026] As a further improvement of the present application, in the geographical spatial clustering step of multi-dimensional dynamic parameters in the first stage, a dynamic distance threshold formula is introduced Let the clustering algorithm adapt to the spatial scale of different regions, which is defined as follows:
[0027] ,
[0028] Wherein, each parameter is defined as follows:
[0029] Dynamic distance threshold , the distance used to finally determine whether two points of interest or clusters are merged; minimum clustering radius , the lower limit of the preset physical distance; basic clustering radius , the preset clustering radius benchmark value in sparsely populated areas; the population density of the grid where the current point of interest is located P, , the variable reflecting the intensity of urban spatial activity obtained from external geographic spatial data sources; the maximum population density in the study area , the constant used for normalization; density influence coefficient λ, a positive number preset to adjust the suppression strength of population density on clustering radius; , a natural constant;
[0030] To overcome the limitations of a single indicator in describing complex urban functional areas, the dynamic threshold model is upgraded to multi-dimensional input:
[0031] ,
[0032] Wherein, f represents a comprehensive function, whose input includes not only the normalized population density , but also road network density and business vitality index , , the weight of each dimension.
[0033] As a further improvement of the present application, in the dual semantic relationship determination step in the second stage, the semantic relationship identification technology includes large language model, entity relationship reasoning based on knowledge graph, rule engine based on string edit distance and classification label, traditional word embedding model combined with classifier, rule engine integrated with hard constraint rules based on medical industry standards, including:
[0034] Institution type mutual exclusion rule: points of interest officially classified as level three A class hospitals cannot form core affiliated relationships with another hospital of the same level;
[0035] Name contains strong association rule: if the name of POI A contains the name of POI B, it will be determined as core-attached relationship with the highest priority, which will override all secondary inference results generated by LLM based on semantic similarity;
[0036] Reverse verification rule: if LLM judges that POI A is the core of POI B, it will query whether POI B is the core of POI A, and if not, it will be marked for manual review;
[0037] The medical service group data object contains the following attributes:
[0038] GroupID: unique identifier of the group;
[0039] CorePOI: one or more POIs playing a core role in the group;
[0040] AlternativePOIs: list of POIs playing an alternative cooperative role in the group;
[0041] SupportPOIs: list of POIs playing a supporting facility role in the group;
[0042] Boundary: a polygon describing the geographical range of the group.
[0043] As a further improvement of the invention, in step 4, the service capability score of the department : for core institutions and authoritative ranking of alternative institutions , directly adopt their authoritative scores; for alternative institutions without authoritative scores, start a data-driven score estimation sub-model, which uses machine learning to input multiple features of the institution, including institution level, user average score, keyword frequency in reviews, number of doctors, equipment information, to predict the equivalent score;
[0044] In step 4, for a specific department , its service capability is calculated as follows:
[0045] ,
[0046] where, is the core quality item, the upper limit of the medical level of a region is determined by its best institution, and the weight is the largest; is the alternative value item, using a logarithmic function to reflect the diminishing marginal utility, +1 is a robust design to prevent mathematical errors; To select the richness term, the selection freedom of the region is reflected, and a logarithmic function is used to reflect the diminishing marginal utility; For the group specialty service ability score, For the core institution specialty score, For the substitute institution specialty score, For the total number of specialty institutions, For the weight coefficient;
[0047] In step 4, the supporting facility perfection score is also included, which decomposes the fuzzy supporting perfection concept into richness, convenience and economy three objective dimensions, and integrates into a comprehensive score :
[0048] ,
[0049] Wherein, The sum of the adjustable weights of each sub-dimension is 1, and the calculation method of each sub-dimension score is as follows:
[0050] Richness score : Based on the number, category weight and average user score of each type of supporting facility in the group, weighted calculation is carried out;
[0051] Convenience score : Based on the average expected travel time from all supporting facilities in the group to the core medical institution, the shorter the travel time, the higher the score;
[0052] Economy score : Based on the normalized average price level of key supporting facilities in the group, the lower the price level, the higher the score.
[0053] As a further improvement of the present application, in step 4, the determination method of model parameters and weights is also included, which comprises:
[0054] Expert scoring method: Invite experts in the fields of medical information, urban planning and user experience to score the importance of different factors, and calculate the initial weights by analytic hierarchy process tool;
[0055] Machine learning optimization: On the validation dataset containing user historical selection and satisfaction feedback, grid search or optimization algorithm is used to maximize the accuracy, recall rate or NDCG of the recommended results as the target index, and the optimal parameter combination is automatically learned;
[0056] Dynamic configuration and user portrait: dynamically adjust the weights according to the user portrait; Predefine and store user portrait configuration file, and then automatically activate or manually select these configurations on the interface by the user according to the user information.
[0057] As a further improvement of the present application, in step 5, the intelligent decision tree runs the following steps in turn:
[0058] Step S1, trigger and high-quality alternative: find the same level or only one level lower, special subject score standard alternative institutions in the same group;
[0059] Step S2, intelligent exploration and logical jump: if there is no high-quality alternative, actively explore the user's willingness to change the region, if the user agrees, seamlessly switch to the inter-group comparison logic, and automatically increase the medical service weight to the highest;
[0060] Step S3, multi-path exit and user control: if the user refuses to change the region, it will provide preliminary diagnosis options, and if the user is still not satisfied with these options, it will provide a variety of subsequent operations, including expanding the search radius of the region, only viewing pharmacies or subscribing to the hospital number source reminder, to ensure that the user always has control.
[0061] As a further improvement of the present application, in step 5, the explainable recommendation module runs the following steps:
[0062] Dynamic natural language explanation step: for each group of the final recommendation, a short natural language summary will be automatically generated as a recommendation reason, which is based on S final The sub-item score that contributes most to the formula is dynamically generated;
[0063] Visual presentation step: in the interface design, follow the principle of progressive disclosure, only show the most important total score and natural language reason by default, and after the user clicks, the detailed scores of the sub-dimensions and the core interest point list within the group will be displayed in a drilling-down manner through the visualization component.
[0064] The present application also discloses a medical service intelligent recommendation system based on spatial clustering and semantic analysis, a memory, a processor and a computer program stored on the memory, the computer program being configured to realize the steps of the method of the present application when called by the processor.
[0065] The present application also discloses a computer readable storage medium, the computer readable storage medium storing a computer program, the computer program being configured to realize the steps of the method of the present application when called by the processor.
[0066] The beneficial effects of the present application are: 1. Realize the cognitive upgrade from point to surface: define and realize the data structure of medical service group for the first time in technology, so that the recommendation system can understand the internal texture of urban medical services, and the recommendation result is more in line with the functional organization of the real world; 2. Enhance the robustness and practicality of recommendation: through intelligent decision tree and hierarchical alternative logic, even if the user's favorite core hospital resource is exhausted, the system can provide effective and user-intended alternative solutions, avoiding the interruption of user decision-making; 3. Improve the efficiency and comprehensiveness of decision-making: through the comparison logic between groups and the multi-dimensional quantitative evaluation system, users can compare the overall utility of different medical service areas at a glance, realizing one-stop comprehensive decision-making of medical level, transportation, accommodation and consumption; 4. Improve the personalization and accuracy of recommendation: through dynamic adjustment of decision weight and intelligent exploration of user intent, it can meet the personalized needs of different users, making the recommendation result more targeted; 5. Achieve high reliability and safety: through data quality monitoring closed loop, API fault tolerance mechanism and LLM+ rule engine dual determination, the present application can still provide stable, reliable and safe recommendation services when facing imperfect and incomplete real world data, which is crucial in the serious medical field; 6. Establish a trust-oriented user experience: through the explainable recommendation module and the interactive design that gives users full control, the present application makes a complex decision-making process transparent and controllable, greatly enhancing users' trust in the system and improving long-term user stickiness. BRIEF DESCRIPTION OF DRAWINGS
[0067] Figure 1 is a functional module architecture diagram of a medical service intelligent recommendation system of the present application;
[0068] Figure 2 is a whole flow chart of a medical service intelligent recommendation method of the present application;
[0069] Figure 3 is a detailed flow chart of medical service group identification of the present application;
[0070] Figure 4 is a principle diagram of the dynamic distance threshold calculation mechanism of the present application;
[0071] Figure 5 is a principle diagram of the multi-dimensional evaluation and decision-making model of the present application. DETAILED DESCRIPTION
[0072] NDCG: English for Normalized Discounted Cumlative Gain, Chinese name for normalized discounted cumulative gain. Mainly used to measure the quality of the ranking results (such as search engine results, recommended system recommendation list) index. It evaluates whether the results in a list are correctly sorted according to the relevance of the results, especially whether the high-relevance results are in a prominent position.
[0073] The core purpose of the present application is to completely abandon the isolated and atomized point thinking in the prior art, and creatively propose a new paradigm for recommending based on functional service areas, thereby overcoming the defects in the background art. Specifically, the present application aims to provide a medical service intelligent recommendation method and system based on spatial clustering and semantic analysis, and a storage medium, the main purpose of which is:
[0074] 1. Provide a two-stage medical service group identification method, which can accurately identify the functional group composed of core medical institutions and their associated facilities in urban space by combining dynamic parameter geographic spatial clustering and semantic relationship determination based on natural language processing;
[0075] 2. Provide a multi-dimensional quantitative evaluation model that can comprehensively evaluate the special service capability of the medical service group and the completeness of the supporting facilities, and provide objective and comprehensive data support for recommendation decisions.
[0076] 3. Provide an intelligent recommendation decision mechanism containing double logic of "replacement within the group" and "comparison between groups" to meet the diversified needs of users in different scenarios and significantly improve the practicality and individualization level of the recommendation results.
[0077] 1. System architecture and data flow of the present application
[0078] Referring to the accompanying Figure 1 (system architecture diagram), the system architecture of the present application can be divided into four layers:
[0079] Data layer 101: responsible for collecting multi-source heterogeneous data, including map POI data, geographic spatial data (such as population density, road network density), professional medical data (such as hospital ranking) and dynamic resource data (such as number source information of the registration platform);
[0080] Processing layer 102: the core of the present application, corresponding to each functional unit of the system. After the data flows from the data layer, it is first cleaned, aligned and checked by the data preprocessing and quality monitoring unit. Subsequently, the medical service group identification unit 102, the group service capability evaluation unit 103 and the intelligent recommendation decision unit 104 process the data in turn;
[0081] Intelligent recommendation decision unit 104: responsible for interacting with users, presenting recommendation results and decision reasons to users in a visual manner through an explainable recommendation engine;
[0082] Feedback and iteration layer: responsible for collecting users' explicit feedback (such as ratings, corrections) and implicit behaviors (such as clicks, dwell time) for continuous calibration of data quality and online learning optimization of recommendation model parameters, forming a complete technical closed loop.
[0083] 2. Medical service intelligent recommendation method
[0084] The medical service intelligent recommendation method disclosed in the present application comprises the following steps:
[0085] Step 1, data collection: collect multi-source heterogeneous data, including map point of interest data, geographic spatial data, professional medical data and dynamic resource data related to medical treatment;
[0086] Step 2, data preprocessing and quality monitoring: clean, align and check the obtained data, specifically as follows:
[0087] a. Obtain map point of interest (PIO) data, geographic spatial data and professional medical data from multiple data sources;
[0088] b. Through a multi-strategy entity alignment module, associate data from different sources to the same medical entity;
[0089] c. Establish a dynamic data quality monitoring mechanism for identifying and marking data that may be outdated or incorrect;
[0090] Step 3, medical service cluster identification:
[0091] a. Combine geographic spatial data reflecting city spatial activity intensity (such as population density, road network density), determine clustering parameters through a multi-dimensional dynamic threshold model, and perform geographic spatial clustering on POI data;
[0092] b. Within each preliminary geographic cluster, through a dual semantic relationship determination module containing a large language model (LLM) preliminary determination and a rule engine verification, identify the functional relationship between POI data, and thus build a medical service cluster;
[0093] Step 4, cluster service capability evaluation;
[0094] a. For each medical service cluster, generate a quantitative cluster service capability score through a hybrid evaluation model that combines authoritative scores and data-driven estimates;
[0095] b. And comprehensively evaluate the richness, convenience and economy of its supporting facilities, generate a quantitative supporting facility perfection score;
[0096] Step 5, intelligent recommendation decision and presentation:
[0097] a. Receive the user's medical service request, and trigger the group replacement or inter-group comparison logic through an intelligent decision tree containing hierarchical replacement and intention confirmation;
[0098] b. Through an interpretable recommendation module, present the recommendation results to the user, and explain the recommendation reasons in natural language and visual way.
[0099] 2.1 Data preprocessing and quality monitoring unit
[0100] In order to solve the problem of data quality from the root, this unit is designed as a powerful data purifier and supervisor:
[0101] Multi-strategy entity alignment: To cope with the challenge of non-standard medical entity names, the invention adopts a comprehensive strategy for entity alignment. It not only combines fuzzy matching of names (such as edit distance algorithm) and geographical proximity of addresses, but also introduces POI categories, keywords in user comments and other auxiliary information for cross verification. In a preferred embodiment, the system uses a weighted scoring model to assign different weights to each matching evidence (name similarity, address distance, category consistency, etc.), and finally calculates a comprehensive confidence score. Only when the score exceeds the preset threshold, the entity alignment is completed.
[0102] Dynamic data quality monitoring and feedback loop: Instead of one-time processing, this unit establishes a continuous monitoring mechanism. For example, the system analyzes user behavior, and if a recommended POI has very low click-through rate over a period of time, or is feedback by multiple users that the information is incorrect, the system will automatically mark it as low confidence, and in the recommendation, it will give less weight or prompt the user that the information may have changed, forming a self-correcting data ecosystem.
[0103] Dynamic resource interface fault tolerance: To cope with the risk of unstable or unavailable registration platform API, this unit designs a fault tolerance and degradation mechanism. When real-time number source API call fails, the system will not interrupt the service, but will make a probabilistic prediction based on historical data (for example, the number of sources of this department in this hospital is usually tight on certain weekdays in the afternoon), and prompt the user: temporary unable to obtain real-time number source, according to historical data, the number source may be tight, please call to confirm.
[0104] 2.2 Medical service group identification unit, as shown in Figure 3
[0105] First stage, geospatial clustering of multi-dimensional dynamic parameters:
[0106] In a preferred embodiment, this step employs a Hierarchical Clustering algorithm.
[0107] The choice of this algorithm is based on deep insights into the distribution characteristics of medical service areas in the real world:
[0108] Natural hierarchical structure: Medical service areas themselves have a nested structure, for example, multiple hospital department buildings form a hospital area cluster, which in turn forms a larger service community cluster with surrounding supporting facilities. Hierarchical clustering can perfectly reveal this multi-scale aggregation pattern without pre-setting the number of clusters K, which is unpredictable like K-Means algorithm.
[0109] Adaptability to irregular shapes: Medical service communities often distribute in irregular shapes along streets, etc. Hierarchical clustering is more adaptable to this real form than algorithms that prefer spherical clusters.
[0110] In this invention, it is further preferred to use Average Linkage as the calculation method of the distance between clusters. This is because it can achieve the best balance between noise insensitivity (better than single linkage) and the ability to identify non-spherical clusters (better than complete linkage), and is most suitable for robustly identifying real functional areas with reasonable cohesion.
[0111] To overcome the limitations of using a fixed distance threshold in the prior art, this invention introduces a dynamic distance threshold formula .
[0112] The design motivation of this formula is to solve the problem of spatial heterogeneity that exists universally in urban space. The functional area scale in the city center is completely different from that in the suburbs, and any fixed distance threshold cannot adapt to both. This formula aims to enable the clustering algorithm to adapt to the spatial scale of different areas.
[0113] Its definition is as follows:
[0114] ,
[0115] Wherein, the parameters are defined as follows:
[0116] Dynamic distance threshold, which is the final distance used to judge whether two POIs or clusters should be merged, is the core output of this formula;
[0117] Minimum cluster radius, which is a preset lower limit of physical distance (e.g. 50 meters). As a key robustness design, it ensures that even in areas with extremely high population density, the cluster radius will not shrink to a physically meaningless level, thus guaranteeing the integrity of the identification of core facilities (such as a large hospital campus);
[0118] Base cluster radius, which is a preset cluster radius benchmark value (e.g. 800 meters) in sparsely populated areas;
[0119] : Population density of the grid where the current POI is located. This is a variable reflecting the intensity of urban space activity obtained from external geographic spatial data sources (such as the WorldPop dataset);
[0120] : Maximum population density within the study area. This is a constant used for normalization;
[0121] : Density influence coefficient. This is a preset positive number (e.g. 1.5) used to adjust the intensity of population density on the suppression of cluster radius;
[0122] : Natural constant.
[0123] To overcome the limitations of a single indicator (such as only population density) in describing complex urban functional areas, the invention upgrades the dynamic threshold model to multi-dimensional input:
[0124] ,
[0125] where, represents a comprehensive function (such as weighted average or a small neural network) whose input not only includes normalized population density but also includes road network density (reflecting regional accessibility) and commercial vitality index (reflecting regional prosperity). is the weight of each dimension. This allows the clustering algorithm to better understand the functional texture of the city, such as identifying service corridors with low population density but convenient transportation.
[0126] Second stage, dual semantic relationship determination step:
[0127] To solve the "hallucination" and bias problems that large language models (LLM) may produce, and to ensure the accuracy of judgments in serious medical scenarios, the invention creatively designs a dual determination process of LLM preliminary judgment + rule engine verification:
[0128] 1. LLM preliminary judgment: Using the powerful natural language understanding ability of LLM, the relationship of POI pairs is preliminarily and creatively judged.
[0129] 2. Rule engine verification: The output result of LLM will not be directly adopted, but will be verified by a hard-coded, high-priority rule engine. The engine contains a series of medical common sense rules that cannot be violated, such as:
[0130] Institution type mutual exclusion rule: A POI officially classified as a three-level first-class hospital cannot form a "core affiliate" relationship with another hospital of the same level;
[0131] Name contains strong association rule: If the name of POI A completely contains the name of POI B (such as: Beijing University People's Hospital and Beijing University People's Hospital (Baita Temple Branch)), there is a high probability that the relationship is core affiliate, which will override other conclusions of LLM.
[0132] Reverse verification rule: If LLM judges that A is the core of B, the system will query whether B is the core of A in reverse, and if it is inconsistent, it will be marked for manual review;
[0133] The final output of this step is a structured medical service group data object. The object contains at least the following attributes:
[0134] GroupID: Unique identifier of the group;
[0135] CorePOI: One or more POIs playing a core role in the group;
[0136] AlternativePOIs: List of POIs playing an alternative cooperation role in the group;
[0137] SupportPOIs: List of POIs playing a supporting facility role in the group;
[0138] Boundary: A polygon describing the geographical range of the group.
[0139] 2.3 Group service capability assessment unit
[0140] To solve the data sparsity problem of a large number of non-top-level hospitals lacking authoritative score data, the invention uses a hybrid evaluation model that combines authoritative score and data-driven estimation:
[0141] For the service capability score of department :
[0142] For the core institution and the alternative institution with authoritative ranking , directly using its authoritative score;
[0143] For alternative institutions without authoritative scores, the system does not simply count its score as 0, but instead initiates a data-driven score estimation sub-model. This sub-model utilizes machine learning (such as gradient boosting trees or shallow neural networks) to input various features of the institution, such as institutional level (second-class, first-class), user average score, keyword frequency involving "professionalism", "therapeutic effect", etc. in reviews, number of doctors, equipment information (if available), to predict an equivalent score.
[0144] This hybrid evaluation method enables the scoring system to cover all institutions from top hospitals to basic clinics, greatly improving the comprehensiveness and fairness of the evaluation, and solving the cold start problem.
[0145] For a specific department , its service capacity is calculated as follows:
[0146] ,
[0147] Each term of the formula has a clear practical meaning:
[0148] (Core quality item): Directly reflects the long board effect, that is, the upper limit of the medical level of an area is determined by its best institution. This item usually has the largest weight;
[0149] (Substitute value item): Reflects the robustness of the region. The introduction of the logarithmic function is one of the key innovations of this formula, which accurately simulates the diminishing marginal utility of user psychology. Having 1 alternative institution is of great value compared to having none; while increasing from 10 to 11, the value increases much less. The logarithmic function avoids the virtual high score caused by too many alternative institutions, making the score more in line with human perception. +1 is a robustness design to prevent mathematical errors;
[0150] (Selection richness item): Reflects the "selection freedom" of the region, also using a logarithmic function to reflect diminishing marginal utility;
[0151] Among them, the parameters are defined as follows:
[0152] : Group specialty service capacity score, which is the final output of this formula;
[0153] : Core institution specialty score, in an optimal implementation, it is defined as the department score of the best institution in the group Score of the top authority score or rank of the institution, which ensures the universality of the formula;
[0154] : Alternative institution specialty score, the score of the alternative institution in the group within the department ;
[0155] : Total number of specialty institutions. The total number of institutions within the group that can provide department k services;
[0156] Weight coefficient. Preset weight (for example ) and 1 to reflect the different importance of the three levels of "core quality", "alternative value" and "selection richness".
[0157] Support completeness score (Support_Completeness_Score)
[0158] This score aims to quantify non-medical factors critical to patients. It decomposes the fuzzy concept of support completeness into three objective dimensions: richness, convenience and economy, and integrates them into a comprehensive score :
[0159] ,
[0160] wherein is the adjustable weight of each sub-dimension, and the sum is 1. The calculation method of each sub-dimension score is as follows:
[0161] Richness score : Based on the number, category weight and average user score of each type of supporting facilities (such as hotels, restaurants, pharmacies) within the group, weighted calculation is performed.
[0162] Convenience score : Based on the average expected travel time of all supporting facilities within the group to the core medical institution, the shorter the travel time, the higher the score.
[0163] Economy score : Based on the normalized average price level of key supporting facilities (especially hotels) within the group, the lower the price level, the higher the score.
[0164] Method for determining model parameters and weights
[0165] All weight coefficients and key parameters (such as λ, , , etc.) in this invention are not randomly set, but are determined by scientific methods to ensure the effectiveness and robustness of the model. The determination method includes but is not limited to:
[0166] Expert Scoring: Invite experts in medical information, urban planning, and user experience to score the importance of different factors, and use tools like AHP (Analytic Hierarchy Process) to calculate the initial weights.
[0167] Machine Learning Optimization: Use Grid Search or more advanced optimization algorithms (like Bayesian Optimization) on a validation dataset containing user historical choices and satisfaction feedback to automatically learn the optimal parameter combination that maximizes metrics like Precision, Recall, or NDCG (Normalized Discounted Cumulative Gain).
[0168] Dynamic Configuration and User Profiling: Some weights (especially the final decision weight) can be dynamically adjusted based on user profiles. The system can predefine and store multiple "user profile configurations", such as "Out-of-town Critical Patient Configuration" (high , high ), Local Emergency Configuration (extremely high , high weight). These configurations can be automatically activated by the system based on user information or manually selected by the user on the interface, achieving systematic and manageable personalized recommendations.
[0169] 2.4 Intelligent Recommendation Decision and Presentation Unit
[0170] Intelligent Decision Tree
[0171] The core of this unit is an upgraded intelligent decision tree that includes hierarchical substitution and intent confirmation.
[0172] When the user's preferred target institution is in short supply, the logic of this decision tree is as follows (using Example Two as an example):
[0173] Step S1, Trigger and High-quality Substitution: First, find the same level or only one lower level of substitution institutions within the same group that meet the specialist score requirements.
[0174] Step S2, Intelligent Exploration and Logical Jump: If there is no high-quality substitution, the system will actively explore the user's willingness to change regions. If the user agrees, seamlessly switch to the inter-group comparison logic and automatically increase the medical service weight to the highest level to ensure that the recommended other regions are also top-notch.
[0175] Step S3, multi-path exit and user control: If the user refuses to change the area, the system will provide initial diagnosis options. Even if the user is still not satisfied with these options, the interaction will not be interrupted. The system will provide a variety of subsequent operations such as expanding the search radius of the area, only viewing pharmacies, or subscribing to the hospital number source reminders, to ensure that the user always has control and never gets stuck in a decision dead end.
[0176] Interpretable recommendation module
[0177] To solve the problem of user distrust and information overload caused by "black box" recommendations, the present application attaches great importance to the interpretability of the recommendation results.
[0178] Dynamically generated natural language explanation: For each group of the final recommendation, the system will automatically generate a short natural language summary as the recommendation reason. The reason is not a pre-set static script, but a dynamic generation based on the S final The sub-item score that contributes most to the formula is dynamically generated. S final The core purpose is to calculate a single, overall, and directly comparable and sortable final score for each candidate "medical service group", in short, S final A quantitative score for the final decision that comprehensively measures the overall value of a "medical service group" after fully considering the user's personalized needs. For example, if a group wins in terms of service capacity and economicity of supporting facilities, the system will generate:
[0179] Recommend
XX group
[0180] Visual presentation: In the interface design, the principle of "progressive disclosure" is followed. By default, only the most important total score and natural language reason are displayed. After the user clicks, the system will drill down in the form of radar chart, bar chart, and other visualization components to clearly show the detailed scores of service capacity, supporting facilities, and traffic convenience of each sub-dimension, as well as the core POI list in the group. This design not only avoids information overload, but also gives users the freedom to explore in depth.
[0181] Embodiment one: wide demand query of out-of-town patients
[0182] Scenario description: A patient from outside the city plans to come to Beijing for treatment of stomach disease and hopes to find an area with high medical level and convenient accommodation. He inputs the query in the App: Beijing stomach disease good hospital.
[0183] Execution process
[0184] 1. Trigger inter-cluster comparison logic: The system receives a broad query for stomach disease and identifies from the user's IP address or account information that it is an out-of-town patient, and then triggers the inter-cluster comparison logic.
[0185] 2. Cluster identification and evaluation: The system performs a medical service cluster identification step to identify all medical service clusters (such as the Peking Union Medical College cluster, the Beijing Friendship Hospital cluster, etc.) that provide gastroenterology services in Beijing. Then, the cluster service capacity evaluation unit calculates the (gastroenterology service capacity score) and (completeness of supporting facilities score) for each cluster.
[0186] 3. Personalized weight adjustment: The system automatically activates the user profile of the out-of-town critical patient, significantly increasing the weight of supporting facilities and medical services .
[0187] 4. Generate comprehensive recommendations: The system calculates for each candidate cluster and ranks them, and presents a list to the user through the interpretable recommendation module, such as: 1. Peking Union Medical College cluster (comprehensive recommendation degree: 9.3) - top medical strength, rich choices of food and accommodation around, suitable for difficult and critical patients and out-of-town patients. 2. Beijing Friendship Hospital cluster (comprehensive recommendation degree: 9.1) - gastroenterology features prominent, extremely convenient transportation, cost-effective… Users can click on details to view each sub-item score and recommendation reasons.
[0188] Example Two: Precise query and intelligent resource shortage processing for local patients
[0189] Scenario description: A Beijing local patient, feeling that the symptoms are relatively severe, directly searches and tries to book an expert number for gastroenterology at Peking Union Hospital through the App, but the system prompts that the number source is full.
[0190] Execution process:
[0191] 1. Position target cluster and resource query: The system receives a precise request from Peking Union Hospital, locates to its affiliated Peking Union Medical College cluster, and confirms through API query that its gastroenterology expert number is full.
[0192] 2. Trigger hierarchical substitution logic: The resource shortage condition is met, and the intelligent recommendation decision unit 104 triggers the upgraded intra-cluster substitution logic.
[0193] 3. Perform first-level substitution (high-quality same-cluster substitution): The system analyzes that Peking Union Hospital is a top-level third-grade hospital. Then, it searches for high-quality institutions within the Peking Union Medical College cluster that provide gastroenterology services and have a role of Alternative_Cooperative.
[0194] Assume scenario A: the system finds XX Tertiary Hospital East Branch (also a tertiary hospital, with high specialty score) within the group. The system will preferentially recommend: Beijing Union Hospital has no number source. Recommend
XX Tertiary Hospital East Branch
[0195] 4. Perform second-level substitution (user intent confirmation):
[0196] Assume scenario B: the system does not find other tertiary or secondary hospitals in the Union Group that provide gastroenterology services. At this time, the system determines that there is no high-quality same group substitution, and will actively explore the user's intent, popping up an interactive window: Union Hospital has no number source, and there is no other hospital of the same level in the current area. Do you want us to compare other top gastroenterology medical areas in the city (such as Friendship Hospital, North Medical Group area) for you? The window provides options:
[Yes, compare other areas]
[No, still search in this area]
[0197] 5. Perform third-level substitution (logical jump or multi-path exit):
[0198] If the user selects
[Yes, compare other areas]
[0199] If the user selects
[No, still search in this area]
[0200] The core idea of the present application is to build and utilize medical service groups for recommendations, and there are multiple equivalent or improved substitution schemes for its specific implementation, which should fall within the scope of protection of the present application.
[0201] 1. Replacement of geospatial data sources: In addition to the "population density data" used in this embodiment, "geospatial data reflecting the intensity of urban spatial activity" can also be road network density data, commercial heat map data, mobile signaling heat data, or night light remote sensing data, etc. These data can also reflect the degree of prosperity and POI clustering potential of the area.
[0202] 2. Alternative to semantic relation identification technology: The "large language model" used to identify the relationship between POIs can also be replaced by other semantic analysis technologies, such as knowledge graph-based entity relationship reasoning, rule engine based on string edit distance and classification label, or traditional word embedding (Word2Vec, GloVe) model combined with classifier, etc.
[0203] 3. Alternative to hardware implementation: In addition to implementing software instructions through general-purpose CPUs, the various computing units described in the present application (particularly the clustering and evaluation sections which are computationally intensive) can also be implemented through specialized hardware logic circuits, such as using field programmable gate arrays (FPGA) to parallelize distance calculations, or using artificial intelligence acceleration chips (NPU) to perform semantic relation judgments, in order to improve operation efficiency.
[0204] The above is a further detailed description of the present application in conjunction with specific preferred embodiments, and cannot be considered as limiting the specific implementation of the present application to these descriptions. For ordinary skilled persons in the technical field to which the present application belongs, a number of simple deductions or substitutions can be made without departing from the concept of the present application, and all of these should be considered as falling within the protection scope of the present application.
Claims
1. A medical service intelligent recommendation method based on spatial clustering and semantic analysis, characterized in that, Comprise: Step 1, data collection: collect multi-source heterogeneous data, including map point of interest data, geospatial data, professional medical data and dynamic resource data related to medical treatment; Step 2, data preprocessing and quality monitoring: clean, align and check the obtained data, as follows: a. Obtain map point of interest data, geospatial data and professional medical data from multiple data sources; b. Through a multi-strategy entity alignment module, correlate data from different sources to the same medical entity; c. Establish a dynamic data quality monitoring mechanism to identify and mark data that may be outdated or incorrect; Step 3, medical service cluster identification: combine geospatial data reflecting the intensity of urban spatial activity, determine clustering parameters through a multi-dimensional dynamic threshold model, and perform geospatial clustering on point of interest data; Within each preliminary geographic cluster, a dual semantic relationship judgment module that includes a semantic relationship identification technology preliminary judgment and a rule engine verification identifies the functional relationship between point of interest data, thereby constructing a medical service cluster; Step 4, cluster service capacity evaluation: for each medical service cluster, generate a quantitative cluster service capacity score through a hybrid evaluation model that combines authoritative scoring and data-driven estimation, and generate a quantitative supporting facility perfection score by comprehensively evaluating its supporting facilities; Step 5, intelligent recommendation decision and presentation: receive a user's medical service request, and through an intelligent decision tree that includes hierarchical substitution and intent confirmation, trigger intra-cluster substitution or inter-cluster comparison logic, present the recommendation result to the user through an interpretable recommendation module, and explain the recommendation reason in natural language and visual manner; In step b, the multi-strategy entity alignment module uses a comprehensive strategy for entity alignment, which combines fuzzy matching of names and geographical proximity of addresses, and introduces auxiliary information for cross-validation; In step c, by monitoring data quality in real time, combining user feedback and rule engine, automatically marking abnormal data and triggering correction actions, a closed-loop feedback ecosystem is formed; Design fault tolerance and degradation mechanism, when the real-time API call fails, the system will not interrupt the service, but will make a probabilistic prediction based on historical data and send a prompt to the user; In step 3, it also includes: First stage, multi-dimensional dynamic parameter geospatial clustering step: perform multi-dimensional dynamic parameter geospatial clustering of medical resources through hierarchical algorithm, use average linkage algorithm as the calculation method of cluster distance, and identify cohesive reality functional areas; Second stage, dual semantic relationship judgment step: including semantic relationship identification technology preliminary judgment and rule engine verification, using semantic relationship identification technology to preliminarily judge the relationship between point of interest pairs, and verifying through a hard-coded rule engine to obtain structured medical service cluster data objects. 2.The intelligent medical service recommendation method of claim 1, wherein, In the first stage, the geospatial clustering step of multi-dimensional dynamic parameters, the dynamic distance threshold formula is introduced Let the clustering algorithm be able to adapt to the spatial scale of different regions, which is defined as follows: , Wherein, each parameter is defined as follows: dynamic distance threshold distance for final decision of merging two POIs or clusters; minimum cluster radius lower limit of preset physical distance; base cluster radius preset cluster radius benchmark value in sparsely populated areas; population density of the grid where the current POI is located P, variable reflecting the intensity of urban spatial activity obtained from external geographic data sources; maximum population density within the study area constant for normalization; natural constant; k represent a specific department; To overcome the limitations of a single indicator in describing complex urban functional areas, the dynamic threshold model is upgraded to multi-dimensional input: , wherein, f represents a composite function whose inputs include not only the normalized population density but also the road network density and the business vitality index , are the weights for each dimension. In the second stage, the dual semantic relationship determination step, the semantic relationship identification technology includes large language models, knowledge graph-based entity relationship reasoning, rule engines based on string edit distance and classification labels, traditional word embedding models combined with classifiers, rule engines integrated with hard constraint rules based on medical industry standards, including: Institution type mutual exclusion rule: interest points officially classified as level 3 first-class hospitals cannot form a core-attached relationship with another hospital of the same level; Name contains strong association rule: if the name of interest point A completely contains the name of interest point B, it will be determined as a core-attached relationship, this rule has the highest priority and will override all secondary inference results generated by LLM based on semantic similarity; Reverse verification rule: if LLM determines that interest point A is the core of interest point B, it will query whether interest point B is the core of interest point A, if not consistent, it will be marked for manual review; The medical service group data object contains the following attributes: GroupID: unique identifier of the group; CorePOI: one or more interest points playing a core role within the group; AlternativePOIs: list of interest points playing an alternative cooperation role within the group; SupportPOIs: list of interest points playing a supporting facility role within the group; Boundary: a polygon describing the geographical range of the group. 3.The intelligent medical service recommendation method of claim 1, wherein, In step 4, this includes departments Service capability rating For core institutions Alternatives to authoritative rankings For institutions without authoritative ratings, a data-driven rating estimation sub-model is activated. This sub-model utilizes machine learning, taking into account various features of the institution, including institution level, average user rating, keyword frequency in reviews, number of doctors, and equipment information, to predict equivalent ratings. Fraction; In step 4, for a particular department its service capabilities are calculated as follows: , where, is the core quality item, the upper limit of the medical level of a region is determined by its best institution, and the weight is the largest; is the substitute value item, and the logarithmic function is used to reflect the diminishing marginal utility, and +1 is a robust design to prevent mathematical errors; To select the richness term, the selection freedom of the region is embodied, and the logarithmic function is used to embody the diminishing marginal utility; For the group specialty service ability score, For the core institution specialty score, For the substitute institution specialty score, For the total number of specialty institutions, For the weight coefficient; In step 4, the supporting facility perfection score is also included, which decomposes the fuzzy supporting facility perfection concept into three objective dimensions of richness, convenience and economy, and integrates them into a comprehensive score : , wherein, are the adjustable weights of each sub-dimension, the sum of which is 1, and each sub-dimension score is calculated as follows: Richness score : Based on the number of each type of supporting facilities in the group, the category weight and the average user score for weighted calculation; Convenience score : Based on the average estimated travel time from all the locations of the supporting facilities within the group to the core medical institution, the shorter the travel time, the higher the score; Economic score : Based on normalized average price levels of key supporting facilities within the cluster, the lower the price level, the higher the score. 4.The intelligent medical service recommendation method of claim 1, wherein, In step 4, the model parameter and weight determination method is also included, which includes: Expert scoring method: invite experts in the fields of medical information, urban planning and user experience to score the importance of different factors, and calculate the initial weights through the analytic hierarchy process tool; Machine learning optimization: on the validation dataset containing user historical selection and satisfaction feedback, use grid search or optimization algorithms to maximize the accuracy, recall rate or NDCG of the recommendation results as target indicators, and automatically learn the optimal parameter combination; Dynamic configuration and user portrait: dynamically adjust the weights according to the user portrait; predefine and store user portrait configuration files, then automatically activate them according to user information or actively select them by users on the interface. 5.The intelligent medical service recommendation method of claim 1, wherein, In step 5, the intelligent decision tree runs the following steps in turn: Step S1, trigger and high-quality alternative: find alternative institutions of the same level or only one level lower within the same group, with specialist scores meeting the standard; Step S2, intelligent exploration and logical jump: if there is no high-quality alternative, actively explore the user's willingness to change the region, if the user agrees, seamlessly switch to the inter-group comparison logic, and automatically switch the medical service weight to the highest; Step S3, multi-path exit and user control: if the user refuses to change the area, preliminary diagnosis and treatment options will be provided, and if the user is still not satisfied with these options, multiple subsequent operations will be provided, including expanding the search radius of the area, only viewing pharmacies or subscribing to hospital number source reminders, to ensure that the user always has control. 6.The intelligent medical service recommendation method of claim 1, wherein, In step 5, the interpretable recommendation module runs the following steps: Dynamic generation of natural language explanation step: For each group in the final recommendation, a short natural language summary is automatically generated as a recommendation reason, which is based on the quantitative score S final The sub-item score that contributes most to the formula is dynamically generated; Visual presentation step: in interface design, follow the principle of gradual disclosure, by default only show the most important total score and natural language reasons, and after user clicks, show the detailed scores of sub-dimensions and the list of core interest points within the group through visual components in a drill-down manner.
7. A medical service intelligent recommendation system based on spatial clustering and semantic analysis, characterized in that: A memory, a processor, and a computer program stored on the memory, the computer program configured to implement the steps of the method of any one of claims 1-6 when invoked by the processor.
8. A computer-readable storage medium, characterized in that: The computer readable storage medium stores a computer program, the computer program configured to implement the steps of the method of any one of claims 1-6 when invoked by a processor.
Citation Information
Patent Citations
Medical resource visual recommendation method based on location-based service
CN113284590A
Intelligent data recommendation method and system based on medical service and medium
CN118588307A