Message transmission method and device and electronic equipment

By building and mounting the message module in the micro front-end architecture, the merger and deduplication of message data is realized, the problem of redundant storage of message data is solved, and data transmission efficiency and resource utilization are improved.

CN118939444APending Publication Date: 2024-11-12DATANG MOBILE COMM EQUIP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310529602.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-11
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

In application software based on micro front-end architecture, message data is likely to cause redundant storage during transmission, resulting in resource waste and processing complexity.

Method used

By building a message module in the main application and mounting it on the root node of the sub-application, the merge and deduplication of message data are realized, and only one piece of data is stored in the message module. Other applications listen and obtain the updated message data , avoid duplicate processing and storage.

Benefits of technology

It effectively avoids redundant storage of message data, simplifies data processing logic, saves resource configuration and processing time, and shortens the response time of message transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118939444A_ABST
    Figure CN118939444A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a message transmission method and device and electronic equipment, which are applied to the electronic equipment configured with a micro-front-end architecture, the micro-front-end architecture is composed of a plurality of applications, the applications comprise a main application and sub-applications, the main application is configured with a message module, and the sub-applications are configured with sub-applications. A plurality of sub-applications are registered in a main application, a message module is mounted on root nodes of the sub-applications, message data and a processing function used for processing the message data are defined in the message module, and the method comprises the steps that a first application in the applications calls the processing function to process and update the message data; and a second application except the first application in the applications monitors the message module, and obtains the updated message data after monitoring that the message data in the message module is updated. By applying the scheme provided by the embodiment of the invention, the problem of message data redundancy in the message transmission process can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of software technology, and in particular to a message transmission method, device and electronic equipment. Background Art

[0002] In the application software created based on the micro-frontend architecture, different sub-applications are included, and different sub-applications can be used to implement different business functions. Different sub-applications are configured with their own message modules, and each message module is exposed to the main application. The main application is configured with a message bus, and the message modules of all sub-applications are stored as a list. When message data needs to be transmitted between applications, the message data can be transmitted to all or part of the applications that need to receive the message based on the message bus of the main application. The transmission of message data between applications includes the transmission of message data from the main application to the sub-application, the transmission of message data from the sub-application to the main application, and the transmission of message data between sub-applications.

[0003] However, in this process, the same transmitted message data will be repeatedly stored in the message modules of multiple different applications that receive the message data, resulting in the problem of message data redundancy. Summary of the invention

[0004] The purpose of the embodiments of the present invention is to provide a message transmission method, device and electronic device to solve the problem of message data redundancy during message transmission. The specific technical solution is as follows:

[0005] In a first aspect, an embodiment of the present invention provides a message transmission method, which is applied to an electronic device configured with a micro-front-end architecture, wherein the micro-front-end architecture is composed of multiple applications, wherein the applications include a main application and a sub-application, wherein a message module is configured in the main application, wherein the main application is registered with multiple sub-applications and the message module is mounted on a root node of the sub-application, wherein message data and a processing function for processing the message data are defined in the message module, wherein the method includes:

[0006] The first application in the application calls the processing function to process and update the message data;

[0007] A second application other than the first application in the application monitors the message module, and after monitoring that the message data in the message module is updated, obtains the updated message data.

[0008] In one embodiment of the present invention, the main application constructs the message module in the following manner:

[0009] Respectively acquiring message data information of the sub-message modules of the plurality of sub-applications, wherein the message data information includes: sub-message data defined in the sub-message module and a sub-processing function for processing the sub-message data;

[0010] Merging and deduplicating the message data information;

[0011] A message module is constructed based on the merged and deduplicated message data information, wherein the message data defined in the message module is the merged and deduplicated sub-message data, and the processing function defined in the message module for processing the message data is the merged and deduplicated sub-processing function.

[0012] In one embodiment of the present invention, the application is pre-set with message data that the application is interested in, and a second application other than the first application in the application monitors the message module, and after monitoring the message data in the message module being updated, obtains the updated message data, including:

[0013] The second application other than the first application in the application monitors the message module, and after monitoring the update of the preset message data that the second application is concerned about, obtains the updated message data.

[0014] In one embodiment of the present invention, the message module is further configured with a message data information loading function for loading the message data information of the sub-application, the message data information of the sub-application includes: the sub-message data defined in the sub-message module of the sub-application and the sub-processing function for processing the sub-message data, and the method further includes:

[0015] When there is a need to start a sub-application, calling the message data information loading function to load the message data information of the sub-application;

[0016] and / or

[0017] The message module is also configured with a message data information replacement function for replacing the message data information of the sub-application, and the method further includes:

[0018] When there is a need to update the message data information of the sub-application, calling the message data information replacement module to replace the original message data information of the sub-application in the message module with the updated message data information;

[0019] and / or

[0020] The message module is also configured with a message data information uninstallation function for uninstalling the message data information of the sub-application, and the method further includes:

[0021] When there is a need to uninstall a sub-application, calling the message data information uninstallation function to uninstall the message data information of the sub-application in the message module;

[0022] and / or

[0023] The message module is also configured with a message persistence function for storing the message data, and the method further includes:

[0024] The message persistence function is called to store the message data in the message module.

[0025] In a second aspect, an embodiment of the present invention provides an electronic device, including a memory, a transceiver, and a processor:

[0026] A memory for storing a computer program; a transceiver for sending and receiving data under the control of the processor; a processor for configuring a micro-frontend architecture, wherein the micro-frontend architecture is composed of multiple applications, wherein the applications include a main application and a sub-application, wherein a message module is configured in the main application, wherein the main application is registered with multiple sub-applications and the message module is mounted on a root node of the sub-application, wherein message data and a processing function for processing the message data are defined in the message module, and the processor is further configured to read the computer program in the memory and perform the following operations:

[0027] Control the first application in the application to call the processing function to process and update the message data;

[0028] A second application other than the first application in the application is controlled to monitor the message module, and after monitoring that the message data in the message module is updated, the updated message data is obtained.

[0029] In one embodiment of the present invention, the processor is further configured to control the main application to construct a message module in the following manner:

[0030] Respectively acquiring message data information of the sub-message modules of the plurality of sub-applications, wherein the message data information includes: sub-message data defined in the sub-message module and a sub-processing function for processing the sub-message data;

[0031] Merging and deduplicating the message data information;

[0032] A message module is constructed based on the merged and deduplicated message data information, wherein the message data defined in the message module is the merged and deduplicated sub-message data, and the processing function defined in the message module for processing the message data is the merged and deduplicated sub-processing function.

[0033] In one embodiment of the present invention, the controlling application is pre-set with message data that the application is concerned about, a second application in the application other than the first application monitors the message module, and after monitoring the message data in the message module is updated, obtains the updated message data, specifically including:

[0034] The second application other than the first application in the application is controlled to monitor the message module, and after monitoring the update of the preset message data that the second application is concerned about, the updated message data is obtained.

[0035] In one embodiment of the present invention, the message module is further configured with a message data information loading function for loading the message data information of the sub-application, the message data information of the sub-application includes: the sub-message data defined in the sub-message module of the sub-application and the sub-processing function for processing the sub-message data, and the processor is further used to:

[0036] When there is a need to start a sub-application, calling the message data information loading function to load the message data information of the sub-application;

[0037] and / or

[0038] The message module is also configured with a message data information replacement function for replacing the message data of the sub-application, and the processor is further configured to:

[0039] When there is a need to update the message data information of the sub-application, calling the message data information replacement module to replace the original message data information of the sub-application in the message module with the updated message data information;

[0040] and / or

[0041] The message module is also configured with a message data information uninstallation function for uninstalling the message data information of the sub-application, and the processor is also used to:

[0042] When there is a need to uninstall a sub-application, calling the message data information uninstallation function to uninstall the message data information of the sub-application in the message module;

[0043] and / or

[0044] The message module is also configured with a message persistence function for storing the message data, and the processor is also used to:

[0045] The message persistence function is called to store the message data in the message module.

[0046] In a third aspect, an embodiment of the present invention provides a message transmission device, which is applied to an electronic device configured with a micro-front-end architecture, wherein the micro-front-end architecture is composed of multiple applications, wherein the applications include a main application and a sub-application, wherein a message module is configured in the main application, wherein the main application is registered with multiple sub-applications and the message module is mounted on a root node of the sub-application, wherein message data and a processing function for processing the message data are defined in the message module, wherein the device includes:

[0047] A data updating unit, used for controlling the first application in the application to call the processing function to process and update the message data;

[0048] The data monitoring unit is used to control a second application in the application except the first application to monitor the message module, and after monitoring that the message data in the message module is updated, obtain the updated message data.

[0049] In one embodiment of the present invention, the main application constructs the message module through the following module construction unit, and the module construction unit is used to:

[0050] Respectively acquiring message data information of the sub-message modules of the plurality of sub-applications, wherein the message data information includes: sub-message data defined in the sub-message module and a sub-processing function for processing the sub-message data;

[0051] Merging and deduplicating the message data information;

[0052] A message module is constructed based on the merged and deduplicated message data information, wherein the message data defined in the message module is the merged and deduplicated sub-message data, and the processing function defined in the message module for processing the message data is the merged and deduplicated sub-processing function.

[0053] In one embodiment of the present invention, the application is pre-set with message data that the application is interested in, and the data monitoring unit is specifically used to:

[0054] The second application other than the first application in the application is controlled to monitor the message module, and after monitoring the update of the preset message data that the second application is concerned about, the updated message data is obtained.

[0055] In one embodiment of the present invention, the message module is further configured with a message data information loading function for loading the message data information of the sub-application, the message data information of the sub-application includes: the sub-message data defined in the sub-message module of the sub-application and the sub-processing function for processing the sub-message data, and the device further includes:

[0056] A sub-application loading unit, configured to call the message data information loading function to load the message data information of the sub-application when there is a need to start the sub-application;

[0057] and / or

[0058] The message module is also configured with a message data information replacement function for replacing the message data information of the sub-application, and the device further includes:

[0059] A sub-application replacement unit, configured to, when there is a need to update the message data information of a sub-application, call the message data information replacement module to replace the original message data information of the sub-application in the message module with the updated message data information;

[0060] and / or

[0061] The message module is also configured with a message data information uninstallation function for uninstalling the message data information of the sub-application, and the device further includes:

[0062] A sub-application uninstallation unit, configured to call the message data information uninstallation function to uninstall the message data information of the sub-application in the message module when there is a need to uninstall the sub-application;

[0063] and / or

[0064] The message module is also configured with a message persistence function for storing the message data, and the device further comprises:

[0065] The data storage unit is used to call the message persistence function to store the message data in the message module.

[0066] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, any method step described in the first aspect is implemented.

[0067] In a fifth aspect, an embodiment of the present invention further provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute any of the methods described in the first aspect.

[0068] Beneficial effects of the embodiments of the present invention:

[0069] The embodiment of the present invention provides a message transmission method, which is applied to an electronic device configured with a micro-frontend architecture, wherein the micro-frontend architecture is composed of multiple applications, the above-mentioned applications include a main application and a sub-application, a message module is configured in the main application, the main application is registered with multiple sub-applications and the message module is mounted on the root node of the sub-application. Message data and a processing function for processing message data are defined in the message module. The first application in the micro-frontend architecture can call the processing function to update the message data in the message module. Since the message module is constructed by the main application and mounted on the root node of the sub-application, other applications, including the main application and the sub-application, can monitor the update of the message data in the message module, and can obtain the updated message data after determining that the message data has been updated, thereby realizing message data transmission between applications. It includes the main application transmitting message data to the sub-application, the sub-application transmitting message data between sub-applications, and the sub-application transmitting message data to the main application.

