Message automatic assembly and distribution method, system, electronic device and storage medium

By using pre-configured matching rules and business plug-ins for automatic message assembly and distribution in the back-end system in the IoT service field, the problems of system expansion difficulties and low message configuration efficiency are solved, and more efficient message processing and system maintenance are achieved .

CN118585358BActive Publication Date: 2024-11-19E SURFING VISION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411073258.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-06
Publication Date
2024-11-19
Estimated Expiration
2044-08-06

AI Technical Summary

Technical Problem

The backend systems in the Internet of Things service field lack flexible expansion mechanisms when processing diverse messages, resulting in low message configuration distribution efficiency, high maintenance costs, and difficult to adapt to the growing business needs.

Method used

By obtaining pre-configured matching rules and business plug-ins, matching and execution are performed according to message types and business needs, the automatic assembly and distribution of messages is realized, including message matching, business execution, assembly and distribution, improving the flexibility and efficiency of the system.

Benefits of technology

It improves the efficiency of message configuration distribution of business systems, reduces system maintenance costs, enhances the adaptability of different message types and formats, and simplifies the system expansion process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118585358B_ABST
    Figure CN118585358B_ABST
Patent Text Reader

Abstract

The present application relates to a message automatic assembly and distribution method, system, electronic device and storage medium, wherein the message automatic assembly and distribution method comprises: obtaining a pre-configured matching rule corresponding to the business demand according to the business demand of the initial message accessed; matching the initial message according to the matching rule to obtain the message type of the initial message; obtaining a preset business plug-in corresponding to the initial message according to the message type and the business demand of the initial message, and executing the business plug-in to obtain a message business execution result; a preset message query function is encapsulated in the business plug-in; assembling the message business execution result with the initial message to obtain a target message result; distributing the target message result to downstream users according to the distribution rule. Through the present application, the efficiency of business system message configuration and distribution is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of software technology, and in particular to a message automatic assembly and distribution method, system, electronic device and storage medium. Background Art

[0002] In the field of IoT services, the backend system plays a vital role in processing a large number of messages from different upstream channels and devices. These messages may include sensor data, user interaction information, device status updates, etc., which exist in different types and formats, such as JSON, XML, binary data, etc. The diversity of IoT devices leads to a wide range of differences in message types, each of which requires specific parsing and processing logic. Devices may use different communication protocols (such as MQTT, CoAP, HTTP, etc.), and the backend system must be able to adapt to these protocols to receive and respond to messages. In addition, for different message types and business needs, the backend system needs to develop customized business logic, which increases the complexity of development work. With the increase in the number of accessed message types, the backend system needs to be integrated with more external systems and services, further increasing the complexity of the system. With the continuous expansion of business logic, the system code becomes interlaced and redundant, difficult to maintain and update, resulting in a significant increase in maintenance costs. Existing systems often lack flexible expansion mechanisms. When new device types or message formats appear, it is necessary to develop corresponding standard entity classes according to the message type and format, and then develop business logic, making system expansion difficult. In addition, with the rapid development of IoT technology and the continuous expansion of application scenarios, it is increasingly difficult for existing systems to meet the growing business needs.

[0003] With regard to the problem of low efficiency in business system message configuration distribution in related technologies, no effective solution has been proposed yet. Summary of the invention

[0004] In this embodiment, a message automatic assembly distribution method, system, electronic device and storage medium are provided to solve the problem of low efficiency of business system message configuration distribution in related technologies.

[0005] In a first aspect, a message automatic assembly distribution method is provided in this embodiment, including:

[0006] According to the business requirements of the initial message received, obtain a pre-configured matching rule corresponding to the business requirements;

[0007] Match the initial message according to the matching rule to obtain the message type of the initial message;

[0008] According to the message type and the business requirements of the initial message, obtain the preset business plug-in corresponding to the initial message, and execute the business plug-in to obtain the message business execution result; the business plug-in encapsulates the preset message query function;

[0009] Assemble the message service execution result with the initial message to obtain the target message result;

