A sequential access prediction method based on multi-task fusion access interval and related equipment
Through multi-task learning, fusion access interval prediction and sequential access prediction, combined with location coding and interval coding, the Transformer multi-head self-attention module is improved, which solves the shortcomings of the existing model in capturing user access interval irregularities, and improves the prediction accuracy and accuracy of health status reflection.
Patent Information
- Application Number
- CN202411763003.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2044-12-03
AI Technical Summary
The existing access prediction model fails to effectively capture the irregularity of user access intervals, resulting in insufficient prediction accuracy, especially lack of accuracy in reflecting fluctuations in user health.
The multi-task learning paradigm is adopted to integrate access interval prediction subtasks and sequential access prediction subtasks, combining location coding and interval coding, and to improve the Transformer multi-headed self-attention module by introducing historical attention residuals, enhancing the model's ability to capture access intervals and sequence information.
The generalization ability of the model in different tasks and data scenarios is improved, and overfitting is avoided, and prediction accuracy and accuracy in reflecting user health fluctuations is improved.
Smart Images

Figure CN119513727B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a sequential access prediction method based on multi-task fusion access interval and related equipment. Background Art
[0002] Sequential visit prediction is a prediction based on a user's historical visits, spanning various medical specialties and scenarios. With technological advancements, visit prediction research continues to evolve and iterate. Early visit prediction models relied on heuristics and expert systems, such as the MYCIN system, which were limited by the high maintenance cost of manual rule curation. Advances in traditional machine learning methods have automated the process of training classifiers from electronic medical records, treating visit prediction as a multi-class classification task. Attention-based models, such as MMORE, MusaNet, and HiTANet, focus on capturing multi-scale temporal features. Although these models take into account the temporal information of user visits, they fail to effectively capture deeper information, such as the irregularity of visit intervals. How to solve the above problems is the focus of this solution.
[0003] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute prior art known to ordinary technicians in the field. Summary of the Invention
[0004] The purpose of this application is to provide a sequential access prediction method and related equipment based on multi-task fusion of access intervals, which at least to some extent overcomes the problems existing in the prior art. Through the access interval prediction subtask and position encoding and interval encoding, it can fully capture the access interval and sequence information, make up for the shortcomings of previous research, more accurately reflect the fluctuations in the user's health status, and improve the performance of the model. For example, ablation studies have shown that removing this task will reduce the accuracy. The multi-task learning paradigm is adopted to fuse the two subtasks and synergistically enhance the performance of each subtask, so that the model can learn richer feature representations, effectively avoid overfitting, and improve the generalization ability in different tasks and data scenarios. The historical attention residual is introduced to improve the Transformer multi-head self-attention module to better capture long-term dependencies, which helps to extract key information from historical accesses and improve prediction accuracy.
[0005] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by practice of the invention.
[0006] According to one aspect of the present application, a sequential access prediction method based on multi-task fusion access interval is provided, including: obtaining access information of a target user within a preset time period, access purpose information of the target user, physiological characteristic information of the target user, an initial access result prediction model and a training sample set; processing the access information of the target user within the preset time period to generate historical access time information of the target user, historical access record information of the target user and real-time access time information of the target user; preprocessing the training sample set to generate a training sample set with target feature information; processing the initial access result prediction model based on the training sample set with target feature information to generate a target access result prediction model; processing the historical access time information of the target user, the historical access record information of the target user, the real-time access time information of the target user and the physiological characteristic information of the target user based on the target access result prediction model to generate an interval prediction subtask and a sequential access prediction subtask; processing the interval prediction subtask and the sequential access prediction subtask to generate an initial prediction feature vector; processing the initial prediction feature vector based on the access purpose information of the target user to generate target prediction information of the target user.
[0007] Another aspect of the present application is a sequential access prediction device based on multi-task fusion access intervals, comprising: an acquisition module for acquiring access information of a target user within a preset time period, access purpose information of the target user, physiological characteristic information of the target user, an initial access result prediction model and a training sample set; a processing module for processing the access information of the target user within the preset time period to generate historical access time information of the target user, historical access record information of the target user and real-time access time information of the target user; pre-processing the training sample set to generate a training sample set with target feature information; processing the initial access result prediction model based on the training sample set with target feature information to generate a target access result prediction model; processing the historical access time information of the target user, the historical access record information of the target user, the real-time access time information of the target user and the physiological characteristic information of the target user based on the target access result prediction model to generate an interval prediction subtask and a sequential access prediction subtask; processing the interval prediction subtask and the sequential access prediction subtask to generate an initial prediction feature vector; processing the initial prediction feature vector based on the access purpose information of the target user to generate target prediction information of the target user.
[0008] According to another aspect of the present application, an electronic device includes: a first processor; and a memory for storing executable instructions of the first processor; wherein the first processor is configured to execute the above-mentioned sequential access prediction method based on multi-task fusion access interval by executing the executable instructions.
[0009] According to another aspect of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a second processor, the method for sequential access prediction based on multi-task fusion access interval is implemented.
[0010] The present application provides a method and related equipment for predicting sequential access based on multi-task fusion of access intervals. The server can fully capture access intervals and sequence information through access interval prediction subtasks and position coding and interval coding, make up for the shortcomings of previous research, more accurately reflect fluctuations in user health status, and improve model performance. For example, ablation studies have shown that removing this task will reduce the accuracy. The multi-task learning paradigm is adopted to fuse two subtasks, and the performance of each subtask is synergistically enhanced, so that the model can learn richer feature representations, effectively avoid overfitting, and improve generalization capabilities in different tasks and data scenarios. The historical attention residual is introduced to improve the Transformer multi-head self-attention module to better capture long-term dependencies, which helps to extract key information from historical accesses and improve prediction accuracy.
[0011] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 A flowchart of a sequential access prediction method based on multi-task fusion access intervals provided by an embodiment of the present application is shown;
[0013] Figure 2 A schematic structural diagram of a sequential access prediction device based on multi-task fusion access intervals provided by an embodiment of the present application is shown;
[0014] Figure 3 A partial structural diagram of an access result prediction model provided by an embodiment of the present application is shown. DETAILED DESCRIPTION
[0015] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0016] The following combination Figure 1The following describes a sequential access prediction method based on multi-task fusion access intervals according to an exemplary embodiment of the present application. It should be noted that the following application scenarios are only provided to facilitate understanding of the spirit and principles of the present application, and the embodiments of the present application are not limited in this respect. On the contrary, the embodiments of the present application can be applied to any applicable scenario.
[0017] In one embodiment, the present application also proposes a sequential access prediction method based on multi-task fusion access intervals and related equipment. Figure 1 The flowchart of a sequential access prediction method based on multi-task fusion access interval according to an embodiment of the present application is schematically shown. Figure 1 As shown, the method is applied to the server and includes:
[0018] S101, obtaining access information of a target user within a preset time period, access purpose information of the target user, physiological feature information of the target user, an initial access result prediction model and a training sample set.
[0019] In one implementation, the target user is set to have performed four health-related activities in a medical institution in the past year (preset time period). The activity times are January 15, 2023, March 5, 2023, July 20, 2023, and October 10, 2023. Through these time records, the time intervals between adjacent activities can be calculated, such as the first to second activity interval is 49 days (March 5, 2023 - January 15, 2023), the second to third activity interval is 137 days, and the third to fourth activity interval is 81 days. These time interval data will serve as an important basis for subsequent analysis of activity patterns and potential needs, similar to the treatment of adjacent medical time intervals in the article, and will be used for related task analysis. The first activity, in the comprehensive treatment area, recorded general discomfort, such as fatigue and mild headaches. The second activity, in the specialized treatment area, covered skin conditions, such as minor localized skin changes and itching. The third activity, back in the comprehensive treatment area, presented digestive system symptoms, such as loss of appetite and occasional abdominal discomfort. The fourth activity, in the sports rehabilitation area, focused on functional issues in specific body parts, such as limited waist mobility and occasional numbness in the lower limbs. The activity records and related condition descriptions in these different areas will serve as basic data for subsequent analysis and processing, similar to the construction of an embedded representation of a visit list, providing clues for a deeper understanding of users' health-related behaviors and trends.
[0020] The target user's first visit to the general care area stems from a recent feeling of being unwell overall and a request for a professional assessment and recommendations for improvement. This falls under the category of health assessment and consultation. The second visit to the specialist care area stems from a skin condition, seeking to understand the cause and provide guidance on how to address it. The third visit to the general care area stems from digestive system symptoms, seeking professional analysis and recommendations for improvement. This also falls under the category of health assessment and consultation. The fourth visit to the sports rehabilitation area stems from a functional issue with a specific body part, requiring a professional assessment and recommendations for improvement. Assuming that, after the third onset of digestive system symptoms, the professional recommends a follow-up examination to monitor overall health. This fourth visit to the sports rehabilitation area could also be considered part of a follow-up to monitor changes in the previous condition, to determine whether other areas of the body were affected during the previous episode or whether the original discomfort triggered new functional changes.
[0021] During each activity, the medical institution recorded some basic physiological data of the target user. For example, during the first activity, the temperature was 37.2°C, blood pressure was 118 / 78 mmHg, and heart rate was 78 beats / minute; during the second activity, the temperature was normal (36.7°C), blood pressure was 116 / 76 mmHg, and heart rate was 76 beats / minute; during the third activity, the temperature was 36.5°C, blood pressure was 128 / 82 mmHg, and heart rate was 77 beats / minute; during the fourth activity, the temperature was 36.6°C, blood pressure was 122 / 78 mmHg, and heart rate was 80 beats / minute. These physiological indicators will serve as target physiological characteristic indicators to analyze the user's basic physical condition and its changing trends. Combined with visit information, they will provide comprehensive data support for subsequent analysis and prediction. In addition to conventional physiological indicators, this data also includes information such as height and weight. For example, a target user is 173cm tall and weighs 68kg during the first activity. During the second activity, skin conditions affect their lifestyle, causing their weight to drop to 67kg. During the third activity, their weight returns to 68kg. During the fourth activity, functional issues in specific body parts affect their activity level, causing their weight to increase to 69kg. This data can also indirectly reflect changes in the user's health status, providing a supporting role in the overall analysis and prediction model.
[0022] like Figure 3As shown in the figure, within the initial access result prediction model, the access interval analysis subtask module plays a key role in the architecture, focusing on in-depth analysis of the target user's health-related activity intervals. It accurately calculates the time intervals between adjacent activities to construct a time interval sequence, which serves as the cornerstone for subsequent analysis. For example, if a user records health activities on January 10, March 20, and June 5, 2023, the duration of each adjacent interval is calculated sequentially, forming a time interval sequence such as [69 days, 77 days], providing raw data support for mining the user's health behavior rhythm. Coding Strategy: Positional and interval coding are used to represent interval information. Positional coding assigns unique values based on the order of activities, with the first activity coded as 1 and subsequent values increasing in sequence. This allows the model to accurately grasp the activity sequence logic. Interval coding quantifies the interval duration according to preset rules, such as coding 0.1 for days 0-30 and 0.3 for days 31-60, reflecting the user's health stability or changing trends. Short intervals may be due to urgent health issues, causing users to pay frequent attention, while long intervals imply relative stability or reduced attention. These coded values are input into the underlying model operations as key features and are deeply integrated into the subsequent complex analysis and prediction process.
[0023] The Health Trend Prediction subtask module, Information Encoding and Integration, focuses on predicting user health trends. It comprehensively extracts information describing physical conditions from users' historical activity records, covering diverse topics such as fatigue, skin lesions, and digestive dysfunction. It also integrates external professional health knowledge systems, such as knowledge linking common discomfort symptoms with potential serious illness risks. For example, for users who repeatedly mention digestive issues, the model leverages knowledge about the evolution of digestive issues from a professional medical knowledge base and analyzes changes in the user's physiological indicators over multiple examinations. Using an attention mechanism, it intelligently filters and prioritizes key information, condensing this massive amount of information into a vector representation that accurately reflects health trends, building a solid data and knowledge foundation for predicting health trends. A trend prediction example: For a user with chronic digestive issues, the model integrates symptom descriptions from multiple medical visits, changes in gastroscopy and colonoscopy parameters, and external digestive disease research. Through complex calculations and logical inference, it predicts whether the user's health will gradually improve, remain the same, or deteriorate. This prediction provides critical, forward-looking guidance for user health management and the precise allocation of medical resources, helping medical providers plan intervention strategies in advance.
[0024] The private layer focuses on deep mining of individual characteristics. The private layer plays a key role in the model architecture, specifically focusing on deeply analyzing the unique characteristics of target users. For each user, the private layer receives raw data input, including visit information, physiological characteristics, and visit purpose information within a preset time period. It first deeply cleanses and structures the visit information. For example, for a user's multiple health visit records, it accurately classifies and codes them based on multiple dimensions, such as time, department visited, and primary symptoms. For physiological characteristics, sophisticated statistical analysis and feature engineering techniques are used to extract deep features, such as fluctuations in physiological indicators and correlations between multiple indicators. Visit purpose information is converted into semantically rich vector representations to accurately capture the motivations and expectations behind each user's visit. Based on this, the private layer applies advanced deep learning algorithms, such as deep belief networks (DBNs) or stacked autoencoders (SAEs), to these processed features through nonlinear transformations and dimensionality reduction, uncovering low-dimensional latent feature representations hidden within the high-dimensional data. These latent features closely reflect the user's individual health status, behavioral patterns, and preferences, providing a personalized basis for accurate model predictions. For example, for a user who suffers from a chronic disease and has adjusted his treatment plan multiple times due to fluctuations in his condition, the private layer can accurately capture the personalized pattern of his condition change cycle, drug response characteristics, and the impact of lifestyle adjustments on health, providing key decision-making basis for the model when predicting the user's future health trends, access needs, and the effectiveness of intervention measures, significantly improving prediction accuracy and personalized service levels, and making the model output closely fit the user's unique health trajectory and demand level.
[0025] Optimized Sharing Layer Mechanism and Expanded Feature Fusion: The sharing layer is the core hub for model synergy and efficiency, and the feature fusion architecture is fully optimized. Firstly, it closely connects the feature vectors of the visit interval and the health trend prediction subtask to enable interactive sharing of basic features. Secondly, it actively introduces rich interactive terms and innovative combination features. For example, by multiplying the visit interval feature with the frequency feature of a specific symptom, a new feature is constructed to reveal the frequency of symptoms within a specific interval, deeply exploring the nonlinear relationship between health behaviors and conditions. If a symptom frequently occurs within a specific interval, the model can keenly capture it, providing key insights for accurately diagnosing disease progression and evaluating intervention effectiveness. Upgraded Encoding Structure: A multi-layer bidirectional transformer architecture is used to encode features, and a multi-head attention mechanism processes multi-feature associations in parallel. Each transformer layer contains multiple attention units, each capturing feature relationships from different perspectives, comprehensively covering the dimension of information interaction. Historical attention residuals are also introduced to address the problem of long-term dependencies. When processing user data on chronic diseases, the model can retrospectively track all relevant activity information, breaking through the limitations of short-term data and accurately capturing long-term health trajectories. This enables accurate long-term prediction of health trends and provides superior intelligent support for chronic disease management.
[0026] The decoding layer is responsible for accurately mapping and outputting prediction information. As the key hub for the model's prediction output, the decoding layer is responsible for accurately converting intermediate results, which have undergone complex processing and analysis, into target prediction information with practical application value. After receiving high-dimensional feature vectors from the shared layer that combine multi-task features and deep knowledge, the decoding layer performs reverse inference based on predefined mapping rules and semantic transformation logic. For the interval prediction subtask, the decoding layer uses a decoding algorithm based on time series analysis, combining historical visit interval patterns with current health status characteristics, to accurately predict the probability distribution of the time interval for the user's next health visit and convert this into a readily understandable time interval prediction value, such as "The next visit is expected to be within the next 45-60 days with a high probability." For the sequential visit prediction subtask, a deep semantic understanding model is combined with a medical knowledge graph to decode the potential visit sequence feature vector into a specific predicted visit path and corresponding probability, such as "Based on current health trends, there is a 60% probability of visiting a specialist clinic for further examination, a 30% probability of a general practitioner follow-up evaluation, and a 10% probability of participating in rehabilitation treatment consultation."
[0027] When comprehensively generating target prediction information, the decoding layer fully considers the weight assigned to the user's access purpose information and the confidence of different prediction results, and uses weighted fusion and decision logic optimization algorithms to output detailed, accurate and actionable prediction information such as "In view of the user's recent fluctuations in cardiovascular indicators and rehabilitation needs, it is predicted that the next visit will focus on cardiovascular specialist review (recommended examination items: cardiac ultrasound, dynamic electrocardiogram), and will also carry recent health monitoring data (daily records of blood pressure and heart rate). The purpose of the visit is to evaluate the efficacy of drugs and adjust the rehabilitation plan. The estimated visit duration is about 90 minutes." This provides strong decision-making support for user health management, early allocation of medical resources, and precise docking of medical services, and deeply empowers the intelligent upgrade of the entire process of medical and health services and the optimization of personalized experience.
[0028] Pre-training data collection adheres to the principles of breadth and precision. In addition to large-scale general health datasets, we deeply explore subsets of health data from populations that match the target users' characteristics, such as region, age, and gender. For example, to predict health trends for middle-aged female users in a specific region, we incorporate health data from people of the same age and gender in that region, as well as data on people with similar health risks. This allows the model to deeply understand the health characteristics and patterns of that specific user group, significantly improving its adaptability to the target users and ensuring that predictions are close to the individual's actual situation. Data processing strictly adheres to quality control. First, ambiguous health status descriptions are strictly verified and labeled. For example, "occasional chest discomfort" is refined into "mild chest tightness about three times a month, lasting about five minutes and then resolving," to ensure data accuracy. Pre-processing is then performed based on health status categories and activity types, distinguishing between sudden visits for acute illnesses and regular follow-up data for chronic diseases, helping the model accurately learn various health patterns. During parameter initialization, parameter values are flexibly set based on the distribution of pre-training data and the initial characteristics of the target users. For users with a family history of cardiovascular disease, the initial parameters of cardiovascular risk indicators from similar cases are used as a reference instead of general initialization. The model accurately anchors individual characteristics from the start, accelerates convergence to the optimal solution, and ensures accurate and stable predictions.
[0029] To accurately drive model learning, dedicated loss functions are designed based on the characteristics of each subtask. The visit interval analysis subtask uses a mean squared error loss function (MSELoss) to accurately measure the deviation between predicted and actual intervals, strongly constraining the model to accurately capture the temporal rhythm of health activities. The health trend prediction subtask employs an improved FocalLoss function, flexibly assigning weights based on the importance of health trends and the difficulty of prediction. This weighting emphasizes deterioration trends, such as those that more sensitively capture subtle signs of deterioration in early cancer. This strengthens the model's ability to detect key health risks, guides the model's focus on predicting key trends, avoids interference from large amounts of normal data, and enhances health risk monitoring sensitivity. Hyperparameter optimization is key to unlocking the model's potential. Beyond traditional parameters such as the learning rate and hidden layer dimensions, we deeply explore hyperparameters associated with visit intervals and health trends, such as the visit interval encoding scaling factor and the health trend attention weight parameter. Model performance is evaluated using cross-validation on multiple training subsets, such as age-stratified cross-validation, to identify optimal hyperparameter combinations for each age group. After massive experimental iterations, we have accurately locked in the hyperparameter set that adapts to various scenarios, ensuring the optimal balance between model generalization and prediction accuracy, and stably outputting reliable results in complex and changeable health prediction tasks, thus safeguarding users' health.
[0030] S102 : Processing the access information of the target user within a preset time period to generate historical access time information of the target user, historical access record information of the target user, and real-time access time information of the target user.
[0031] In one implementation, assume that a target user has five visits to a health service platform within the past year (preset time period). The details are as follows: The first visit occurred at 10:30 AM on March 10, 2022. The user had recently been experiencing poor health, specifically experiencing occasional headaches and poor rest. The user spoke with a consultant on the platform. The consultant inquired about the duration of the symptoms and their daily experience, and provided general lifestyle adjustments, such as maintaining a regular sleep schedule and maintaining appropriate relaxation. The second visit occurred at 2:15 PM on May 5, 2022. The user reported that their headache symptoms had not improved and that they had experienced some visual changes. The consultant inquired in detail about the specific visual changes, such as changes in visual clarity and any abnormal lighting and shadows. The user was also advised to further assess their overall health. The third visit occurred at 9:45 AM on July 20, 2022. The user underwent a comprehensive physical examination (including scans of specific areas) and then spoke with the consultant again. The fourth visit, at 11:20 AM on October 1, 2022, outlined the following: The user experienced further changes in their physical condition during the holiday and urgently accessed the platform. Based on previous records and the user's current description, the consultant speculated that this was related to internal pressure balance. The fifth visit, at 4:30 PM on December 15, 2022, outlined the following: The user reported having undergone a professional examination, which confirmed an abnormality in a specific internal indicator. This visit was to consult with the consultant regarding daily precautions and adjustments to address this situation. The consultant developed a personalized lifestyle optimization plan for the user, including dietary adjustments and daily activity planning.
[0032] Calculate the time interval between adjacent visits:
[0033] The time interval between the first visit (10:30 on March 10, 2022) and the second visit (2:15 on May 5, 2022) is: First, calculate the difference in days. March has 31 days, and April has 30 days, so the interval is 56 days. Then calculate the time difference: 2:15 PM - 10:30 AM = 3 hours and 45 minutes.
[0034] The time interval from the second visit to the third visit (July 20, 2022, 9:45) is:
[0035] May has 31 days, June has 30 days, and the interval is 76 days. 9:45 - 14:15 = -4 hours and 30 minutes (a negative time difference here indicates that the third visit occurred earlier than the second visit. The interval calculation can be performed using the absolute value or modified according to specific needs). Similarly, the intervals between all adjacent visits are calculated. This interval information reflects the user's pace of attention and management of their health at different stages and can be used as part of historical visit time information. Visit time series analysis: Arrange all visit times in chronological order to form a time series: [March 10, 2022, 10:30 AM, May 5, 2022, 2:15 PM, July 20, 2022, 9:45 AM, October 1, 2022, 11:20 AM, December 15, 2022, 4:30 PM]. Analyze the characteristics of this time series, such as the average number of days between visits and the distribution of visit times (such as the proportion of weekday and weekend visits). Assuming the average interval between visits is approximately 60 days, and finding that users visit more frequently on weekdays, this suggests that users are more focused on managing their health outside of work. These statistical and analytical results represent historical visit time information, which helps understand users' health management behavior patterns.
[0036] Historical visit records are generated, specifically: First visit details: The user communicated with a health consultant regarding head and rest issues. The consultant inquired about the duration of the discomfort (user reported approximately two weeks), the severity of the daily experience (described as intermittent head discomfort with moderate impact on daily life), and the symptoms of rest issues (difficulty falling asleep, sleeping approximately 4-5 hours per night). The consultant recommended adjusting sleep schedules, avoiding excessive exertion, and engaging in relaxing activities. Second visit details: The user's head discomfort persisted and vision changes occurred. The vision specialist inquired about the onset of the vision changes (started approximately a week ago), any other visual abnormalities (no obvious eye pain but slight light and shadow perception), and the correlation between the head discomfort and vision changes (visual changes were more pronounced as the head discomfort intensified). Visual function tests were performed, including basic vision tests and visual sensitivity tests. Initial results showed slight fluctuations in vision, and the specialist recommended further evaluation of overall health to identify potential contributing factors. Detailed records of each visit are organized in this manner, including the user's reported health status, the questions asked by the consultant or specialist, the examination items and results (if any), and any recommended adjustments.
[0037] From the first visit to the last, the user's physical condition changes are sorted out: from initial headaches and poor rest, to headaches accompanied by visual changes, and then to the determination of abnormalities in certain internal body indicators. At the same time, the changes in the consultant's or expert's response ideas and suggestions are sorted out: from initial lifestyle adjustments, to suspected physical function problems and recommendations for comprehensive examinations, to further observation and analysis based on the examination results, and finally to the determination of abnormalities and the formulation of adjustment plans. For example, taking the symptom of headaches as an example, its severity varies in different visits (from intermittent abnormal sensations to intensified), and related symptoms gradually emerge (visual changes). These physical condition development trajectories and corresponding response processes constitute an important part of the historical visit record information, which helps to analyze the evolution of the user's health status and feedback on relevant suggestions.
[0038] Assume that at the current moment (15:00 on May 1, 2023), the user is accessing the health service platform and is preparing to consult about the feedback and further optimization suggestions after the recent adjustments to life under the previously determined abnormal internal body indicators. The real-time access time information at this time is 15:00 on May 1, 2023. This real-time access time is combined with the previous historical access time information to analyze whether the time pattern of user visits has changed, such as whether the platform is visited more frequently to consult about health issues in a specific time period (such as after holidays, when the seasons change, etc.). At the same time, by comparing with the historical access record information, you can understand the relationship and development of the user's current visit with previous changes in physical condition and response suggestions. For example, this consultation is based on the needs of the continuous adjustment process after the abnormal internal body indicators were previously determined. Through real-time access time information, you can better grasp the dynamic process of user health management.
[0039] S103: Preprocess the training sample set to generate a training sample set with target feature information.
[0040] In one embodiment, the training sample set is grouped to generate a grouped training sample set, where the grouped training sample set includes physiological characteristic information of users of different age groups and genders. Suppose we have a training sample set containing health-related data for 1,000 users. This set records the user's basic information (age, gender), various physiological indicators (such as blood pressure, heart rate, blood sugar, height, weight, etc.), and some lifestyle data (such as weekly exercise hours, daily number of cigarettes smoked, and alcohol consumption frequency). We divide the age range into three intervals: youth (18-35 years old), middle-aged (36-55 years old), and elderly (56 years old and above). This is further subdivided by gender (male, female), resulting in six groups: young male group, young female group, middle-aged male group, middle-aged female group, elderly male group, and elderly female group. For example, user 1 (35 years old, male) belongs to the young male group; user 2 (42 years old, female) belongs to the middle-aged female group; and user 5 (60 years old, male) belongs to the elderly male group.
[0041] Feature extraction is performed on the grouped training sample set to generate a raw feature library. For each group, we select features relevant to the user's health status. In addition to the aforementioned physiological indicators and lifestyle data, we can also calculate derived features such as body mass index (BMI = weight (kg) / height (m²)) and blood pressure / pulse pressure difference (systolic pressure - diastolic pressure). Taking the young male group as an example, we calculate features such as BMI and pulse pressure difference for each user. For user 1 (height 175 cm, weight 75 kg), BMI = 75 / (1.752) ≈ 24.49, and pulse pressure difference = 120 - 80 = 40. These raw features (including the original physiological indicators, lifestyle data, and the calculated derived features) are organized to form a raw feature library. Each group has its own corresponding raw feature library, which contains various feature information for the group's users.
[0042] The original feature library was processed to generate training and validation sets. We decided to split the original feature library for each group into training and validation sets at a ratio of 70%:30%. For example, if the young male group had 200 users, the data of 140 users would be used as the training set, and the data of 60 users would be used as the validation set. For the young male group, all feature data of 140 users was randomly selected as the training set, and the feature data of the remaining 60 users would be used as the validation set. The same method was applied to the other five groups to generate grouped training and validation sets. This way, both the training and validation sets retained feature information of users of different age groups and genders, and their distribution was similar to that of the original sample set. Predictions were processed on the validation set using the classifier to generate prediction results. The training set was then trained using the preset algorithm to generate prediction results for the validation set. The logistic regression classifier was chosen as the example classifier (in actual applications, a more appropriate classifier could be selected based on the data characteristics). The classifier is trained using a training set (containing training data for each group). The goal of the training is to predict whether a user has potential health risks based on information such as the user's physiological characteristics and lifestyle habits (here it is simply defined as a two-classification problem, risky / no risk. In fact, more complex classification goals can be defined based on specific research questions). For the validation set (which also contains validation data for each group), the characteristic data of each user is input into the trained classifier to obtain the prediction results. For example, for a user in the validation set of the young male group, the classifier predicts whether he has health risks based on his age, gender, blood pressure, heart rate, BMI, lifestyle habits and other characteristics. The prediction result is risky or no risk (assuming it is expressed in the form of probability, such as a risk probability of 0.6, indicating a higher risk).
[0043] At the same time, a preset algorithm (such as the K-nearest neighbor algorithm) is used to train the training set and obtain the validation set class prediction results. The K-nearest neighbor algorithm predicts the category of the validation set user (here also the health risk category) based on the categories of neighboring users in the training set with similar characteristics to the validation set user. For example, for a user in the validation set, the K-nearest neighbor algorithm finds the K training set users with the most similar characteristics, and predicts the category of the validation set user based on the majority category of these K users, obtaining the validation set class prediction result (such as risky or non-risky).
[0044] The prediction results and validation set prediction results are processed to generate target feature information, which is used to characterize risk factors for abnormal physiological characteristics of the user. The prediction results (such as risk probability) obtained by the classifier are compared and analyzed with the validation set prediction results obtained by the preset algorithm. For example, if the classifier predicts a user to be at high risk (risk probability 0.7), while the K-nearest neighbor algorithm predicts the user to be at no risk, further analysis is needed to understand the reasons for this discrepancy. It is found that certain characteristics of this user (such as higher blood pressure, lower exercise duration, and higher number of cigarettes smoked) are assigned higher weights in the classifier, resulting in a higher risk probability. However, in the K-nearest neighbor algorithm, the different feature distributions of the neighboring users lead to different prediction results. These features associated with the prediction discrepancy (such as blood pressure, exercise duration, and number of cigarettes smoked) are the risk factors that characterize abnormal physiological characteristics of the user. These factors are organized to form target feature information. Target feature information can help us further understand which factors are most critical for predicting a user's health risk, thus providing a basis for subsequent health management and intervention.
[0045] S104: Process the initial access result prediction model based on the training sample set with target feature information to generate a target access result prediction model.
[0046] In one implementation, assume that we have completed the preceding series of operations and obtained a training sample set containing target feature information. This sample set contains rich information about numerous users. After processing and analysis, key features related to the users' physiological characteristics are extracted and associated with specific annotations or outcomes. This information is then used to train a model to predict certain health-related trends or outcomes for the users. (The specific content of the target feature information will not be elaborated upon here; only its presence and function in the sample set will be emphasized.) The sample set contains data from users of different age groups and genders to ensure that the model can learn diverse patterns. Assume that the initial access outcome prediction model employs a multi-layer perceptron (MLP) structure, with the following main components: The input layer is designed to receive various user-related feature information from the training sample set containing target feature information. The number of input nodes is determined by the number of features contained in the training sample set, with each node corresponding to one feature, such as basic user information (age, gender, etc.) and other related features derived from the target feature information (the specific number and nature of features are determined by previous data processing).
[0047] The model contains multiple hidden layers to enable deep processing of input data and feature learning. The number of hidden layers and the number of neurons in each hidden layer can be adjusted based on actual needs and data complexity. For example, a three-hidden-layer model might have 256 neurons in the first layer, 128 neurons in the second layer, and 64 neurons in the third layer. Within the hidden layers, appropriate activation functions (such as the ReLU function) are used to introduce nonlinearity, enabling the model to learn complex nonlinear relationships between input features, thereby better fitting the data and discovering underlying patterns. The structure of the output layer depends on the specific requirements of the prediction task. If the problem is to predict whether a user has a risk of abnormal physiological characteristics (assuming a binary classification problem), the output layer will have only one neuron, using the Sigmoid activation function to map the output value between 0 and 1, representing the probability of the user belonging to a certain category (e.g., the probability of risk). For more complex predictions, such as multiple risk types or a gradation of risk severity, the number of neurons in the output layer and the activation function will be adjusted accordingly.
[0048] First, the training sample set containing target feature information undergoes preprocessing. This includes data cleaning, removing invalid or severely missing data records; and data normalization, mapping the values of different features to a specific range (such as between 0 and 1 or -1 and 1). This ensures that all features have equal importance during training and prevents certain features from dominating model training due to their large value range. The processed sample set is then randomly shuffled and divided into a training set and a validation set according to a specific ratio (e.g., 70% for training and 30% for validation). To improve training efficiency, the training set is further divided into several small batches, each containing a certain number of samples (e.g., 64 samples per batch). Before model training begins, the weights and bias parameters in the model need to be initialized. Random initialization is typically used, for example, by randomly drawing initial values from a specific probability distribution (such as a normal distribution or a uniform distribution). The range of initial values should be carefully selected to avoid problems such as vanishing or exploding gradients during the early stages of training. For example, weights can be randomly initialized from a normal distribution with mean 0 and standard deviation 0.01, and biases can be initialized to 0.
[0049] In each training batch, sample data is sequentially input into the input layer of the initial access outcome prediction model. The data then flows through the input layer into the hidden layer, where it undergoes a series of linear transformations (weights multiplied by the input data) and nonlinear activation operations (through activation functions) to gradually extract and learn feature representations from the data. Finally, after processing in the hidden layer, the data reaches the output layer, where the model's predicted output for that sample is obtained. For example, for a sample containing user age, gender, and other target features, after the model's forward propagation calculations, the output layer will produce a predicted value representing the user's predicted outcome for a certain health-related aspect (such as risk probability). A loss function is calculated based on the model's predicted output and the sample's true label (from the training set). The choice of loss function depends on the nature of the prediction task. For classification tasks, the cross-entropy loss function is used; for regression tasks, the mean squared error loss function is used, for example. For binary classification tasks, the binary cross-entropy loss function calculates the difference between the predicted value and the true label (0 or 1, indicating the presence or absence of a condition). By calculating the loss function, a numerical value is obtained to quantify the inaccuracy of the model prediction. The larger the loss value, the greater the difference between the model's prediction result and the actual situation.
[0050] Based on the calculated loss value, the backpropagation algorithm is used to calculate the contribution of each parameter (weight and bias) to the loss, i.e., the gradient. The gradient descent algorithm is used to update the model parameters based on the direction and magnitude of the gradient. During the update process, a pre-set learning rate is used to control the step size of the parameter update. The choice of learning rate is critical. If the learning rate is too high, the model will not converge or may even diverge; if the learning rate is too low, the training process will be very slow. For example, adaptive learning rate strategies such as Adagrad, Adadelta, or Adam optimization algorithms can dynamically adjust the learning rate based on the actual training process to achieve more efficient parameter updates, allowing the model to gradually learn the patterns in the data and reduce prediction error. After each training cycle (epoch), the model is evaluated using the validation set. Evaluation metrics can be selected based on the specific requirements of the prediction task, such as accuracy, recall, F1 score (for classification tasks), or root mean square error (RMSE) or mean absolute error (MAE) (for regression tasks). By calculating these evaluation metrics on the validation set, we can understand the model's performance on unseen data. If the model's performance on the validation set stops improving or starts to decline, it means the model is overfitting (the model has overlearned the training set data, resulting in a decrease in its ability to generalize to new data). At this point, you can take some measures to prevent overfitting, such as stopping training early, adding regularization terms (such as L1 regularization, L2 regularization), and using dropout techniques to improve the model's generalization ability.
[0051] The aforementioned forward propagation, loss calculation, backpropagation, and parameter update processes are repeated over multiple training cycles (requiring dozens or even hundreds of epochs, depending on factors such as data complexity, model structure, and performance requirements). The model parameters are continuously optimized, gradually improving performance on the training and validation sets until a preset stopping criterion is met (e.g., reaching the maximum number of training epochs or no further performance improvement on the validation set). Throughout this complete training process, the initial access outcome prediction model continuously adjusts its internal weights and bias parameters, gradually learning the complex relationship between user characteristics and prediction results embedded in the training sample set containing target feature information. When the model meets the stopping criterion, it becomes the target access outcome prediction model. This target model possesses the ability to accurately predict new user data. It can output corresponding prediction results (e.g., the presence and degree of physiological abnormality risk) based on input user-related features (including age, gender, and other features derived from the target feature information). It also generalizes to a certain extent to user data not previously included in the training set, providing valuable predictions and analysis for practical application scenarios such as health management and medical decision support.
[0052] A more diverse range of evaluation metrics are used to comprehensively assess model performance. For example, the mean absolute error (MAE) is used to assess the accuracy of visit interval predictions, and the health stability index (HSI) is used to measure the model's ability to predict the overall stability of a user's health status. The HSI can be calculated by analyzing the fluctuations in a user's health status over time (combining factors such as changes in physiological indicators and physical condition descriptions). Lower values indicate more stable health status. The model's ability to accurately predict the HSI will help assess its effectiveness in user health management. During the validation process, a stratified sampling validation method was used. The dataset was divided into multiple strata based on factors such as user age, gender, and health status category, and validation was then performed separately within each stratum. This ensures that the model's effectiveness across different user groups is fully validated, avoiding validation bias caused by uneven data distribution. Furthermore, the validation dataset is regularly updated to incorporate the latest user data to ensure that the model can always adapt to changing health conditions and user behavior patterns, maintaining the accuracy and timeliness of its predictions.
[0053] S105, based on the target access result prediction model, the historical access time information of the target user, the historical access record information of the target user, the real-time access time information of the target user and the physiological characteristic information of the target user are processed to generate an interval prediction subtask and a sequential access prediction subtask.
[0054] In one embodiment, the target user's historical access time information and historical access record information are processed based on the target access result prediction model to generate historical access interval information and historical access consultation information, wherein the historical access interval information is used to characterize the access interval duration between different access times and the access duration of the current visit, and the historical access consultation information is used to characterize the access content and access direction of different access times. Based on the historical access interval information and historical access consultation information, the target user's real-time access time information and the target user's physiological characteristic information are processed to generate the target user's access prediction information, wherein the target user's access prediction information is used to characterize the predicted access content and access direction of the target user's current visit. The target user's access prediction information is processed to generate an interval prediction subtask and a sequential access prediction subtask.
[0055] Assume that the target user has 4 relevant visit records on a health management platform in the past period of time. The following are the details: First visit, visit time: January 5, 2023, 10:00-10:30. Visit situation: The user has been feeling poor physical condition recently, specifically fatigued and having poor sleep, so he consulted the platform's health consultant. The consultant asked in detail about the user's daily life routine, including working hours, rest time arrangements, and daily activity levels. The user reported that he was very busy at work, often had to stay up late to work overtime, and had fewer daily activities. Based on the user's description, the consultant suggested that the user adjust his work and rest schedule, try to ensure adequate sleep time, and appropriately increase some daily physical activities, such as walking, simple stretching exercises, etc., to improve the overall condition of the body. The visit lasted 30 minutes.
[0056] The second visit was from 14:00 to 15:00 on March 10, 2023. Visit status: The user stated that the previous tiredness had not been relieved, and he began to experience slight discomfort in his head. This time, he visited the general practitioner consultant on the platform, who asked detailed questions about the user's symptoms of head discomfort, including the specific location of the pain, the frequency of the pain, and the approximate degree of the pain. At the same time, the consultant also conducted some basic physical examinations on the user, such as measuring the user's blood pressure and heart rate. The test results showed that the blood pressure and heart rate were within the normal range. Based on the user's symptoms and test results, the consultant recommended that the user continue to observe changes in the body. If the symptoms of head discomfort worsen, a more in-depth physical examination should be conducted in time to determine whether there are any potential health problems. The visit lasted 60 minutes.
[0057] Third visit, June 1, 2023, 9:00-10:00 AM. Visit details: The user reported more noticeable discomfort and increased pain in their head, along with some changes in vision, including blurred vision. This visit involved an ophthalmologist on the platform, who first performed a comprehensive eye examination, including a vision test and intraocular pressure measurement. The examination revealed slightly elevated intraocular pressure, and the user also learned about their recent extensive use of electronic devices. Based on the examination results and the user's condition, the specialist suspected the blurred vision was due to overuse, but did not rule out other potential factors. The specialist recommended minimizing electronic device use and using eye drops to relieve eye fatigue. Further brain examinations were arranged to rule out any potential brain problems affecting vision. This visit lasted 60 minutes. Fourth visit, August 15, 2023, 11:00-12:30 PM. Visit Details: The user returned to see their general practitioner with the results of a previous brain examination, which revealed some minor abnormalities in their brain blood vessels. Based on the user's previous symptoms and the results of the current examination, the consultant recommended regular checkups and close monitoring of their overall health. The consultant also emphasized the importance of lifestyle adjustments, including optimizing diet, increasing nutritional intake, arranging exercise, and further adjusting their sleep and rest schedule to ensure adequate rest. Based on the user's specific situation, the consultant prescribed nutritional supplements or supplemental medications to improve brain blood circulation. The visit lasted 90 minutes.
[0058] Calculate the interval length between different visits: The interval from the first visit (January 5, 2023) to the second visit (March 10, 2023) is calculated as follows: the remaining days of January (31-5 = 26 days) + the number of days in February (2023 is a non-leap year, so February has 28 days) + 10 days in March = 64 days. The interval from the second visit to the third visit (June 1, 2023) is calculated as follows: the remaining days of March (31-10 = 21 days) + the number of days in April (30 days) + the number of days in May (31 days) + 1 day in June = 83 days. The interval from the third visit to the fourth visit (August 15, 2023) is calculated as follows: the remaining days of June (30-1 = 29 days) + the number of days in July (31 days) + 15 days in August = 75 days. Determine the duration of the current visit: Based on the description above, the first visit lasted 30 minutes, the second visit lasted 60 minutes, the third visit lasted 60 minutes, and the fourth visit lasted 90 minutes. These visit intervals and the current visit duration together constitute historical visit interval information, which is used to subsequently analyze the rhythm and patterns of user health management behavior.
[0059] The first visit primarily focused on fatigue and sleep issues. The consultant asked questions to understand the user's lifestyle and provided recommendations for adjustments. The second visit focused on persistent fatigue and new headaches. The consultant inquired about the symptoms, performed a basic physical examination, and provided observational advice. The third visit addressed the user's worsening headaches and newly developed blurred vision. The ophthalmologist performed a professional eye examination, inquired about eye habits, and provided recommendations for relief and further examinations. The fourth visit, based on the user's brain examination results, involved a general practitioner providing follow-up examinations, lifestyle adjustments, and supplementary treatments based on previous symptoms. The first visit involved the user seeking lifestyle recommendations based on physical discomfort and was considered basic health consultation. The second visit involved the user seeking a deeper understanding of their physical condition and recommendations from the general practitioner, representing symptom follow-up. The third visit involved the user seeking professional examinations and targeted solutions for vision issues from the ophthalmologist, focusing on addressing eye health issues. The fourth visit involved the user seeking comprehensive health management solutions based on the brain examination results, representing comprehensive health guidance. These visit contents and visit directions constitute historical visit consultation information, which reflects the development process and response methods of users' health problems.
[0060] Features are extracted from historical visit interval information, such as the average visit interval ((64+83+75) / 3≈74 days), the variance of the visit interval (calculation process omitted), and the average duration of the current visit ((30+60+60+90) / 4=60 minutes). Key information is extracted from historical visit consultation information, such as the frequency of physical discomfort symptoms (such as fatigue, headache, blurred vision, etc., in different visits), the type of professional advice (the proportion of recommendations such as lifestyle adjustments, examination items, and auxiliary conditioning), etc. Assuming that the current real-time visit time is 10:00 on November 1, 2023, the target user measured some physiological characteristics before this visit, such as blood pressure of 130 / 85 mmHg (slightly higher than the normal range) and heart rate of 78 beats / minute (normal range). The historical visit data features, real-time visit time and physiological characteristic information are input into the target visit result prediction model. Based on previously learned patterns and relationships, the model predicts that the content of this visit is related to previous changes in physical condition. Due to slightly elevated blood pressure and previous cerebral vascular conditions, a further assessment of overall physical condition, particularly the circulatory system and functional status, will be required. This may include re-measuring blood pressure and checking the stability of various physical indicators. The visit is intended for comprehensive health guidance, meaning that professionals will comprehensively consider previous physical symptoms, examination results, and current physiological characteristics to provide a more comprehensive health management plan, including the need for lifestyle adjustments and further examination of functional items.
[0061] In the visit interval prediction subtask, position encoding and interval encoding are used to handle the irregularity of visit intervals. For the target user's historical visit interval information, the visit time series is position-encoded. For example, the first visit is encoded as position 1, the second visit as position 2, and so on. Next, interval encoding is performed for the visit interval duration. Assume that the interval duration is mapped to a coding space according to certain rules, such as encoding intervals of 0-30 days as 0.1, 31-60 days as 0.3, 61-90 days as 0.5, and intervals of more than 90 days as 0.8. To predict the next visit interval, the model uses the position encoding and interval encoding information of historical visits, combined with the target user's real-time physiological characteristics (e.g., changes in blood pressure affect visit intervals; slightly higher blood pressure leads to a greater focus on health and shorter visit intervals), to predict the interval duration between the next visit and the current visit (November 1, 2023). For example, the model predicts that the next visit interval is between 40-60 days, and the corresponding interval code is about 0.3, and the next visit is predicted to be in the 5th position (i.e., the order calculated from the first visit) based on the position code. The sequential visit prediction subtask is determined based on historical visit consultation information and visit prediction information. Based on the development sequence of physical discomfort symptoms in historical visit consultation information (from fatigue to headache to blurred vision to brain blood vessel-related conditions) and changes in visit direction (from basic health consultation to symptom follow-up, professional eye examination to comprehensive health guidance) in historical visit consultation information, as well as the predicted content of this visit (such as further assessment of overall physical condition), the model predicts the subsequent visit sequence and content.
[0062] For example, the model predicts that in the next visit, if the results of various physical indicators change further, more professional health experts (such as cardiovascular health experts or neurological health experts) will be visited for more in-depth evaluation and guidance, and the direction of the visit will be more focused on specific areas of physical function. If the examination results are relatively stable, regular review and lifestyle adjustment consultations will continue to be conducted at the general practitioner or health consultant. The direction of the visit is still comprehensive health guidance but the focus is on maintaining good physical condition. At the same time, the implementation of professional recommendations in historical visits (such as whether lifestyle adjustment measures are taken on time, etc.) will also affect the prediction of subsequent visit order and content. If the user does not strictly implement the recommendations, it will lead to further changes in physical condition or new problems, thereby changing the order and content of the visit, such as visiting earlier or increasing the frequency of visits, and the content of the visit will also revolve around new problems.
[0063] In another embodiment, the real-time access time information of the target user and the physiological characteristic information of the target user are processed based on the historical access interval information and the historical access consultation information to generate access prediction information of the target user, including: processing the historical access interval information, the historical access consultation information, the real-time access time information of the target user and the physiological characteristic information of the target user to generate target characteristic information, wherein the target characteristic information includes the mean access interval duration, the variance of the access interval duration, the maximum access interval duration, the minimum access interval duration, the access keyword frequency and the target physiological characteristic index; processing the target characteristic information to generate a first characteristic association value and a second characteristic association value, wherein the first characteristic association value is used to characterize the correlation between the access interval duration pattern and the physiological characteristic change, and the second characteristic association value is used to characterize the correlation between the target access content and the real-time access time.
[0064] Assume that the target user had five health-related visits in the past year, with visit dates of March 1, 2022, May 15, 2022, August 5, 2022, November 20, 2022, and February 10, 2023. Calculate the intervals between consecutive visits: the interval between the first and second visits is 75 days (May 15-March 1), the interval between the second and third visits is 82 days (August 5-May 15), the interval between the third and fourth visits is 107 days (November 20-August 5), and the interval between the fourth and fifth visits is 82 days (February 10-November 20). The mean interval between visits is (75 + 82 + 107 + 82) / 4 = 86.4 days. The variance calculation is omitted, with a maximum of 107 days and a minimum of 75 days.
[0065] The first visit focused on fatigue and poor sleep quality. The consultant inquired about work intensity and daily routines, recommending adjustments to daily routines and moderate exercise. Keyword records included "fatigue," "poor sleep," "replacement of daily routines," and "exercise." The second visit was due to persistent fatigue and the development of headaches. The consultant inquired about headache symptoms and family medical history, recommending further observation. Keyword records included "persistent fatigue," "headache," "family medical history," and "observation." The third visit was related to worsening headaches and blurred vision. The ophthalmologist examined vision and intraocular pressure, inquired about eye habits, and recommended reducing eye use and using eye drops. Keyword records included "worsening headache," "blurred vision," "eye habits," and "eye drops." The fourth visit included brain examination results (showing mild abnormalities in brain blood vessels). The consultant recommended regular checkups, dietary adjustments, and increased exercise. Keyword records included "brain vascular abnormalities," "checkup," "dietary adjustments," and "increased exercise." The fifth visit was for consultation regarding follow-up examinations. Keyword records included "check-up consultation." The frequency of each keyword was counted, for example, "fatigue" appeared twice and "headache" three times.
[0066] Assume that the current real-time access time is 2:00 PM on May 1, 2023. Assume that the user's blood pressure before the real-time access was measured at 130 / 85 mmHg (slightly above the normal range), heart rate at 78 beats / minute (normal range), and weight at 70 kg (an increase of 2 kg from the previous access). These serve as target physiological characteristic indicators. The mean of the interval between accesses has been calculated to be 86.5 days, with a variance (assumed to be 120.25, calculation omitted) of 107 days at its maximum and 75 days at its minimum. These characteristics reflect the regularity of the user's access intervals. As shown in the statistics above, the word frequency for "fatigue" is 2, and the word frequency for "headache" is 3. This word frequency information can reflect the user's focus and changing trends in health issues. Indicators such as blood pressure of 130 / 85 mmHg, heart rate of 78 beats / minute, and weight of 70 kg reflect the user's current physiological state. Comparing these indicators with the physiological characteristics from the previous access (assuming blood pressure was within the normal range and weight was 68 kg), we can see changes such as increased blood pressure and increased weight.
[0067] The method also includes a calculation formula for obtaining the first feature association value, the calculation formula is:
[0068]
[0069] Among them, i j represents the jth visit interval, which is a specific value to measure the time interval between two visits of the user, reflecting the time pattern of the user's visit; P j represents the physiological characteristic value at the jth visit, which is a quantitative indicator of the user's physiological state at the time of the visit, such as heart rate, blood sugar, etc.; μ I Represents the mean of the access interval duration, which summarizes the average level of user access interval duration and provides a benchmark for subsequent calculation of covariance and feature association values; I Represents the standard deviation of the access interval, which is used to standardize the data when calculating the feature association value to make different features comparable; μ P and σ P Represent the mean and standard deviation of physiological characteristic values, respectively. The mean reflects the overall average level of physiological characteristic values, and the standard deviation measures the degree of dispersion of physiological characteristic value data, and participates in the covariance calculation and the determination of characteristic association value. Cov(I,P) represents covariance, which indicates the linear correlation between the two variables of visit interval duration and physiological characteristic value. It is the intermediate variable for calculating characteristic association value. Its positive and negative and size reflect the consistency and correlation of the changing trends of the two variables. IP Represents the first feature association value, which is between -1 and 1. The closer the absolute value is to 1, the stronger the correlation between the access interval duration pattern and the change of physiological characteristics. A positive value indicates a positive correlation, that is, the change trend of the access interval duration is consistent with the change trend of the physiological characteristics. A negative value indicates a negative correlation, that is, the change trends of the two are opposite.
[0070] First feature correlation value (correlation between access interval duration pattern and physiological feature changes):
[0071] Assume that the visit interval duration sequence is I = {75, 82, 107, 82}, and the corresponding physiological characteristic changes can be represented by the weight change sequence P = {0, 0, 2, 2} (assuming that there is no weight change from the first to the second visit, and the weight increases by 2 kg from the third to the fifth visit). First, calculate the mean μ of I. I =86.5, variance (calculated), the mean μ of P P =1, variance (Calculation process omitted). Calculate the covariance Cov(I,P) = 10.5 (calculation process omitted). Then the first characteristic correlation value (Hypothesis), this value is close to 1, indicating that the visit interval length pattern has a strong positive correlation with weight change, that is, weight tends to increase when the visit interval is longer.
[0072] The method further includes a calculation formula for obtaining a second feature association value, wherein the calculation formula is:
[0073]
[0074]
[0075] Among them, f kj represents the number of times keyword k appears in the jth access consultation information. It reflects the frequency of occurrence of a keyword in a specific access and is used to analyze the characteristics of the access content; j represents the real-time time of the jth visit, which is the specific moment when the user visits, and is used to explore the relationship between the access content and the access time; μ Fk and σ Fk : Represents the mean and standard deviation of the number of keyword occurrences. The mean reflects the average level of the number of keyword occurrences in multiple visits, and the standard deviation describes the degree of dispersion of its occurrences, which is used to calculate the correlation; μ T and σ T Represent the mean and standard deviation of real-time access time respectively. The mean summarizes the average situation of access time, and the standard deviation measures the dispersion of access time, and participates in the calculation of covariance and feature association value. Cov(F k ,T) represents the covariance, which indicates the linear correlation degree between the two variables of keyword occurrence times and real-time access time. It is an intermediate step in calculating the feature correlation value. Its value reflects the synergy of the change trends of the two. R kTIt represents the second feature association value, which is also between -1 and 1. Its absolute value indicates the strength of the correlation between the target access content (keyword k) and the real-time access time. The positive and negative signs indicate the direction of the correlation. A positive correlation means that the number of keyword occurrences and the access time have the same changing trend, while a negative correlation indicates the opposite changing trend.
[0076] Second feature association value (correlation between target access content and real-time access time): Taking the keyword "review" as an example, its occurrence sequence in historical access consultation information is F = {0, 0, 0, 1, 1} (review is mentioned in the fourth and fifth visits), and the corresponding real-time access time sequence is T = {March 1, 2022, May 15, 2022, August 5, 2022, November 20, 2022, February 10, 2023}. Calculate the mean μ of F F =0.4, variance (Calculation process omitted), the mean value μ of T T (The calculation is done on July 24, 2022, the specific calculation process is omitted). Calculate the covariance Cov(F k ,T)=100 (the specific calculation process is omitted). Then the second characteristic correlation value (Assuming σ T =100 days, the calculation result is). This value shows that the appearance of the keyword "review" has a certain correlation with the real-time access time, and the attention to review increases over time.
[0077] The first feature correlation value and the second feature correlation are processed to generate visit prediction information for the target user. Based on the first feature correlation value, since the visit interval duration pattern has a strong positive correlation with weight change, and the current weight gain is present, combined with the fact that the real-time visit time is approximately 80 days since the last visit (close to the average interval), it is predicted that this visit will continue to focus on weight management and overall physical condition assessment, and will inquire about more effective weight management methods, such as adjusting the diet plan and increasing exercise intensity. Based on the second feature correlation value, "recheck" has a certain correlation with the visit time, and given the previous history of brain vascular abnormalities, it is predicted that this visit will involve brain recheck matters, such as inquiries about the review items and whether the recheck interval needs to be adjusted. Furthermore, due to the previous history of blurred vision, vision-related issues will be mentioned again, such as any changes in vision and the need for further examinations. Combined with the slightly elevated blood pressure in the physiological characteristics, the consultant will recommend further blood pressure monitoring, such as regular blood pressure measurements and recording of blood pressure changes. Based on the blood pressure level, lifestyle adjustments will be made, such as reducing salt intake and increasing aerobic exercise.
[0078] Predicted visit information includes: Regarding visit content, the focus will be on weight management, brain reexamination, vision, and blood pressure monitoring; regarding visit direction, the user will seek professional advice on a comprehensive assessment of health status and corresponding adjustment plans, such as developing a personalized diet and exercise plan and confirming a reexamination schedule. For example, it is predicted that users will ask consultants questions such as "I have gained weight recently. How can I adjust my diet and exercise to control my weight? What items will be included in my brain reexamination? My vision is still a little blurry. Do I need further examination? My blood pressure is slightly high. What should I pay attention to?" The consultant will provide detailed answers based on the user's situation and provide specific suggestions and plans.
[0079] S106 , processing the interval prediction subtask and the sequential access prediction subtask to generate an initial prediction feature vector.
[0080] In one implementation, assume that the target user had four health-related visits in the past year, with visit times of April 1, 2022, June 15, 2022, September 20, 2022, and December 10, 2022. The intervals between adjacent visits are calculated as follows: the interval between the first and second visits is 75 days (June 15-April 1), the interval between the second and third visits is 97 days (September 20-June 15), and the interval between the third and fourth visits is 81 days (December 10-September 20). The mean interval between visits is (75+97+81) / 3 = 84.33 days. The variance calculation is omitted, with a maximum value of 97 days and a minimum value of 75 days. Perform position encoding on the access interval (assuming simple encoding, the first access position is 1, the second is 2, and the third is 3) and interval encoding (assuming 0-30 days are encoded as 0.1, 31-60 days are encoded as 0.3, 61-90 days are encoded as 0.5, and more than 90 days are encoded as 0.8, then 75 days are encoded as 0.5, 97 days are encoded as 0.8, and 81 days are encoded as 0.5). Construct a vector to represent the features of the interval prediction subtask, for example, V1 = [84.33, variance value (assuming it is 100), 97, 75, 0.5, 0.8, 0.5] (the variance value here is assumed to be 100, but it needs to be accurately calculated in practice, and more interval-related features can be added as needed).
[0081] Visit consultation information processing. The first visit mainly consulted about physical fatigue and sleep problems. The keywords were "fatigue" and "sleep problems". The consultant asked about work pressure and suggested adjusting work and rest schedules. It can be represented as vector E O1 = [2, 1, 1] (assuming the word frequency of "fatigue" is 2, the word frequency of "sleep problems" is 1, and the word frequency of "work pressure" is 1. The word frequency statistics here can adjust the weight according to the actual situation.) The second visit was because the fatigue did not subside and the headache came. The consultant asked about the headache symptoms and family history. The keywords were "persistent fatigue", "headache", and "family history", which is represented by EO2 = [1, 2, 1]. At the third visit, the headache worsened and the vision was blurred. The ophthalmologist checked the vision and intraocular pressure. The keywords were "worsened headache", "blurred vision" and "intraocular pressure", which is represented by E O3 =[2,2,1]. The fourth visit brought the brain examination results (mild abnormalities), and the consultant recommended reexamination, adjustment of diet and exercise. The keywords are "brain abnormality", "reexamination", "diet adjustment", and "increase in exercise", which is represented by E O4 =[1,2,2,2].
[0082] Calculate the rate of change of the embedding representation of adjacent accesses (here simply represented by vector difference), ΔE O2 =E O2 -E O1 =[-1, 1, 0], ΔE O3 =E O3 -E O2 =[1,0,0],ΔE O4 =E O4 -E O3 =[-1, 0, 1, 1]. Calculate the mean (assuming it is [0, 0.33, 0.33], the calculation process is omitted) and variance (assuming it is [0.67, 0.22, 0.22], the calculation process is omitted). Construct the feature vector of the sequential access prediction subtask, such as V O =[E O4 , mean vector (0, 0.33, 0.33) variance vector (0.67, 0.22, 0.22)] (feature representation can be further optimized and expanded as needed, such as adding more features about access order and access change). O Fusion. A simple way is to directly splice to obtain the variance value of the initial prediction feature vector. Adjust the feature weights according to historical data trends. For example, if it is found that user health problems tend to be more serious when the access interval is longer in history (based on more data and analytical assumptions), and the current access interval is long (97 days is close to the maximum value), the weight of the interval-related features can be appropriately increased. For example, the features such as the mean and maximum value of the access interval in are multiplied by a coefficient greater than 1 (assuming it is 1.2) to obtain the optimized initial prediction feature vector.
[0083] S107: Process the initial prediction feature vector based on the target user's access purpose information to generate target prediction information of the target user.
[0084] In one embodiment, the target user's visit purpose information is processed to generate access type information. Assume that the target user has had the following health-related visits in the past period of time: The first visit was because the target user recently felt weak and easily tired, so he went to the health management center to consult about ways to improve his physical condition. The inquiries mainly focused on lifestyle adjustments, nutritional supplements, etc. The health consultant gave suggestions on work and rest adjustments, diet improvements, and appropriate exercise. The second visit was because after adjusting the lifestyle for a period of time during the first visit, the fatigue was relieved but still existed, and mild dizziness symptoms occurred. This time, the target user visited a general practitioner consultant, who conducted a basic physical examination (such as blood pressure, heart rate measurements, etc., and the results were basically normal), asked about detailed living habits and family medical history, and suspected that it might be an early symptom of potential chronic health. Further observation and regular check-ups were recommended. The third visit was due to persistent dizziness and occasional palpitations, so the patient visited a cardiovascular specialist consultant, who conducted a more in-depth cardiovascular system examination (such as an electrocardiogram, which revealed mild arrhythmia) and asked in detail about the patient's daily activity level, work pressure, sleep quality, etc. The consultant diagnosed the patient with mild cardiovascular dysfunction and provided a drug intervention plan and further lifestyle adjustment suggestions, including reducing work pressure and increasing aerobic exercise. The fourth visit was after the patient had taken the medication for a period of time. The palpitations had eased, but the patient still wanted to know how to better restore cardiovascular health, so he consulted a rehabilitation expert. The expert developed a personalized rehabilitation exercise plan and dietary nutrition plan based on the patient's recovery, focusing on enhancing cardiovascular function and improving physical endurance.
[0085] Based on the purposes of these visits, we can classify them into different types of visits: The first visit can be classified as "health consultation and lifestyle adjustment", the main purpose of which is to obtain general advice on improving physical condition, and does not involve health visits and interventions, with the focus on prevention and health promotion. The second visit belongs to the "symptom follow-up and potential health screening" category. If the user's symptoms have not completely disappeared after adjusting their lifestyle and new symptoms have appeared, the consultant will conduct preliminary examinations and screenings to determine whether there are potential health risks. The third visit is the "health visit and specialist intervention" category. A specialist examination is conducted for clear symptoms (dizziness, palpitations), and the visit results (mild cardiovascular dysfunction) are obtained and targeted interventions (drug intervention) are started. The fourth visit is the "rehabilitation guidance and health management category". During the intervention process, the focus is on how to better restore health and obtain professional guidance related to rehabilitation (rehabilitation exercise plans, diet matching).
[0086] The visit type information is processed to generate prediction weighting coefficients. We assign different weighting coefficients to different visit types based on their importance to the prediction. For example, visits involving "Health Visits and Specialist Interventions" are given a higher weighting coefficient, assuming a value of 0.4, because they involve specific health visits and intervention plans and have a greater impact on subsequent health outcomes. Visits involving "Rehabilitation Guidance and Health Management" are also critical for the user's current health recovery and long-term health management, and are therefore given a weighting coefficient of 0.3. Visits involving "Symptom Follow-up and Potential Health Screening" help identify potential problems in a timely manner, and are therefore given a weighting coefficient of 0.2. Visits involving "Health Consultation and Lifestyle Adjustment" have a relatively minor direct impact on current health outcomes, but contribute to overall health awareness and prevention, and are therefore given a weighting coefficient of 0.1. Based on the above rules, a prediction weighting coefficient vector W = [0.1, 0.2, 0.4, 0.3] is generated for the target user's visit type information, corresponding to the four visit types: "Health Consultation and Lifestyle Adjustment," "Symptom Follow-up and Potential Health Screening," "Health Visits and Specialist Intervention," and "Rehabilitation Guidance and Health Management."
[0087] The initial prediction feature vector is processed based on the prediction weight coefficient to generate the target prediction information of the target user. Assume that we have obtained the initial prediction feature vector V=[v1,v2,...,v n ](Here n is the dimension of the feature vector. The specific value is determined according to the results of the previous processing of the interval prediction subtask and the sequential access prediction subtask. For example, n = 30. The elements in the vector include access interval duration features, keyword frequency features, access change features, etc. For example, v1 = 80 means that the average access interval duration is 80 days, and v5 = 0.6 means the frequency weighted value of a certain keyword.) The target prediction information is calculated by weighted summation. Target prediction information vector P = [p1, p2, ..., p n ],in, here represents the i-th element in the initial prediction feature vector corresponding to the first visit type ("health consultation and lifestyle adjustment category"), Similarly, for other access types, ω1, ω2, ω3, and ω4 are prediction weight coefficients. For example, for i=1 (access interval mean feature), (Assuming that the average access interval duration corresponding to the second access type is The third time Fourth time The calculation process is omitted).
[0088] The same method is used to calculate the other elements in vector P to obtain the target prediction information vector P. This vector can be used to further analyze the user's future health-related behavior or status, such as predicting the likely time of the user's next visit and the types of health issues they may be interested in. If an element in the vector is correlated with the visit time prediction and has a large value, it may indicate that the user's next visit is imminent. If an element is correlated with the weighted sum of specific health issue keywords and has a significant value, it may indicate that the user will focus on that health issue during their next visit.
[0089] In this application, the server can fully capture the access interval and sequence information through the access interval prediction subtask and position encoding and interval encoding, making up for the shortcomings of previous research, more accurately reflecting the fluctuations in the user's health status, and improving the model performance. For example, ablation studies have shown that removing this task will reduce the accuracy. The multi-task learning paradigm is adopted to fuse the two subtasks, synergistically enhance the performance of each subtask, enable the model to learn richer feature representations, effectively avoid overfitting, and improve the generalization ability in different tasks and data scenarios. The introduction of historical attention residual improves the Transformer multi-head self-attention module to better capture long-term dependencies, help extract key information from historical accesses, and improve prediction accuracy.
[0090] In one embodiment, Figure 2 As shown, the present application also provides a sequential access prediction device based on multi-task fusion access interval, comprising:
[0091] An acquisition module 201 is configured to acquire the target user's access information within a preset time period, the target user's access purpose information, the target user's physiological characteristic information, an initial access result prediction model, and a training sample set;
[0092] The processing module 202 is used to process the access information of the target user within a preset time period to generate the target user's historical access time information, the target user's historical access record information and the target user's real-time access time information; pre-process the training sample set to generate a training sample set with target feature information; process the initial access result prediction model based on the training sample set with target feature information to generate a target access result prediction model; process the target user's historical access time information, the target user's historical access record information, the target user's real-time access time information and the target user's physiological feature information based on the target access result prediction model to generate an interval prediction subtask and a sequential access prediction subtask; process the interval prediction subtask and the sequential access prediction subtask to generate an initial prediction feature vector; process the initial prediction feature vector based on the target user's access purpose information to generate the target prediction information of the target user.
[0093] Each embodiment in this application is described in a related manner, and the same or similar parts between the embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments. In particular, for evaluating the sequential access prediction method based on multi-task fusion access interval, electronic device, electronic device, and readable storage medium embodiment, since they are basically similar to the above-mentioned sequential access prediction method based on multi-task fusion access interval, the description is relatively simple, and the relevant parts can be referred to the partial description of the embodiment of the sequential access prediction method based on multi-task fusion access interval.
Claims
1. A sequential access prediction method based on multi-task fusion access interval, characterized in that: include: Obtaining the target user's access information within a preset time period, the target user's access purpose information, the target user's physiological characteristics information, the initial access result prediction model and the training sample set; Processing the target user's access information within a preset time period to generate the target user's historical access time information, the target user's historical access record information, and the target user's real-time access time information; Preprocessing the training sample set to generate a training sample set with target feature information; Processing the initial access result prediction model based on the training sample set with target feature information to generate a target access result prediction model; Based on the target access result prediction model, the historical access time information of the target user, the historical access record information of the target user, the real-time access time information of the target user and the physiological characteristic information of the target user are processed to generate an interval prediction subtask and a sequential access prediction subtask, including processing the historical access time information of the target user and the historical access record information of the target user based on the target access result prediction model to generate historical access interval information and historical access consultation information, wherein the historical access interval information is used to characterize the access interval duration between different access times and the access duration of the current visit, and the historical access consultation information is used to characterize the access content and access direction of different access times; based on the historical access interval information and the historical access consultation information, the real-time access time information of the target user and the physiological characteristic information of the target user are processed to generate the access prediction information of the target user, wherein the access prediction information of the target user is used to characterize the access content and access direction of the target user's current visit; processing the access prediction information of the target user to generate an interval prediction subtask and a sequential access prediction subtask; Processing the interval prediction subtask and the sequential access prediction subtask to generate an initial prediction feature vector; The initial prediction feature vector is processed based on the access purpose information of the target user to generate target prediction information of the target user.
2. The method according to claim 1, wherein Preprocessing the training sample set to generate a training sample set with target feature information includes: performing grouping processing on the training sample set to generate a grouped training sample set, wherein the grouped training sample set includes physiological characteristic information of users of different age groups and genders; Perform feature extraction on the grouped training sample set to generate an original feature library; Processing the original feature library to generate a training set and a validation set; Performing prediction processing on the verification set based on the classifier to generate a prediction result; Performing training processing on the training set based on a preset algorithm to generate a validation set class prediction result; The prediction results and the validation set prediction results are processed to generate target feature information, where the target feature information is used to characterize risk factors for abnormal physiological characteristics of the user.
3. The method according to claim 1, wherein The target user's real-time access time information and the target user's physiological characteristic information are processed based on the historical access interval information and the historical access consultation information to generate target user's access prediction information, including: Processing the historical access interval information, the historical access consultation information, the real-time access time information of the target user, and the physiological characteristic information of the target user to generate target characteristic information, wherein the target characteristic information includes the mean access interval duration, the variance of the access interval duration, the maximum access interval duration, the minimum access interval duration, the frequency of access keywords, and the target physiological characteristic index; Processing the target feature information to generate a first feature association value and a second feature association value, wherein the first feature association value is used to represent the correlation between the access interval duration pattern and the physiological feature change, and the second feature association value is used to represent the correlation between the target access content and the real-time access time; The first feature association value and the second feature association value are processed to generate access prediction information of the target user.
4. The method according to claim 3, wherein The method further includes processing the real-time access time information of the target user and the physiological characteristic information of the target user based on the historical access interval information and the historical access consultation information to generate access prediction information of the target user: The method further includes a calculation formula for obtaining the first feature association value, wherein the calculation formula is: Among them, i j represents the duration of the jth visit interval; P j represents the physiological characteristic value at the jth visit; μ I represents the mean of the visit interval; σ I represents the standard deviation of the visit interval; μ P and σ P Represent the mean and standard deviation of physiological characteristic values respectively; Cov(I,P) represents covariance; R IP represents the first feature association value; The method further includes a calculation formula for obtaining a second feature association value, the calculation formula being: Among them, f kj represents the number of times keyword k appears in the jth access consultation information; t j represents the real time of the jth visit; and Represent the mean and standard deviation of the number of keyword occurrences; μ T and σ T Represent the mean and standard deviation of real-time access time respectively; Cov(F k ,T) represents covariance; R kT Represents the second feature association value.
5. The method according to claim 1, wherein Processing the interval prediction subtask and the sequential access prediction subtask to generate an initial prediction feature vector includes: Performing feature extraction processing on the interval prediction subtask to generate access time interval sequence features, access interval number features, and access interval information features; Processing the access interval information features to generate adjacent interval difference sequence information, difference sequence mean, and difference sequence variance; Performing dimensionality reduction processing on the sequential access prediction subtask to generate a one-dimensional prediction feature vector; Performing feature extraction processing on the one-dimensional prediction feature vector to generate target access list information, a mean of a similarity sequence of adjacent access information, and a variance of a similarity sequence of adjacent access information; The access time interval sequence feature, access interval number feature, target access list information, mean value of adjacent access information similarity sequence and variance of adjacent access information similarity sequence are processed to generate an initial prediction feature vector.
6. The method according to claim 5, wherein The initial prediction feature vector is processed based on the access purpose information of the target user to generate target prediction information of the target user, including: Processing the target user's access purpose information to generate access type information; Processing the access type information to generate a prediction weighting coefficient; The initial prediction feature vector is processed based on the prediction weight coefficient to generate target prediction information of the target user.
7. A sequential access prediction device based on multi-task fusion access interval, characterized in that: For implementing the method of claim 1, the apparatus comprises: An acquisition module is used to obtain the target user's access information within a preset time period, the target user's access purpose information, the target user's physiological feature information, the initial access result prediction model and the training sample set; A processing module is used to process the access information of the target user within a preset time period to generate the target user's historical access time information, the target user's historical access record information and the target user's real-time access time information; pre-process the training sample set to generate a training sample set with target feature information; process the initial access result prediction model based on the training sample set with target feature information to generate a target access result prediction model; process the target user's historical access time information, the target user's historical access record information, the target user's real-time access time information and the target user's physiological feature information based on the target access result prediction model to generate an interval prediction subtask and a sequential access prediction subtask; process the interval prediction subtask and the sequential access prediction subtask to generate an initial prediction feature vector; process the initial prediction feature vector based on the target user's access purpose information to generate the target prediction information of the target user.
8. An electronic device, characterized in that: include: a first processor; and a memory for storing executable instructions of the first processor; The first processor is configured to execute the sequential access prediction method based on multi-task fusion access interval according to any one of claims 1 to 6 by executing the executable instructions.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the second processor, the sequential access prediction method based on multi-task fusion access interval according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Data processing method and device and prediction model training method and device
CN114169401A
Method, device and equipment for limiting crawler high-frequency access and medium
CN114710318A