Message processing method, message production device, message consumption device and system under unitization architecture
Patent Information
- Application Number
- CN202511713925.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-20
- Publication Date
- 2026-10-13
- Estimated Expiration
- 2045-11-20
AI Technical Summary
[0005]本申请的主要目的在于提供一种单元化架构下的消息处理方法、消息生产设备、消息消费设备以及系统,旨在解决现有的消息处理方式由于需要获取不同的单元主题信息而导致的消息处理过程繁琐、效率低下的技术问题
[0016]本申请公开一种单元化架构下的消息处理方法,该方法应用于消息生产端,包括:获取当前单元应用的消息发送请求,所述消息发送请求包括:目标发送单元信息、消息标签信息以及消息数据;通过预设服务组件根据所述目标发送单元信息以及所述消息标签信息生成消息生产标签,所述预设服务组件为消息服务器的客户端组件;将所述消息数据与所述消息生产标签进行绑定,并将绑定后的所述消息数据发送至所述消息服务器。
Smart Images

Figure CN121193702B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer communication technology, and in particular to message processing methods, message production equipment, message consumption equipment, and systems under a modular architecture. Background Technology
[0002] The response speed requirements for message processing in financial business systems have reached the millisecond level. In order to solve the problem of severe resource contention and performance drop during peak business hours caused by the deployment of programs and databases on the same host in traditional centralized architecture, unitized architecture has been widely used in financial business systems.
[0003] Unitized architecture ensures high availability and high concurrency by breaking down business applications into independent units and deploying them on different servers (unit servers). Since business applications can process messages (produce or consume messages) based on different units, they can be divided into different unit applications. In unitized architecture, to ensure proper message routing within the same unit and across units, the existing approach is to create an independent unit topic for each unit, allowing each unit application to subscribe to the unit topic to implement unit-based message processing.
[0004] However, since the process of processing messages in a unit application may involve multiple units, it is necessary to obtain the unit topic information of different units separately when routing messages, which makes the message processing process cumbersome and thus affects the efficiency of message processing. Summary of the Invention
[0005] The main purpose of this application is to provide a message processing method, message production device, message consumption device, and system under a modular architecture, aiming to solve the technical problem of cumbersome and inefficient message processing caused by the need to obtain different unit topic information in existing message processing methods.
[0006] To achieve the above objectives, this application proposes a message processing method under a modular architecture, which is applied to the message production end. The method includes: Obtain the message sending request of the current unit application, wherein the message sending request includes: target sending unit information, message tag information, and message data; A message production tag is generated by a preset service component based on the target sending unit information and the message tag information. The preset service component is a client component of the message server. The message data is bound to the message production tag, and the bound message data is sent to the message server.
[0007] In one embodiment, the step of generating a message production tag by a preset service component based on the target sending unit information and the message tag information includes: Extract the sending unit number from the target sending unit information and extract the tag number from the message tag information; The message production tag is obtained by combining and concatenating the sending unit number and the tag number using a preset service component.
[0008] In one embodiment, the step of binding the message data with the message production tag and sending the bound message data to the message server includes: The message data is bound to the message production tag to obtain the bound message data; The message server determines a target message tag that matches the message production tag, and sends the bound message data to the corresponding storage area of the target message tag in the message server.
[0009] In one embodiment, the step of obtaining the message sending request of the current unit application includes: Obtain the production interface call information of the current unit application, and determine whether the production interface corresponding to the production interface call information is a valid interface; If so, the production interface call information will be identified as a message sending request.
[0010] Furthermore, to achieve the above objectives, this application also proposes a message processing method under a modular architecture, which is applied to a message consumer and includes: Obtain the message subscription request of the current unit application, wherein the message subscription request includes: target consumer unit information and message tag information; A message consumption tag is generated by a preset service component based on the target consumption unit information and the message tag information. The preset service component is a client component of the message server. Send the message consumption tag to the message server; When the message data returned by the message server based on the message consumption tag is received, the message data is consumed.
[0011] In one embodiment, the step of generating a message consumption tag by a preset service component based on the target consumption unit information and the message tag information includes: Extract the consumer unit number from the target consumer unit information and extract the tag number from the message tag information; The message consumption tag is obtained by combining and concatenating the consumption unit number and the tag number through a preset service component.
[0012] In one embodiment, the step of consuming the message data upon receiving message data returned by the message server according to the message consumption tag includes: The message server determines the target message tag that matches the message consumption tag and establishes a subscription relationship with the target message tag. When corresponding message data exists under the target message tag in the message server, the message data is obtained based on the subscription relationship and consumed.
[0013] In addition, to achieve the above objectives, this application also proposes a message production device, which includes: a first memory, a first processor, and a computer program stored in the first memory and executable on the first processor. The computer program is configured to implement the steps of the message processing method under the unitized architecture applied to the message production end as described above.
[0014] In addition, to achieve the above objectives, this application also proposes a message consumption device, which includes: a second memory, a second processor, and a computer program stored in the second memory and executable on the second processor, the computer program being configured to implement the steps of the message processing method under the unitized architecture applied to the message consumption end as described above.
[0015] In addition, to achieve the above objectives, this application also proposes a message processing system under a modular architecture, the system including the message production equipment as described above and the message consumption equipment as described above.
[0016] This application discloses a message processing method under a unitized architecture. The method is applied to a message production end and includes: obtaining a message sending request of the current unit application, wherein the message sending request includes: target sending unit information, message tag information, and message data; generating a message production tag based on the target sending unit information and the message tag information through a preset service component, wherein the preset service component is a client component of a message server; binding the message data with the message production tag, and sending the bound message data to the message server.
[0017] This application uses a pre-defined service component to generate message production tags based on target sending unit information and message tag information. This ensures that messages carry clear routing and classification identifiers upon transmission, allowing message data to be sent to the message server providing the pre-defined service component for fast and accurate message routing and classification. Compared to existing methods, it eliminates the need to obtain specific target sending unit topic information, thus simplifying the message sending process and improving message processing efficiency. Attached Figure Description
[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a flowchart illustrating the first embodiment of the message processing method under the unitized architecture of this application; Figure 2 This is a flowchart illustrating the second embodiment of the message processing method under the unitized architecture of this application; Figure 3 This is a schematic diagram of the entire process of the message processing method under the unitized architecture of this application; Figure 4 This is a schematic diagram of the structure of the equipment used to produce the message in this application; Figure 5 This is a schematic diagram of the message consumption device in this application.
[0021] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0022] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0023] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0024] The main solution of this application embodiment is: to obtain the message sending request of the current unit application, the message sending request including: target sending unit information, message tag information and message data; to generate a message production tag by a preset service component based on the target sending unit information and the message tag information, the preset service component being a client component of the message server; to bind the message data with the message production tag, and to send the bound message data to the message server.
[0025] Currently, in financial business systems, to prevent resource contention caused by a single host, a unitized architecture is typically used to split the business applications in the system and run them on independent unit servers. Unit applications can produce and consume messages based on different units. To enable normal message routing within the same unit or across units, each unit can create its corresponding message topic, i.e., a unit topic. This allows each unit application to establish routing between units by subscribing to different unit topics. However, when message routing involves multiple units, the need to retrieve information from different unit topics separately leads to a cumbersome message processing process, thus affecting message processing efficiency.
[0026] Therefore, to address the aforementioned shortcomings, this embodiment provides a message processing method based on a unitized architecture, applied to the message production end. By employing a preset service component to generate message production tags based on target sending unit information and message tag information, the message carries clear routing and classification identifiers upon transmission. This allows the message data to be sent to the message server providing the preset service component, enabling fast and accurate message routing and classification. Compared to existing methods, it eliminates the need to obtain specific target sending unit topic information, thereby simplifying the message sending process and improving message processing efficiency.
[0027] Based on this, embodiments of this application provide a message processing method under a unitized architecture, referencing... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the message processing method under the unitized architecture of this application. In this embodiment, the method is applied to the message production end, and the method includes: steps S01~S03: Step S01: Obtain the message sending request of the current unit application. The message sending request includes: target sending unit information, message tag information, and message data.
[0028] It should be noted that the executing entity in this embodiment can be a computing electronic device with data processing, network communication, and program execution capabilities, such as a unit server. It can also be other electronic devices with message production functions that can be used as unit servers in a unitized architecture, such as laptops or mainframes; this embodiment does not impose any limitations on this. The following description uses a unit server (referred to as a "production unit server") as a message producer as an example to illustrate this embodiment.
[0029] It should be understood that in a unitized architecture, business applications can be divided into units according to unit splitting criteria. Each unit can contain complete business logic, services, and data partitions, and business applications can run on servers corresponding to different units. Therefore, the current unit application can be a business application running on the server corresponding to the current unit, i.e., the production unit server.
[0030] It should also be noted that when the current unit application has a message sending requirement, it can generate a message sending request through an interface call. The production unit server can provide a production interface, therefore, the production unit server can obtain the production interface call information of the current unit application and determine the message sending request based on the production interface call information. Specifically, step S01 includes: steps S011~S012: Step S011: Obtain the production interface call information of the current unit application, and determine whether the production interface corresponding to the production interface call information is a valid interface.
[0031] It should be noted that the production interface can be a programming interface (API) provided to the unit application by a pre-configured service component (SDK) for sending messages. When the current unit application attempts to call the production interface, the production unit server can intercept the call through the SDK and obtain the corresponding production interface call information.
[0032] The production interface call information may include: call method parameters, call business tag, target unit information, unit information, and unit application identity.
[0033] Next, the production unit server can perform interface validity verification based on the above production interface call information: for example, determining whether the current unit application has the permission to call the production interface, whether the call method parameters meet the basic format requirements, and whether the production interface is in an active and available state.
[0034] Step S012: If so, the production interface call information is determined to be a message sending request.
[0035] It should be understood that if the production interface corresponding to the production interface call information is not a valid interface, the SDK can return an exception code to the current unit application and intercept the production interface call information.
[0036] If the production interface call information corresponds to a valid production interface, then the intercepted production interface call information can be converted into a message sending request. This message sending request includes at least: target sending unit information, message tag information, and message data.
[0037] Among them, the target sending unit information can be the description information of the destination unit of the message, the message tag information is the service type of the message, and the message data is the actual content of the message.
[0038] Furthermore, since a message topic needs to be specified when sending messages in a unitized architecture, the message sending request can also include a target topic. In this embodiment, the target topic can be set based on the business application; that is, different unit applications can specify the same target topic when sending messages.
[0039] Step S02: Generate a message production tag based on the target sending unit information and the message tag information using a preset service component. The preset service component is a client component of the message server.
[0040] It should be understood that the default service component is a pre-configured service component (SDK). This SDK can be a client component provided by the message server to each unit server. It can be used to provide callable sending interfaces, tag reassembly based on message sending requests, and message data sending functions.
[0041] It should be noted that the message server can be used to receive message data from various unit applications. Furthermore, one or more target topic configurations can be pre-maintained in the message server, with each target topic corresponding to a business application. Therefore, for different unit applications under the same business application, the same target topic can be specified by default when sending messages within or across units, eliminating the need to obtain specific unit topic information as in existing methods.
[0042] Specifically, the SDK can extract the sending unit number, such as RZ01, from the target sending unit information and the message tag type, such as tag01, from the message tag information. Then, the sending unit number RZ01 and the tag number tag01 are combined and concatenated according to a fixed template to obtain the message production tag tag01@RZ01.
[0043] Step S03: Bind the message data with the message production tag, and send the bound message data to the message server.
[0044] It should be understood that after obtaining the aforementioned message production tag, in order to ensure that message data is sent in units and stored in the storage area of the corresponding tag in the message server, the message data to be sent can be bound to the message production tag to obtain the bound message data.
[0045] It should be noted that the message server can pre-maintain storage areas corresponding to different target message tags, and the storage area of the same target message tag can store message data that is consistent with the unit number in the target message tag.
[0046] After obtaining the bound message data, the target message tag that matches the aforementioned message production tag can first be determined through the message server, that is, the target message tag with the same unit number as the aforementioned message production tag can be determined; then the bound message data can be sent to the corresponding storage area of the target message tag in the message server.
[0047] It should also be noted that, considering the time-sensitive nature of some message data, and to reduce the message storage pressure on the message server, different retention times (TTLs) can be generated for different message data based on message tag information, i.e., the business type of the message, and these retention times can be associated with the aforementioned generated message production tags. Furthermore, in the message server, data can be cleared based on the different retention times of the message data to reduce storage costs.
[0048] In a specific implementation, the production unit server can bind the message data with the message production tag to obtain the bound message data; then, the message server determines the target message tag that matches the message production tag; finally, the bound message data is sent to the corresponding storage area of the target message tag in the message server, thereby quickly and accurately realizing message routing and classification processing.
[0049] This embodiment discloses a message processing method applied to a message production end, comprising: obtaining a message sending request of the current unit application, the message sending request including: target sending unit information, message tag information, and message data; generating a message production tag based on the target sending unit information and the message tag information through a preset service component, the preset service component being a client component of a message server; binding the message data with the message production tag, and sending the bound message data to the message server. Because this embodiment uses a preset service component to generate the message production tag based on the target sending unit information and message tag information, the message carries a clear routing and classification identifier when sent, thus enabling fast and accurate message routing and classification processing when the message data is sent to the message server providing the preset service component. Compared to existing methods, it eliminates the need to obtain specific target sending unit topic information, thereby simplifying the message sending process and improving message processing efficiency.
[0050] Furthermore, to achieve the above objectives, this application also proposes a message processing method under a modular architecture, referring to... Figure 2 , Figure 2 This is a flowchart illustrating the second embodiment of the message processing method under the unitized architecture of this application. In this embodiment, the method is applied to the message consumer end, and the method includes: steps S10~S40: Step S10: Obtain the message subscription request of the current unit application, wherein the message subscription request includes: target consumer unit information and message tag information.
[0051] It should be noted that the executing entity in this embodiment can also be a computing electronic device with data processing, network communication, and program execution capabilities, such as a unit server. It can also be other electronic devices with message consumption functions that can be used as unit servers in a unitized architecture, such as laptops or mainframes; this embodiment does not impose any limitations on this. The following description uses a unit server (referred to as a "consumer unit server") as a message consumer as an example to illustrate this embodiment.
[0052] It should be understood that in a unitized architecture, business applications can be divided into units according to unit splitting criteria. Each unit can contain complete business logic, services, and data partitions, and business applications can run on servers corresponding to different units. Therefore, the current unit application can be a business application running on the server corresponding to the current unit, i.e., the consumer unit server.
[0053] It should also be noted that when the current unit application has a message consumption need, it can initiate a message subscription request through an API call. The consumer unit server can provide a consumption interface, so the consumer unit server can obtain the consumer interface call information of the current unit application and determine the message subscription request based on the consumer interface call information.
[0054] Specifically, the consumption interface call information of the current unit application can be obtained first, and it can be determined whether the consumption interface corresponding to the consumption interface call information is a valid interface: for example, whether the current unit application has the right to call the consumption interface, whether the call method parameters meet the basic format requirements, and whether the consumption interface is in an active and available state; then, when the consumption interface corresponding to the consumption interface call information is a valid interface, the consumption interface call information is converted into a message subscription request, which includes at least the target consumption unit information and message tag information.
[0055] The target consumption unit information can be the unit corresponding to the message data requested by the current unit application. Since in the unitized architecture's message processing, a unit application can only consume message data from its own unit, this target consumption unit information can be the description information of the current unit. The message tag information is the business type of the message data requested by the current application.
[0056] Furthermore, since the message consumption topic needs to be specified when consuming messages in a unitized architecture, the message subscription request can also include a target topic. In this embodiment, the target topic can be set based on the business application, meaning that different unit applications can subscribe to the same target topic when consuming messages.
[0057] Step S20: Generate a message consumption tag based on the target consumption unit information and the message tag information using a preset service component, wherein the preset service component is a client component of the message server.
[0058] It should be noted that this preset service component (SDK) can be a client component provided by the message server to each unit server. It can be used to provide callable consumption interfaces, tag reassembly based on message subscription requests, and message data subscription, among other functions.
[0059] It should be understood that a message server can be used to register different message data subscriptions. This message server can pre-maintain one or more target topic configurations, each target topic corresponding to a business application. Therefore, for different unit applications under the same business application, the same target topic can be specified by default when consuming messages within the unit, without needing to obtain specific unit topic information as in existing methods.
[0060] Specifically, the SDK can extract the consumer unit number, such as RZ01, from the target consumer unit information and the message tag type, such as tag01, from the message tag information. Then, the sending unit number RZ01 and the tag number tag01 are combined and concatenated according to a fixed template to obtain the message consumption tag tag01@RZ01.
[0061] Step S30: Send the message consumption tag to the message server.
[0062] It should be understood that after obtaining the aforementioned message consumption tag, the message tag can be submitted to the message server to realize the subscription registration for the message consumption tag.
[0063] Step S40: When receiving message data returned by the message server according to the message consumption tag, consume the message data.
[0064] It should be understood that the message server can pre-maintain storage areas corresponding to different target message tags under the same target topic. After the consumer unit server completes the subscription registration for a certain message consumption tag, the message server can determine the target message tag that matches the message consumption tag, and then complete the subscription of the current unit application for that target message tag, establishing a subscription relationship between the consumer unit server and the target message tag.
[0065] The message server can continuously monitor all message data under the target topic. When it detects that there is message data in the storage area corresponding to the target message tag, it can push the message data to the consumer unit server, thereby ensuring that each unit application only obtains message data that is consistent with its own message consumption tag.
[0066] Therefore, when the consumer unit server receives message data pushed by the message server that has the same message consumption tag, it can consume the message data.
[0067] In its implementation, the consumer unit server can determine the target message tag that matches the message consumption tag through the message server and establish a subscription relationship with the target message tag. Then, when the message server has corresponding message data under the target message tag, it retrieves the message data based on the subscription relationship and consumes the message data. This eliminates the need for business applications to configure complex global unit topic information when subscribing to messages, reducing message routing complexity.
[0068] This embodiment discloses another message processing method applied to a message consumer, including: obtaining a message subscription request from the current unit application, the message subscription request including target consumption unit information and message tag information; generating a message consumption tag based on the target consumption unit information and message tag information using a preset service component, where the preset service component is a client component of the message server; sending the message consumption tag to the message server; and consuming the message data upon receiving message data returned by the message server based on the message consumption tag. Because this embodiment uses a preset service component to generate the message consumption tag based on the target consumption unit information and message tag information, the message server can accurately filter and route message data based on the tag, thereby ensuring that the unit application only receives the message data it has subscribed to, ensuring the isolation of message data between units. Compared to existing methods, it eliminates the need to subscribe to different unit topic information for the requested consumption, thus simplifying the message consumption process and improving message processing efficiency.
[0069] Furthermore, you can also refer to this section. Figure 3 This paper describes the entire process of the message processing method under the unitized architecture of this application. Figure 3 This is a schematic diagram of the entire message processing method under the unitized architecture of this application.
[0070] Depend on Figure 3 As can be seen, the message processing method under the unitized architecture of this application can be applied to application system scenarios corresponding to business applications. That is, the application system can be divided into multiple units and run on corresponding unit servers. When a business application runs on a certain unit, it can be described as a unit application.
[0071] In each unit server, the unit application can embed a message server client component, namely the preset service component SDK. This preset service component can provide the unit application with callable message processing interfaces (producer interface, consumer interface) and perform tag conversion on the unit information and tag information used by the unit application.
[0072] Furthermore, during message processing, the same server unit can simultaneously act as both a message producer and a message consumer.
[0073] For example, when a certain unit application has a message production requirement, it can first call the production interface provided by the SDK to send the message to the target topic01, and attach the target sending unit information RZ01 and message tag information tag01 in the message sending request.
[0074] It should be noted that the cell to which this cell belongs can be RZ01 or other cells, such as RZ02, GZ01, etc.
[0075] Next, the unit application uses the SDK to convert the target sending unit information RZ01 and message tag information tag01, and concatenates them to obtain the message production tag tag01@RZ01.
[0076] Finally, the message production tag tag01@RZ01 can be bound to the message data, and then the bound message data can be sent to the target topic topic01 and the storage area corresponding to the target message tag tag01@RZ01 in the message server to which the SDK belongs.
[0077] Since the same business application can use the same target topic for message data management in the message server, when a unit application produces and sends a message, it does not need to obtain the specific unit topic information to be sent. It can automatically complete the encapsulation of routing tags (message production tags) through the client component, thereby accurately routing and classifying messages based on the routing tags, avoiding the management complexity caused by creating an independent physical topic for each unit.
[0078] Similarly, when a certain application unit has a message consumption requirement, it can first call the consumption interface provided by the SDK to subscribe to the target topic topic01, and attach the target consumption unit information RZ01 and message tag information tag01 in the message subscription request.
[0079] It should also be noted that the cell to which this cell belongs is RZ01.
[0080] Next, the unit application uses the SDK to convert the target consumption unit information RZ01 and the message tag information tag01, and concatenates them to obtain the message consumption tag tag01@RZ01. Then, the message consumption tag tag01@RZ01 is sent to the message server to complete the subscription registration. After the message server determines the target message tag tag01@RZ01 that matches the message consumption tag, the unit application completes the subscription to the target message tag tag01@RZ01.
[0081] Finally, the message server continuously monitors all message data under the target topic 01. When it detects that message data exists in the storage area corresponding to the target message tag 01@RZ01, it pushes the message data to the unit application based on the subscription relationship, so that the unit application can consume the message data.
[0082] Since the same business application can use the same target topic for message data management in the message server, when a unit application requests to consume a message, it does not need to obtain the specific unit topic information to be consumed. It can automatically complete the encapsulation of the routing label (message production label) through the client component, thereby accurately routing and classifying messages based on the routing label, avoiding the management complexity caused by creating an independent physical topic for each unit.
[0083] The message processing method under the unitized architecture of this application adopts a symmetrical tag generation method on both the production and consumption ends. This ensures that message production tags and message consumption tags can be precisely matched, thereby guaranteeing the standard consistency of message data during production and consumption. This ensures that messages are accurately sent from the production end to the consumption end, reducing the risk of message routing errors and data loss. Simultaneously, managing message data from multiple unit applications using the same target topic avoids the operational complexity of creating independent unit topic information for each unit, achieving centralized management and efficient distribution of message data.
[0084] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the message processing method under the unitized architecture of this application. Any simple transformations based on this technical concept are within the protection scope of this application.
[0085] This application also provides a message production device, which includes: at least one first processor; and a first memory communicatively connected to the at least one first processor; wherein the first memory stores instructions executable by the at least one first processor, and the instructions are executed by the at least one first processor to enable the at least one first processor to execute the message processing method applied to the unitized architecture of the message production end in the first embodiment described above.
[0086] The following is for reference. Figure 4 , Figure 4 This is a schematic diagram of the message production device of this application. The message production device in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), etc., as well as fixed terminals such as digital TVs, desktop computers, etc. Figure 4 The message production equipment shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0087] like Figure 4As shown, the message production device may include a first processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a first read-only memory (ROM) 1002 or a program loaded from a first storage device 1003 into a first random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the message production device. The first processing unit 1001, the first ROM 1002, and the first RAM 1004 are interconnected via a first bus 1005. A first input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the first I / O interface 1006: a first input device 1007 including, for example, a touchscreen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; a first storage device 1003 including, for example, magnetic tape, hard disk, etc.; and a first communication device 1009. The first communication device 1009 allows the message production equipment to communicate wirelessly or wiredly with other devices to exchange data.
[0088] The message production equipment provided in this application adopts the message processing method under the unitized architecture in the first embodiment described above, which can solve the technical problems of the message processing method under the unitized architecture. Compared with the prior art, the beneficial effects of the message production equipment provided in this application are the same as the beneficial effects of the message processing method under the unitized architecture provided in the first embodiment described above, and other technical features in the message production equipment are the same as the features disclosed in the method of the first embodiment, and will not be repeated here.
[0089] This application also provides a message consumption device, which includes: at least one second processor; and a second memory communicatively connected to the at least one second processor; wherein the second memory stores instructions executable by the at least one second processor, and the instructions are executed by the at least one second processor to enable the at least one second processor to execute the message processing method applied to the unitized architecture of the message consumption end in the second embodiment described above.
[0090] The following is for reference. Figure 5 , Figure 5This is a schematic diagram of the message consumption device of this application. The message consumption device in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), etc., as well as fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The message consumption device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0091] like Figure 5 As shown, the message consuming device may include a second processing unit 1001' (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a second read-only memory (ROM) 1002' or a program loaded from a second storage device 1003' into a second random access memory (RAM) 1004'. The RAM 1004' also stores various programs and data required for the operation of the message consuming device. The second processing unit 1001', the second ROM 1002', and the second RAM 1004' are interconnected via a second bus 1005'. A second input / output (I / O) interface 1006' is also connected to the bus. Typically, the following systems can be connected to the second I / O interface 1006': a second input device 1007' including, for example, a touchscreen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; an output device 1008' including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; a second storage device 1003' including, for example, magnetic tape, hard disk, etc.; and a second communication device 1009'. The second communication device 1009' allows the message consuming device to communicate wirelessly or wiredly with other devices to exchange data.
[0092] The message consumption device provided in this application adopts the message processing method under the unitized architecture in the second embodiment described above, which can solve the technical problems of the message processing method under the unitized architecture. Compared with the prior art, the beneficial effects of the message consumption device provided in this application are the same as the beneficial effects of the message processing method under the unitized architecture provided in the second embodiment described above, and other technical features in the message consumption device are the same as the features disclosed in the method of the second embodiment, which will not be repeated here.
[0093] Furthermore, this application also proposes a message processing system under a modular architecture, which includes the message production equipment and the message consumption equipment as described above.
[0094] In this embodiment, the specific implementation of the message processing system under the unitized architecture can be referred to the descriptions of the above method embodiments, and will not be repeated here.
[0095] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other elements in the process, method, article, or system that includes that element.
[0096] The sequence numbers of the above embodiments of the present invention are merely for description and do not represent the superiority or inferiority of the embodiments. They are only some embodiments of this application and are not intended to limit the scope of this application. All equivalent structural transformations made under the technical concept of this application and based on the content of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included within the protection scope of this application.
Claims
1. A message processing method under a modular architecture, characterized in that, The method is applied to the message production end, and the method includes: Obtain the message sending request of the current unit application. The message sending request includes: target sending unit information, message tag information, and message data. The target sending unit information is the description information of the destination unit of the message sending. The process of generating a message production tag by means of a preset service component based on the target sending unit information and the message tag information includes: extracting the sending unit number from the target sending unit information and extracting the message tag type to be sent from the message tag information by means of the preset service component; combining and splicing the sending unit number and the tag number of the message tag type according to a fixed template to obtain the message production tag; wherein the preset service component is a client component of the message server. Binding the message data to the message production tag and sending the bound message data to the message server includes: binding the message data to the message production tag to obtain the bound message data; determining a target message tag matching the message production tag through the message server, and sending the bound message data to the corresponding storage area of the target message tag in the message server.
2. The method as described in claim 1, characterized in that, The step of generating a message production tag by a preset service component based on the target sending unit information and the message tag information includes: Extract the sending unit number from the target sending unit information and extract the tag number from the message tag information; The message production tag is obtained by combining and concatenating the sending unit number and the tag number using a preset service component.
3. The method as described in claim 1, characterized in that, The step of obtaining the message sending request of the current unit application includes: Obtain the production interface call information of the current unit application, and determine whether the production interface corresponding to the production interface call information is a valid interface; If so, the production interface call information will be identified as a message sending request.
4. A message processing method under a modular architecture, characterized in that, The method is applied to the message consumer, and the method includes: Obtain the message subscription request of the current unit application. The message subscription request includes: target consumption unit information and message tag information. The target consumption unit information is the unit corresponding to the message data requested by the current unit application. The message consumption tag is generated by a preset service component based on the target consumption unit information and the message tag information. The process includes: extracting the consumption unit number from the target consumption unit information and the message tag type of the requested message from the message tag information; combining and splicing the consumption unit number and the tag number of the message tag type according to a fixed template to obtain the message consumption tag. The preset service component is a client component of the message server. Send the message consumption tag to the message server; When receiving message data returned by the message server according to the message consumption tag, consuming the message data includes: determining a target message tag consistent with the message consumption tag through the message server, and establishing a subscription relationship with the target message tag; when there is corresponding message data under the target message tag in the message server, obtaining the message data based on the subscription relationship, and consuming the message data.
5. The method as described in claim 4, characterized in that, The step of generating message consumption tags using a preset service component based on the target consumption unit information and the message tag information includes: Extract the consumer unit number from the target consumer unit information and extract the tag number from the message tag information; The message consumption tag is obtained by combining and concatenating the consumption unit number and the tag number through a preset service component.
6. A message production device, characterized in that, The device includes: a first memory, a first processor, and a computer program stored in the first memory and executable on the first processor, the computer program being configured to implement the steps of the message processing method under the unitized architecture as described in any one of claims 1 to 3.
7. A message consumption device, characterized in that, The device includes: a second memory, a second processor, and a computer program stored in the second memory and executable on the second processor, the computer program being configured to implement the steps of the message processing method under the unitized architecture as described in claim 4 or 5.
8. A message processing system based on a modular architecture, characterized in that, The system includes the message production device as described in claim 6 and the message consumption device as described in claim 7.
Citation Information
Patent Citations
Consumption message processing method and related equipment
CN112333087A
Service cluster unitization grouping method and device, equipment and medium
CN112965818A