[0010] According to the distribution rules, the target message results are distributed to downstream users.

[0011] In some of the embodiments, before obtaining a pre-configured matching rule corresponding to the service requirement according to the service requirement of the received initial message, the method further includes:

[0012] The data structure of the initial message is obtained, and it is determined whether the data structure conforms to a preset data format. If so, a pre-configured matching rule corresponding to the business requirement is obtained according to the business requirement of the received initial message.

[0013] In some of the embodiments, obtaining a preset service plug-in corresponding to the initial message according to the message type and the service requirement of the initial message includes:

[0014] If there is no service plug-in corresponding to the initial message type and the service requirement of the initial message in the preset service plug-in, a new service plug-in is added to the preset service plug-in according to the initial message type and the service requirement of the initial message.

[0015] In some embodiments, according to the business requirements of the received initial message, a pre-configured matching rule corresponding to the business requirements is obtained; the initial message is matched according to the matching rule to obtain the message type of the initial message, including:

[0016] The message matcher obtains the corresponding message type matching rule according to the business needs of the initial message, matches the initial message according to the matching rule, and obtains the message type of the initial message.

[0017] In some of the embodiments, according to the message type and the service requirements of the initial message, a preset service plug-in corresponding to the initial message is obtained, and the service plug-in is executed to obtain a message service execution result, including:

[0018] The service executor obtains the corresponding service plug-in according to the message type, executes the corresponding service plug-in, and obtains the message service execution result.

[0019] In some of the embodiments, the message service execution result is assembled with the initial message to obtain the target message result, including:

[0020] The message assembler obtains the corresponding assembly rules according to the business requirements of the initial message, and assembles the message business execution result and the initial message according to the assembly rules to obtain the target message result.

[0021] In some of the embodiments, the target message result is distributed to the downstream user according to the distribution rule, including:

[0022] The message distributor obtains message subscription information according to the message type, obtains the corresponding distribution rules according to the subscription information, and distributes the target message results to downstream users.

[0023] In a second aspect, a message automatic assembly distribution system is provided in this embodiment, which is applied to the message automatic assembly distribution method described in the first aspect, and includes: a message configuration management platform and a message automatic assembly processing platform; wherein,

[0024] The message configuration management platform is used to provide configuration rules for the message automatic assembly processing platform, so that the message automatic assembly processing platform can complete the configuration and distribution of the message after receiving the message;

[0025] The message automatic assembly processing platform includes a message matcher, a business executor, a message assembler and a message distributor.

[0026] In a third aspect, an electronic device is provided in this embodiment, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the message automatic assembly and distribution method described in the first aspect is implemented.

[0027] In a fourth aspect, a storage medium is provided in this embodiment, on which a computer program is stored, and when the program is executed by a processor, the message automatic assembly and distribution method described in the first aspect is implemented.

[0028] Compared with the related art, the message automatic assembly and distribution method provided in the present embodiment obtains a pre-configured matching rule corresponding to the business demand according to the business demand of the initial message received; matches the initial message according to the matching rule to obtain the message type of the initial message; obtains a preset business plug-in corresponding to the initial message according to the message type and the business demand of the initial message, and executes the business plug-in to obtain a message business execution result; the business plug-in encapsulates a preset message query function; assembles the message business execution result with the initial message to obtain a target message result; distributes the target message result to downstream users according to the distribution rule, thereby improving the business system message configuration and distribution efficiency.

[0029] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0031] Figure 1 This is a hardware structure block diagram of a terminal of the message automatic assembly and distribution method of this embodiment.

[0032] Figure 2 It is a flow chart of the message automatic assembly and distribution method of this embodiment.

[0033] Figure 3 This is a flowchart of another message automatic assembly and distribution method of this embodiment.

[0034] Figure 4 It is a schematic diagram of the structure of the message automatic assembly and distribution system of this embodiment. DETAILED DESCRIPTION

[0035] In order to more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments.

