A message processing method, device, electronic device and computer readable medium
By receiving message processing requests, obtaining the message source ID and user ID, calling the message middleware to aggregate the messages and push them to the target device, it solves the problem of messages being sent from multiple terminals when users log in with multiple devices, achieves accurate message push, and reduces user interruption. .
Patent Information
- Application Number
- CN202210606452.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-31
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2042-05-31
AI Technical Summary
When a user logs in from multiple devices, subscribed messages may be sent to multiple sources, causing user interruption.
By receiving the message processing request, the message source ID and user ID are obtained, the message middleware is called to aggregate the message, and the target device is determined based on the user's login log data, and the aggregated message is pushed to the target device to avoid repeated and indiscriminate multi-end sending.
It effectively avoids multi-end sending, improves user experience, ensures that messages are only displayed on the device the user recently logged in to, and reduces unnecessary message interference.
Smart Images

Figure CN115065656B
Abstract
Description
Technical Field
[0001] The present application relates to the field of medical health technology, and in particular to a message processing method, device, electronic device and computer-readable medium. Background Art
[0002] At present, with the development of business, the message center system has evolved from a single client to a message system that covers multiple terminals such as apps, H5, and smart hardware devices. Each client handles its own message event source independently and has its own message sending logic. There is no connection between them. When a user logs in from multiple devices, each client is independent of each other. In some cases, it may cause multi-terminal sending and disturb the user.
[0003] In the process of implementing this application, the inventors discovered that the prior art has at least the following problems:
[0004] When a user logs in from multiple devices, subscribed messages may be sent to multiple devices, disturbing the user. Summary of the Invention
[0005] In view of this, embodiments of the present application provide a message processing method, apparatus, electronic device, and computer-readable medium, which can solve the existing problem that when a user logs in to multiple devices, subscribed messages may be sent to multiple terminals, disturbing the user.
[0006] To achieve the above-mentioned purpose, according to one aspect of an embodiment of the present application, a message processing method is provided, including:
[0007] Receive a message processing request and obtain the corresponding message source identifier and user identifier;
[0008] Calling the message middleware to obtain the corresponding message based on the message source identifier, and then aggregating the message to generate an aggregated message;
[0009] Determine the corresponding device ID according to the user ID, obtain login log data of the device corresponding to the device ID, and obtain the login time corresponding to the user ID from the login log data;
[0010] The target device among the devices corresponding to the device identifier is determined according to the login time, and the aggregated message is pushed to the target device.
[0011] Optionally, before aggregating the messages to generate the aggregated message, the method further includes:
[0012] Get the scene identifier carried in the message processing request;
[0013] Filtering the messages according to the scenario identifier to obtain messages corresponding to the scenario identifier; and
[0014] Messages are aggregated to generate aggregate messages, including:
[0015] Messages corresponding to the scenario identifiers are aggregated to generate aggregated messages.
[0016] Optionally, push aggregated messages to target devices, including:
[0017] Obtain message distribution configuration information, and determine the customized content corresponding to the target device based on the message distribution configuration information;
[0018] Adjust the aggregate message based on the customized content and push the adjusted aggregate message to the target device.
[0019] Optionally, push aggregated messages to target devices, including:
[0020] The aggregate message is asynchronously sent to the message distribution service, so that the asynchronous distribution service calls the event communication framework to send the message event to the sending end corresponding to the target device, so that the sending end pushes the aggregate message to the target device based on the message event.
[0021] Optionally, before obtaining the corresponding message based on the message source identifier, the method further includes:
[0022] In response to detecting that a user signing event is triggered, obtaining a corresponding user identifier and a signing object identifier, and then creating a session based on the user identifier and the signing object identifier;
[0023] The session content corresponding to the created session is obtained, and a session receipt is generated based on the session content and output.
[0024] Optionally, before generating a session receipt based on the session content, the method further includes:
[0025] The session change message listener is called to obtain unread messages in the session content, and an unread mark is generated based on the unread messages, and the unread mark is displayed in the display position corresponding to the unread message.
[0026] Optionally, after displaying an unread mark at a display position corresponding to the unread message, the method further includes:
[0027] The existence time of the unread message is obtained, and in response to the existence time exceeding a preset time threshold, the unread message and the unread mark are cleared.
[0028] Optionally, determining a target device among the devices corresponding to the device identifier according to the login time includes:
[0029] Calculate the time interval between the current time and each login time;
[0030] The device corresponding to the login time corresponding to the time interval less than the preset threshold is determined as the target device.
[0031] In addition, the present application also provides a message processing device, including:
[0032] A receiving unit configured to receive a message processing request and obtain a corresponding message source identifier and user identifier;
[0033] a message aggregation unit configured to call the message middleware to obtain corresponding messages based on the message source identifier, and then aggregate the messages to generate an aggregated message;
[0034] a login time acquisition unit configured to determine a corresponding device identifier according to the user identifier, acquire login log data of the device corresponding to the device identifier, and acquire a login time corresponding to the user identifier from the login log data;
[0035] The message pushing unit is configured to determine a target device among the devices corresponding to the device identifier according to the login time, and then push the aggregated message to the target device.
[0036] Optionally, the message processing device further includes a message filtering unit configured to:
[0037] Get the scene identifier carried in the message processing request;
[0038] Filtering the messages according to the scenario identifier to obtain messages corresponding to the scenario identifier; and
[0039] The message aggregation unit is further configured to:
[0040] Messages corresponding to the scenario identifiers are aggregated to generate aggregated messages.
[0041] Optionally, the message push unit is further configured to:
[0042] Obtain message distribution configuration information, and determine the customized content corresponding to the target device based on the message distribution configuration information;
[0043] Adjust the aggregate message based on the customized content and push the adjusted aggregate message to the target device.
[0044] Optionally, the message push unit is further configured to:
[0045] The aggregate message is asynchronously sent to the message distribution service, so that the asynchronous distribution service calls the event communication framework to send the message event to the sender corresponding to the target device, so that the sender pushes the aggregate message to the target device based on the message event.
[0046] Optionally, the message processing apparatus further includes a session creating unit configured to:
[0047] In response to detecting that a user signing event is triggered, obtaining a corresponding user identifier and a signing object identifier, and then creating a session based on the user identifier and the signing object identifier;
[0048] The session content corresponding to the created session is obtained, and a session receipt is generated based on the session content and output.
[0049] Optionally, the message processing device further includes a monitoring unit configured to:
[0050] The session change message listener is called to obtain unread messages in the session content, and an unread mark is generated based on the unread messages, and the unread mark is displayed in the display position corresponding to the unread message.
[0051] Optionally, the monitoring unit is further configured to:
[0052] The existence time of the unread message is obtained, and in response to the existence time exceeding a preset time threshold, the unread message and the unread mark are cleared.
[0053] Optionally, the message push unit is further configured to:
[0054] Calculate the time interval between the current time and each login time;
[0055] The device corresponding to the login time corresponding to the time interval less than the preset threshold is determined as the target device.
[0056] In addition, the present application also provides a message processing electronic device, including: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by one or more processors, the one or more processors implement the message processing method as described above.
[0057] In addition, the present application also provides a computer-readable medium on which a computer program is stored, and when the program is executed by a processor, the message processing method as described above is implemented.
[0058] One embodiment of the above invention has the following advantages or beneficial effects: the present application obtains the corresponding message source identifier and user identifier by receiving a message processing request; calls the message middleware to obtain the corresponding message based on the message source identifier, and then aggregates the message to generate an aggregate message; determines the corresponding device identifier based on the user identifier, obtains the login log data of the device corresponding to the device identifier, and obtains the login time corresponding to the user identifier from the login log data; determines the target device among the devices corresponding to the device identifier based on the login time, and then pushes the aggregate message to the target device. By aggregating messages from multiple sources to generate an aggregate message, and determining the target device based on the login time corresponding to the login log information of the devices at multiple ends, the aggregate message is sent to the target device to avoid repeated and indiscriminate multi-end transmission and to avoid disturbing the user.
[0059] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] The accompanying drawings are provided to facilitate a better understanding of the present application and do not constitute an undue limitation on the present application.
[0061] Figure 1 This is a schematic diagram of the main process of a message processing method according to an embodiment of the present application;
[0062] Figure 2 This is a schematic diagram of the main process of a message processing method according to an embodiment of the present application;
[0063] Figure 3 This is a schematic diagram of a system principle diagram of a message processing method according to an embodiment of the present application;
[0064] Figure 4 This is a schematic diagram of an application scenario of the message processing method according to the fourth embodiment of the present application;
[0065] Figure 5 This is a message aggregation schematic diagram of a message processing method according to a fifth embodiment of the present application;
[0066] Figure 6 This is a target device determination logic diagram of the message processing method according to the sixth embodiment of the present application;
[0067] Figure 7 is a schematic diagram of the main units of the message processing device according to an embodiment of the present application;
[0068] Figure 8 is an exemplary system architecture diagram to which embodiments of the present application may be applied;
[0069] Figure 9It is a schematic diagram of the structure of a computer system of a terminal device or server suitable for implementing the embodiments of the present application;
[0070] Figure 10 It is a schematic diagram of an application scenario of a message processing method according to an embodiment of the present application. DETAILED DESCRIPTION
[0071] The following description of exemplary embodiments of the present application is made in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding. These details should be considered as merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0072] This disclosure contemplates that entities responsible for collecting, analyzing, disclosing, transmitting, storing, or otherwise using such personal information will adhere to established privacy policies and / or practices. Specifically, such entities should implement and adhere to privacy policies and practices that are recognized as meeting or exceeding industry or government requirements for maintaining the privacy and security of personal information. Such policies should be easily accessible to users and updated as the collection and / or use of data changes. Personal information collected from users should be used for the entity's legitimate and reasonable purposes and not shared or sold beyond those legitimate uses. Furthermore, such collection / sharing should be conducted with the user's informed consent. Furthermore, such entities should consider taking any necessary steps to safeguard and secure access to such personal information and ensure that others with access to the personal information adhere to their privacy policies and procedures. Furthermore, such entities may subject themselves to third-party assessments to demonstrate compliance with widely accepted privacy policies and practices. Furthermore, policies and practices should be tailored to the specific type of personal information collected and / or accessed and to applicable laws and standards, including jurisdictional considerations. For example, in the United States, the collection or access of certain health data may be governed by federal and / or state laws, such as the Health Insurance Portability and Accountability Act (HIPAA); whereas health data in other countries may be subject to other regulations and policies and should be handled accordingly. Therefore, different privacy practices should be maintained for different types of personal data in each country.
[0073] Regardless of the foregoing, the present disclosure also contemplates implementation schemes in which users selectively block the use or access of personal information data. That is, the present disclosure contemplates providing hardware elements and / or software elements to prevent or block access to such personal information data. For example, with respect to accessing or storing health information, the technology of the present invention may be configured to allow users to choose to "opt in" or "opt out" to participate in the collection of personal information data at any time during or after registration for the service. In another example, a user may choose not to provide specific types of health-related information. In yet another example, a user may choose to limit the length of time that health-related information is maintained or to prohibit the storage of health-related information altogether. In addition to providing "opt-in" and "opt-out" options, the present disclosure contemplates providing notifications related to access or use of personal information. For example, a user may be notified that their personal information data will be accessed when downloading an application, and then be reminded again just before the personal information data is accessed by the application.
[0074] Furthermore, it is an object of the present disclosure that personal information data should be managed and processed to minimize the risk of unintentional or unauthorized access or use. Risk can be minimized by limiting data collection and deleting data once it is no longer needed. In addition, and when applicable, including in certain health-related applications, data de-identification can be used to protect the privacy of users. De-identification can be facilitated by removing specific identifiers (e.g., date of birth, etc.), controlling the amount or specificity of stored data (e.g., collecting location data at the city level rather than the address level), controlling how data is stored (e.g., aggregating data across users), and / or other methods, where appropriate.
[0075] Figure 1 This is a schematic diagram of the main process of the message processing method according to an embodiment of the present application. Figure 1 As shown, the message processing method includes:
[0076] Step S101: Receive a message processing request and obtain the corresponding message source identifier and user identifier.
[0077] In this embodiment, the execution subject of the message processing method (for example, it can be a server) can receive the message processing request through a wired connection or a wireless connection. The message processing request can specifically be a request to distribute (or forward) the message. After receiving the message processing request, the execution subject can obtain the message source identifier and user identifier carried in the request. Among them, the message source identifier is used to characterize the source of the message. The source of the message can be, for example, a health consultation APP or a medical consultation referral APP. The message corresponding to the message processing request can be, for example, a health consultation message, a medical consultation referral message, or a combination of a health consultation message and a medical consultation referral message. The embodiment of the present application does not specifically limit the content of the message corresponding to the message processing request. The user identifier is used to characterize the user name or user mobile phone number that generates the message corresponding to the message processing request. The embodiment of the present application does not limit the specific content of the user identifier.
[0078] Step S102 : calling the message middleware to obtain the corresponding message based on the message source identifier, and then aggregating the message to generate an aggregated message.
[0079] For example, the execution entity can call the message middleware to locate the corresponding message source APP based on the message source identifier, and then obtain the various messages generated from the located message source APP. Messages from multiple sources are oriented towards a certain topic or content. Based on the aggregation of multi-source messages, cross-system search, refinement and integration of messages are key. The execution entity can aggregate messages for users, conduct cross-system searches for messages based on the user's message needs, implement user-oriented message aggregation through filtering, and generate aggregated messages. This can aggregate messages with the same meaning or format in disorganized messages, and unify the message format for easy distribution to various terminals.
[0080] Specifically, before obtaining the corresponding message based on the message source identifier, the message processing method includes: in response to detecting that a user signing event is triggered, obtaining the corresponding user identifier and signing object identifier, and then creating a session based on the user identifier and signing object identifier; obtaining the session content corresponding to the created session, and then generating and outputting a session receipt based on the session content.
[0081] When the execution entity detects that a user contract event has been triggered, it obtains the user identifier and contract partner identifier corresponding to the user contract event. The user identifier may be, for example, the user name or mobile phone number of the user seeking medical advice. The contract partner identifier may be, for example, the doctor's number or name receiving the medical consultation or health advice. This embodiment of the application does not limit the specific content of the user identifier and contract partner identifier.
[0082] After obtaining the user identifier and the contract object identifier, the execution entity can create a consultation session window based on the obtained user identifier and contract object identifier for the user corresponding to the user identifier and the doctor corresponding to the contract object identifier to communicate. When the execution entity detects the end of the session identifier (such as end) or fails to detect the interactive session for a long time, the session content corresponding to the consultation session window is obtained, and a session receipt is generated and output based on the session content. The session receipt can be a prescription document or a list of recommended diets in the session content. The embodiment of the present application does not specifically limit the content of the session receipt.
[0083] Specifically, before generating a session receipt based on the session content, the message processing method further includes:
[0084] The session change message listener is called to obtain unread messages in the session content, and an unread mark is generated based on the unread messages, and the unread mark is displayed in the display position corresponding to the unread message.
[0085] PIN (Personal Identification Number). A personal identification number is a passcode consisting of a string of numbers that is used to authenticate the user's identity and authorize the user to enter the system. Figure 5As shown, the execution entity can call the session change message listening program to monitor whether the user's (such as a patient's) pin is online under compliance conditions, and whether the session type is Changcha (the session type corresponding to the session generated by the instant chat APP) or the Internet Hospital (referred to as Huyi). Doctors can communicate and consult with patients online through the Internet Hospital (referred to as Huyi) software, and can also view patient files and health data under compliance conditions. If the session type is Changcha (Changcha is a session with no content restrictions), it is determined whether the main responsible doctor is participating in the session. If the session type is Internet Hospital (referred to as Huyi), it is determined whether it is a housekeeper single chat based on the scene value in the session. Among them, "housekeeper" can represent a doctor on duty at a preset time point or a preset place, or it can represent a person who transfers calls for each doctor on duty. For example, "housekeeper single chat" can be a single-line chat between a doctor on duty and a user (such as a patient), and other doctors cannot participate in the single-line chat. If the main responsible doctor (the main responsible doctor can be one doctor or multiple doctors, specifically a doctor designated by the user) is participating in a conversation or a housekeeper chat, the unread messages in the conversation will be queried, where the unread messages may include the unread messages of the main responsible doctor in the chat, and may also include the unread messages of the housekeeper chat in the Internet Hospital (abbreviated as Huyi). A long connection means that multiple data packets can be sent continuously on a connection. During the period when the connection is maintained, if no data packet is sent, the two parties connected by the long link need to send link detection packets to detect and maintain the long link. For example, a long link can be one that keeps the link connected after data transmission is completed (i.e., does not send a RST (Reset the connection) packet for forcibly disconnecting the TCP link), and waits to continue transmitting data using this channel under the same domain name. The execution entity can call the long link service to monitor whether the user's (such as a patient's) pin is online and continuously detect unread messages in real time through the long link interface and display them in the created session window.
[0086] After detecting an unread message, the execution entity can determine the display position corresponding to the unread message. The display position can be to the right, left, above, below, etc. of the unread message. The embodiment of the present application does not specifically limit the display position of the unread message. The execution entity can generate an unread mark based on the unread message, and after determining the display position of the unread message, display the unread mark at the display position corresponding to the unread message to remind the user to check the dimension message in time, improve the real-time nature of the conversation, and enhance the user experience.
[0087] Specifically, after displaying an unread mark at a display position corresponding to an unread message, the method further includes: obtaining an existence time of the unread message, and clearing the unread message and the unread mark in response to the existence time exceeding a preset time threshold.
[0088] When the executing entity detects that the length of time that an unread message has existed from the time it was generated to the current time exceeds a preset time threshold, that is, the unread message has existed for too long and has not been read, the executing entity can enable an elimination program to eliminate the unread messages that have existed for longer than the preset time threshold to ensure the real-time nature of the conversation and avoid confusion in the user's (here referring to the patient) answers.
[0089] As another implementation method, the execution entity may also generate a reference reminder message based on the unread message that has existed for too long and has not been read, that is, quote the message that has existed for too long and has not been read and send a reminder message to the user (here referring to the patient) to remind the user to respond to the reminder message in a timely manner, thereby ensuring the integrity of the conversation, not missing any question, and ensuring the integrity of the questions in the conversation and the user's (here referring to the patient) answers to the questions in the conversation.
[0090] Step S103: determining the corresponding device identifier according to the user identifier, obtaining login log data of the device corresponding to the device identifier, and obtaining the login time corresponding to the user identifier from the login log data.
[0091] After obtaining the user ID, the execution entity can query which devices the user corresponding to the user ID has logged into, and determine which device or devices are the most recently logged in based on the login log data of each device (this may include logins within a few hours of the current time, logins on the same day, logins yesterday, etc., and this embodiment of the application does not specifically limit the time of the most recent login). Specifically, the login time can be obtained from the login log data of several devices logged in by the user corresponding to the user ID. The target device is determined based on the order of the login times.
[0092] Step S104 , determining a target device among the devices corresponding to the device identifier according to the login time, and then pushing the aggregated message to the target device.
[0093] Specifically, determining the target device among the devices corresponding to the device identifier according to the login time includes: calculating the time interval between the current time and each login time; and determining the device corresponding to the login time corresponding to the time interval less than a preset threshold as the target device.
[0094] For example, the execution entity may calculate the difference between the current time and the login time of the device most recently logged in by the user corresponding to the user ID to obtain each time interval. The execution entity may determine the device most recently logged in corresponding to the smaller time interval (i.e., a time interval less than a preset threshold, such as 3 hours, which is not specifically limited in this embodiment of the application) as the target device.
[0095] Specifically, pushing the aggregate message to the target device includes: obtaining message distribution configuration information, determining customized content corresponding to the target device according to the message distribution configuration information; adjusting the aggregate message based on the customized content, and pushing the adjusted aggregate message to the target device.
[0096] In an embodiment of the present application, the message distribution configuration information stores information about the push methods / methods for each client, mini-program, and smart hardware device. The execution entity can obtain customized content corresponding to the target device based on the push methods / methods for each client, mini-program, and smart hardware device in the message distribution configuration information. This customized content may include customized content information such as the format, prefix, and suffix of the distribution message that can be received by each client, mini-program, and smart hardware device. After obtaining the customized content for the target device, the execution entity can adjust the corresponding content of the aggregate message based on the restrictions on the message format, prefix, and suffix in the customized content, and push the adjusted aggregate message to the target device.
[0097] Specifically, pushing the aggregate message to the target device includes: asynchronously sending the aggregate message to the message distribution service, so that the asynchronous distribution service calls the event communication framework to send the message event to the sending end corresponding to the target device, so that the sending end pushes the aggregate message to the target device based on the message event.
[0098] The execution subject can generate an asynchronous task based on the adjusted aggregate message and send the generated asynchronous task to the asynchronous task pool. It waits for the asynchronous task's execution time to arrive, executes the asynchronous task, and then sends the corresponding adjusted aggregate message to the message distribution service. The asynchronous distribution service then calls the event communication framework (such as EventBus) to send a message event. Each sender responsible for sending messages to specific clients receives the message event and then sends it to different clients (i.e., target devices, which can be one or more), achieving the goal of reaching multiple terminals with one message.
[0099] This embodiment receives a message processing request, obtains the corresponding message source identifier and user identifier; calls the message middleware to obtain the corresponding message based on the message source identifier, and then aggregates the messages to generate an aggregate message; determines the corresponding device identifier based on the user identifier, obtains the login log data of the device corresponding to the device identifier, and obtains the login time corresponding to the user identifier from the login log data; determines the target device among the devices corresponding to the device identifier based on the login time, and then pushes the aggregate message to the target device. By aggregating messages from multiple sources to generate an aggregate message, and determining the target device based on the login time corresponding to the login log information of the devices at multiple terminals, the aggregate message is sent to the target device to avoid repeated and indiscriminate multi-terminal transmissions and to avoid disturbing users.
[0100] Figure 2 This is a schematic diagram of the main flow of a message processing method according to an embodiment of the present application. Figure 2 As shown, the message processing method includes:
[0101] Step S201: Receive a message processing request and obtain the corresponding message source identifier and user identifier.
[0102] Step S202: calling the message middleware to obtain the corresponding message based on the message source identifier.
[0103] Step S203: Obtain the scenario identifier carried in the message processing request.
[0104] A message processing request may include a scenario identifier. The scenario identifier, or scenario value, characterizes the type of chat scenario. Examples of chat scenarios include free chat scenarios and internet hospital scenarios. A free chat scenario might involve a user chatting with their family doctor (the chat content might include topics like dietary health and postpartum recovery). An internet hospital (interactive medical care) scenario might involve a user consulting with their family doctor about a specific illness.
[0105] Step S204: Filter the messages according to the scene identifier to obtain messages corresponding to the scene identifier.
[0106] After obtaining the scenario identifier carried in the message processing request, the executing entity can filter the message based on the scenario identifier. The filtered message is the consultation message generated by the corresponding chat scenario or the doctor consultation scenario, that is, the message with the corresponding scenario identifier is obtained, and some noise is removed, thereby improving the efficiency and accuracy of message processing.
[0107] Step S205: Aggregate the messages corresponding to the scenario identifier to generate an aggregate message.
[0108] The execution entity aggregates the messages filtered based on the scenario identifier to generate an aggregate message. The aggregate message can be a medical inquiry message for a single scenario, or an aggregate message obtained by aggregating medical inquiry messages from different scenarios based on a preset aggregation rule.
[0109] Step S206: Determine the corresponding device identifier according to the user identifier, obtain login log data of the device corresponding to the device identifier, and obtain the login time corresponding to the user identifier from the login log data.
[0110] Step S207 : determining the target device among the devices corresponding to the device identifier according to the login time, and then pushing the aggregated message to the target device.
[0111] The execution entity can push aggregated messages to the device that the user has recently logged in to avoid indiscriminate multi-terminal sending and improve user experience.
[0112] Figure 3 This is a schematic diagram of an application scenario of a message processing method according to an embodiment of the present application. The message processing method of the embodiment of the present application is applied to a scenario where messages subscribed by a user are pushed to a terminal where the user is logged in. For example, Figure 3 As shown, the execution subject uses the message queue to monitor health consultation messages and medical consultation referral messages, and then aggregates and enhances these two types of messages, and uniformly outputs them as family doctor (abbreviated as family doctor) side messages. After the processing is completed, the message is sent to the message distribution system, and the event communication framework eventBus technology is used to distribute and process the message. Different sending ends monitor the eventBus message arrival event, and then decide whether to send and the customized content of each end according to the message distribution configuration, and then reach the processed message to the user. After the execution subject uniformly processes and enhances the messages from different sources, it sends the event through eventBus to complete the message aggregation processing and multi-client (such as APP1, applet 2, IOT3) sending. Among them, IOT: smart hardware device, such as XX box. IOT 3 is a smart hardware device numbered 3. The embodiment of this application does not specifically limit the number of IOT.
[0113] Figure 4 This is a schematic diagram of an application scenario of the message processing method according to the fourth embodiment of the present application. Figure 4As shown, after the execution subject obtains the mutual medical IM message and the chat IM message, the IM message is first synchronized to the pre-processing service in the form of a message queue JMQ for enhanced processing to obtain data in a unified format. The pre-processing service PRE_PROCESS maintains the enhanced family doctor service package ID and the user service package ID. Then, the execution subject can call the family doctor underlying service, obtain the corresponding service package information according to the session ID that generates the IM message, and then call the corresponding atomic service (atomic service: an atom is an indecomposable basic service unit that constitutes an application, and is also the smallest unit that the operating system can manage and control and allocate permissions. It can also be "shared" by multiple applications) to execute the mutual medical service and family doctor service in the atomic service (the family doctor service obeys the family doctor basic service specification DB). After obtaining the data in a unified format, the execution subject asynchronously hands the unified format data to the distribution service for data delivery. Specifically, the rule engine is called to use the event communication framework EventBus technology to call the DISPATCH distribution service for distribution processing through the message center according to the configured distribution rules. Specifically, the unified interface of the message center is used to perform specific message distribution processing for each terminal (such as health APP, home doctor H5, smart hardware device, mini program). The embodiment of the present application uses EventBus technology to distribute and process user message push to achieve the purpose of triggering the terminal separately.
[0114] Figure 5 This is a message aggregation diagram of the message processing method according to the fifth embodiment of the present application.
[0115] like Figure 5As shown, first, a user logs in to the X Enterprise Health Service homepage and clicks on the last message on a card on the homepage. Before the user triggers a message on the homepage, the execution entity periodically (e.g., every 2 seconds) polls the trigger status of the homepage message or determines the trigger status of the connected message by checking whether the long link connected to the homepage message has been triggered. The execution entity queries the messages sent by the user through the X Enterprise Health Service homepage through the gateway interface and performs initialization. The execution entity then calls the Family Doctor Atomic Service to invoke the IM underlying service to obtain and update the Chat New Message MQ and clear the Unread MQ. The execution entity also obtains the Mutual Medical Consultation MQ generated by the doctor / PC. The execution entity then sends the Mutual Medical Consultation MQ and the Chat New Message MQ to the Family Doctor portal for aggregation, generating an aggregated message. Specifically, the execution entity filters the family doctor's user ID; reverse-checks the enhanced Usp&Config_id based on the Sid (Sid is a unique identification number, specifically a service package ID or user service package ID); and creates a JMQ3 message. This JMQ3 message is then the aggregated message. The execution entity can send the aggregated message to the message center, have it pushed by other terminals, and then send it to the Family Doctor tab. This information is then sent to the health app, official account, or mini-program via the message center. Other endpoints can also push it to the gateway interface for further aggregation and enhancement. After generating aggregated information, the Family Doctor Portal can also monitor the Changliao New Message MQ, the Changliao Clear Unread MQ, and the Huyi Message Change MQ. The Huyi Message Change MQ monitor can detect new Huyi messages, patient entry, and other messages. The executing entity can filter all monitored messages (excluding non-Family Doctor IM messages) to obtain the Changliao IM, and then perform corresponding message enhancement based on the cached Sid enhancement service package information. The executing entity can filter all monitored messages (excluding non-Family Doctor IM messages) to obtain the Huyi IM, and then perform corresponding message enhancement based on the cached DiagId enhancement service package information. Enhanced content includes: service package information (such as service package ID and service package type); sender information (such as From Doctor); session type (such as Changliao / Huyi); change type (such as New Message / Clear Unread); change reason (such as Doctor / Patient New Message, Patient Entry); and original session information (such as title, content, and time). After the message enhancement processing is completed, the execution entity responds to the monitored family doctor session change message MQ, determines whether the user (e.g., patient)'s pin is online, and whether the session type is Changcha (the session type corresponding to the session generated by the instant messaging APP) or the Internet Hospital (Huyi for short). Doctors can communicate and consult with patients online through the Internet Hospital (Huyi for short) software, and can also view patient files, health data, and manage patients at any time.If the session type is free chat, determine whether the primary responsible doctor is participating in the session (this step can be omitted). If the session type is an Internet hospital (referred to as Huyi), determine whether it is a housekeeper single chat based on the scenario value in the session (this step can be omitted). If the primary responsible doctor is participating in the session or the housekeeper is having a single chat, query the unread messages in the session, where the unread messages may include the unread messages of the primary responsible doctor in the free chat, and may also include the unread messages of the housekeeper single chat in the Internet hospital (referred to as Huyi). A long connection means that multiple data packets can be sent continuously on a connection. During the connection, if no data packet is sent, the two parties connected by the long link need to send a link detection packet to detect and maintain the long link. For example, a long link can be a connection that keeps the link from being disconnected after the data transmission is completed (no RST packet is sent, no four-way handshake is performed), waiting to continue transmitting data using this channel under the same domain name. The execution entity can call the long link service to monitor whether the user's (such as a patient's) pin is online and continuously detect unread messages in real time through the long link interface and display them in the created session window.
[0116] In the family doctor service scenario of the present application's embodiments, users primarily access services through conversations, where they describe their health status and receive health advice from their doctor or housekeeper. There are two ways to implement more granular interactions: a health management scenario based on health consultations, and a consultation scenario based on internet medical referrals. The former is proactive healthcare, while the latter is serious healthcare. Serious healthcare, with its core goal of curing illnesses and saving lives, requires the most trustworthy doctor-patient relationship.
[0117] Whether it is health consultation or medical consultation referral, the technical solution for conversation implementation is based on the underlying technology of XX instant messaging software. XX instant messaging software provides IM conversation management and message management mechanisms. Based on the capabilities of XX instant messaging software, conversation scenarios for health scenarios are built.
[0118] Based on the underlying IM (instant messaging) capabilities, the upper layer encapsulates two implementation methods, namely the consultation IM of the Internet hospital and the chat IM of the family doctor scenario.
[0119] The medical consultation IM is bound to the medical consultation form. The user needs to specify a doctor, and the system will generate a medical consultation form for them. Then, it will asynchronously generate a session and create an IM chat. The doctor and the patient will conduct medical consultation within the IM. The family doctor chat IM is related to the service package and rights. The main user service package is valid, and after the user signs a contract with the doctor, a session will be automatically created for them. Patients or other session members can manage session members, session content, message content, etc. outside the medical consultation form scenario.
[0120] The message aggregation process of the embodiment of the present application is as follows Figure 5 As shown:
[0121] 1) In the family doctor (health management) scenario, all IM messages need to have a unified output channel to facilitate patient reminders and other processes. Therefore, the messages from the consultation IM and the family doctor chat IM need to be aggregated and output.
[0122] 2) Since the Huyi IM messages are also generated by the family doctor service package, the Huyi IM session itself also carries the family doctor scenario value (the scenario value of the consultation form / Huyi session businessScene=familyDoctor). The Huyi IM messages can be filtered using the scenario value. The messages after filtering are the consultation messages generated by the family doctor scenario.
[0123] 3) Design an adapter to aggregate filtered mutual medical IM messages and family doctor chat IM messages. All messages carry the user service package ID generated in the family doctor scenario.
[0124] 4) During the PRE_PROCESS phase, the user service package ID carried in the session information is used to enhance the basic information of the user service package. This enhancement includes: service package information (such as the service package ID and type); sender information (such as "From Doctor"); session type (such as "Chat" / "Doctor-to-Doctor"); change type (such as "New Message" / "Clear Unread"); change reason (such as "Doctor / Patient New Message" or "Patient Enters Session"); and original session information (such as title, content, and time). The enhanced messaging solution is a comprehensive communication and information sharing platform across communication networks and the internet. Users use their real mobile phone numbers as login accounts and can communicate through the RCS mobile client, sharing content such as pictures, music, videos, and text. RCS not only expands people's social networks but also provides a more diverse lifestyle. Using the enhanced messaging feature requires subscribing to a mobile VoLTE service. Please contact your mobile operator for details.
[0125] After message aggregation processing, the message data is asynchronously sent to the message distribution service. The distribution service sends message events through Eventbus (Eventbus event communication framework (send events | get subscribers based on event type | call subscription method)). Each sender responsible for sending messages to specific clients receives the message events and then sends them to different clients, achieving the goal of reaching multiple terminals with one message.
[0126] In this embodiment of the application, a message queue is used to aggregate messages from all business systems and process them uniformly. The user login information is parsed and processed using the tracking point upload statistics capability to determine the user's most recent login device. EventBus technology is used to distribute and process user message pushes to achieve the purpose of triggering them separately.
[0127] Figure 6 This is a target device determination logic diagram according to the message processing method of the sixth embodiment of the present application. Figure 6 As shown, the user logs in and records the device and time of the user's login. When a user logs in online, a persistent TCP connection is used to record the user's online / offline status. By using the user's login status and the most recently logged-in device (for example, App1 logged in at 15:01, App2 logged in at 14:01, ..., IOT3 logged in at 10:01), we can manage the user's nearest login and send certain messages to the user's most recently logged-in device.
[0128] Figure 7 Schematic diagram of the main units of the message processing device according to the embodiment of the present application. Figure 7 As shown, the message processing device 700 includes a receiving unit 701 , a message aggregation unit 702 , a login time acquisition unit 703 and a message pushing unit 704 .
[0129] The receiving unit 701 is configured to receive a message processing request and obtain a corresponding message source identifier and user identifier.
[0130] The message aggregation unit 702 is configured to call the message middleware to obtain the corresponding message based on the message source identifier, and then aggregate the message to generate an aggregate message.
[0131] The login time acquisition unit 703 is configured to determine the corresponding device identifier according to the user identifier, acquire login log data of the device corresponding to the device identifier, and acquire the login time corresponding to the user identifier from the login log data.
[0132] The message pushing unit 704 is configured to determine a target device among the devices corresponding to the device identifier according to the login time, and then push the aggregated message to the target device.
[0133] In some embodiments, the device further comprises Figure 7 The message filtering unit not shown in the figure is configured to: obtain the scenario identifier carried in the message processing request; filter the message according to the scenario identifier to obtain the message corresponding to the scenario identifier; and the message aggregation unit is further configured to: aggregate the messages corresponding to the scenario identifier to generate an aggregated message.
[0134] In some embodiments, the message push unit 704 is further configured to: obtain message distribution configuration information, determine customized content corresponding to the target device according to the message distribution configuration information; adjust the aggregate message based on the customized content, and push the adjusted aggregate message to the target device.
[0135] In some embodiments, the message push unit 704 is further configured to: asynchronously send the aggregate message to the message distribution service, so that the asynchronous distribution service calls the event communication framework to send the message event to the sending end corresponding to the target device, so that the sending end pushes the aggregate message to the target device based on the message event.
[0136] In some embodiments, the message processing device further includes Figure 7 The session creation unit not shown in the figure is configured to: in response to detecting that a user signing event is triggered, obtain the corresponding user identifier and signing object identifier, and then create a session based on the user identifier and signing object identifier; obtain the session content corresponding to the created session, and then generate and output a session receipt based on the session content.
[0137] In some embodiments, the message processing device further includes Figure 7 The monitoring unit not shown in the figure is configured to: call the session change message monitoring program, obtain the unread messages in the session content, generate an unread mark based on the unread messages, and display the unread mark at the display position corresponding to the unread messages.
[0138] In some embodiments, the monitoring unit is further configured to: obtain the existence time of the unread message, and clear the unread message and the unread mark in response to the existence time exceeding a preset time threshold.
[0139] In some embodiments, the message push unit 704 is further configured to: calculate the time interval between the current time and each login time; and determine the device corresponding to the login time corresponding to the time interval less than a preset threshold as the target device.
[0140] It should be noted that the message processing method and the message processing device of the present application have a corresponding relationship in terms of specific implementation content, so the repeated content will not be described again.
[0141] Figure 8 An exemplary system architecture 800 is shown to which the message processing method or message processing apparatus according to the embodiments of the present application can be applied.
[0142] like Figure 8 As shown, system architecture 800 may include terminal devices 801, 802, 803, a network 804, and a server 805. Network 804 is used to provide a medium for communication links between terminal devices 801, 802, 803 and server 805. Network 804 may include various connection types, such as wired or wireless communication links or fiber optic cables.
[0143] Users can use terminal devices 801, 802, and 803 to interact with server 805 via network 804 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 801, 802, and 803, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).
[0144] The terminal devices 801 , 802 , and 803 may be various electronic devices having a message processing screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.
[0145] Server 805 can be a server that provides various services, such as a background management server that provides support for message processing requests submitted by users using terminal devices 801, 802, and 803 (for example only). The background management server can receive message processing requests, obtain the corresponding message source identifier and user identifier; call the message middleware to obtain the corresponding message based on the message source identifier, and then aggregate the message to generate an aggregate message; determine the corresponding device identifier based on the user identifier, obtain the login log data of the device corresponding to the device identifier, and obtain the login time corresponding to the user identifier from the login log data; determine the target device among the devices corresponding to the device identifier based on the login time, and then push the aggregate message to the target device. Aggregate messages are generated by aggregating messages from multiple sources, and the target device is determined based on the login time corresponding to the login log information of the devices at multiple terminals. The aggregate message is sent to the target device to avoid repeated and indiscriminate multi-terminal transmissions and to avoid disturbing the user.
[0146] It should be noted that the message processing method provided in the embodiment of the present application is generally executed by the server 805, and accordingly, the message processing device is generally set in the server 805.
[0147] It should be understood that Figure 8 The number of terminal devices, networks and servers in the embodiment is merely illustrative. Any number of terminal devices, networks and servers may be provided as required.
[0148] Reference below Figure 9 , which shows a structural diagram of a computer system 900 of a terminal device suitable for implementing an embodiment of the present application. Figure 9 The terminal device shown is merely an example and should not limit the functions and scope of use of the embodiments of the present application.
[0149] like Figure 9As shown, the computer system 900 includes a central processing unit (CPU) 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage unit 908 into a random access memory (RAM) 903. Various programs and data required for the operation of the computer system 900 are also stored in the RAM 903. The CPU 901, ROM 902, and RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0150] The following components are connected to the I / O interface 905: an input section 906 including a keyboard, a mouse, and the like; an output section 907 including displays such as a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage section 908 including a hard disk and the like; and a communication section 909 including a network interface card such as a LAN card or a modem. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the I / O interface 905 as needed. Removable media 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, and the like, are installed in the drive 910 as needed, so that computer programs read therefrom can be installed into the storage section 908 as needed.
[0151] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 909, and / or installed from a removable medium 911. When the computer program is executed by the central processing unit (CPU) 901, the above-mentioned functions defined in the system of the present application are executed.
[0152] It should be noted that the computer-readable medium described in this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. Computer-readable storage media can include, for example, but are not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or devices, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this application, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. This propagated data signal can take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wireline, optical fiber cable, RF, or any suitable combination thereof.
[0153] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of the boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0154] The units involved in the embodiments described in this application can be implemented by software or hardware. The units described can also be set in a processor. For example, it can be described as: a processor includes a receiving unit, a message aggregation unit, a login time acquisition unit, and a message push unit. In some cases, the names of these units do not constitute limitations on the units themselves.
[0155] As another aspect, the present application also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently and not be assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device receives a message processing request, obtains a corresponding message source identifier and a user identifier; calls a message middleware to obtain a corresponding message based on the message source identifier, and then aggregates the message to generate an aggregated message; determines the corresponding device identifier based on the user identifier, obtains the login log data of the device corresponding to the device identifier, and obtains the login time corresponding to the user identifier from the login log data; determines the target device among the devices corresponding to the device identifier based on the login time, and then pushes the aggregated message to the target device.
[0156] According to the technical solution of the embodiment of the present application, an aggregate message is generated by aggregating messages from multiple sources, and the target device is determined based on the login time corresponding to the login log information of the devices at multiple ends, and the aggregate message is sent to the target device to avoid repeated and indiscriminate multi-end sending and avoid disturbing the user.
[0157] Figure 10 This is a schematic diagram of an application scenario of a message processing method according to an embodiment of the present application. Figure 10 As shown, server 1007 (i.e., the execution entity) receives message processing request 1001 and obtains the corresponding message source identifier 1002 and user identifier 1003. Server 1007 calls message middleware 1004 to obtain the corresponding message 1005 based on message source identifier 1002, and then aggregates message 1005 to generate aggregate message 1006. Server 1007 determines the corresponding device identifier 1008 based on user identifier 1003, obtains login log data 1009 for the device corresponding to device identifier 1008, and obtains the login time 1010 corresponding to user identifier 1003 from login log data 1009. Server 1007 determines the target device 1011 among the devices corresponding to device identifier 1008 based on login time 1010, and then pushes aggregate message 1006 to target device 1011 for display. This avoids repeated and indiscriminate multi-terminal transmissions and prevents disturbing users.
[0158] The above specific embodiments do not constitute a limitation on the scope of protection of this application. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application shall be included within the scope of protection of this application.
Claims
1. A message processing method, characterized in that: include: Receive a message processing request and obtain the corresponding message source identifier and user identifier; Calling the message middleware to obtain the corresponding message based on the message source identifier, obtain the scenario identifier carried in the message processing request, filter the message according to the scenario identifier to obtain the message corresponding to the scenario identifier, and then aggregate the messages corresponding to the scenario identifier to generate an aggregate message; Determine a corresponding device identifier according to the user identifier, obtain login log data of the device corresponding to the device identifier, and obtain a login time corresponding to the user identifier from the login log data; A target device among the devices corresponding to the device identifier is determined according to the login time, and then the aggregate message is pushed to the target device.
2. The method according to claim 1, characterized in that The pushing the aggregate message to the target device includes: Acquire message distribution configuration information, and determine customized content corresponding to the target device according to the message distribution configuration information; The aggregate message is adjusted based on the customized content, and the adjusted aggregate message is pushed to the target device.
3. The method according to claim 1, characterized in that: The pushing the aggregate message to the target device includes: The aggregate message is asynchronously sent to a message distribution service, so that the message distribution service calls an event communication framework to send a message event to a sending end corresponding to the target device, so that the sending end pushes the aggregate message to the target device based on the message event.
4. The method according to claim 1, characterized in that Before acquiring the corresponding message based on the message source identifier, the method further includes: In response to detecting that a user contract signing event is triggered, obtaining a corresponding user identifier and a contract signing object identifier, and then creating a session based on the user identifier and the contract signing object identifier; The session content corresponding to the created session is obtained, and then a session receipt is generated based on the session content and outputted.
5. The method according to claim 4, characterized in that Before generating a session ticket based on the session content, the method further includes: The session change message listening program is called to obtain unread messages in the session content, and an unread mark is generated based on the unread message, and the unread mark is displayed at a display position corresponding to the unread message.
6. The method according to claim 5, characterized in that After displaying the unread mark at the display position corresponding to the unread message, the method further includes: The existence time of the unread message is obtained, and in response to the existence time exceeding a preset time threshold, the unread message and the unread mark are cleared.
7. The method according to claim 1, characterized in that The step of determining a target device among the devices corresponding to the device identifier according to the login time includes: Calculate the time interval between the current time and each of the login times; The device corresponding to the login time corresponding to the time interval less than the preset threshold is determined as the target device.
8. A message processing device, characterized in that: include: A receiving unit is configured to receive a message processing request and obtain a corresponding message source identifier and a user identifier; A message aggregation unit is configured to call the message middleware to obtain the corresponding message based on the message source identifier, and then aggregate the message to generate an aggregate message; a message filtering unit configured to obtain a scenario identifier carried in the message processing request; filter the message according to the scenario identifier to obtain a message corresponding to the scenario identifier; and The message aggregation unit is further configured to: aggregate messages corresponding to the scenario identifier to generate an aggregate message; a login time acquisition unit, configured to determine a corresponding device identifier according to the user identifier, acquire login log data of a device corresponding to the device identifier, and acquire a login time corresponding to the user identifier from the login log data; The message pushing unit is configured to determine a target device among the devices corresponding to the device identifier according to the login time, and then push the aggregate message to the target device.
9. A message processing electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
10. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