[0070] As can be seen from the above, in the embodiment of the present invention, the first application calls the processing function once to complete the processing and updating of the message data, and other applications can directly obtain the updated message data, so as to realize the transmission of the message data between applications. In this process, the message data is stored in the message module only in one copy, so the repeated storage of the message data can be avoided, and the problem of message data redundancy can be solved. In addition, only configuring one message module in the main application can save the resources required for configuring the message module. Furthermore, in the related art, it is often that an application first transmits the original data to other applications, and the applications receiving the original data respectively call the processing function to process and update the original data respectively, so as to obtain the updated message data. That is, each application needs to perform the same processing on the original data many times, and the same processing many times will cause a lot of resource consumption, but in the embodiment of the present invention, only the first application calls the processing function once, and the updated message data can be transmitted to other applications, and other applications do not need to call the processing function again for data processing, so the processing logic of the message data in the embodiment of the present invention is relatively simple, which can save the resources used for data processing and shorten the response time of message transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention, and a person skilled in the art can also obtain other drawings based on these drawings.

[0072] Figure 1 A schematic diagram of a flow chart of a first message transmission method provided in an embodiment of the present invention;

[0073] Figure 2 A flow chart of a message module construction method provided in an embodiment of the present invention;

[0074] Figure 3 A schematic diagram of a flow chart of a second message transmission method provided by an embodiment of the present invention;

[0075] Figure 4 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention;

[0076] Figure 5 A schematic diagram of the structure of a message transmission device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0077] In the embodiments of the present invention, the term "and / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent three situations: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.

[0078] In the embodiments of the present invention, the term "plurality" refers to two or more than two, and other quantifiers are similar.

[0079] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention belong to the scope of protection of the present invention.

[0080] In the related art, there is a problem of message data redundancy when transmitting message data between applications. To solve the above problem, an embodiment of the present invention provides a message transmission method, device and electronic device.

[0081] See also Figure 1 , which is a flow chart of the first message transmission method provided in an embodiment of the present invention, and is applied to an electronic device configured with a micro-front-end architecture, wherein the micro-front-end architecture is composed of multiple applications, wherein the applications include a main application and sub-applications, wherein a message module is configured in the main application, wherein the main application is registered with multiple sub-applications and the message module is mounted on the root node of the sub-application, wherein message data and a processing function for processing the message data are defined in the message module.

[0082] Among them, different applications in the above micro-frontend architecture can be used to implement different businesses.

[0083] For example, the system containing multiple applications built by the above-mentioned micro-front-end architecture (single-spa) is OMC (Operation and Maintenance Center, network management system). The various applications in the network management system are used to implement services for configuring network equipment, monitoring the performance of network equipment, issuing alarms for operating failures of network equipment, planning network topology, etc.

[0084] The system containing multiple applications built by the above-mentioned micro-frontend architecture is an information retrieval system. The various applications in the information retrieval system are used to implement the business of searching web pages, searching images, searching videos, implementing user authentication, etc.

[0085] In addition, a message module is constructed in the above main application, and one or more message data and one or more processing functions for processing the message data are defined in the message module. Each message data defined in the message module can be the message data concerned by some or all sub-applications. The way to construct the message module in the main application can be seen below Figure 2 The illustrated embodiment will not be described in detail here.

[0086] The above processing functions can be used to perform different processing on message data, such as content modification, calculation, deduplication, format conversion, data cleaning, etc. The functions and number of specific processing functions can be set based on demand, and this embodiment does not limit this.

[0087] The message module defines the name of the message data, the initialization content of the message data, etc., which are used to define the message data. The name and initialization content of the message data can be defined in the initialState variable. In addition, the message module also defines the name and processing function of the processing function, wherein the function used to modify the content of the message data can be defined in the typesCommands variable.

[0088] The above method includes the following steps S101-S102.

[0089] S101: The first application among the above applications calls the above processing function to process and update the above message data.

[0090] Among them, the above-mentioned first application can be a main application or a sub-application. Since the above-mentioned message module is created by the main application, the above-mentioned main application can call the processing function in the above-mentioned message module to process the message data and update the content of the message data. In addition, the above-mentioned first application can also be a sub-application. Since the above-mentioned main application has registered multiple sub-applications and the message module is mounted on the root node of the sub-application, the sub-application can call the processing function in the above-mentioned message module to process the message data and update the content of the message data.

[0091] In addition, when multiple processing functions are defined in the message module, the first application can select a processing function according to demand, and call the selected processing function to update the message data.

[0092] S102: A second application other than the first application in the application monitors the message module, and after monitoring that the message data in the message module is updated, obtains the updated message data.

[0093] The second application can be a main application. Since the message module is created by the main application, the main application can monitor the update of the message data in the message module. The first application can also be a sub-application. Since the message module is mounted on the root node of the sub-application, the sub-application can monitor the update of the message data in the message module.

[0094] That is, when the first application is the main application and the second application is the sub-application, after the main application updates the message data, the sub-application can monitor the update of the message data and realize the message transmission from the main application to the sub-application.

[0095] In the case where the first application is a sub-application and the second application is a sub-application, after the sub-application of the first application updates message data, the sub-application of the second application can monitor the update of the message data and realize message transmission from sub-application to sub-application.

[0096] In the case where the first application is a sub-application and the second application is a main application, after the sub-application updates the message data, the main application can monitor the update of the message data and realize the message transmission from the sub-application to the main application.

[0097] It should be noted that the above-mentioned second application can be multiple applications in the application in the micro-frontend architecture, realizing message transmission from the first application to multiple second applications.

[0098] As can be seen from the above, in the embodiment of the present invention, the first application calls the processing function once to complete the processing and updating of the message data, and other applications can directly obtain the updated message data, so as to realize the transmission of the message data between applications. In this process, the message data is stored in the message module only in one copy, so the repeated storage of the message data can be avoided, and the problem of message data redundancy can be solved. In addition, only configuring one message module in the main application can save the resources required for configuring the message module. Furthermore, in the related art, it is often that an application first transmits the original data to other applications, and the applications receiving the original data respectively call the processing function to process and update the original data respectively, so as to obtain the updated message data. That is, each application needs to perform the same processing on the original data many times, and the same processing many times will cause a lot of resource consumption, but in the embodiment of the present invention, only the first application calls the processing function once, and the updated message data can be transmitted to other applications, and other applications do not need to call the processing function again for data processing, so the processing logic of the message data in the embodiment of the present invention is relatively simple, which can save the resources used for data processing and shorten the response time of message transmission.