[0036] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the general meaning understood by people with general skills in the technical field to which this application belongs. The words "one", "a", "the", "these" and the like in this application do not indicate a quantitative limitation, and they may be singular or plural. The terms "include", "comprise", "have" and any variants thereof involved in this application are intended to cover non-exclusive inclusions; for example, a process, method and system, product or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, "A and / or B" may mean: A exists alone, A and B exist at the same time, and B exists alone. Generally, the character " / " indicates that the objects associated with each other are in an "or" relationship. The terms "first", "second", "third", etc. in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.

[0037] The method embodiment provided in this embodiment can be executed in a terminal, a computer or a similar computing device. For example, running on a terminal, Figure 1 FIG. 4 is a hardware structure diagram of a terminal of the message automatic assembly and distribution method of this embodiment. Figure 1 As shown, the terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 and a memory 104 for storing data, wherein the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA. The above terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0038] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the message automatic assembly distribution method in the present embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above method is realized. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0039] The transmission device 106 is used to receive or send data via a network. The above network includes a wireless network provided by a communication provider of the terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.

[0040] In this embodiment, a message automatic assembly distribution method is provided. Figure 2 is a flow chart of the message automatic assembly and distribution method of this embodiment. Figure 2 As shown, the process includes the following steps:

[0041] Step S201: According to the service requirements of the received initial message, a pre-configured matching rule corresponding to the service requirements is obtained.

[0042] Specifically, the system first receives an initial message from the user. The initial message can be text, voice, or other forms of input, used to indicate the business operations that need to be performed. The system parses the business requirements of the initial message. For example, if the user sends a message "I want to query the location and on-site images of the alarm", the system will identify the business requirement of "querying the alarm location and on-site images". According to the specific business needs, the matching rules in the pre-configured message type matching rule management module are accessed to obtain the matching rules corresponding to the business needs, where the matching process can be through keyword matching, semantic analysis or other matching algorithms, which are not specifically limited in this embodiment.

[0043] Step S202: Match the initial message according to the matching rule to obtain the message type of the initial message.

[0044] Specifically, the initial message is matched with multi-dimensional information such as field content according to the matching rules to determine the message type of the initial message. The specific message type can be determined according to the actual business scenario requirements, such as text message, picture message, video message, audio message, location message, link message, etc. Among them, messages of the same type have common business rules and processing logic.

[0045] Step S203, according to the message type and the service requirements of the initial message, obtain a preset service plug-in corresponding to the initial message, execute the service plug-in, and obtain a message service execution result; the service plug-in encapsulates a preset message query function.

[0046] Specifically, business plug-ins are functional units developed according to needs. For example, the message of IoT devices can query the device's user, device address, longitude and latitude, alarm pictures, other linked devices, etc., and encapsulate these functions into business plug-ins. According to different message types and the business needs of the initial message, you can independently select the corresponding business plug-in and execute the business plug-in in a certain order. The general execution order is configured when the message is connected to the system. For example, if the business requires that Class A messages be connected to the system, the plug-ins that need to be executed and their order can be configured as: user information plug-in → device address plug-in → longitude and latitude plug-in → alarm picture plug-in. In addition, if there is no related dependency between the plug-ins, such as the device address plug-in and the longitude and latitude plug-in, the two plug-ins can be set to a parallel model for execution, reusing the multi-threaded execution capability to improve execution efficiency. After executing the business plug-in, the message business execution result is obtained.

[0047] Step S204: assemble the message service execution result with the initial message to obtain a target message result.

[0048] Specifically, according to the data template of the user's subscription needs, the information required in the user's subscription needs is obtained from the message service execution results and the initial message, and assembled into a new target message result. In addition, for different types of messages, they can be assembled without message results by uniformly mapping them to the same module. For example: What needs to be obtained in the data template of the user's subscription needs is the location and on-site picture of the alarm, then the device address and the picture address information of the alarm are obtained from the executed device address plug-in and the alarm picture plug-in to form the target message result. Another example: What is needed in the data model of the user's subscription needs is the latitude and longitude of the device, then the latitude and longitude information is obtained from the executed latitude and longitude plug-in to form the target message result.

