Message processing method, apparatus and system, electronic device, and computer-readable medium

By generating target instruction messages corresponding to the target device type and task requirements, and employing a deep neural network model and message queue asynchronous distribution strategy, the real-time, reliability, and scalability issues of IoT systems when data volume increases are solved, achieving efficient message processing and synchronization.

WO2026065382A1PCT designated stage Publication Date: 2026-04-02BOE TECHNOLOGY GROUP CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2026-04-02

AI Technical Summary

Technical Problem

Existing IoT systems face challenges in terms of real-time performance, reliability, stability, and scalability when processing increasing amounts of data, making it difficult to efficiently process and synchronize messages from different types of IoT devices.

Method used

By receiving user request information, a target instruction message corresponding to the target device type and task requirements is generated. The message is then processed using a deep neural network model and business logic rules, combined with an asynchronous distribution strategy for message queues, to ensure reliable message transmission and processing.

Benefits of technology

It enables efficient message synchronization and processing across different IoT devices, improving the system's real-time performance, reliability, and scalability, and ensuring the security and consistency of message transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024122710_02042026_PF_FP_ABST
    Figure CN2024122710_02042026_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed are a message processing method and apparatus, a message processing system, an electronic device, and a computer-readable storage medium. The message processing method comprises: receiving request information of a user, wherein the request information comprises task demand information and device information of a target device; on the basis of the request information, generating a target instruction message to be sent to the target device, wherein the data content of the target instruction message corresponds to the task demand information, and the data structure of the target instruction message corresponds to the device information; and sending the target instruction message to the target device.
Need to check novelty before this filing date? Find Prior Art

Description

Message processing method, device and system, electronic device, and computer readable medium TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of Internet of Things, and in particular to a message processing method, a message processing device and system, an electronic device, and a computer readable medium. BACKGROUND

[0002] With the rapid development of artificial intelligence and Internet of Things technology, the amount of data that a business server needs to process is increasing dramatically, and Internet of Things devices are also increasing rapidly, thus higher requirements are put forward for the real-time performance, reliability, stability, and scalability of the system.

[0003] SUMMARY

[0004] The present disclosure aims to at least solve one of the technical problems existing in the prior art, and proposes a message processing method and device, an electronic device, and a computer readable medium.

[0005] In a first aspect, the present disclosure provides a message processing method, comprising:

[0006] receiving request information of a user, the request information comprising task requirement information and device information of a target device;

[0007] generating a target instruction message to be sent to the target device according to the request information; the data content of the target instruction message corresponds to the task requirement information, and the data structure of the target instruction message corresponds to the device information;

[0008] sending the target instruction message to the target device.

[0009] In some embodiments, the device information comprises a device type, and the data structure of the target instruction message corresponds to the device type of the target device.

[0010] In some embodiments, the request information further comprises a task type corresponding to the task requirement information; generating a target instruction message to be sent to the target device according to the request information specifically comprises:

[0011] processing the request information to generate an initial instruction message corresponding to the task requirement information;

[0012] judging whether a historical instruction message corresponding to both the device information of the target device and the task type exists in a database;

[0013] In a case where the database contains a historical instruction message corresponding to both the device information of the target device and the task type, it is determined whether the data structure of the initial instruction message is consistent with the data structure of the historical instruction message, and if so, the initial instruction message is taken as the target instruction message; otherwise, according to the initial instruction message and the request information, an initial instruction message corresponding to the task demand information is generated again until the data structure of the generated initial instruction message is consistent with the data structure of the historical instruction message, at which point the initial instruction message is taken as the target instruction message.

[0014] In some embodiments, the task demand information in the request information is processed to generate an initial instruction message corresponding to the task demand information, specifically including:

[0015] The task demand information is subjected to natural language processing to generate task semantic information corresponding to the task demand information.

[0016] The initial instruction message is generated according to the task semantic information and the device information of the target device.

[0017] In some embodiments, the task demand information is subjected to natural language processing, specifically including:

[0018] The task demand information is subjected to text preprocessing to obtain text information in a predetermined format.

[0019] The text information in the predetermined format is subjected to syntax and morphology analysis, and the text information subjected to syntax and morphology analysis is subjected to semantic analysis to obtain the task semantic information.

[0020] In some embodiments, the device information of the target device includes device identity information.

[0021] The initial instruction message is generated according to the task semantic information and the device information of the target device, specifically including:

[0022] A business logic rule corresponding to the task type is obtained from a database.

[0023] The initial instruction message is generated according to at least the task semantic information, the business logic rule, and the device identity information of the target device.

[0024] In some embodiments, the step of generating the initial instruction message according to at least the task semantic information, the business logic rule, and the device identity information of the target device specifically includes:

[0025] It is determined whether trigger logic information corresponding to the device identity information of the target device is stored in a database.

[0026] If the trigger logic information corresponding to the device identity information is stored in the database, an initial instruction message is generated according to the business logic rule, the trigger logic information, the device identity information and the task semantic information.

[0027] If the trigger logic information corresponding to the device identity information is not stored in the database, an initial instruction message is generated according to the business logic rule, the device identity information and the task semantic information.

[0028] In some embodiments, the initial instruction message is generated by a preset generator, and the generator includes a deep neural network model.

[0029] In some embodiments, in a message processing flow, the number of target devices is one or more.

[0030] In the step of generating the initial instruction message according to the task semantic information and the device information of the target devices, the initial instruction message of each target device is generated in parallel.

[0031] In some embodiments, the request information further includes a task type, and the device information of the target device includes a device type.

[0032] Before the step of sending the target message to the target device, the method further includes:

[0033] According to the device type of the target device and / or the task type, a message distribution strategy corresponding to the target device is determined.

[0034] The step of sending the target message to the target device includes: sending the target message to the target device by using the message distribution strategy corresponding to the target device.

[0035] In some embodiments, according to the device type of the target device and / or the task type, a message distribution strategy corresponding to the target device is determined, specifically including:

[0036] According to the device type of the target device, the task type and a preset mapping relationship table, a message distribution strategy corresponding to the target device is determined; wherein the preset mapping relationship table includes the mapping relationship between multiple device types, multiple task types and multiple message distribution strategies.

[0037] In some embodiments, in the mapping relationship table, the message distribution strategy corresponding to at least one device type includes a message distribution strategy based on a message queue.

[0038] In some embodiments, the number of the request information is M, each of the request information includes device information of one or more of the target devices, and M is a positive integer;

[0039] The method further includes, after the step of sending the target instruction message to the target devices:

[0040] determining whether each of the target devices successfully performs a corresponding task;

[0041] In a case where it is determined that at least one of the target devices does not successfully perform a corresponding task, sending a rollback instruction to each of the target devices to control each of the target devices to rollback to a task node of a previous message processing flow.

[0042] In some embodiments, the number of the target instruction messages generated according to the M request information is N, and N is an integer greater than or equal to M;

[0043] The determining whether each of the target devices successfully performs a corresponding task specifically includes:

[0044] determining the number of the feedback information received within a preset time period;

[0045] If the number of the feedback information received within the preset time period is less than N, it is determined that at least one of the target devices does not successfully perform a corresponding task;

[0046] If the number of the feedback information received within the preset time period is equal to N, and each of the feedback information contains a success flag, it is determined that each of the target devices successfully performs a corresponding task;

[0047] If the number of the feedback information received within the preset time period is equal to N, and at least one of the feedback information contains a failure flag, it is determined that at least one of the target devices does not successfully perform a corresponding task.

[0048] In some embodiments, the message processing method further includes:

[0049] storing the target instruction message, the feedback information of the target devices, and the determination result of whether each of the target devices performs a corresponding task into a database.

[0050] In some embodiments, the method further includes, before the step of sending the target instruction message to the target devices:

[0051] performing security processing on the target instruction message according to the device information of the target devices, the security processing at least including data encoding and encryption;

[0052] The message sent to the target devices is the target instruction message after the security processing.

[0053] In a second aspect, the present disclosure provides a message processing apparatus, comprising:

[0054] a receiving module configured to receive request information of a user, the request information comprising task requirement information and device information of a target device;

[0055] a processing module configured to generate a target instruction message to be sent to the target device according to the request information, wherein data content of the target instruction message corresponds to the task requirement information, and a data structure of the target instruction message corresponds to the device information;

[0056] a distribution module configured to send the target instruction message to the target device, so that the target device performs a corresponding task according to the target instruction message.

[0057] In a third aspect, the present disclosure provides a message processing system, comprising:

[0058] the message processing apparatus as described above;

[0059] a target device configured to perform a task according to the target instruction message.

[0060] In a fourth aspect, the present disclosure provides an electronic device, comprising:

[0061] one or more processors;

[0062] a storage device having one or more programs stored thereon, when the one or more programs are executed by the one or more processors, the one or more processors implement the method as described above.

[0063] In a fifth aspect, the present disclosure provides a computer readable medium having a computer program stored thereon, when the program is executed by a processor, the method as described above is implemented. BRIEF DESCRIPTION OF DRAWINGS

[0064] The accompanying drawings are included to provide a further understanding of the present disclosure and constitute a part of the specification, which together with the specific embodiments described below, serve to explain the present disclosure but do not constitute a limitation thereof. In the drawings:

[0065] FIG. 1 is a flowchart of a message processing method provided in some embodiments of the present disclosure.

[0066] FIG. 2 is a flowchart of generating a target instruction message provided in some embodiments of the present disclosure.

[0067] FIG. 3 is a flowchart of processing a request message provided in some embodiments of the present disclosure.

[0068] FIG. 4 is a flowchart of a message processing method according to some embodiments of the present disclosure.

[0069] FIG. 5 is a block diagram of a message processing apparatus according to some embodiments of the present disclosure.

[0070] FIG. 6 is a diagram of services provided by a processing module according to some embodiments of the present disclosure.

[0071] FIG. 7 is a system block diagram of a message processing system according to some embodiments of the present disclosure.

[0072] FIG. 8 is a diagram of information interaction of a message processing system according to some embodiments of the present disclosure.

[0073] FIGS. 9A and 9B are diagrams of two front-end interfaces according to an example.

[0074] FIG. 10 is a diagram of an electronic device according to some embodiments of the present disclosure. DETAILED DESCRIPTION

[0075] The specific embodiments of the present disclosure will be described below in detail with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are merely intended to explain and illustrate the present disclosure, and are not intended to limit the present disclosure.

[0076] To make the objectives, technical solutions, and advantages of the embodiments of the present disclosure clearer, the technical solutions of the embodiments of the present disclosure will be described clearly and completely below with reference to the accompanying drawings of the embodiments of the present disclosure. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all the embodiments of the present disclosure. Based on the described embodiments of the present disclosure, all other embodiments obtained by a person of ordinary skill in the art without creative effort belong to the scope of protection of the present disclosure.

[0077] Unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present disclosure should be understood as the common meanings thereof by those having ordinary skills in the art to which the present disclosure belongs. The terms “first”, “second”, and similar terms used in the present disclosure do not represent any order, quantity, or importance, but are only used to distinguish different constituent parts.

[0078] FIG. 1 is a flowchart of a message processing method according to some embodiments of the present disclosure, which can be executed by a business server. As shown in FIG. 1, the message processing method includes the following steps S10-S30.

[0079] S10, receiving request information of a user, the request information including task requirement information and device information of a target device.

[0080] For example, the request information can be issued by the user from a front-end web interface.

[0081] For example, the request information is a task message requested by the user to perform, wherein the target device refers to a terminal device performing the task, and the task requirement information refers to the task content to be performed by the target device. The target device is an Internet of Things terminal device, and the target device can be one or more. For example, the task requested by the user to perform is to make a projector in a conference room play a certain picture and make a sound box in the conference room play a certain audio; the target device includes the projector and the sound box, and the task requirement information includes an instruction message of “making the projector play the picture” and specific picture information, and an instruction message of “making the sound box play the audio” and specific audio information. The picture information and the audio information can be provided by the user.