[0099] See also Figure 2 , which is a flow chart of a message module construction method provided in an embodiment of the present invention, the main application constructs the message module through the following steps S201-S203.

[0100] S201: Obtain message data information of the sub-message modules of the above-mentioned multiple sub-applications respectively.

[0101] The message data information includes: sub-message data defined in the sub-message module and a sub-processing function for processing the sub-message data.

[0102] Specifically, the main application can obtain the message data information of the sub-message modules of some or all sub-applications. The sub-message module of each sub-application defines the sub-message data and sub-processing function of the sub-application, including the name of the sub-message data, the initialization content, the name of the sub-processing function, the sub-processing function itself, and the function name variable that can be called by other applications. The above function name variable can be recorded in the types-constant.js file.

[0103] It should be noted that the above-mentioned sub-message module does not need to be created. The main application only needs to obtain the message data information of the sub-message module of the sub-application. The above-mentioned message data information can be recorded in the template of the sub-message module. The sub-message module can be created based on the template of the sub-message module. The above-mentioned message data information can be read from the template of the sub-message module, so that the above-mentioned message data information can be obtained without creating the sub-message module, so as to avoid actually creating the sub-message module and wasting the processing resources of the electronic device.

[0104] S202: Merge and remove duplicates from the above message data information.

[0105] Specifically, each item of information in the message data information is deduplicated and merged respectively, and the final merged and deduplicated message data information includes information of all sub-message data defined in the sub-message modules of the above-mentioned multiple sub-applications and information of all sub-processing functions.

[0106] The information of each sub-message data after merging and deduplication may be the information of the sub-message data in the sub-message module of a sub-application, or may be the information of the sub-message data contained in the sub-message modules of multiple sub-applications. Each sub-processing function after merging and deduplication may be the sub-processing function in the sub-message module of a sub-application, or may be the sub-processing function in the sub-message modules of multiple sub-applications.

[0107] S203: Construct a message module based on the merged and deduplicated message data information.

[0108] The message data defined in the above message module are the merged and deduplicated sub-message data, and the processing function defined in the above message module for processing the above message data are the merged and deduplicated sub-processing functions.

[0109] Specifically, as can be seen from the above, the merged and deduplicated message data information covers the information of all sub-message data and all sub-processing functions defined in the sub-message modules of the above-mentioned multiple sub-applications. Therefore, the message module constructed based on the merged and deduplicated message data information can include all sub-message data and all sub-processing functions defined in the sub-message modules of the above-mentioned multiple sub-applications.

[0110] As can be seen from the above, the main application can construct a message module based on the message data information of the sub-message modules of multiple sub-applications. The constructed message module contains all sub-message data and all sub-processing functions defined in the sub-message modules of multiple sub-applications, and can meet all message transmission requirements of the above multiple sub-applications. In addition, the message data information is merged and deduplicated before the message module is constructed to avoid repeated definition of message data and processing functions in the message module constructed based on the merged and deduplicated message data information.

[0111] See also Figure 3 , is a flow chart of a second message transmission method provided by an embodiment of the present invention, which is similar to the above Figure 1 Compared with the embodiment shown, the above application is pre-set with message data that the application is interested in, wherein the message data that the application is interested in can be the message data of the application or the message data of other applications. The above step S102 can be implemented by the following step S102A.

[0112] S102A: A second application other than the first application in the application monitors the message module, and after monitoring the update of preset message data that the second application is concerned about, obtains the updated message data.

[0113] Specifically, each application is used to process different businesses, and the message data required to complete different businesses are different. Therefore, the message data that each application needs to obtain is also different. Different applications only need to obtain the message data that they are concerned about to operate normally.

[0114] In one embodiment, after any message data in the message module is updated by the first application, other applications except the first application can monitor the update of the message data. Each application can obtain the updated message data only after monitoring the update of the message data it is concerned about, and ignore the update of the message data it is not concerned about.

[0115] In another embodiment, each application may only monitor the message data that it is concerned about, but not monitor the message data that it is not concerned about, so that after the message data that it is concerned about is updated, it can obtain the updated message data.

[0116] From the above, it can be seen that different message data and different processing functions are defined in the message module constructed by the main application. Different applications pay attention to different message data. In the embodiment of the present invention, each application can only obtain the updated message data that it pays attention to, and does not obtain updates on other message data that it does not pay attention to. Based on the above method, under the condition that each application can operate normally, the resource consumption of the application in obtaining message data can be reduced.

[0117] Based on the aforementioned message transmission method embodiment, the above message module may also be configured with one or more of the functions described in (i) to (iv) below.

[0118] (i) The above-mentioned message module is also configured with a message data information loading function for loading the message data information of the above-mentioned sub-application. The above-mentioned message data information of the sub-application includes: the sub-message data defined in the sub-message module of the sub-application and the sub-processing function for processing the sub-message data. On this basis, the following step A can be executed.

[0119] Step A: When there is a need to start a sub-application, the message data information loading function is called to load the message data information of the sub-application.

[0120] Specifically, the demand for starting the sub-application can be input by the user or automatically triggered by the system. For example, when the system constructed by the micro-front-end architecture is OMC, the user can input a request to monitor the performance of the network device into the electronic device, and the electronic device can start the sub-application for monitoring the performance of the network device, and call the message data information loading function to load the message data information of the sub-application. Alternatively, in the event of a network device failure, the system can automatically trigger an alarm demand, and the electronic device can start the sub-application for alarming the operation failure of the network device, and call the message data information loading function to load the message data information of the sub-application. The loaded message data information includes the sub-message data of the sub-application and / or the sub-processing function for processing the sub-message data.

[0121] In addition, after calling the message data information loading function to load the message data information of the sub-application, the message data information loaded this time can be deduplicated and merged with other pre-loaded message data information, and then a new message module can be constructed based on the deduplication and merging results.