[0049] Step S205: Distribute the target message result to downstream users according to the distribution rules.

[0050] Specifically, based on the user's subscription form, distribution can be based on message type, or message subscription can be based on mapping rules, and the target message results are distributed to downstream users according to the subscription.

[0051] Through the above steps S201 to S205, according to the business requirements of the initial message accessed, the pre-configured matching rules corresponding to the business requirements are obtained; the initial message is matched according to the matching rules to obtain the message type of the initial message; according to the message type and the business requirements of the initial message, the preset business plug-in corresponding to the initial message is obtained, and the business plug-in is executed to obtain the message business execution result; the business plug-in is encapsulated with a preset message query function; the message business execution result is assembled with the initial message to obtain the target message result; according to the distribution rule, the target message result is distributed to the downstream user. Compared with the prior art that requires the back-end system to develop customized business logic for different message types and business requirements, the present application configures and processes the initial message through preset configuration rules and business plug-ins, assembles the processed business execution result and the initial message according to the data template of the user's subscription requirements, obtains the target message result, and then sends the target message result to the downstream user according to the set distribution rules, thereby realizing the automatic assembly of messages and improving the efficiency of business system message configuration and distribution.

[0052] In some of the embodiments, before obtaining a pre-configured matching rule corresponding to the service requirement according to the service requirement of the received initial message, the method further includes:

[0053] The data structure of the initial message is obtained, and it is determined whether the data structure conforms to a preset data format. If so, a pre-configured matching rule corresponding to the business requirement is obtained according to the business requirement of the received initial message.

[0054] Specifically, the system itself has a pre-set data format. In order to smoothly execute the message assembly and distribution process, the data structure of the acquired initial message is first verified. This embodiment mainly provides the corresponding JSON format data structure and its description. This embodiment does not specifically limit the data format. When the data structure of the initial message conforms to the data format preset by the system, the corresponding matching rules are obtained for the business requirements of the accessed initial message. Through the verification of the data structure, the data processing format is unified.

[0055] In another embodiment, obtaining a preset service plug-in corresponding to the initial message according to the message type and the service requirement of the initial message includes:

[0056] If there is no service plug-in corresponding to the initial message type and the service requirement of the initial message in the preset service plug-in, a new service plug-in is added to the preset service plug-in according to the initial message type and the service requirement of the initial message.

[0057] Specifically, when obtaining the corresponding business plug-in according to the message type and the business requirements of the initial message, if there is no corresponding business plug-in in the message business plug-in configuration management module, the required business plug-in can be developed and uploaded according to the plug-in development specification, wherein the developed business plug-in is a code package. In order to ensure information security and the uniqueness of the business plug-in name, the uploaded business plug-in is reviewed. After the review is passed, the business plug-in is loaded into the message business plug-in configuration management module based on the SPI (Service Provider Interface) service discovery mechanism, so that the initial message matches the corresponding business plug-in. Loading business plug-ins through the SPI service discovery mechanism can ensure the stability of the system and the timeliness of business plug-in updates.

[0058] In some embodiments, according to the business requirements of the received initial message, a pre-configured matching rule corresponding to the business requirements is obtained; the initial message is matched according to the matching rule to obtain the message type of the initial message, including:

[0059] The message matcher obtains the corresponding message type matching rule according to the business needs of the initial message, matches the initial message according to the matching rule, and obtains the message type of the initial message; wherein the message matcher stores the preset matching rule.

[0060] Specifically, in this embodiment, a message matcher and a message type matching rule management module are provided, and the message type matching rule management module stores pre-set matching rules. The message matcher obtains the corresponding message type matching rule from the message type matching rule management module according to the business requirements of the initial message, and then matches the initial message according to the message type matching rule to obtain the message type of the initial message. The specific code is as follows:

[0061] {

[0062] "alertId": 13223334,

[0063] "sceneId": "200031",

[0064] "deviceType": 3,

[0065] "createTime": "2024-07-15 15:24:21:939",

[0066] "deviceCode": "3HWCP263820000D",

[0067] "ext":{

[0068] "count":2

[0069] }

[0070] }