[0082] For example, the device information of the target device can include device identity information of the target device (the device identity information is a unique identifier of the device, for example, can be a Mac address of the device), and in addition, the device information can also include a device type.

[0083] S20, generating a target instruction message to be sent to the target device according to the request information; the data content of the target instruction message corresponds to the task requirement information, and the data structure of the target instruction message corresponds to the device information.

[0084] The target instruction message is information for instructing the target terminal to perform a corresponding task. Each target device corresponds to a target instruction message, or each type of target device corresponds to a target instruction message.

[0085] For example, each data in the target instruction message can include task content information (for example, a task of playing a picture), device identity information of the target device, and delivery time of the target instruction message. The data content of the target instruction message corresponding to the task requirement information means that, for the same target device (denoted as A device), the task content information in the target instruction message to be sent to the A device matches the task content of the A device contained in the task requirement information, and when the A device receives the target instruction message, the A device can perform the corresponding task content according to the target instruction message.

[0086] The data structure of the target instruction message corresponding to the device information means that the data structure of the target instruction message meets the data receiving requirements of the corresponding target device. For example, the data structure of the target instruction message is the format of each data in the target instruction message.

[0087] S30, sending the target instruction message to the corresponding target device, so that the target device performs a corresponding task according to the target instruction message.

[0088] In the message processing method provided in the embodiments of the present disclosure, after receiving the request information of the user, the service server automatically generates a target instruction message according to the task demand information in the request information, and the data structure of the target instruction message corresponds to the device information of the target device, so as to meet the data receiving requirements of different Internet of Things devices, and further efficiently adapt to message synchronization of different devices.

[0089] In some embodiments, the device information of the target device includes device type and device identity information, and the data structure of the target instruction message at least corresponds to the device type of the target device.

[0090] In some embodiments, the request information further includes a task type corresponding to the task demand information. For example, the task type can include a check-in type, a reminder type, a voting type, a screen projection type, etc.

[0091] FIG. 2 is a flowchart of generating a target instruction message according to some embodiments of the present disclosure. As shown in FIG. 2, step S20 can specifically include:

[0092] S21, processing the request information to generate an initial instruction message corresponding to the task demand information.

[0093] In some embodiments, the request information can be processed by using a preset generator. For example, the generator can include a deep neural network model, such as a recurrent neural network (RNN) model or a long short-term memory (LSTM) model.

[0094] S22, determining whether there is a historical instruction message corresponding to both the device information of the target device and the task type in the database.

[0095] If there is a historical instruction message corresponding to both the device information of the target device and the task type in the database, it is determined whether the data structure of the initial instruction message is consistent with the data structure of the historical instruction message. If the data structure of the initial instruction message is consistent with the data structure of the historical instruction message, the initial instruction message is taken as the target instruction message; if not, the initial instruction message corresponding to the task demand information is generated again according to the initial instruction message and the request information, until the data structure of the generated initial instruction message is consistent with the data structure of the historical instruction message, and the initial instruction message is taken as the target instruction message.

[0096] If there is no historical instruction message corresponding to both the device information of the target device and the task type in the database, the initial instruction message is taken as the target instruction message.

[0097] In one example, in step S22, it can be first judged whether there is a historical instruction message corresponding to the device identity information and the task type of the target device in the database. If there is, the historical instruction message is taken as the historical instruction message corresponding to the device information and the task type of the target device. If not, it is further judged whether there is a historical instruction message corresponding to the device type information and the task type of the target device in the database. If there is a historical instruction message corresponding to the device type information and the task type of the target device, it is considered that the historical instruction message corresponds to the device information and the task type of the target device. If there is no historical instruction message corresponding to the device type information and the task type of the target device, it is determined that there is no historical instruction message corresponding to the device information and the task type of the target device in the database.

[0098] In one example, the target instruction message is a JSON format message body.

[0099] In the embodiments of the present disclosure, by adjusting the data structure of the target instruction message to be consistent with the data structure of the historical instruction message of the target device, it is ensured that the target instruction message can meet the data receiving requirements of the target device.

[0100] FIG. 3 is a flowchart of processing a request message provided in some embodiments of the present disclosure. As shown in FIG. 3, step S21 includes steps S211-S212.

[0101] S211, performing natural language processing on the task demand information in the request information to generate task semantic information corresponding to the task demand information.

[0102] Optionally, step S211 includes S211a-S211b.

[0103] S211a, performing text preprocessing on the task demand information to obtain text information in a predetermined format.

[0104] In one example, before step S211a, S2110 can be performed first: performing noise processing on the request information to remove noise information in the request information, and then performing step S211a, so as to improve the accuracy of natural language processing.

[0105] In one example, in step S211a, the text preprocessing on the task demand information can specifically include:

[0106] (1) Tokenization: dividing text into words or phrases.

[0107] (2) Stop Word Removal: removing common meaningless words such as “of”, “in”, “is”, etc.

[0108] (3) Stemming or Lemmatization: Reducing words to their base form.

[0109] (4) Normalization: Converting text to a uniform standard format, such as dates, numbers, etc. to a specific format.

[0110] S211b, performing syntax and morphology analysis on the text information in the predetermined format, and performing semantic analysis on the text information after syntax and morphology analysis to obtain task semantic information.

[0111] Wherein, the syntax and morphology analysis specifically includes: (1) using a tagger to determine the type or form of each word, such as noun, verb, adjective, etc. The tagger can be designed based on rules, statistical models or deep learning models. (2) Determine the relationship between words in a sentence and construct the syntax structure of the sentence. This usually involves the generation of parse trees (such as dependency trees) to show the dependency relationships between words.

[0112] Semantic analysis is to capture the deep meaning and context information in the sentence, and use the context information to enhance the understanding of the text. It specifically involves word sense disambiguation, entity recognition, relationship extraction, and reasoning processes in text generation tasks.

