Risk early warning method for appointment door-to-door massage
Through the artificial intelligence model, the risk warning information is generated based on real-time data, and the security risks in home massage services are solved, and the timely and effective warning of risks in home massage services is achieved, and the service safety and user trust are improved.
Patent Information
- Application Number
- CN202510332486.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-20
- Publication Date
- 2025-06-20
AI Technical Summary
The existing technology cannot effectively warn and solve safety risks in home-based massage services, such as personal safety, service quality, fraud and other problems.
An artificial intelligence model is used to generate risk warning information dynamically based on real-time data, and through data collection, cleaning, processing and model training, early warning information is generated, including risk type, severity and its possible impact.
It has achieved timely and effective early warnings on possible risks during home massage services, and improved service security and user trust.
Smart Images

Figure CN120181584A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of safety management for reservation-based on-site services, and particularly relates to a risk warning method for reservation-based on-site massage services. Background Art
[0002] As an emerging service model, reservation-based on-site massage services have developed rapidly in recent years with the rise of the mobile Internet and the O2O (online-to-offline) business model. This service model provides great convenience for customers, allowing users to easily reserve massage services through a mobile application, and the masseurs directly go to the locations designated by the customers to provide services. However, with the popularization of this service, a series of potential risks and challenges have gradually emerged.
[0003] In order to achieve the safety management of a reservation-based on-site massage platform, it is necessary to conduct risk warnings for reservation-based on-site massages. Through retrieval, a public safety risk warning system with the patent number 2021208148661 discloses that this solution collects data information within the area to be monitored through a data collection module, and then inputs the data information into a data processing module. The data processing module determines whether there are public safety risks within the area to be monitored based on the data information; if there are safety risks, an alarm module communicatively connected to the data processing module will issue a risk warning. However, this solution aims to monitor and warn public safety events and cannot warn against and solve the safety risks in reservation-based on-site massage services, such as personal safety, service quality, fraud, etc., and is not applicable to the risk warning of the on-site massage service industry.
[0004] A risk warning system for VTE (venous thromboembolism) with the patent number 202210627168X discloses that this invention connects a data collection end to a data processing end to obtain the current physical state data of a user, and sends the physical state data to the data processing end; then connects the data processing end to a result warning end, analyzes and processes the received physical state data to obtain a processing result, and then sends the processing result to the result warning end; the warning end gives a timely warning reminder based on the received processing result. However, this system is usually used in hospitals or medical facilities and may also be applied to home care scenarios, and is also not applicable to the risk warning of the on-site massage service industry. Summary of the Invention
[0005] In view of this, the purpose of the present invention is to provide a risk warning method for reservation-based on-site massage, which uses an artificial intelligence model to dynamically generate risk warning information based on real-time data, so as to achieve timely and effective warning of possible risks during the on-site massage service process.
[0006] To achieve the above purpose, the present invention provides the following technical solutions:
[0007] The present invention provides a risk warning method for reserved door-to-door massage, including the following steps:
[0008] S1 - Data collection: Collect data from data sources;
[0009] S2 - Data processing: Clean, integrate, and transform the collected data;
[0010] S3 - Model training: Train the model based on historical data by using machine learning and deep learning technologies;
[0011] S4 - Warning generation: Generate warning information after model training.
[0012] Further, the data collected in step S1 includes order information and user information obtained by calling the API, basic information of massage therapists obtained by querying the enterprise's internal database, direct feedback from users collected through online surveys, customer service hotlines, and emails, and tracking of brand-related comments, posts, and topics through social media monitoring tools.
[0013] Further, the basic information of the massage includes work experience, training records, health certificates, and past evaluations.
[0014] Further, the data cleaning is to process missing values, outliers, and duplicate data. Among them, fill the missing values with the average value; determine the outliers according to the business logic and delete the abnormal data; use the database query statement to find and delete the duplicates.
[0015] Further, according to the order data obtained from the background management system of the reserved door-to-door massage platform, if an order has no evaluation information, it is marked as "no evaluation", and then connect the massage therapist information and order information according to the massage therapist ID, and extract the hour segment from the order time as a new feature for subsequent judgment of whether this order is abnormal according to the order duration.
[0016] Further, extract features from the original data in step S2: order time and select the decision tree as the supervised learning model. The decision tree predicts the increment of the risk score of the massage therapist based on multiple features.
[0017] Further, in step S4, if it is determined whether the proportion of the order-taking volume of the massage therapist from 22:00 to 6:00 exceeds 40%, the risk score of the massage therapist can be increased according to this judgment, and then combined with the risk score accumulated by other criteria. When the total risk score reaches the warning threshold, the massage therapist will enter the AI warning list and needs to be verified.
[0018] The beneficial effects of the present invention are:
[0019] The present invention is directed to the emerging industry of reserved door-to-door massage services. By using an artificial intelligence model, risk warning information is dynamically generated based on real-time data, including the specific type, severity, and possible impacts of the risks, so as to achieve timely and effective warning of the possible risks in the process of door-to-door massage services.
[0020] Other advantages, objectives, and features of the present invention will, to some extent, be described in the subsequent specification, and to some extent, will be obvious to those skilled in the art based on the study of the following text, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can be realized and obtained through the following specification. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be described in detail preferably with reference to the accompanying drawings, where:
[0022] Figure 1 It is a flowchart of the risk warning method of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0023] The following specific examples illustrate the embodiments of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments. Various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the diagrams provided in the following embodiments only illustrate the basic concept of the present invention in a schematic manner. Without conflict, the following embodiments and the features in the embodiments can be combined with each other.
[0024] Among them, the accompanying drawings are only for illustrative purposes, showing only schematic diagrams, not physical diagrams, and should not be construed as a limitation to this patent; in order to better illustrate the embodiments of the present invention, some components in the drawings will be omitted, enlarged, or reduced, which do not represent the dimensions of the actual products; for those skilled in the art, it is understandable that some well-known structures and their descriptions in the drawings may be omitted. In addition, the present invention may repeat reference numerals and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.
[0025] As Figure 1 shown, the risk warning method for reserved door-to-door massage of the present invention includes the following steps:
[0026] Step S1: Collect relevant data from multiple data sources. Effective data collection can help enterprises better understand the business situation, user behavior, and changes in the external environment, so as to timely identify potential risks and take measures.
[0027] In a specific embodiment of the present application, order information and user information are obtained by calling APIs, and basic information of massage therapists, including work experience, training records, health certificates, past evaluations, etc., is obtained by querying the enterprise's internal database; direct feedback from users is collected through online surveys, customer service hotlines, emails, etc. Social media monitoring tools are used to track brand-related comments, posts, and topics.
[0028] Step S2: Clean, integrate, and transform the collected data to prepare for subsequent analysis and modeling. Data cleaning is the process of handling quality problems such as missing values, outliers, and duplicate data to ensure data accuracy and integrity. Among them, missing values are filled with the average value; outliers are determined according to business logic and abnormal data is deleted; database query statements are used to find and delete duplicates.
[0029] In a specific embodiment of the present application, according to the order data obtained from the background management system of a reservation-based in-home massage platform, if an order has no evaluation information, it is marked as "no evaluation", and then the masseur information and order information are connected according to the masseur ID. The hour segment is extracted from the order time as a new feature for subsequent determination of whether the order is abnormal based on the order duration. In the present invention, a normal order should be greater than 60 points. If the order duration is less than 30 minutes, indicating that there may be problems with the service, then this order will be marked as abnormal. The order receiving time is processed from the timestamp into the format of "2023-10-01 07:00" to prepare for subsequent calculation of the risk score.
[0030] Step S3: Train the model based on historical data by using machine learning and deep learning techniques. In a specific embodiment of the present application, a dataset after cleaning, integrating, and transforming the data has been obtained, which includes information of each order (order ID, user ID, masseur ID, order start time, order end time, service duration). Features are extracted from the original data: order time (whether the order is placed during non-normal working hours), and a decision tree is selected as the supervised learning model. Next, a function is defined to calculate the increment of the risk score, and this function can determine the increase in the risk score according to whether the proportion of orders received by the masseur from 22:00 to 6:00 exceeds 40%.
[0031] In the present invention, we take the order time as an example. Next, a function is defined to calculate the increment of the risk score, and this function can determine the increase in the risk score according to whether the proportion of orders received by the masseur from 22:00 to 6:00 exceeds 40%. The function code is as follows:
[0032] <?php
[0033] / / Assume the order data is stored in an array
[0034] $orders =
[0035] ['order_id' => 1,'massage_id' => 101, 'order_time' => '2023-10-01 23:00'],
[0036] ['order_id' => 2,'massage_id' => 101, 'order_time' => '2023-10-01 01:00'],
[0037] ['order_id' => 3,'massage_id' => 102, 'order_time' => '2023-10-01 22:00'],
[0038] ['order_id' => 4,'massage_id' => 102, 'order_time' => '2023-10-01 02:00'],
[0039] ['order_id' => 5,'massage_id' => 101, 'order_time' => '2023-10-01 03:00'],
[0040] ['order_id' => 6,'massage_id' => 103, 'order_time' => '2023-10-01 04:00'],
[0041] ['order_id' => 7,'massage_id' => 103, 'order_time' => '2023-10-01 05:00'],
[0042] ['order_id' => 8,'massage_id' => 101, 'order_time' => '2023-10-01 06:00'],
[0043] ['order_id' => 9,'massage_id' => 102, 'order_time' => '2023-10-01 07:00'],
[0044] ['order_id' => 10,'massage_id' => 103, 'order_time' => '2023-10-01 08:00'], ;
[0046] / / Define the night time period
[0047] $nightHours = [22, 23, 0, 1, 2, 3, 4, 5, 6];
[0048] / / Initialize the statistical array
[0049] $nightOrdersCount = [];
[0050] $totalOrdersCount = [];
[0051] / / Traverse the order data
[0052] foreach ($orders as $order) {
[0053] $orderTime = strtotime($order['order_time']);
[0054] $hour = date('G', $orderTime); / / Extract the hour segment
[0055] $massageId = $order['massage_id'];
[0056] / / Count the total number of orders
[0057] if (!isset($totalOrdersCount[$massageId])) {
[0058] $totalOrdersCount[$massageId] = 0;
[0059] }
[0060] $totalOrdersCount[$massageId]++;
[0061] / / Count the number of night orders
[0062] if (in_array($hour, $nightHours)) {
[0063] if (!isset($nightOrdersCount[$massageId])) {
[0064] $nightOrdersCount[$massageId] = 0;
[0065] }
[0066] $nightOrdersCount[$massageId]++;
[0067] }
[0068] }
[0069] / / Calculate the proportion of night orders
[0070] $nightRatio = [];
[0071] foreach ($totalOrdersCount as $massageId => $total) {
[0072] $nightOrders = isset($nightOrdersCount[$massageId])? $nightOrdersCount[$massageId] : 0;
[0073] $nightRatio[$massageId] = $nightOrders / $total;
[0074] }
[0075] / / Define the function to increase the danger score
[0076] function calculateDangerScore($massageId, $nightRatio, $threshold = 0.4, $scoreIncrease = 15) {
[0077] if (isset($nightRatio[$massageId]) && $nightRatio[$massageId] > $threshold) {
[0078] return $scoreIncrease;
[0079] } else {
[0080] return 0;
[0081] }
[0082] }
[0083] / / Example: Calculate the increase in the danger score for masseur 101
[0084] $dangerScoreIncrease = calculateDangerScore(101, $nightRatio);
[0085] echo "The increase in the danger score of masseur 101: ". $dangerScoreIncrease;
[0086] ? >
[0087] Step S4: After model training, the system can generate warning information based on real-time data, including risk type, severity, and possible impacts. In the previous specific embodiment, once it is determined whether the proportion of orders received by the masseur from 22:00 to 6:00 exceeds 40%, the risk score of the masseur can be increased based on this judgment. Combining with the risk scores accumulated according to other criteria, when the total risk score reaches the warning threshold, the masseur will enter the AI warning list and needs to be verified.
[0088] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the purpose and scope of the present technical solution, and they should all be covered by the scope of the claims of the present invention.
Claims
1. A risk warning method for booking home massage, characterized in that: The following steps are involved: S1-Data Collection: Collect data from data sources; S2-Data processing: cleaning, integration and transformation of collected data; S3-Model training: Train the model based on historical data by using machine learning and deep learning techniques; S4-Warning generation: After model training, warning information is generated.
2. The risk warning method for booking home massage according to claim 1, characterized in that: The data collected in step S1 includes order information and user information obtained by calling the API, basic information about masseurs obtained by querying the company's internal database, direct feedback from users collected through online surveys, customer service hotlines, and emails, and tracking comments, posts, and topics related to the brand through social media monitoring tools.
3. The risk warning method for booking home massage according to claim 2, characterized in that: The basic information of the massage includes work experience, training records, health certificates, and past evaluations.
4. The risk warning method for booking home massage according to claim 1, characterized in that: The data cleaning is to process missing values, abnormal values, and duplicate data, wherein missing values are filled with average values; abnormal values are determined according to business logic and abnormal data are deleted; and duplicate items are found and deleted using database query statements.
5. The risk warning method for booking home massage according to claim 4, characterized in that: According to the order data obtained from the backend management system of the home massage booking platform, if an order has no evaluation information, it will be marked as "no evaluation". Then, the masseur information and order information are connected according to the masseur ID, and the hourly segment is extracted from the order time as a new feature, which is used to judge whether the order is abnormal in the future according to the order time.
6. The risk warning method for booking home massage according to claim 1, characterized in that: Extract features from the raw data in step S2: order time and selects a decision tree as the supervised learning model, which predicts the masseur's risk score increment based on multiple features.
7. The risk warning method for booking home massage according to claim 1, characterized in that: In step S4, if it is determined whether the masseur's order volume between 22:00 and 6:00 accounts for more than 40%, the masseur's risk score can be increased based on this judgment. Combined with the accumulated risk scores of other standards, when the total risk score reaches the warning threshold, the masseur will enter the AI warning list and need to be verified.