[0071] When the field sceneId=200031 and deviceType=3, it is mapped to the same type of message. When the field sceneId=200031 and deviceType>5, it is mapped to another type of message. Field values ​​can be nested, and conditions can be empty, non-empty, greater than, less than, etc., for example, ext.count != null.

[0072] For example, a camera has a crowd counting function. The user needs to distribute the crowd number message monitored from 9:00 to 22:00 to the backend for statistics, identify the crowd counted from 22:00 to the store closing time of 9:00 the next day as the suspected theft crowd, and notify the customer, and send the camera picture at that time to the user. The specific code is as follows:

[0073] {

[0074] "alertId": 13223334,

[0075] "sceneId": "200031",

[0076] "createTime": "2024-07-15 15:24:21:939",

[0077] "deviceCode": "3HWCP263820000D",

[0078] "linkedId":"JUERIUI847892473"

[0079] "peopleCount": 5

[0080] }

[0081] Configure the mapping rule sceneId=200031 and createTime>9 o'clock and createTime<22 o'clock to map it to the passenger flow statistics message type, and the rule sceneId=200031 and createTime<9 o'clock or createTime>22 o'clock and peopleCount>0 to map it to the theft alarm message type.

[0082] In another embodiment, according to the message type and the service requirements of the initial message, a preset service plug-in corresponding to the initial message is obtained, and the service plug-in is executed to obtain a message service execution result, including:

[0083] The service executor obtains the corresponding service plug-in according to the message type, executes the corresponding service plug-in, and obtains the message service execution result.

[0084] In this embodiment, a service executor and a message service plug-in configuration management module are provided. The service executor obtains the corresponding service plug-in from the message service plug-in configuration management module according to the message type, sorts according to the configuration, executes the service plug-in, and obtains the message service execution result. Among them, if there is no mutual dependence between the plug-ins, the plug-in can be set to parallel execution mode, and multi-threaded processing is adopted to improve the execution efficiency. Based on the above-mentioned camera crowd counting case, for passenger flow statistics messages: select the device address plug-in, the store plug-in to which the device belongs, and the store information plug-in in the message service plug-in configuration management module, and set their execution order on the page. For theft alarm messages: select the configuration device address plug-in, the store plug-in to which it belongs, the alarm picture plug-in, and the linkage camera picture plug-in in the message service plug-in configuration management module, and set the order. Among them, the message mapping configuration and the plug-ins that need to be executed by the message and their order will be stored in the database after configuration. When the message needs to be executed, the corresponding configuration information can be directly pulled from the database to execute the corresponding service plug-in. The service plug-in corresponds to a section of function code under the project. During coding development, only one unique name is defined for each plug-in. Therefore, when configuring a plug-in on the interface, you only need to select the corresponding plug-in name. When executing, you can obtain the name of the plug-in and execute the corresponding function code.

[0085] In one embodiment, the message service execution result is assembled with the initial message to obtain a target message result, including:

[0086] The message assembler obtains the corresponding assembly rules according to the business requirements of the initial message, and assembles the message business execution result and the initial message according to the assembly rules to obtain the target message result.

[0087] Specifically, in this embodiment, a message assembler and a standardized message assembly rule management module are provided. The message assembler obtains the corresponding assembly rules from the standardized message assembly rule management module according to the business requirements of the initial message. Different target message results can be obtained according to different assembly rules to meet different business requirements. Among them, the assembly rule can be a data template of the user's subscription requirements, or a customized assembly rule. In this embodiment, the data template of the user's subscription requirements is used as an example for explanation, and this embodiment does not make specific limitations on this. The message assembler extracts the required messages from the message service execution results and the initial message according to the assembly rules, and assembles them to obtain the target message results. For example, the message service execution results obtained after the above-mentioned passenger flow statistics message execution plug-in are: device address: store lobby camera, store address: No. 123 Dongping Road, store information: store manager Zhang San, store manager phone number: 13900009999.