[0113] S212, generating an initial instruction message according to the task semantic information and the device information of the target device.

[0114] In some embodiments, the device information of the target device includes device identity information. Step S212 can specifically include:

[0115] S212a, determining the business logic rule corresponding to the task type.

[0116] Specifically, the business logic rule corresponding to the task type can be obtained from the database. The business logic rule refers to the execution rule when the target device executes the task. For example, the task requirement information is "the display device displays a pop-up window", and the task semantic information is the semantic information corresponding to "the display device displays a pop-up window"; the business logic rule is: when the display device is not in video conference, the pop-up window is displayed immediately; when the display device is in video conference, the pop-up window is displayed after the video conference ends.

[0117] S212b, judging whether the trigger logic information corresponding to the device identity information of the target device is stored in the database.

[0118] Wherein, the trigger logic information refers to the trigger sequence of each action supported by the target device when executing the task.

[0119] For example, some target devices support the action of directly playing the picture when playing the picture; that is, the trigger logic information is to directly play the picture; and some target devices support the actions of previewing the picture and playing the picture, and the picture is played after the previewing is completed; that is, the trigger logic information is to play the picture after the picture previewing is completed.

[0120] In S212c, if the trigger logic information corresponding to the device identity information is stored in the database, the initial instruction message is generated according to the business logic rule, the trigger logic information, the device identity information and the task semantic information. If the trigger logic information corresponding to the device identity information is not stored in the database, the initial instruction message is generated according to the business logic rule, the device identity information and the task semantic information.

[0121] In the generation of the initial instruction message, the device identity information is added, so that after the target instruction message generated finally is sent to the target device, the target device can determine whether the device identity information in the received target instruction message is consistent with the actual device identity information of the target device. If the device identity information is consistent, the task processing can be performed; if the device identity information is not consistent, the task processing can not be performed, thereby improving the reliability of message transmission.

[0122] In some embodiments, in one message processing flow (i.e., one transaction, from the user sending the request message to the user receiving the response message), the number of target devices is one or more. When the number of target devices is more than one, the target instruction messages of the target devices are generated in parallel, thereby improving the processing speed of the system.

[0123] FIG. 4 is a flowchart of a message processing method provided in some embodiments of the present disclosure, wherein the request information further includes a task type. For example, the task type can include a check-in type, a reminder type, a voting type, etc. As shown in FIG. 4, the message processing method includes the above steps S10-S30. In addition, before step S30, the message processing method can further include:

[0124] In S25, the target instruction message is processed securely according to the device information of the target device. The secure processing at least includes data encoding and encryption.

[0125] In step S30, the message sent to the target device is the target instruction message processed securely, thereby improving the security of message transmission.

[0126] In some embodiments, before step S30, there can further comprise: S15, determining a message distribution strategy corresponding to the target device according to the device type and / or the task type of the target device. Wherein, step S30 is to send the target instruction message to the target device by using the message distribution strategy corresponding to the target device.

[0127] In some embodiments, step S15 specifically comprises: determining the message distribution strategy corresponding to the target device according to the device type, the task type of the target device and a preset mapping relationship table. Wherein, the preset mapping relationship table contains the mapping relationship between multiple device types, multiple task types and multiple message distribution strategies.

[0128] For example, the multiple message distribution strategies in the mapping relationship table can include: an asynchronous distribution strategy based on a message queue, and a distribution strategy based on a polling schedule.

[0129] In actual application, for the device type, some types of terminal devices can support multiple distribution strategies, and some types of terminal devices can only support one distribution strategy. In addition, for some types of tasks, the data content received by different target devices is different, which requires the use of the publish / subscribe mode to accurately send the message to a certain device or certain devices. For another type of task, for example, when sending the same screen of the main screen, voting, meeting agenda pictures, it is necessary to ensure that the data content received by each target device is consistent, at which time, the distribution strategy based on the polling schedule can be used.

[0130] In some embodiments, in the mapping relationship table, the message distribution strategy corresponding to at least one device type includes a message distribution strategy based on a message queue, so as to realize efficient distribution and processing of messages, reduce system delay and response time.

[0131] Wherein, the message distribution strategy based on the message queue can be Mica-Mqtt message protocol. Mqtt is short for Message Queuing Telemetry Transport, which is a "lightweight" message protocol based on the publish / subscribe paradigm. Through the QoS delivery level of Mqtt, the reliability and transmission efficiency of the message are ensured.

[0132] In a message queue-based message distribution strategy, when a sender needs to send a message, it will put the message into a message queue instead of sending it directly to the receiver. The sender does not need to wait for the processing result of the receiver after sending the message and can continue to perform other tasks. The receiver can take out the message from the message queue at any time for processing, and after processing, it can send the processing result to the sender or not send it according to the needs. This asynchronous communication mode brings many benefits. First, it improves the reliability and performance of the system, because the sender and receiver do not need to wait for the processing result of the other party, and can handle tasks in parallel, thereby improving the throughput of the system. Second, it reduces the complexity of the system, because the sender and receiver do not need to communicate directly, but indirectly through the message queue, reducing the coupling between systems. Finally, it also supports peak shaving, by evenly distributing requests to different time periods, avoiding system overload. In the asynchronous communication mechanism of the message queue, the publish / subscribe mode and the first-in-first-out (FIFO) principle are usually used. The publish / subscribe mode allows producers to publish messages to one or more topics, and consumers can subscribe to these topics and receive corresponding messages. The first-in-first-out principle ensures the sequential delivery and processing of messages.

[0133] In addition, in the asynchronous communication mechanism using the message queue, message persistence can be achieved. Specifically, when the message sender sends a message, the message queue will store the message in the persistent storage medium, such as a disk or a Clickhouse database, at the same time, not just in the memory. This means that even if the message sender and receiver fail or disconnect, the message will not be lost. When the message receiver is ready to receive the message, the message queue first retrieves the corresponding message from the memory and delivers it to the receiver.