[0122] As can be seen from the above, in the solution provided by the embodiment of the present invention, the message data information loading function can be called to load the message data information of the sub-application only when there is a need to start the sub-application. If there is no need to start the sub-application, there is no need to load the message data information of the sub-application. In other words, there is no need to load the message data information of all sub-applications at once when the micro-frontend architecture is started, thereby avoiding the waste of resources caused by loading the message data information of the sub-application when the sub-application is not in use, and realizing lazy loading of the message data information of the sub-application.

[0123] (ii) The message module is also configured with a message data information replacement function for replacing the message data information of the sub-application, on this basis, the following step B can be executed.

[0124] Step B: When there is a need to update the message data information of the sub-application, the message data information replacement module is called to replace the original message data information of the sub-application in the message module with the updated message data information.

[0125] Specifically, in real scenarios, each sub-application in the micro-frontend architecture may need to update its own message data information. By updating the message data information of the sub-application, it is possible to repair the sub-application's fault, add a new sub-application function, remove a sub-application function, etc. In this case, it is necessary to replace the original message data information of the sub-application with the updated message data information. In the embodiment of the present invention, by calling the message data information replacement module, the original message data information of the sub-application in the message module can be replaced with the updated message data information, thereby realizing the update of the message data information in the message module. The replaced message data information includes the sub-message data of the sub-application and / or the sub-processing function for processing the sub-message data.

[0126] The requirement for updating the message data information of the sub-application may be input by the user or automatically triggered by the system.

[0127] In addition, after calling the message data information replacement function to replace the message data information, the replaced message data information and other message data information can be deduplicated and merged, and then a new message module can be constructed based on the deduplication and merging results.

[0128] As can be seen from the above, the solution provided by the embodiment of the present invention is configured with a message data information replacement function for replacing the message data information of the sub-application. When the message data information needs to be updated, the message data information in the message module can be updated by calling the message data information replacement function.

[0129] (III) The message module is also configured with a message data information uninstallation function for uninstalling the message data information of the sub-application, on this basis, the following step C can be executed.

[0130] Step C: When there is a need to uninstall the sub-application, the message data information uninstallation function is called to uninstall the message data information of the sub-application in the message module.

[0131] Specifically, in real scenarios, each sub-application in the micro-frontend architecture may need to be uninstalled. For example, if the business processed by a sub-application is no longer needed, the sub-application can be uninstalled. In this case, the message data information of the sub-application does not need to be defined in the above-mentioned message module. In this case, the message data information of the sub-application can be uninstalled by calling the message data information uninstallation module in the embodiment of the present invention. The uninstalled message data information may include the sub-message data of the sub-application and / or the sub-processing function for processing the sub-message data.

[0132] The requirement to uninstall the sub-application may be input by the user or automatically triggered by the system.

[0133] In addition, after calling the message data information uninstallation function to uninstall the message data information, the remaining message data information of each sub-application can be deduplicated and merged, and then a new message module can be constructed based on the deduplication and merging results.

[0134] From the above, it can be seen that the solution provided by the embodiment of the present invention is configured with a message data information uninstallation function for uninstalling the message data information of the sub-application. When the sub-application needs to be uninstalled, the message data information of the sub-application can be uninstalled from the message module by calling the message data information uninstallation function.

[0135] (IV) The above message module is also configured with a message persistence function for storing the above message data, on this basis, the following step D can be executed.

[0136] Step D: Call the message persistence function to store the message data in the message module.

[0137] Specifically, storing the message data in the message module refers to storing the message data in a memory or a hard disk.

[0138] As can be seen from the above, in the solution provided by the embodiment of the present invention, the message data in the message module can be stored by calling the message persistence function, thereby achieving persistence of the message data.

[0139] Corresponding to the aforementioned message transmission method applied to an electronic device, an embodiment of the present invention further provides an electronic device.

[0140] See also Figure 4 , is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention, including a memory 401, a transceiver 402, and a processor 403:

[0141] A memory 401 is used to store computer programs; a transceiver 402 is used to send and receive data under the control of the processor; a processor 403 is used to configure a micro-frontend architecture, wherein the micro-frontend architecture is composed of multiple applications, wherein the applications include a main application and a sub-application, wherein a message module is configured in the main application, wherein the main application is registered with multiple sub-applications and the message module is mounted on the root node of the sub-application, wherein message data and a processing function for processing the message data are defined in the message module, and the processor is further used to read the computer program in the memory and perform the following operations:

[0142] Control the first application in the application to call the processing function to process and update the message data;

[0143] A second application other than the first application in the application is controlled to monitor the message module, and after monitoring that the message data in the message module is updated, the updated message data is obtained.

[0144] Among them, Figure 4 In the embodiment, the bus architecture may include any number of interconnected buses and bridges, specifically one or more processors represented by processor 403 and various circuits of memory represented by memory 401 are linked together. The bus architecture may also link together various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface. The transceiver 402 may be a plurality of components, namely, a transmitter and a receiver, providing a unit for communicating with various other devices on a transmission medium, which transmission medium may include a wireless channel, a wired channel, an optical cable, and other transmission media. The processor 403 is responsible for managing the bus architecture and general processing, and the memory 401 may store data used by the processor 403 when performing operations.

[0145] The processor 403 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or a complex programmable logic device (CPLD). The processor may also adopt a multi-core architecture.

[0146] As can be seen from the above, in the embodiment of the present invention, the first application calls the processing function once to complete the processing and updating of the message data, and other applications can directly obtain the updated message data, so as to realize the transmission of the message data between applications. In this process, the message data is stored in the message module only in one copy, so the repeated storage of the message data can be avoided, and the problem of message data redundancy can be solved. In addition, only configuring one message module in the main application can save the resources required for configuring the message module. Furthermore, in the related art, it is often that an application first transmits the original data to other applications, and the applications receiving the original data respectively call the processing function to process and update the original data respectively, so as to obtain the updated message data. That is, each application needs to perform the same processing on the original data many times, and the same processing many times will cause a lot of resource consumption, but in the embodiment of the present invention, only the first application calls the processing function once, and the updated message data can be transmitted to other applications, and other applications do not need to call the processing function again for data processing, so the processing logic of the message data in the embodiment of the present invention is relatively simple, which can save the resources used for data processing and shorten the response time of message transmission.