[0088] The message body that user A wants to obtain by subscription is as follows:

[0089] {

[0090] "createTime": "2024-07-15 15:24:21:939",

[0091] "deviceCode": "3HWCP263820000D",

[0092] "peopleCount": 5,

[0093] "deviceLocation":"Store lobby camera",

[0094] "shopowner":"Shop Manager Zhang San",

[0095] "phone":"13900009999",

[0096] "shopAddress":"No. 123 Dongping Road"

[0097] }

[0098] The message body that user B wants to obtain by subscription is as follows:

[0099] {

[0100] "createTime": "2024-07-15 15:24:21:939",

[0101] "deviceCode": "3HWCP263820000D",

[0102] "peopleCount": 5,

[0103] "shopInfo":{

[0104] "deviceLocation":"Store lobby camera",

[0105] "shopowner":"Shop Manager Zhang San",

[0106] "phone":"13900009999",

[0107] "shopAddress":"No. 123 Dongping Road"

[0108] }

[0109] }

[0110] Among them, user A directly lists all the information according to the data template of subscription requirements and obtains it, while user B encapsulates the store-related information in a JSON object named "shopInfo" according to the data template of subscription requirements and obtains it, which provides user B with a clearer information hierarchy when processing data. Or, if the original system of user B needs to receive messages and process business according to this data structure, the message business execution results can be directly mapped to this data structure through the message assembler, so that user B does not need to modify and adapt the original system, further improving the flexibility of message configuration and distribution.

[0111] The message assembler executes the information obtained by the business plug-in based on the original message body, assembles it according to the user's data template structure, and finally obtains a message body that fully conforms to the format of the demander. In addition, different types of messages can also be assembled by uniformly mapping them to the same template. The demander does not need to care about the differences between different message bodies and can focus on its own business entity for development.

[0112] In another embodiment, the target message result is distributed to the downstream user according to the distribution rule, including:

[0113] The message distributor obtains message subscription information according to the message type, obtains the corresponding distribution rules according to the subscription information, and distributes the target message results to downstream users.

[0114] Specifically, in this embodiment, a message distributor and a standardized message distribution subscription management module are provided. The message distributor distributes the target message results to downstream users based on the user's subscription form and according to specific subscription requirements. Among them, the user's subscription form can be subscribed according to the message type, or it can be subscribed according to the mapping rule. The standardized distribution subscription management module stores various user subscription forms and customized distribution rules. The distribution rules define how to send messages to subscribed users, including the sending time, sending method, and sending frequency. The sending method can be immediate or timed, and specific rules can be set according to actual conditions.

[0115] This embodiment also provides a message automatic assembly and distribution method. Figure 3 is a flowchart of another message automatic assembly and distribution method of this embodiment. Figure 3 As shown, the process includes the following steps:

[0116] Step S301, obtaining a data structure of an initial message, and obtaining a pre-configured matching rule corresponding to the business requirement according to the business requirement of the received initial message when the data structure conforms to a preset data format;

[0117] Step S302, matching the initial message according to the matching rule by a message matcher to obtain the message type of the initial message;

[0118] Step S303, judging whether there is a corresponding service plug-in in the preset service plug-in according to the message type and the service requirement of the initial message, if yes, executing step S304, otherwise executing step S307;

[0119] Step S304, obtaining the corresponding service plug-in according to the message type through the service executor, executing the corresponding service plug-in, and obtaining the message service execution result;

[0120] Step S305, assembling the message service execution result and the initial message according to the assembly rule by the message assembler to obtain the target message result;

[0121] Step S306, through the message distributor, the corresponding distribution rules are obtained according to the subscription information, and the target message result is distributed to the downstream user;

[0122] Step S307, adding a new service plug-in to the preset service plug-in according to the initial message type and the service requirement of the initial message, and returning to step S304.