[0134] In some embodiments, step S15 is performed before step S20, in which case, when it is determined in step S15 to use a message queue-based message distribution strategy, in step S20, the target device can be added to the target instruction message. Topic (Topic) subscribed to.

[0135] In some embodiments, in a message processing flow (i.e., a transaction), one or more target devices can be involved, each of which can receive one or more target message instructions from one or more data sources. That is, in the delivery and reception of messages, it can be one-to-many sending, many-to-one sending, or many-to-many sending. Specifically, in a transaction of message processing, M request messages from M data sources can be received, M being a positive integer; each request message includes device information of one or more target devices. When M > 1, different request messages can include device information of the same device or device information of different devices, i.e., when there are multiple data sources, the target instruction messages generated based on the request messages of the multiple data sources can be sent to the same target device or different target devices. Based on the M request messages, N target instruction messages are generated.

[0136] In some embodiments, N is equal to 1, i.e., one target instruction message is generated based on one request message and sent to one target device (one-to-one); in other embodiments, N is an integer greater than 1. For example, multiple target instruction messages are generated based on one request message and sent to multiple target devices (i.e., one-to-many); for another example, multiple target instruction messages are generated based on multiple request messages and sent to one target device (i.e., many-to-one); for another example, multiple target instruction messages are generated based on multiple request messages and sent to multiple target devices (i.e., many-to-many).

[0137] As shown in FIG. 4, after step S30, the following steps can also be included:

[0138] S40, determining whether each target device successfully performs the corresponding task.

[0139] The task performed by the target device is the task performed based on the target instruction message, and a single target device can perform one task or multiple tasks. In the embodiments of the present disclosure, the task performed by a single target device receiving a target instruction message is taken as one task.

[0140] The success of the target device in performing the corresponding task refers to whether the target device has completed the tasks corresponding to all the received target instruction messages. For example, for the case of “one-to-many”, each target device can receive one target instruction message and thus needs to perform one task; if the task is completed by the target device, it means that the target device “successfully performs the corresponding task”. For the case of “many-to-one”, the target device can receive multiple target instruction messages, and at this time, “successfully performing the corresponding task” means that the target device has completed the multiple tasks corresponding to the multiple target instruction messages.

[0141] S50, in a case where it is judged that at least one target device does not successfully perform the corresponding task, sending a fallback instruction to each target device to control each target device to fallback to a task node of the last message processing flow.

[0142] The embodiments of the present disclosure can ensure the synchronization consistency and reliability of the message by steps S40 and S50, ensure that when the message is sent to the same target device across multiple services or data sources, all the tasks corresponding to the multiple messages are successfully processed or all the tasks are failed to be processed; similarly, when the message is sent to multiple target terminals by the same data source, all the target terminals successfully process the tasks or all the target terminals fail to process the tasks, thereby avoiding the problem of inconsistent data, i.e., ensuring the atomicity of message receiving and feedback.

[0143] In some embodiments, step S40 can specifically include:

[0144] S41, determining the number of feedback information received within a preset time length.

[0145] The feedback information is from the target device, and the preset time length is the heartbeat time of the target device. The feedback information contains marking information, which is used to represent whether the target device successfully performs the task corresponding to the target instruction message. The marking information can be a success mark, i.e., representing that the target device has successfully performed the task corresponding to the target instruction message; or a failure mark, i.e., representing that the target device has not successfully performed the task corresponding to the target instruction message.

[0146] The target device reports the feedback information in a manner matched with the above information distribution strategy. When the server sends the message to the target device by using the message queue, the target device also reports the feedback information to the server by using the message queue.

[0147] In one example, the feedback information reported by the target device is in JSON data format, for example, the structure of the feedback information is as follows:

[0148] The "code" represents the unique identification code of the target instruction message, and by setting this identification code, the target device can judge whether the same target instruction message is received. The "deviceMac" represents the device identity information of the target device; the "status" represents the mark of whether the device successfully performs the task; the "taskCode" represents the unique identification code generated when the server issues the target instruction message. In one message processing flow, multiple target instruction messages can be issued to multiple target devices in parallel; or multiple target instruction messages can be issued to one target device; but no matter what kind of issuing manner, one message processing flow corresponds to one "taskCode".

[0149] S42, if the number of feedback information received within the preset time period is less than N, it is determined that at least one target device does not successfully execute the corresponding task.

[0150] If the number of feedback information received within the preset time period is less than N, it indicates that at least one target device does not generate feedback information due to abnormal conditions such as power failure, so as to determine that at least one target device does not successfully execute the corresponding task.

[0151] S43, if the number of feedback information received within the preset time period is equal to N, and each feedback information contains a success mark, it is determined that each target device successfully executes the corresponding task.

[0152] S44, if the number of feedback information received within the preset time period is equal to N, and at least one feedback information contains a failure mark, it is determined that at least one target device does not successfully execute the corresponding task.

[0153] In some embodiments, the request information of the user can come from the front-end web interface. In the case of multiple data sources and request information, it can be understood that multiple request information is generated from different user login interfaces.

[0154] In some embodiments, after the business server generates the target instruction message, in addition to sending the target instruction message to the target device, the target instruction message can also be sent to the cache. When performing the above step S40, the number of feedback information received within the preset time period is compared with the number of target instruction messages in the cache. After the end of the message processing process, the data in the cache is cleared. The end of a message processing process is divided into two cases: one is that the business server judges that each target terminal device successfully executes the task; the other is that the business server issues a rollback instruction.

[0155] In some embodiments, after step S40, it further includes: in response to the user's query instruction, generating a reminder information according to the judgment result, and sending the reminder information to the front-end web interface for display, so that the user knows whether each target device successfully executes the task.

[0156] In some embodiments, the message processing method further includes: storing the target instruction message, the feedback information of the target device, and the judgment result of whether each target device executes the corresponding task into the database, so as to update the historical data in the database.