[0147] In one embodiment of the present invention, the processor 403 is further configured to control the main application to construct a message module in the following manner:

[0148] Respectively acquiring message data information of the sub-message modules of the plurality of sub-applications, wherein the message data information includes: sub-message data defined in the sub-message module and a sub-processing function for processing the sub-message data;

[0149] Merging and deduplicating the message data information;

[0150] A message module is constructed based on the merged and deduplicated message data information, wherein the message data defined in the message module is the merged and deduplicated sub-message data, and the processing function defined in the message module for processing the message data is the merged and deduplicated sub-processing function.

[0151] As can be seen from the above, the main application can construct a message module based on the message data information of the sub-message modules of multiple sub-applications. The constructed message module contains all sub-message data and all sub-processing functions defined in the sub-message modules of multiple sub-applications, and can meet all message transmission requirements of the above multiple sub-applications. In addition, the message data information is merged and deduplicated before the message module is constructed to avoid repeated definition of message data and processing functions in the message module constructed based on the merged and deduplicated message data information.

[0152] In one embodiment of the present invention, the control pre-sets message data that the application is concerned about in the application, and a second application other than the first application in the application monitors the message module, and after monitoring the message data in the message module to be updated, obtains the updated message data, specifically including:

[0153] The second application other than the first application in the application is controlled to monitor the message module, and after monitoring the update of the preset message data that the second application is concerned about, the updated message data is obtained.

[0154] From the above, it can be seen that different message data and different processing functions are defined in the message module constructed by the main application. Different applications pay attention to different message data. In the embodiment of the present invention, each application can only obtain the updated message data that it pays attention to, and does not obtain updates on other message data that it does not pay attention to. Based on the above method, under the condition that each application can operate normally, the resource consumption of the application in obtaining message data can be reduced.

[0155] In one embodiment of the present invention, the message module is further configured with a message data information loading function for loading the message data information of the sub-application, the message data information of the sub-application includes: the sub-message data defined in the sub-message module of the sub-application and the sub-processing function for processing the sub-message data, and the processor 403 is further used to:

[0156] When there is a need to start a sub-application, calling the message data information loading function to load the message data information of the sub-application;

[0157] and / or

[0158] The message module is also configured with a message data information replacement function for replacing the message data of the sub-application, and the processor is further configured to:

[0159] When there is a need to update the message data information of the sub-application, calling the message data information replacement module to replace the original message data information of the sub-application in the message module with the updated message data information;

[0160] and / or

[0161] The message module is also configured with a message data information uninstallation function for uninstalling the message data information of the sub-application, and the processor is also used for:

[0162] When there is a need to uninstall a sub-application, calling the message data information uninstallation function to uninstall the message data information of the sub-application in the message module;

[0163] and / or

[0164] The message module is also configured with a message persistence function for storing the message data, and the processor is also used to:

[0165] The message persistence function is called to store the message data in the message module.

[0166] As can be seen from the above, in the solution provided by the embodiment of the present invention, the message data information loading function can be called to load the message data information of the sub-application only when there is a need to start the sub-application. If there is no need to start the sub-application, there is no need to load the message data information of the sub-application. In other words, there is no need to load the message data information of all sub-applications at once when the micro-frontend architecture is started, thereby avoiding the waste of resources caused by loading the message data information of the sub-application when the sub-application is not in use, and realizing lazy loading of the message data information of the sub-application.

[0167] Furthermore, the solution provided by the embodiment of the present invention is configured with a message data information replacement function for replacing the message data information of the sub-application. When the message data information needs to be updated, the message data information in the message module can be updated by calling the message data information replacement function.

[0168] In addition, the solution provided in the embodiment of the present invention is configured with a message data information uninstallation function for uninstalling the message data information of the sub-application. When the sub-application needs to be uninstalled, the message data information of the sub-application can be uninstalled from the message module by calling the message data information uninstallation function.

[0169] Furthermore, in the solution provided by the embodiment of the present invention, the message data in the message module can be stored by calling the message persistence function, thereby realizing the persistence of the message data.

[0170] Corresponding to the aforementioned information transmission method applied to an electronic device configured with a micro-front-end architecture, an embodiment of the present invention also provides an information transmission device applied to an electronic device configured with a micro-front-end architecture.

[0171] See also Figure 5 , is a structural schematic diagram of a message transmission device provided by an embodiment of the present invention, which is applied to an electronic device configured with a micro-frontend architecture, wherein the micro-frontend architecture is composed of multiple applications, wherein the applications include a main application and a sub-application, wherein a message module is configured in the main application, wherein the main application is registered with multiple sub-applications and the message module is mounted on the root node of the sub-application, wherein message data and a processing function for processing the message data are defined in the message module, and the device includes:

[0172] A data updating unit 501 is used to control the first application in the application to call the processing function to process and update the message data;

[0173] The data monitoring unit 502 is used to control the second application in the application except the first application to monitor the message module, and obtain the updated message data after monitoring the message data in the message module is updated.

[0174] As can be seen from the above, in the embodiment of the present invention, the first application calls the processing function once to complete the processing and updating of the message data, and other applications can directly obtain the updated message data, so as to realize the transmission of the message data between applications. In this process, the message data is stored in the message module only in one copy, so the repeated storage of the message data can be avoided, and the problem of message data redundancy can be solved. In addition, only configuring one message module in the main application can save the resources required for configuring the message module. Furthermore, in the related art, it is often that an application first transmits the original data to other applications, and the applications receiving the original data respectively call the processing function to process and update the original data respectively, so as to obtain the updated message data. That is, each application needs to perform the same processing on the original data many times, and the same processing many times will cause a lot of resource consumption, but in the embodiment of the present invention, only the first application calls the processing function once, and the updated message data can be transmitted to other applications, and other applications do not need to call the processing function again for data processing, so the processing logic of the message data in the embodiment of the present invention is relatively simple, which can save the resources used for data processing and shorten the response time of message transmission.

[0175] In one embodiment of the present invention, the main application constructs the message module through the following module construction unit, and the module construction unit is used to:

[0176] Respectively acquiring message data information of the sub-message modules of the plurality of sub-applications, wherein the message data information includes: sub-message data defined in the sub-message module and a sub-processing function for processing the sub-message data;

[0177] Merging and deduplicating the message data information;

[0178] A message module is constructed based on the merged and deduplicated message data information, wherein the message data defined in the message module is the merged and deduplicated sub-message data, and the processing function defined in the message module for processing the message data is the merged and deduplicated sub-processing function.

[0179] As can be seen from the above, the main application can construct a message module based on the message data information of the sub-message modules of multiple sub-applications. The constructed message module contains all sub-message data and all sub-processing functions defined in the sub-message modules of multiple sub-applications, and can meet all message transmission requirements of the above multiple sub-applications. In addition, the message data information is merged and deduplicated before the message module is constructed to avoid repeated definition of message data and processing functions in the message module constructed based on the merged and deduplicated message data information.

[0180] In one embodiment of the present invention, the application is pre-set with message data that the application is interested in, and the data monitoring unit 502 is specifically used to:

[0181] The second application other than the first application in the application is controlled to monitor the message module, and after monitoring the update of the preset message data that the second application is concerned about, the updated message data is obtained.

[0182] From the above, it can be seen that different message data and different processing functions are defined in the message module constructed by the main application. Different applications pay attention to different message data. In the embodiment of the present invention, each application can only obtain the updated message data that it pays attention to, and does not obtain updates on other message data that it does not pay attention to. Based on the above method, under the condition that each application can operate normally, the resource consumption of the application in obtaining message data can be reduced.

[0183] In one embodiment of the present invention, the message module is further configured with a message data information loading function for loading the message data information of the sub-application, the message data information of the sub-application includes: the sub-message data defined in the sub-message module of the sub-application and the sub-processing function for processing the sub-message data, and the device further includes:

[0184] A sub-application loading unit, configured to call the message data information loading function to load the message data information of the sub-application when there is a need to start the sub-application;

[0185] and / or

[0186] The message module is also configured with a message data information replacement function for replacing the message data information of the sub-application, and the device further includes:

[0187] A sub-application replacement unit, configured to call the message data information replacement module to replace the original message data information of the sub-application in the message module with the updated message data information when there is a need to update the message data information of the sub-application;

[0188] and / or

[0189] The message module is also configured with a message data information uninstallation function for uninstalling the message data information of the sub-application, and the device further includes:

[0190] A sub-application uninstallation unit, configured to call the message data information uninstallation function to uninstall the message data information of the sub-application in the message module when there is a need to uninstall the sub-application;

[0191] and / or

[0192] The message module is also configured with a message persistence function for storing the message data, and the device further comprises:

[0193] The data storage unit is used to call the message persistence function to store the message data in the message module.

[0194] As can be seen from the above, in the solution provided by the embodiment of the present invention, the message data information loading function can be called to load the message data information of the sub-application only when there is a need to start the sub-application. If there is no need to start the sub-application, there is no need to load the message data information of the sub-application. In other words, there is no need to load the message data information of all sub-applications at once when the micro-frontend architecture is started, thereby avoiding the waste of resources caused by loading the message data information of the sub-application when the sub-application is not in use, and realizing lazy loading of the message data information of the sub-application.

[0195] Furthermore, the solution provided by the embodiment of the present invention is configured with a message data information replacement function for replacing the message data information of the sub-application. When the message data information needs to be updated, the message data information in the message module can be updated by calling the message data information replacement function.

[0196] In addition, the solution provided in the embodiment of the present invention is configured with a message data information uninstallation function for uninstalling the message data information of the sub-application. When the sub-application needs to be uninstalled, the message data information of the sub-application can be uninstalled from the message module by calling the message data information uninstallation function.

[0197] Furthermore, in the solution provided by the embodiment of the present invention, the message data in the message module can be stored by calling the message persistence function, thereby realizing the persistence of the message data.

[0198] In another embodiment provided by the present invention, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the message transmission method described in any one of the above embodiments is implemented.

[0199] When the computer-readable storage medium provided by the embodiment of the present invention is used for message transmission, the first application calls the processing function once to complete the processing and updating of the message data, and other applications can directly obtain the updated message data, thereby realizing the transmission of the message data between applications. In this process, the message data is stored in only one copy in the message module, so the repeated storage of the message data can be avoided, and the problem of message data redundancy can be solved. In addition, only configuring one message module in the main application can save the resources required for configuring the message module. Furthermore, in the related art, an application often transmits the original data to other applications first, and the applications receiving the original data call the processing function respectively to process and update the original data respectively, so as to obtain the updated message data. That is, each application needs to perform the same processing on the original data many times, and the same processing many times will cause a lot of resource consumption, but in the embodiment of the present invention, only the first application calls the processing function once, and the updated message data can be transmitted to other applications, and other applications do not need to call the processing function again for data processing, so the processing logic of the message data in the embodiment of the present invention is relatively simple, which can save the resources used for data processing and shorten the response time of message transmission.

[0200] In another embodiment of the present invention, a computer program product including instructions is provided. When the computer program product is run on a computer, the computer executes any message transmission method in the above embodiments.

[0201] When the computer program product provided by the embodiment of the present invention is used for message transmission, the processing and updating of the message data can be completed by calling the processing function once, and other applications can directly obtain the updated message data, so as to realize the transmission of the message data between applications. In this process, the message data is stored in the message module only in one copy, so the repeated storage of the message data can be avoided, and the problem of message data redundancy can be solved. In addition, only configuring one message module in the main application can save the resources required for configuring the message module. Furthermore, in the related art, one application often transmits the original data to other applications first, and the applications receiving the original data respectively call the processing function to process and update the original data respectively, so as to obtain the updated message data. That is, each application needs to perform the same processing on the original data many times, and the same processing many times will cause a lot of resource consumption, but in the embodiment of the present invention, only the first application calls the processing function once, and the updated message data can be transmitted to other applications, and other applications do not need to call the processing function again for data processing, so the processing logic of the message data in the embodiment of the present invention is relatively simple, which can save the resources used for data processing and shorten the response time of message transmission.