[0123] Through the above steps S301 to S307, the present application configures and processes the initial message through preset configuration rules and business plug-ins, assembles the processed business execution results and the initial message according to the data template of the user's subscription requirements, obtains the target message result, and then sends the target message result to downstream users according to the set distribution rules, thereby realizing automatic assembly of messages and improving the efficiency of business system message configuration and distribution.

[0124] In this embodiment, a message automatic assembly and distribution system is also provided, which is applied to the message automatic assembly and distribution method described in any of the above embodiments. Figure 4 4 is a schematic diagram of the structure of the message automatic assembly distribution system of this embodiment. The system 40 includes: a message configuration management platform 41 and a message automatic assembly processing platform 42; wherein,

[0125] The message configuration management platform 41 is used to provide configuration rules for the message automatic assembly processing platform 42, so that the message automatic assembly processing platform 42 completes the configuration and distribution of the message after receiving the message;

[0126] The message configuration management platform 41 includes: a message type matching rule management module 411, a message service plug-in configuration management module 412, a standardized message assembly rule management module 413 and a standardized message distribution and subscription management module 414; wherein,

[0127] A message type matching rule management module 411, used to store message type matching rules;

[0128] A message service plug-in configuration management module 412, used to store service plug-ins and newly added service plug-ins;

[0129] A standardized message assembly rule management module 413, used for storing assembly rules;

[0130] Standardized message distribution subscription management module 414, used to store message subscription information and custom distribution rules;

[0131] The message automatic assembly processing platform 42 includes a message matcher 421, a service executor 422, a message assembler 423 and a message distributor 424;

[0132] The message matcher 421 is used to obtain the corresponding message type matching rule from the message type matching rule management module 411 according to the service of the initial message, match the initial message according to the matching rule, and obtain the message type of the initial message;

[0133] The service executor 422 is used to obtain the corresponding service plug-in from the message service plug-in configuration management module 412 according to the message type, execute the corresponding service plug-in, and obtain the message service execution result;

[0134] The message assembler 423 is used to obtain the corresponding assembly rule from the standardized message assembly rule management module 413 according to the business requirements of the initial message, and assemble the message business execution result and the initial message according to the assembly rule to obtain the target message result;

[0135] The message distributor 424 is used to obtain message subscription information from the standardized message distribution subscription management module 414 according to the message type, obtain the corresponding distribution rule according to the subscription information, and distribute the target message result to the downstream user.

[0136] It should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.

[0137] In this embodiment, an electronic device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0138] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0139] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0140] S1, according to the business requirements of the initial message received, obtain a pre-configured matching rule corresponding to the business requirements;

[0141] S2, matching the initial message according to the matching rule to obtain the message type of the initial message;

[0142] S3, according to the message type and the business requirements of the initial message, obtain the preset business plug-in corresponding to the initial message, and execute the business plug-in to obtain the message business execution result; the business plug-in encapsulates the preset message query function;

[0143] S4, assembling the message service execution result and the initial message to obtain the target message result;

[0144] S5: Distribute the target message result to downstream users according to the distribution rules.

[0145] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and will not be repeated in this embodiment.

[0146] In addition, in combination with the message automatic assembly distribution method provided in the above embodiments, a storage medium can also be provided in this embodiment to implement the message automatic assembly distribution method. The storage medium stores a computer program; when the computer program is executed by a processor, any one of the message automatic assembly distribution methods in the above embodiments is implemented.

[0147] It should be understood that the specific embodiments described herein are only used to explain the application, rather than to limit it. Based on the embodiments provided in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the protection scope of this application.

[0148] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0149] Obviously, the drawings are only some examples or embodiments of the present application. For ordinary technicians in the field, the present application can also be applied to other similar situations based on these drawings without creative work. In addition, it is understandable that although the work done in this development process may be complicated and lengthy, for ordinary technicians in the field, certain changes in design, manufacturing or production based on the technical content disclosed in this application are only conventional technical means and should not be regarded as insufficient content disclosed in this application.