[0157] For example, after the target message instruction is generated, the log storage in step S51 can be performed at the same time or after the message distribution, which can include storing the task demand information, the target message instruction, the device information of the target device, the time of issuing the target message instruction, and the like.

[0158] For example, after the feedback information reported by the target device is received, the log storage in step S52 can be performed, which can include storing the feedback information, the feedback time, and the like.

[0159] For example, after it is determined whether each target device successfully performs the task required to be performed by itself, the log storage in step S53 can be performed, which can include storing the determination result.

[0160] For example, after the log storages in steps S51, S52, and S53 are performed, the data issued and reported in the message processing flow can be stored, and the time of issuing and reporting can be stored, so that the historical data in the database is updated, so that in subsequent other message processing flows, the data structure supported by the target device can be determined according to the historical data.

[0161] In addition, through the storage and update of the historical data, the task prediction can also be performed. Specifically, the task prediction can be performed according to the historical data in the database, a prediction message is generated, the prediction information includes a prediction instruction message, an issuing time, an issuing rule, and device information of a prediction target device; the prediction instruction message is sent to the prediction target device. In some scenarios, when there are regular task target instruction messages in the historical data, the prediction information is generated according to the target instruction messages and the message issuing rule, and the prediction instruction message is issued according to the issuing time and the issuing rule. The issuing rule refers to a rule that needs to be followed when the prediction instruction message is issued. For example, the prediction issuing rule includes whether to wait and the waiting time length in the case of other tasks.

[0162] In one example, a user issues a request message at a specific time of each working day to instruct all target devices in a conference group to sign in, and after a preset monitoring time length (for example, one week or one month), the time rule of the message issuing can be determined, so that a prediction instruction message is generated, and the prediction instruction message is issued at the specific time of each working day thereafter to instruct all target devices in a conference group to sign in. If the business server is issuing other instruction messages to the target device at the specific time of a working day, the prediction instruction message can be issued after waiting for a certain time length.

[0163] In some embodiments, log storage can be performed by Clickhouse, thereby improving the storage and query efficiency of a large amount of Internet of Things device data. Clickhouse is a distributed columnar database management system that allows the creation of databases and tables, loading of data and running of queries at runtime without the need to reconfigure and restart the server, and supports linear expansion.

[0164] The embodiments of the present disclosure further provide a message processing apparatus, which can be a service server. FIG. 5 is a block diagram of the message processing apparatus provided in some embodiments of the present disclosure. As shown in FIG. 5, the message processing apparatus includes a receiving module 10, a processing module 20 and a distribution module 30.

[0165] The receiving module 10 is configured to receive request information of a user, the request information including task demand information and device information of a target device.

[0166] The processing module 20 is configured to generate a target instruction message to be sent to the target device according to the request information, the data content of the target instruction message corresponding to the task demand information, and the data structure of the target instruction message corresponding to the device information. The specific process of generating the target instruction message by the processing module 20 according to the request information is described above and will not be repeated here.

[0167] The distribution module 30 is configured to send the target instruction message to the target device, so that the target device performs task processing according to the target instruction message.

[0168] In some embodiments, the distribution module 30 is further configured to receive feedback information of the target device. The processing module 20 can further judge the task execution of the target device and perform log storage according to the feedback information. The specific process is described above and will not be repeated here.

[0169] Figure 6 is a service content provided by the processing module according to some embodiments of the present disclosure. As shown in Figure 6, the processing module 20 includes a plurality of services, including: grouping service, terminal service, device mapping, AI processing service, task service, reminder service, check-in service, content service, Mica-mqtt service, and voting service. The grouping service is used for grouping management of a plurality of terminal devices. The terminal service is used for providing relevant information of the terminal device. The device mapping includes a mapping relationship between the device type and / or task type of the terminal device and the message distribution strategy. The reminder service is used for providing information related to the reminder task. The check-in service is used for providing information related to the check-in task. The voting service is used for providing information related to the voting task. The content service is used for providing information related to the content task (e.g., issuing various types of information content to the terminal device). The Mica-mqtt service is a service for data transmission with the message queue. The task service is used for generating a target instruction message to be issued to the target device according to the request information of the user, and determining whether the target device successfully performs the corresponding task according to whether the feedback information is received within a preset time period and the content of the received feedback information.

[0170] In some embodiments, the processing module 20 is further configured to determine the message distribution strategy corresponding to the target device according to the device type and / or the task type of the target device. When the processing module 20 sends the target message to the target device, the target instruction message is sent to the target device by using the message distribution strategy corresponding to the target device.

[0171] In some embodiments, the processing module 20 determines the message distribution strategy corresponding to the target device according to the device type and / or the task type of the target device, specifically including: determining the message distribution strategy corresponding to the target device according to the device type, the task type of the target device, and a preset mapping relationship table. The preset mapping relationship table includes a mapping relationship between a plurality of device types, a plurality of task types, and a plurality of message distribution strategies.

[0172] In some embodiments, the number of request information is M, and each request information includes device information of one or more target devices, and M is a positive integer. The processing module 20 is further configured to: after sending the target instruction message to the target device, determine whether each target device successfully performs the corresponding task; and in a case where it is determined that at least one target device does not successfully perform the corresponding task, send a fallback instruction to each target device to control each target device to fallback to a task node of a previous message processing flow.

[0173] In some embodiments, the processing module 20 is further configured to perform security processing on the target instruction message according to the device information of the target device, the security processing at least including data encoding and encryption. The message sent by the processing module 20 to the target device is the target instruction message after security processing.

[0174] The embodiments of the present disclosure further provide a message processing system. FIG. 7 is a system block diagram of the message processing system provided in some embodiments of the present disclosure. As shown in FIG. 7, the message processing system includes a message processing apparatus 100 and a target device 300.

[0175] The message processing apparatus 100 is the message processing apparatus in the above embodiments, which is configured to receive request information of a user, and generate a target instruction message to be sent to a target device according to the request information, wherein the data content of the target instruction message corresponds to task demand information, and the data structure of the target instruction message corresponds to device information; and send the target instruction message to the target device 300.

