Message processing method and apparatus
By generating standardized parameters and sliced process processing, the issues of universality and scalability when connecting different business systems are resolved, enabling flexible business process orchestration and exception handling, and improving the system's adaptability and development efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA CONSTRUCTION BANK
- Filing Date
- 2023-01-03
- Publication Date
- 2026-07-07
AI Technical Summary
Existing technologies have poor versatility and scalability when interfacing with different business systems, requiring the separate writing of processing logic for each interface, making it difficult to adapt to complex business needs.
By receiving processing messages from external systems, standardized parameters are generated using meta-structure information, assembled into processing events, and processed by calling the slice process, supporting flexible orchestration and sequential control of multiple slice processes.
It enables integration with different business systems, has good versatility and scalability, can flexibly adapt to various business scenarios, and improves the system's development efficiency and exception handling capabilities.
Smart Images

Figure CN116028243B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of big data technology, and in particular to a message processing method and apparatus. Background Technology
[0002] Due to the needs of various business processes, it is often necessary to interface with different business systems to achieve more complex business requirements, such as unified modeling and analysis based on data from different systems. This can involve interfacing with similar business systems in different cities or branches, or with multiple upstream and downstream systems. Interfaces are typically used to achieve system interfacing, but this method requires writing the processing logic for each interface separately, resulting in poor versatility and scalability. Summary of the Invention
[0003] In view of this, embodiments of the present invention provide a message processing method and apparatus that can achieve the interconnection of different business systems and has good versatility and scalability.
[0004] In a first aspect, embodiments of the present invention provide a message processing method, including:
[0005] Receive processing messages sent by an external system, the processing messages including: process identifier, slice identifier and at least one message parameter; wherein, the process identifier is used to identify the target process;
[0006] Based on the metastructure information and the at least one message parameter, generate the standardized parameters corresponding to the processed message;
[0007] The process identifier, the slice identifier, and the standardized parameters are assembled into a processing event corresponding to the processing message;
[0008] Based on the slice identifier, the target slice process is determined from multiple slice processes corresponding to the target process, and the target slice process is invoked to process the event information of the processing event.
[0009] Optionally, generating standardized parameters corresponding to the processed message based on the metastructure information and the at least one message parameter includes:
[0010] Obtain at least one output field from the metastructure information;
[0011] For each output field, a standardized parameter corresponding to the output field is generated based on the processing information corresponding to the output field and the message parameters.
[0012] Combine the standardized parameters corresponding to each of the output fields to generate the standardized parameters corresponding to the processed message.
[0013] Optionally, the processing message may further include: a target service identifier, which is used to identify the target service;
[0014] The step of assembling the process identifier, the slice identifier, and the standardized parameters into a processing event corresponding to the processing message includes:
[0015] The target business identifier, the process identifier, the slice identifier, and the standardized parameters are assembled into a processing event corresponding to the processing message;
[0016] The process of invoking the target slice flow to process the event information of the processing event includes:
[0017] In response to the fact that the service identifier corresponding to the alternative processing event is the target service identifier, the alternative processing event is determined as the target processing event corresponding to the target service;
[0018] The execution order of each target processing event is determined based on the slice identifier corresponding to each target processing event;
[0019] According to the execution order, the slice process corresponding to each target processing event is called sequentially to process the event information of the target processing event.
[0020] Optionally, after processing the event information of each target processing event by sequentially calling the slice process corresponding to each target processing event according to the execution order, the method further includes:
[0021] Determine the processing result corresponding to each of the target processing events;
[0022] In response to the fact that the processing results corresponding to each of the target processing events all indicate that the event processing was successful, and the number of slice identifiers corresponding to each of the target processing events is equal to the total number of slices, it is determined that the processing of the target service for the target process has been completed.
[0023] Optionally, before invoking the target slice process to process the event information of the processing event, the method further includes:
[0024] Determine whether the parameter information of the processing event meets the input conditions of the target slice process;
[0025] In response to the parameter information meeting the input conditions, the step of calling the target slice process to process the event information of the processing event is executed;
[0026] In response to the parameter information not conforming to the input conditions, an anomaly information characterizing the parameter abnormality is generated and the anomaly information is returned to the external system.
[0027] Optionally, after determining the target slice process based on the process identifier and the slice identifier, the method further includes:
[0028] Obtain the data cleaning rules corresponding to the target slice process;
[0029] According to the data cleaning rules, the parameter information of the processing event is cleaned.
[0030] Optionally, after the process of calling the target slice procedure to process the event information of the processing event, the method further includes:
[0031] Obtain the processing result corresponding to the processing event;
[0032] In response to the processing result indicating event processing failure, an exception message indicating processing failure is generated and returned to the external system.
[0033] Secondly, embodiments of the present invention provide a message processing apparatus, comprising:
[0034] The message receiving module is used to receive processing messages sent by an external system. The processing messages include: a process identifier, a slice identifier, and at least one message parameter; wherein, the process identifier is used to identify the target process.
[0035] The standardization module is used to generate standardized parameters corresponding to the processed message based on the metastructure information and the at least one message parameter.
[0036] The event assembly module is used to assemble the process identifier, the slice identifier, and the standardized parameters into a processing event corresponding to the processing message;
[0037] The processing module is used to determine the target slice process from multiple slice processes corresponding to the target process based on the slice identifier, and call the target slice process to process the event information of the processing event.
[0038] Optionally, the standardization module is specifically used for:
[0039] Obtain at least one output field from the metastructure information;
[0040] For each output field, a standardized parameter corresponding to the output field is generated based on the processing information corresponding to the output field and the message parameters.
[0041] Combine the standardized parameters corresponding to each of the output fields to generate the standardized parameters corresponding to the processed message.
[0042] Optionally, the processing message may further include: a target service identifier, which is used to identify the target service;
[0043] The event assembly module is specifically used for:
[0044] The target business identifier, the process identifier, the slice identifier, and the standardized parameters are assembled into a processing event corresponding to the processing message;
[0045] The processing module is specifically used for:
[0046] In response to the fact that the service identifier corresponding to the alternative processing event is the target service identifier, the alternative processing event is determined as the target processing event corresponding to the target service;
[0047] The execution order of each target processing event is determined based on the slice identifier corresponding to each target processing event;
[0048] According to the execution order, the slice process corresponding to each target processing event is called sequentially to process the event information of the target processing event.
[0049] Optionally, it also includes:
[0050] The determination module is used to determine the processing result corresponding to each of the target processing events;
[0051] In response to the fact that the processing results corresponding to each of the target processing events all indicate that the event processing was successful, and the number of slice identifiers corresponding to each of the target processing events is equal to the total number of slices, it is determined that the processing of the target service for the target process has been completed.
[0052] Optionally, it also includes:
[0053] The condition determination module is used to determine whether the parameter information of the processing event meets the input conditions of the target slice process;
[0054] In response to the parameter information meeting the input conditions, the step of calling the target slice process to process the event information of the processing event is executed;
[0055] In response to the parameter information not conforming to the input conditions, an anomaly information characterizing the parameter abnormality is generated and the anomaly information is returned to the external system.
[0056] Thirdly, embodiments of the present invention provide an electronic device, comprising:
[0057] One or more processors;
[0058] Storage device for storing one or more programs.
[0059] When the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any of the above embodiments.
[0060] Fourthly, embodiments of the present invention provide a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the methods described in any of the above embodiments.
[0061] Fifthly, embodiments of the present invention provide a computer program product, including a computer program that, when executed by a processor, implements the method described in any of the above embodiments.
[0062] One embodiment of the above invention has the following advantages or beneficial effects: First, the message parameters in processing messages sent by different external systems are standardized using the original structural information, and processing events containing standardized parameters are generated. Different external systems correspond to different meta-structural information, and standardized parameters corresponding to the processing messages are generated using the meta-structural information corresponding to the external systems. Through processing events containing standardized parameters, the current system can uniformly process processing messages sent by different external systems.
[0063] Secondly, the business process is divided into multiple slices, with each slice handling events at a finer granularity. On one hand, this allows for more precise control over each processing step of an event, and makes it easier to capture and handle exceptions when they occur. On the other hand, multiple slices allow for flexible orchestration of business processes to adapt to various business scenarios. Specifically, multiple different slices are selected, and their execution order is arranged to generate execution chains corresponding to the business processes. These chains can meet the integration requirements of different business systems. Furthermore, different business processes can share the same slices as needed, improving system development efficiency.
[0064] Furthermore, when requirements change, the execution chain corresponding to the business process of that requirement can be modified by altering the slice processes within the execution chain or changing the execution order of those slice processes. This allows for flexible and scalable application to various scenarios involving the integration of different business systems. Therefore, the solution of this invention can achieve integration between different business systems and has good scalability.
[0065] The further effects of the aforementioned unconventional alternative methods will be explained below in conjunction with specific implementation methods. Attached Figure Description
[0066] The accompanying drawings are provided to better understand the invention and are not intended to unduly limit the scope of the invention. Wherein:
[0067] Figure 1This is a flowchart illustrating a message processing method provided in the first embodiment of the present invention;
[0068] Figure 2 This is a flowchart illustrating a message processing method provided in the second embodiment of the present invention;
[0069] Figure 3 This is a flowchart illustrating a method for constructing a business fingerprint database according to the third embodiment of the present invention;
[0070] Figure 4 This is a schematic diagram of the structure of a message processing device provided in an embodiment of the present invention;
[0071] Figure 5 This is a schematic diagram of the structure of a computer system suitable for implementing terminal devices or servers of the present invention. Detailed Implementation
[0072] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of the present invention, including various details to aid understanding. These details should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the invention. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0073] It should be noted that the collection, analysis, use, transmission, and storage of user personal information involved in the technical solution of this invention all comply with relevant laws and regulations, are used for legitimate and reasonable purposes, and are not shared, disclosed, or sold outside of these legitimate uses, and are subject to supervision and management by regulatory authorities. Necessary measures should be taken to prevent unauthorized access to such personal information data, ensure that personnel authorized to access personal information data comply with relevant laws and regulations, and ensure the security of user personal information. Once this user personal information data is no longer needed, the risk should be minimized by restricting or even prohibiting data collection and / or deleting the data.
[0074] Figure 1 This is a flowchart illustrating a message processing method provided in the first embodiment of the present invention, as shown below. Figure 1 As shown, the method includes:
[0075] Step 101: Receive a processing message sent by an external system. The processing message includes: a process identifier, a slice identifier, and at least one message parameter; wherein, the process identifier is used to identify the target process.
[0076] The process identifier corresponds to the target process. The target process can be divided into multiple slice processes according to specific needs and workflow status. Slice processes are identified by slice identifiers. Slice identifiers can correspond to slice process names, slice sequences, etc. The system ensures the sequentiality and integrity of message processing for the target business based on the total number of slices in the target process, the slice identifiers for each processing event, and the slice sequences.
[0077] The external system is the interface system, capable of sending external messages and receiving exception messages. Different external systems generate different processing messages, which may include message parameters. Message parameters can be stored in key-value pairs, which include: a parameter identifier and its corresponding value.
[0078] Step 102: Generate standardized parameters corresponding to the processed message based on the metastructure information and at least one message parameter.
[0079] Metastructure information is used to standardize message parameters in processing messages from different external systems. By parsing the metastructure information, the data structure of the standardized parameters is obtained. The data structure of the standardized parameters determines the processing method for the processed events. The metastructure information may include: a metastructure identifier, the data structure of the standardized parameters, a version number, and an update time. The data results of the standardized parameters may include: the field names of the output fields, the types of the output fields, and the descriptions of the output fields. The version number corresponds to the current version, and the update time is the update time of the metastructure information.
[0080] The metastructure information may also include: external system ID. Different external systems correspond to different system IDs. The metastructure information corresponding to the external system is determined using the external system ID; then, based on the determined metastructure information and at least one message parameter, standardized parameters corresponding to the processed message are generated.
[0081] If the current system needs to interface with an external system, it can generate the corresponding metastructure information for that external system based on the business requirements and data table structures of both systems. This metastructure information includes the external system ID. When a business message is received from an external system, the system uses the corresponding metastructure information to standardize the business parameters in the message, and then assembles and processes the business message from the external system into an event processing unit.
[0082] Specifically, at least one output field is obtained from the meta-structure information; for each output field, standardized parameters corresponding to the output field are generated based on the processing information and message parameters corresponding to the output field; and standardized parameters corresponding to each output field are combined to generate standardized parameters corresponding to the processing message.
[0083] The processing information is used to generate standardized parameters corresponding to the output fields based on the message parameters. This processing information can include: the mapping relationship between standardized parameters and message parameters, the mapping relationship between standardized parameters, message parameters, and external system numbers, the operational expressions corresponding to the standardized parameters (which are composed of message parameters), and the processing procedures corresponding to the standardized parameters. Using the processing information and message parameters corresponding to the output fields, the standardized parameters for those output fields can be generated.
[0084] Step 103: Assemble the process identifier, slice identifier, and standardized parameters into the processing event corresponding to the processing message.
[0085] Event processing is uniquely identified by an event identifier. Event information may include: event identifier, slice identifier, occurrence time, process, current slice number, total number of slices, and message body. The total number of slices and the current slice number can be used for process integrity verification. The message body stores the standardized parameters corresponding to the processing message. Standardized parameters can be stored in key-value pairs, which include a parameter identifier and its corresponding value.
[0086] In one embodiment of the present invention, after determining the target slice process based on the process identifier and slice identifier, the method further includes: obtaining the data cleaning rules corresponding to the target slice process; and cleaning the parameter information of the processing event according to the data cleaning rules. The data cleaning rules can be used to clean standardized parameters in the processing event, such as converting characters in standardized parameters into numerical forms, handling invalid values, and supplementing missing fields. Through data cleaning rules, the data quality of the parameter information of the processing event can be improved, and the occurrence of processing anomalies can be reduced.
[0087] Step 104: Based on the slice identifier, determine the target slice process from among the multiple slice processes corresponding to the target process, and call the target slice process to process the event information of the event.
[0088] Steps 102-103 encapsulate processing messages from different external systems into standardized processing events. Then, based on these standardized events, the event processing process is unified, such as unified external output and fault tolerance.
[0089] Event information, such as slice identifier, total number of slices, and current slice sequence, can ensure the order and integrity of message processing, while flexibly providing replaceable message processing mechanisms and data persistence mechanisms.
[0090] In this embodiment of the invention, message parameters in processing messages from different external systems are standardized using the original structural information, and processing events containing standardized parameters are generated to facilitate unified processing of these events. Secondly, the business process is divided into multiple slice processes, with each slice process handling the processing events. On one hand, this allows for more accurate control over each processing step of the event, and makes it easier to capture and handle anomalies. On the other hand, by calling different slice processes and their order, the business processes can be flexibly orchestrated to adapt to various business scenarios. Therefore, the solution in this embodiment of the invention can achieve interoperability between different business systems and has good versatility and scalability.
[0091] In one embodiment of the present invention, after processing the event information of the processing event by calling the target slice process, the method further includes: obtaining the processing result corresponding to the processing event; in response to the processing result indicating that the event processing has failed, generating exception information indicating the processing failure, and returning the exception information to the external system. If the processing event fails, error information can be obtained, and the exception information indicating the event processing failure can be returned to the external system. The exception information may include the obtained error information. The external system can regenerate and send the processing message based on the exception information.
[0092] Figure 2 This is a flowchart illustrating a message processing method provided in the second embodiment of the present invention, as shown below. Figure 2 As shown, the method includes:
[0093] Step 201: Receive a processing message sent by an external system. The processing message includes: process identifier, target business identifier, slice identifier, and at least one message parameter.
[0094] The process identifier is used to identify the target process. The target business identifier is used to identify the target business. The uniqueness of processed messages is maintained through the process identifier, business identifier, and slice identifier.
[0095] Step 202: Generate standardized parameters corresponding to the processed message based on the metastructure information and at least one message parameter.
[0096] Step 203: Assemble the process identifier, target business identifier, slice identifier, and standardized parameters into a processing event corresponding to the processing message.
[0097] Step 204: In response to the business identifier corresponding to the candidate processing event being the target business identifier, the candidate processing event is determined as the target processing event corresponding to the target business.
[0098] Multiple processing events existing in the system are acquired as candidate processing events. The business identifier corresponding to each candidate processing event is determined. If the business identifier corresponding to a candidate processing event is the target business identifier, then the candidate processing event is determined as the target processing event corresponding to the target business. Through the above method, multiple target processing events are determined from the multiple candidate processing events.
[0099] Step 205: Determine the execution order of each target processing event based on the slice identifier corresponding to each target processing event.
[0100] The execution order of each target processing event can be determined based on the size of the slice identifier. Alternatively, the execution order corresponding to each slice identifier can be preset in the system, and the execution order of each target processing event can be determined based on the execution order corresponding to each slice identifier. Furthermore, the execution order of each target processing event can be determined based on the current slice sequence number corresponding to the target event.
[0101] Step 206: According to the execution order, call the slice process corresponding to each target processing event in sequence to process the event information of the target processing event.
[0102] In embodiments of the present invention, the target processing event corresponding to the target service is first determined based on the service identifier corresponding to the processing event; then, the execution order of each target processing event is determined based on the slice identifier corresponding to each target processing event, and the slice process is called in this execution order to complete the processing of the target processing event. Therefore, the sequentiality of message processing for the target service can be guaranteed based on slice information, such as slice identifier, total number of slices, and current slice sequence.
[0103] In one embodiment of the present invention, after processing the event information of each target processing event by sequentially calling the slice process corresponding to each target processing event according to the execution order, the method further includes: determining the processing result corresponding to each target processing event; in response to the fact that the processing results corresponding to each target processing event all indicate that the event processing was successful, and the number of slice identifiers corresponding to each target processing event is equal to the total number of slices, determining that the processing of the target business for the target process has been completed.
[0104] If the processing result corresponding to a target processing event indicates that the event processing has failed, or if the number of slice identifiers corresponding to the target processing event is less than the total number of slices, it is determined that the processing of the target business for the target process has not been completed. The process can either continue to wait or return an exception message indicating that the processing of the target process has not been completed to an external system. The solution of this embodiment of the invention can ensure the integrity of message processing for the target business based on slice information, such as slice identifiers, the total number of slices, and the current slice sequence.
[0105] Figure 3 This is a flowchart illustrating a message processing method provided in the third embodiment of the present invention, as shown below. Figure 3 As shown, the method includes:
[0106] Step 301: Receive a processing message sent by an external system. The processing message includes: a process identifier, a slice identifier, and at least one message parameter; wherein, the process identifier is used to identify the target process.
[0107] Step 302: Generate standardized parameters corresponding to the processed message based on the metastructure information and at least one message parameter.
[0108] Step 303: Assemble the process identifier, slice identifier, and standardized parameters into a processing event corresponding to the processing message.
[0109] Step 304: Determine whether the parameter information of the processing event meets the input conditions of the target slice process.
[0110] If the parameter information meets the input conditions, proceed to step 305. If the parameter information does not meet the input conditions, proceed to step 306.
[0111] Step 305: Invoke the target slice process to process the event information of the event.
[0112] Step 306: Generate anomaly information representing the abnormal parameters and return the anomaly information to the external system.
[0113] In this embodiment of the invention, if the processing event corresponding to the processing message does not meet the input conditions, an exception message indicating parameter abnormality is returned to the external system. The external system can modify the message parameters in the processing message based on the exception message, regenerate and resend the processing message.
[0114] This invention provides a message processing system, including: a processor module, an event module, a message module, and a persistence module.
[0115] Processor module: Used to verify compatibility between external and current systems. Based on the metadata, it standardizes message parameters and assembles them into processing events, which have a standardized data structure. During event processing, data cleansing can be performed according to data rules to remove parameter information from the processing events. For exceptions generated during processing, a callback interface is provided to notify external systems.
[0116] Event Module: This module segments business processes based on workflow and transition status, generating multiple sliced processes. These sliced processes safeguard data throughout the entire business lifecycle. Message processing maintains uniqueness through business identifiers and workflow identifiers. Event processing provides a unified encapsulation of external messages. The total number of slices corresponding to each event and the current slice sequence ensure the order and integrity of business messages.
[0117] Persistence module: It provides a unified repository pattern encapsulation for different persistence schemes, shields the underlying differences, and allows for flexible database switching.
[0118] Message module: Receives processing messages sent by external systems, and provides a unified abstraction of the processing messages, shielding them from underlying differences and allowing for flexible switching of the underlying message components.
[0119] The solution based on the embodiments of the present invention can save manpower costs, is suitable for interfacing with multiple external systems, and can meet the needs of incremental development; it also provides a mechanism for checking parameter information for processing events to ensure the correctness of system interfacing; and by defining the relevant information of standardized parameters through meta-structure information, it reduces the maintenance costs required for interfacing with the system.
[0120] Figure 4 This is a schematic diagram of the structure of a message processing device provided in one embodiment of the present invention, as shown below. Figure 4 As shown, the device includes:
[0121] The message receiving module 401 is used to receive processing messages sent by an external system. The processing messages include: a process identifier, a slice identifier, and at least one message parameter; wherein, the process identifier is used to identify the target process.
[0122] The standardization module 402 is used to generate standardized parameters corresponding to the processed message based on the metastructure information and at least one message parameter.
[0123] The event assembly module 403 is used to assemble process identifiers, slice identifiers and standardized parameters into processing events corresponding to processing messages;
[0124] The processing module 404 is used to determine the target slice process from multiple slice processes corresponding to the target process based on the slice identifier, and call the target slice process to process the event information of the processing event.
[0125] Optionally, the standardized module 402 is specifically used for:
[0126] Retrieve at least one output field from the metastructure information;
[0127] For each output field, generate standardized parameters corresponding to the output field based on the processing information and message parameters corresponding to the output field;
[0128] Combine the standardized parameters corresponding to each output field to generate the standardized parameters corresponding to the processed message.
[0129] Optionally, the processing message may also include: a target service identifier, which is used to identify the target service;
[0130] Event assembly module 403 is specifically used for:
[0131] Assemble the target business identifier, process identifier, slice identifier, and standardized parameters into a processing event corresponding to the processing message;
[0132] Processing module 404 is specifically used for:
[0133] In response to the business identifier corresponding to the candidate processing event being the target business identifier, the candidate processing event is determined as the target processing event corresponding to the target business.
[0134] The execution order of each target processing event is determined based on the slice identifier corresponding to each target processing event;
[0135] Based on the execution order, the slice process corresponding to each target processing event is called sequentially to process the event information of the target processing event.
[0136] Optionally, it also includes:
[0137] The determination module 405 is used to determine the processing result corresponding to each target processing event;
[0138] If the processing results corresponding to each target processing event indicate that the event processing was successful, and the number of slice identifiers corresponding to each target processing event is equal to the total number of slices, it is determined that the target business's processing of the target process has been completed.
[0139] Optionally, it also includes:
[0140] The condition determination module 406 is used to determine whether the parameter information of the processing event meets the input conditions of the target slice process;
[0141] In response to the parameter information meeting the input conditions, the step of calling the target slice process to process the event information is executed;
[0142] In response to parameter information not meeting input conditions, anomaly information is generated to characterize the parameter abnormality, and the anomaly information is returned to the external system.
[0143] Optionally, it also includes:
[0144] The cleaning processing module 407 is used to obtain the data cleaning rules corresponding to the target slice process;
[0145] According to the data cleaning rules, the parameter information of the processed events is cleaned.
[0146] Optionally, it also includes:
[0147] The exception handling module 408 is used to obtain the processing result corresponding to the processing event;
[0148] In response to a failure in the processing result representation event, an exception message representing the processing failure is generated and returned to the external system.
[0149] This invention provides an electronic device, comprising:
[0150] One or more processors;
[0151] Storage device for storing one or more programs.
[0152] When one or more programs are executed by one or more processors, the one or more processors implement the methods of any of the above embodiments.
[0153] This invention provides a computer program product, including a computer program that, when executed by a processor, implements the enterprise risk assessment method of this invention.
[0154] The following is for reference. Figure 5 It shows a schematic diagram of the structure of a computer system 500 suitable for implementing a terminal device of the present invention. Figure 5 The terminal device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.
[0155] like Figure 5 As shown, the computer system 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 502 or programs loaded from storage section 508 into random access memory (RAM) 503. The RAM 503 also stores various programs and data required for the operation of the system 500. The CPU 501, ROM 502, and RAM 503 are interconnected via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0156] The following components are connected to I / O interface 505: an input section 506 including a keyboard, mouse, etc.; an output section 507 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to I / O interface 505 as needed. A removable medium 511, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 510 as needed so that computer programs read from it can be installed into storage section 508 as needed.
[0157] In particular, according to the embodiments disclosed in this invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 509, and / or installed from removable medium 511. When the computer program is executed by central processing unit (CPU) 501, it performs the functions defined above in the system of this invention.
[0158] It should be noted that the computer-readable medium shown in this invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0159] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0160] The modules described in the embodiments of the present invention can be implemented in software or hardware. The described modules can also be located in a processor, and for example, can be described as: a message receiving module, a standardization module, an event assembly module, and a processing module. The names of these modules do not necessarily limit the module itself; for example, a message receiving module can also be described as "a module that receives processing messages sent by an external system, wherein the processing messages include: a process identifier, a slice identifier, and at least one message parameter."
[0161] In another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiments; or it may exist independently and not assembled into the device. The computer-readable medium carries one or more programs, which, when executed by the device, cause the device to include:
[0162] Receive processing messages sent by an external system, the processing messages including: process identifier, slice identifier and at least one message parameter; wherein, the process identifier is used to identify the target process;
[0163] Based on the metastructure information and the at least one message parameter, generate the standardized parameters corresponding to the processed message;
[0164] The process identifier, the slice identifier, and the standardized parameters are assembled into a processing event corresponding to the processing message;
[0165] Based on the slice identifier, the target slice process is determined from multiple slice processes corresponding to the target process, and the target slice process is invoked to process the event information of the processing event.
[0166] According to the technical solution of this embodiment of the invention, firstly, message parameters in processing messages sent by different external systems are standardized using the original structure information. Different external systems correspond to different meta-structure information. Standardized parameters corresponding to the processing messages are generated using the meta-structure information corresponding to the external systems. Processing events containing standardized parameters are then generated to facilitate unified processing of these events in the future.
[0167] Business processes are divided into multiple slices, with each slice handling events at a finer granular level. This allows for more precise control over each processing step, making it easier to capture and handle exceptions. Furthermore, by invoking different slices and their execution order, business processes can be flexibly orchestrated to adapt to various business scenarios. Specifically, selecting multiple slices and arranging their execution order allows for integration with different business systems. Furthermore, different business processes can share the same slices as needed, improving system development efficiency.
[0168] Furthermore, when requirements change, this can be achieved by calling other slice processes or changing the execution order of slice processes, making it flexible and scalable for integration with various different business systems. Therefore, the solution of this invention can achieve integration with different business systems and has good scalability.
[0169] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A message processing method, characterized in that, include: Receive processing messages sent by an external system, the processing messages including: process identifier, slice identifier and at least one message parameter; wherein, the process identifier is used to identify the target process; Based on the metastructure information and the at least one message parameter, generating standardized parameters corresponding to the processed message includes: obtaining at least one output field from the metastructure information; for each output field, generating standardized parameters corresponding to the output field based on the processing information corresponding to the output field and the message parameter; combining the standardized parameters corresponding to each output field to generate standardized parameters corresponding to the processed message; wherein, the metastructure information is used to standardize message parameters in processed messages sent by different external systems, and the metastructure information includes a metastructure identifier, a data structure of the standardized parameters, a version number and update time, and an external system number; The process identifier, the slice identifier, and the standardized parameters are assembled into a processing event corresponding to the processing message; Based on the slice identifier, the target slice process is determined from multiple slice processes corresponding to the target process, and the target slice process is invoked to process the event information of the processing event.
2. The method according to claim 1, characterized in that, The processing message also includes: a target service identifier, which is used to identify the target service; The step of assembling the process identifier, the slice identifier, and the standardized parameters into a processing event corresponding to the processing message includes: The target business identifier, the process identifier, the slice identifier, and the standardized parameters are assembled into a processing event corresponding to the processing message; The process of invoking the target slice flow to process the event information of the processing event includes: In response to the fact that the service identifier corresponding to the alternative processing event is the target service identifier, the alternative processing event is determined as the target processing event corresponding to the target service; The execution order of each target processing event is determined based on the slice identifier corresponding to each target processing event; According to the execution order, the slice process corresponding to each target processing event is called sequentially to process the event information of the target processing event.
3. The method according to claim 2, characterized in that, After processing the event information of each target processing event by sequentially calling the slice process corresponding to each target processing event according to the execution order, the method further includes: Determine the processing result corresponding to each of the target processing events; In response to the fact that the processing results corresponding to each of the target processing events all indicate that the event processing was successful, and the number of slice identifiers corresponding to each of the target processing events is equal to the total number of slices, it is determined that the processing of the target service for the target process has been completed.
4. The method according to claim 1, characterized in that, Before invoking the target slice process to process the event information of the processing event, the method further includes: Determine whether the parameter information of the processing event meets the input conditions of the target slice process; In response to the parameter information meeting the input conditions, the step of calling the target slice process to process the event information of the processing event is executed; In response to the parameter information not conforming to the input conditions, an anomaly information characterizing the parameter abnormality is generated and the anomaly information is returned to the external system.
5. The method according to claim 1, characterized in that, After determining the target slice process based on the process identifier and the slice identifier, the method further includes: Obtain the data cleaning rules corresponding to the target slice process; According to the data cleaning rules, the parameter information of the processing event is cleaned.
6. The method according to claim 1, characterized in that, After the process of calling the target slice procedure to process the event information of the processing event, the method further includes: Obtain the processing result corresponding to the processing event; In response to the processing result indicating event processing failure, an exception message indicating processing failure is generated and returned to the external system.
7. A message processing device, characterized in that, include: The message receiving module is used to receive processing messages sent by an external system. The processing messages include: a process identifier, a slice identifier, and at least one message parameter; wherein, the process identifier is used to identify the target process. The standardization module is used to generate standardized parameters corresponding to the processing message based on the metastructure information and the at least one message parameter; wherein, the metastructure information is used to standardize the message parameters in processing messages sent by different external systems, and the metastructure information includes a metastructure identifier, the data structure of the standardized parameters, the version number and update time, and the external system number; The event assembly module is used to assemble the process identifier, the slice identifier, and the standardized parameters into a processing event corresponding to the processing message; The processing module is used to determine the target slice process from multiple slice processes corresponding to the target process according to the slice identifier, and call the target slice process to process the event information of the processing event; The standardization module is specifically used for: obtaining at least one output field from the metastructure information; for each output field, generating a standardized parameter corresponding to the output field based on the processing information corresponding to the output field and the message parameters; and combining the standardized parameters corresponding to each output field to generate standardized parameters corresponding to the processing message.
8. The apparatus according to claim 7, characterized in that, The processing message also includes: a target service identifier, which is used to identify the target service; The event assembly module is specifically used for: The target business identifier, the process identifier, the slice identifier, and the standardized parameters are assembled into a processing event corresponding to the processing message; The processing module is specifically used for: In response to the fact that the service identifier corresponding to the alternative processing event is the target service identifier, the alternative processing event is determined as the target processing event corresponding to the target service; The execution order of each target processing event is determined based on the slice identifier corresponding to each target processing event; According to the execution order, the slice process corresponding to each target processing event is called sequentially to process the event information of the target processing event.
9. The apparatus according to claim 8, characterized in that, Also includes: The determination module is used to determine the processing result corresponding to each of the target processing events; In response to the fact that the processing results corresponding to each of the target processing events all indicate that the event processing was successful, and the number of slice identifiers corresponding to each of the target processing events is equal to the total number of slices, it is determined that the processing of the target service for the target process has been completed.
10. The apparatus according to claim 7, characterized in that, Also includes: The condition determination module is used to determine whether the parameter information of the processing event meets the input conditions of the target slice process; In response to the parameter information meeting the input conditions, the step of calling the target slice process to process the event information of the processing event is executed; In response to the parameter information not conforming to the input conditions, an anomaly information characterizing the parameter abnormality is generated and the anomaly information is returned to the external system.
11. An electronic device, characterized in that, include: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-6.
12. A computer-readable medium having a computer program stored thereon, characterized in that... When the program is executed by the processor, it implements the method as described in any one of claims 1-6.
13. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-6.