[0150] The term "embodiment" in this application refers to a specific feature, structure or characteristic described in conjunction with the embodiment that can be included in at least one embodiment of the present application. The appearance of this phrase in various locations in the specification does not necessarily mean the same embodiment, nor does it mean that it is mutually exclusive with other embodiments and is independent or optional. It is clearly or implicitly understood by those of ordinary skill in the art that the embodiments described in this application can be combined with other embodiments without conflict.

[0151] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0152] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of patent protection. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the attached claims.

Claims

1. A message automatic assembly and distribution method, characterized in that: include: According to the business requirements of the initial message received, obtaining a matching rule in a pre-configured message type matching rule management module and corresponding to the business requirements; wherein the initial message is used to indicate a business operation to be performed; Matching the initial message according to the matching rule to obtain a message type of the initial message; According to different message types and business requirements of the initial message, obtain the preset business plug-in corresponding to the initial message, and execute the business plug-in in a certain order to obtain the message business execution result; the business plug-in encapsulates a preset message query function; Assembling the message service execution result with the initial message to obtain a target message result. Specifically, according to a data template of the user's subscription requirement, obtaining information required by the user's subscription requirement from the message service execution result and the initial message, and assembling them into a new target message result; Distributing the target message result to downstream users according to the distribution rules; The acquiring of a preset service plug-in corresponding to the initial message according to different message types and service requirements of the initial message includes: When obtaining the corresponding business plug-in according to the different message types and the business requirements of the initial message, if the corresponding business plug-in does not exist in the message business plug-in configuration management module, develop and upload the corresponding business plug-in, and review the corresponding business plug-in. After the review is passed, load the corresponding business plug-in into the message business plug-in configuration management module based on the SPI service discovery mechanism.

2. The message automatic assembly and distribution method according to claim 1, characterized in that: Before obtaining, according to the service requirement of the initial message received, a matching rule in a pre-configured message type matching rule management module and corresponding to the service requirement, the method further includes: The data structure of the initial message is obtained, and it is determined whether the data structure conforms to a preset data format. If so, according to the business requirements of the received initial message, a matching rule corresponding to the business requirements in a pre-configured message type matching rule management module is obtained.

3. The message automatic assembly and distribution method according to claim 1, characterized in that: The acquiring, according to the service requirement of the initial message received, a matching rule in a pre-configured message type matching rule management module and corresponding to the service requirement; matching the initial message according to the matching rule to obtain the message type of the initial message includes: The message matcher obtains the corresponding message type matching rule in the pre-configured message type matching rule management module according to the business requirements of the initial message, matches the initial message according to the matching rule, and obtains the message type of the initial message.

4. The message automatic assembly and distribution method according to claim 3, characterized in that: The acquiring, according to different message types and service requirements of the initial message, preset service plug-ins corresponding to the initial message, and executing the service plug-ins in a certain order to obtain message service execution results includes: The service executor obtains corresponding different service plug-ins according to different message types, and executes the corresponding different service plug-ins in a certain order to obtain a message service execution result.

5. The message automatic assembly and distribution method according to claim 4, characterized in that: The step of assembling the message service execution result with the initial message to obtain a target message result includes: The message assembler obtains the corresponding assembly rules according to the business requirements of the initial message, and assembles the message business execution result and the initial message according to the assembly rules to obtain the target message result.

6. The message automatic assembly and distribution method according to claim 5, characterized in that: The step of distributing the target message result to downstream users according to the distribution rule includes: The message distributor obtains message subscription information according to the message type, obtains corresponding distribution rules according to the subscription information, and distributes the target message result to downstream users.

7. A message automatic assembly and distribution system, applied to the message automatic assembly and distribution method described in any one of claims 1 to 6, characterized in that: include: Message configuration management platform and message automatic assembly processing platform; among them, The message configuration management platform is used to provide configuration rules for the message automatic assembly processing platform, so that the message automatic assembly processing platform completes the configuration and distribution of the message after receiving the message; The message automatic assembly processing platform includes a message matcher, a service executor, a message assembler and a message distributor.

8. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to execute the message automatic assembly and distribution method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the message automatic assembly and distribution method according to any one of claims 1 to 6 is implemented.