[0176] The request information of the user can be sent to the message processing apparatus 100 by a front-end web interface. In an example, the front-end web interface communicates with the message processing apparatus 100 through an Nginx middleware tool. The Nginx middleware is used to realize load balancing, which distributes the request information of the front-end web interface to downstream business servers, so as to ensure that the front-end web interface can normally and stably access each business service in a high-concurrency scenario.

[0177] The target device 300 is configured to perform task processing according to the target instruction message.

[0178] The message processing apparatus 100 can perform data transmission with the message queue 400, the buffer 600 and the database 500. For example, when a message distribution strategy based on the message queue is adopted, the message processing apparatus 100 sends the target instruction message to the message queue 400, and the target device 300 receives the message in the message queue 400; when the above log storage is performed, the message processing apparatus 100 writes the log data into the database 500 as historical data; after a preset time period after sending the target instruction message, the message processing apparatus 100 can compare the number of feedback messages with the number of target instruction messages in the buffer 600, to determine whether each target device successfully performs the task.

[0179] FIG. 8 is an information interaction schematic diagram of the message processing system provided in some embodiments of the present disclosure. As shown in FIG. 8, the process of information processing includes:

[0180] S101, a user sends request information by a front-end web interface.

[0181] FIG. 9A and FIG. 9B are schematic diagrams of two front-end interfaces provided in an example, both of which are related pages of "edit task", which include pages of "task basic information", "content selection", "device selection", etc. FIG. 9A shows the page of "content selection", and FIG. 9B shows the page of "device selection". In FIG. 9A, information of "content type", "content selection" and "content preview" is displayed. For the information of "content type", the user can select a specific content type, i.e. the task type described above. For the information of "content selection", the user can select from the provided options or add new content, which is used to generate the task requirement information in the request information. In "content preview", the preview of the task content is displayed. In FIG. 9B, the user can input the group to which the device belongs from "device group" to perform filtering, and select the device from "device list", which is the target device selected by the user.

[0182] S102, the request message is sent to the message processing device (i.e. the service server).

[0183] S103, the service server generates a target instruction message according to the request message.

[0184] S104, the service server sends the target instruction message to the target device. For example, the service server sends the target instruction message to the message queue, and the target device obtains the message from the message queue.

[0185] S105, after receiving the target instruction message, the target device executes the corresponding task according to the target instruction message.

[0186] S106, after executing the corresponding task, the target device sends feedback information to the service server.

[0187] S107, the service server judges whether the target device successfully processes the task according to the feedback information.

[0188] S108, the service server records logs, stores the related data in the message processing process (e.g. the request information, the target instruction message, the feedback information, the judgment result), and updates the historical data in the database.

[0189] S109, in response to the query instruction of the user, the service server generates a reminder information according to the judgment result in S107, and feeds back to the front-end web interface for display.

[0190] FIG. 10 is a schematic diagram of an electronic device provided in some embodiments of the present disclosure, as shown in FIG. 10, the electronic device comprises one or more processors 901.

[0191] The memory 902 has one or more programs stored thereon, and when the one or more programs are executed by the one or more processors, the one or more processors implement the message processing method of any one of the above.

[0192] The electronic device further includes one or more I / O interfaces 903 connected between the processor and the memory and configured to implement information interaction between the processor and the memory.

[0193] The processor 901 is a device with data processing capability, including but not limited to a central processing unit (CPU) and the like; the memory 902 is a device with data storage capability, including but not limited to a random access memory (RAM, more specifically, SDRAM, DDR, etc.), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), and a flash memory (FLASH); and the I / O interface (read-write interface) is connected between the processor and the memory and can implement information interaction between the processor and the memory, including but not limited to a data bus (Bus) and the like.

[0194] In some embodiments, the processor 901, the memory 902, and the I / O interface 903 are connected to each other through a bus, and further connected to other components of the computing device.

[0195] The embodiment further provides a computer readable medium having a computer program stored thereon, and the program is executed by the processor to implement the message processing method provided by the embodiment. For the sake of avoiding repeated description, the specific steps of the method are not described here.

[0196] Those skilled in the art can understand that all or some of the steps in the method disclosed above, the functional modules / units in the system and the device can be implemented as software, firmware, hardware and appropriate combinations thereof. In the hardware implementation, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component can have multiple functions, or one function or step can be performed by several physical components in cooperation. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor or a microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software can be distributed on a computer readable medium, which can include computer storage media (or non-transitory media) and communication media (or transitory media). As known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, as known to those skilled in the art, communication media typically includes computer readable instructions, data structures, program modules or other data in modulated data signals such as carrier waves or other transport mechanisms, and can include any information delivery medium.

[0197] It should be noted that, in this document, the terms "comprising", "including", or any other variant thereof are intended to cover non-exclusive inclusions, such that processes, methods, articles or devices that include a series of elements not only include those elements, but also include other elements not explicitly listed, or inherent to such processes, methods, articles or devices. Without more limitations, the element defined by the phrase "comprising a" does not exclude the presence of additional identical elements in the process, method, article or device that includes the element.

[0198] It can be understood that the above embodiments are only exemplary embodiments adopted for illustrating the principles of the disclosure, and the disclosure is not limited thereto. Various modifications and improvements can be made by those skilled in the art without departing from the spirit and essence of the disclosure, and these modifications and improvements are also considered to be within the protection scope of the disclosure.

Claims

1. A message processing method, comprising: receiving request information of a user, the request information comprising task requirement information and device information of a target device; generating a target instruction message to be sent to the target device according to the request information; the data content of the target instruction message corresponding to the task requirement information, and the data structure of the target instruction message corresponding to the device information; sending the target instruction message to the target device.

2. The message processing method of claim 1, wherein, The device information comprises a device type, and the data structure of the target instruction message corresponds to the device type of the target device.