[0202] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.

[0203] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0204] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the electronic device, device, storage medium and computer program embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0205] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) that contain computer-usable program code.

[0206] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer executable instructions. These computer executable instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0207] These processor executable instructions may also be stored in a processor readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the processor readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0208] These processor-executable instructions may also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0209] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the embodiments of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A message transmission method, characterized in that: The method is applied to an electronic device configured with a micro-frontend architecture, wherein the micro-frontend architecture is composed of multiple applications, wherein the applications include a main application and a sub-application, wherein a message module is configured in the main application, wherein the main application is registered with multiple sub-applications and the message module is mounted on a root node of the sub-application, wherein message data and a processing function for processing the message data are defined in the message module, and wherein the method includes: The first application in the application calls the processing function to process and update the message data; A second application other than the first application in the application monitors the message module, and after monitoring that the message data in the message module is updated, obtains the updated message data.

2. The method according to claim 1, characterized in that The main application builds the message module in the following way: Respectively acquiring message data information of the sub-message modules of the plurality of sub-applications, wherein the message data information includes: sub-message data defined in the sub-message module and a sub-processing function for processing the sub-message data; Merging and deduplicating the message data information; A message module is constructed based on the merged and deduplicated message data information, wherein the message data defined in the message module is the merged and deduplicated sub-message data, and the processing function defined in the message module for processing the message data is the merged and deduplicated sub-processing function.

3. The method according to claim 1, characterized in that The application is pre-set with message data that the application is interested in, and a second application other than the first application in the application monitors the message module, and after monitoring that the message data in the message module is updated, obtains the updated message data, including: The second application other than the first application in the application monitors the message module, and after monitoring the update of the preset message data that the second application is concerned about, obtains the updated message data.

4. The method according to any one of claims 1 to 3, characterized in that The message module is also configured with a message data information loading function for loading the message data information of the sub-application, the message data information of the sub-application includes: the sub-message data defined in the sub-message module of the sub-application and the sub-processing function for processing the sub-message data, the method further includes: When there is a need to start a sub-application, calling the message data information loading function to load the message data information of the sub-application; and / or The message module is also configured with a message data information replacement function for replacing the message data information of the sub-application, and the method further includes: When there is a need to update the message data information of the sub-application, calling the message data information replacement module to replace the original message data information of the sub-application in the message module with the updated message data information; and / or The message module is also configured with a message data information uninstallation function for uninstalling the message data information of the sub-application, and the method further includes: When there is a need to uninstall a sub-application, calling the message data information uninstallation function to uninstall the message data information of the sub-application in the message module; and / or The message module is also configured with a message persistence function for storing the message data, and the method further includes: The message persistence function is called to store the message data in the message module.

5. An electronic device, characterized in that: Including memory, transceiver, processor: Memory for storing computer programs; a transceiver, for transmitting and receiving data under the control of the processor; A processor is used to configure a micro-frontend architecture, wherein the micro-frontend architecture is composed of multiple applications, wherein the applications include a main application and a sub-application, wherein a message module is configured in the main application, wherein the main application is registered with multiple sub-applications and the message module is mounted on a root node of the sub-application, wherein message data and a processing function for processing the message data are defined in the message module, wherein the processor is further used to read a computer program in the memory and perform the following operations: Control the first application in the application to call the processing function to process and update the message data; A second application other than the first application in the application is controlled to monitor the message module, and after monitoring that the message data in the message module is updated, the updated message data is obtained.

6. The electronic device according to claim 5, characterized in that: The processor is further configured to control the main application to construct a message module in the following manner: Respectively acquiring message data information of the sub-message modules of the plurality of sub-applications, wherein the message data information includes: sub-message data defined in the sub-message module and a sub-processing function for processing the sub-message data; Merging and deduplicating the message data information; A message module is constructed based on the merged and deduplicated message data information, wherein the message data defined in the message module is the merged and deduplicated sub-message data, and the processing function defined in the message module for processing the message data is the merged and deduplicated sub-processing function.

7. The electronic device according to claim 5, characterized in that: The controlling the application to pre-set message data that the application is concerned about, the second application in the application other than the first application monitoring the message module, and obtaining the updated message data after monitoring the message data in the message module to be updated, specifically includes: The second application other than the first application in the application is controlled to monitor the message module, and after monitoring the update of the preset message data that the second application is concerned about, the updated message data is obtained.

8. The electronic device according to any one of claims 5 to 7, characterized in that: The message module is also configured with a message data information loading function for loading the message data information of the sub-application, the message data information of the sub-application includes: the sub-message data defined in the sub-message module of the sub-application and the sub-processing function for processing the sub-message data, and the processor is also used to: When there is a need to start a sub-application, calling the message data information loading function to load the message data information of the sub-application; and / or The message module is also configured with a message data information replacement function for replacing the message data of the sub-application, and the processor is further configured to: When there is a need to update the message data information of the sub-application, calling the message data information replacement module to replace the original message data information of the sub-application in the message module with the updated message data information; and / or The message module is also configured with a message data information uninstallation function for uninstalling the message data information of the sub-application, and the processor is also used to: When there is a need to uninstall a sub-application, calling the message data information uninstallation function to uninstall the message data information of the sub-application in the message module; and / or The message module is also configured with a message persistence function for storing the message data, and the processor is also used to: The message persistence function is called to store the message data in the message module.

9. A message transmission device, characterized in that: The device is applied to an electronic device configured with a micro-frontend architecture, wherein the micro-frontend architecture is composed of multiple applications, wherein the applications include a main application and a sub-application, wherein a message module is configured in the main application, wherein the main application is registered with multiple sub-applications and the message module is mounted on a root node of the sub-application, wherein message data and a processing function for processing the message data are defined in the message module, and wherein the device includes: A data updating unit, used for controlling the first application in the application to call the processing function to process and update the message data; The data monitoring unit is used to control a second application in the application except the first application to monitor the message module, and after monitoring that the message data in the message module is updated, obtain the updated message data.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 4 are implemented.