3. The message processing method of claim 1, wherein, The request information further comprises a task type corresponding to the task requirement information; generating a target instruction message to be sent to the target device according to the request information, specifically comprising: processing the request information to generate an initial instruction message corresponding to the task requirement information; determining whether there is a historical instruction message corresponding to both the device information of the target device and the task type in a database; in the case that there is a historical instruction message corresponding to both the device information of the target device and the task type in the database, determining whether the data structure of the initial instruction message is consistent with the data structure of the historical instruction message, if consistent, taking the initial instruction message as the target instruction message; otherwise, according to the initial instruction message and the request information, generating an initial instruction message corresponding to the task requirement information again, until the data structure of the generated initial instruction message is consistent with the data structure of the historical instruction message, taking the initial instruction message as the target instruction message. processing the task requirement information in the request information to generate an initial instruction message corresponding to the task requirement information, specifically comprising:

4. The message processing method of claim 3, wherein, performing natural language processing on the task requirement information to generate task semantic information corresponding to the task requirement information; generating the initial instruction message according to the task semantic information and the device information of the target device. The natural language processing on the task requirement information specifically comprises:

5. The message processing method of claim 4, wherein, performing text preprocessing on the task requirement information to obtain text information in a predetermined format; performing syntax and morphology analysis on the text information in the predetermined format, and performing semantic analysis on the text information after syntax and morphology analysis to obtain the task semantic information. The device information of the target device comprises device identity information; 6. The message processing method of claim 4, wherein, generating the initial instruction message according to the task semantic information and the device information of the target device, specifically comprising: obtaining a business logic rule corresponding to the task type from a database; generating the initial instruction message according to at least the task semantic information, the business logic rule and the device identity information of the target device. The step of generating the initial instruction message according to at least the task semantic information, the business logic rule and the device identity information of the target device specifically comprises:

7. The message processing method of claim 6, wherein, determining whether trigger logic information corresponding to the device identity information of the target device is stored in a database; ​ If the trigger logic information corresponding to the device identity information is stored in the database, an initial instruction message is generated according to the business logic rule, the trigger logic information, the device identity information and the task semantic information; If the trigger logic information corresponding to the device identity information is not stored in the database, an initial instruction message is generated according to the business logic rule, the device identity information and the task semantic information.

8. The message processing method of claim 3, wherein, The initial instruction message is generated by a preset generator, and the generator includes a deep neural network model.

9. The message processing method according to any one of claims 4 to 8, wherein, In a message processing flow, the number of target devices is one or more; In the step of generating the initial instruction message according to the task semantic information and the device information of the target devices, the initial instruction message of each target device is generated in parallel.

10. The message processing method according to any one of claims 1 to 8, wherein, The request information further includes a task type, and the device information of the target device includes a device type; Before the step of sending the target message to the target device, the method further includes: According to the device type of the target device and / or the task type, a message distribution strategy corresponding to the target device is determined. The step of sending the target message to the target device includes: sending the target message to the target device by using the message distribution strategy corresponding to the target device.

11. The message processing method of claim 10, wherein, According to the device type of the target device and / or the task type, a message distribution strategy corresponding to the target device is determined, specifically including: According to the device type of the target device, the task type and a preset mapping relationship table, a message distribution strategy corresponding to the target device is determined; wherein the preset mapping relationship table includes the mapping relationship between multiple device types, multiple task types and multiple message distribution strategies.

12. The message processing method of claim 11, wherein, In the mapping relationship table, the message distribution strategy corresponding to at least one device type includes a message distribution strategy based on a message queue.

13. The message processing method according to any one of claims 1 to 8, wherein, The number of request information is M, and the device information of one or more target devices is included in each request information, M being a positive integer; After the step of sending the target instruction message to the target device, the method further includes: Determining whether each target device successfully executes a corresponding task; In the case where it is determined that at least one target device does not successfully execute a corresponding task, a rollback instruction is sent to each target device to control each target device to rollback to a task node of a previous message processing flow.

14. The message processing method of claim 13, wherein, The number of target instruction messages generated according to M request information is N, N being an integer greater than or equal to M; Determining whether each target device successfully executes a corresponding task specifically includes: Determining the number of feedback information received within a preset time period; If the number of feedback information received within the preset time period is less than N, it is determined that at least one target device does not successfully execute a corresponding task; If the number of feedback information received within the preset time period is equal to N, and each feedback information contains a success mark, it is determined that each target device successfully executes a corresponding task; ​ If the number of the feedback information received within the preset time period is equal to N, and at least one of the feedback information contains a failure mark, it is determined that at least one of the target devices fails to perform the corresponding task.

15. The message processing method of claim 13, wherein, The message processing method further comprises: storing the target instruction message, the feedback information of the target device, and the result of determining whether each target device performs the corresponding task into a database.

16. The message processing method according to any one of claims 1 to 8, wherein, Before the step of sending the target instruction message to the target device, the method further comprises: performing security processing on the target instruction message according to the device information of the target device, wherein the security processing at least includes data encoding and encryption; wherein the message sent to the target device is the target instruction message after the security processing.

17. A message processing apparatus, comprising: a receiving module configured to receive request information of a user, wherein the request information comprises task requirement information and device information of a target device; a processing module configured to generate a target instruction message to be sent to the target device according to the request information; the data content of the target instruction message corresponds to the task requirement information, and the data structure of the target instruction message corresponds to the device information; a distribution module configured to send the target instruction message to the target device, so that the target device performs a corresponding task according to the target instruction message.

18. A message processing system, comprising: the message processing apparatus according to claim 17; and a target device configured to perform a task according to the target instruction message.

19. An electronic device, comprising: one or more processors; a storage device having one or more programs stored thereon, wherein 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-16.

20. A computer readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method according to any one of claims 1-16 is implemented.

Citation Information

Patent Citations

  • Voice control method, information processing method, vehicle and server

    CN111768777A

  • User interface method and device

    US20130080178A1

  • Multi-database data processing method, apparatus, computer device, and storage medium

    WO2020155760A1

  • Voice interaction method, vehicle, server, system, and storage medium

    WO2022001013A1