A message generation method, device, equipment, storage medium and program product
By dynamically obtaining and processing message templates and number acquisition rules for financial transaction services, the message system is automatically assembled, which solves the problem of difficulty in dynamically adjusting the value acquisition logic during the message generation process in the prior art, and realizes efficient and automatic message generation and maintenance.
Patent Information
- Application Number
- CN202111532599.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-15
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2041-12-15
AI Technical Summary
In the intensive operation of investment and transactions of financial institutions, it is difficult to dynamically adjust the value logic of the message domain during the message generation process, and the maintenance is poor, so the value logic errors or omissions cannot be handled in time, which increases operational risks.
By obtaining the group report route, message template and message acquisition rule template of the target service, the data source collector obtains the service entity information, the group report executor processes the number acquisition rule script, dynamically generates the message body, and realizes automatic assembly of the message.
It improves the efficiency of message generation, reduces the risk of manual operation, saves a lot of manpower, and can dynamically adjust the message content according to business needs, improving the system maintenance and timeliness of problem handling.
Smart Images

Figure CN114202419B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a message generation method, device, equipment, storage medium and program product. Background Art
[0002] Under the background of globalization of large financial institutions and the prosperity of financial technology, large domestic and foreign financial institutions have started the transformation of intensive operation to reduce enterprise operating costs and improve operating efficiency. In the intensive operation projects of financial institutions' investment and trading, different business scenarios (such as foreign exchange transactions, borrowing transactions, bond transactions, precious metal transactions, derivative transactions, etc.) usually involve message interactions with different types of external systems, as well as different types of messages, including Society for Worldwide Interbank Financial Telecommunications (SWIFT) messages, China National Advanced Payment System (CNAPS) messages, Cross-border Interbank Payment System (CIPS) messages, China Foreign Exchange Trading Center Post-trade Interface Service (CPIS) messages and transaction confirmations, etc.
[0003] In the prior art, each message field in the message is usually assigned a value through code development. That is to say, for each message field in the message specification, different assignment logics must be written according to the actual transaction business to finally form the message. However, when there is a need to adjust the value logic of the message field in the message, or to add a value scenario, the technicians need to modify the code to achieve it, which has poor maintainability; and when the value logic is found to be incorrect or missing, it can only be handled by message modification / manual message sending, which cannot guarantee the timeliness of problem handling and increases the risk of subsequent operations. Summary of the invention
[0004] In view of the above problems in the prior art, the object of the present invention is to provide a message generation method, device, equipment, storage medium and program product, which can dynamically assemble corresponding business messages according to business needs and improve the efficiency of message generation.
[0005] In order to solve the above problem, the present invention provides a message generation method, comprising:
[0006] Obtaining a group report route corresponding to a target service, wherein the group report route includes a data source collector and a group report executor;
[0007] Obtaining a message template and a message data retrieval rule template corresponding to the target service, wherein the message template includes at least one message field, and the message data retrieval rule template includes data retrieval rule scripts for each message field in the message template;
[0008] Acquire the business entity information corresponding to the target business through the data source collector;
[0009] The group message executor processes the data acquisition rule script of each message field respectively, obtains the value of each message field from the business entity information; and generates the message body corresponding to the target business based on the message template and the value of each message field.
[0010] Further, obtaining the group report route corresponding to the target service includes:
[0011] Obtaining message registration information of the target service;
[0012] A corresponding group message route is configured for the target service according to the message registration information.
[0013] Furthermore, the group reporting route also includes at least one entity information collector;
[0014] The acquiring of the business entity information corresponding to the target business through the data source collector includes:
[0015] The at least one entity information collector is called respectively by the data source collector to obtain at least one business entity information corresponding to the target business.
[0016] Further, the processing of the data acquisition rule script of each message field by the group message executor respectively, and obtaining the value of each message field from the business entity information includes:
[0017] Reading the data retrieval rule script of each message field in the message data retrieval rule template through the group message executor;
[0018] The preset data retrieval script processing engine is called by the group message executor to parse the data retrieval rule script of each message field respectively, and the value of each message field is obtained from the business entity information according to the parsing result.
[0019] Furthermore, the group report routing also includes a group report checker and a group report result processor;
[0020] The method further comprises:
[0021] Obtaining the verification rule corresponding to the message template through the group message verifier; verifying the message body according to the verification rule to obtain a verification result;
[0022] When the verification result is that the verification is passed, the message body is stored by the group report result processor.
[0023] Specifically, the checking the message body according to the checking rule to obtain a checking result includes:
[0024] According to the verification rules, the message body is checked for required items, format and related required items;
[0025] If the mandatory item check, format check and associated mandatory item check are all checked and passed, the check result is determined to be passed;
[0026] If at least one of the mandatory item check, format check, and associated mandatory item check fails to pass the check, the check result is determined to be a check failure.
[0027] Another aspect of the present invention provides a message generating device, comprising:
[0028] A group report route acquisition module, used to acquire a group report route corresponding to a target service, wherein the group report route includes a data source collector and a group report executor;
[0029] A template acquisition module, used to acquire a message template and a message data acquisition rule template corresponding to the target service, wherein the message template includes at least one message field, and the message data acquisition rule template includes data acquisition rule scripts for each message field in the message template;
[0030] An entity information acquisition module, used to acquire business entity information corresponding to the target business through the data source collector;
[0031] The message generation module is used to process the data acquisition rule script of each message field respectively through the group message executor, obtain the value of each message field from the business entity information; and generate the message body corresponding to the target business based on the message template and the value of each message field.
[0032] Another aspect of the present invention provides an electronic device, including a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the message generation method as described above.
[0033] Another aspect of the present invention provides a computer-readable storage medium, in which at least one instruction or at least one program is stored, and the at least one instruction or the at least one program is loaded and executed by a processor to implement the message generation method as described above.
[0034] Another aspect of the present invention provides a computer program product, comprising a computer program / instruction, which implements the steps of the message generation method as described above when executed by a processor.
[0035] Due to the above technical solution, the present invention has the following beneficial effects:
[0036] According to the message generation method of the embodiment of the present invention, according to the message sending requirements of the actual business, the message data acquisition rule template is used to define the data acquisition rules of each message field in the message in a script language configuration manner, and the data acquisition rule script of each message field is processed through the corresponding group report routing to obtain the corresponding value, and the message body is automatically combined to generate the corresponding business message dynamically according to the business requirements, without the need for manual filling of numerical values, reducing the risk of misoperation, saving a lot of manpower, and improving the efficiency of message generation. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for use in the embodiments or prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention, and for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work.
[0038] Figure 1 is a structural diagram of an operation system provided by an embodiment of the present invention;
[0039] Figure 2 is a flow chart of a message generation method provided by an embodiment of the present invention;
[0040] Figure 3 is a schematic diagram of a message template provided by an embodiment of the present invention;
[0041] Figure 4 It is a schematic diagram of a message data acquisition rule template provided by an embodiment of the present invention;
[0042] Figure 5 It is a schematic diagram of a data acquisition rule script provided by an embodiment of the present invention;
[0043] Figure 6 is a flow chart of a message generating method provided by another embodiment of the present invention;
[0044] Figure 7It is a structural schematic diagram of a message generating device provided by an embodiment of the present invention;
[0045] Figure 8 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0046] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0047] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, device, product or equipment that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0048] In order to make the purpose, technical scheme and advantages disclosed in the embodiments of the present invention more clear, the embodiments of the present invention are further described in detail in combination with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the embodiments of the present invention and are not used to limit the embodiments of the present invention. The acquisition, storage, use, and processing of data in the technical scheme of the embodiments of the present invention are in compliance with the relevant provisions of national laws and regulations.
[0049] Reference Manual Attached Figure 1 , which shows a schematic diagram of an operation system provided by an embodiment of the present invention, such as Figure 1 As shown, the operation system may include a transaction management module 110, a parameter management module 120, a clearing and settlement management module 130, a transaction confirmation module 140, and a message management module 150. The message management module 150 is respectively connected to the transaction management module 110, the parameter management module 120, the clearing and settlement management module 130, and the transaction confirmation module 140.
[0050] Among them, when the target business is accessed, the transaction confirmation module 140 can call the message registration service component of the message management module 150 to register the message task of the target business and generate message registration information. Based on the message registration information, the message management module 150 can use the message generation method provided in the embodiment of the present invention to obtain the corresponding business entity information from the transaction management module 110, the parameter management module 120 and the clearing and settlement management module 130 through the data source collector, and obtain the values of each message field from the business entity information through the group message executor in combination with the message template and the message data retrieval rule template corresponding to the target business, and finally generate the message body corresponding to the target business.
[0051] Reference Manual Attached Figure 2 , which shows a process of a message generation method provided by an embodiment of the present invention, which can be applied to Figure 1 In the message management module, the specific Figure 2 As shown, the method may include the following steps:
[0052] S210: Acquire a group report route corresponding to the target service, where the group report route includes a data source collector and a group report executor.
[0053] In an embodiment of the present invention, the target business may be various types of investment and trading businesses, such as foreign exchange inquiries, foreign currency lending, foreign exchange options, precious metals and commodities and other trading businesses in the financial market. The counterparties corresponding to the target business may include various types of domestic and foreign financial institutions. The confirmation and clearing and settlement of the trading business need to be achieved with the help of the operating system.
[0054] Specifically, obtaining the group report route corresponding to the target service may include:
[0055] Obtaining message registration information of the target service;
[0056] A corresponding group message route is configured for the target service according to the message registration information.
[0057] In an embodiment of the present invention, the message registration information can be generated by the transaction confirmation module of the operation system when the target service is accessed, calling the message registration service component of the message management module to register the corresponding message task, and the message registration information can include the message type corresponding to the target service and the message template identification (Identification, ID) and the message data retrieval rule template ID. After the message registration information is obtained, the corresponding group message route can be configured according to the message type corresponding to the target service through the group message route distributor. Specifically, the group message route may include a group message processor and at least one entity information collector, and the group message processor may include a data source collector, a group message executor, etc.
[0058] For example, for SWIFT MT600 messages, the corresponding group report routing includes entity information collectors such as transaction information collector, local clearing information collector and counterparty information collector, as well as group report processors such as data source collector, group report executor, group report verifier and group report result processor. For precious metal delivery confirmation email messages, the corresponding group report routing includes entity information collectors such as transaction information collector, delivery cash flow information collector, local clearing information collector and counterparty information collector, as well as group report processors such as data source collector, group report executor, group report verifier, group report result processor and email format processor.
[0059] It should be noted that different types of target services in the embodiment of the present invention may correspond to the same group report route or different group report routes, which is not limited in the embodiment of the present invention. Different group report routes may be configured for different messages, which is convenient for service personnel to maintain and expand.
[0060] S220: Acquire a message template and a message data retrieval rule template corresponding to the target service, wherein the message template includes at least one message field, and the message data retrieval rule template includes data retrieval rule scripts for each message field in the message template.
[0061] In an embodiment of the present invention, the corresponding message template ID and message retrieval rule template ID can be determined according to the message registration information of the target service, and the corresponding message template can be obtained through the message template ID, and the corresponding message retrieval rule template can be obtained through the message retrieval rule template ID.
[0062] In actual applications, multiple different message types can be determined based on actual business scenarios (including information such as transaction product types, transaction methods, transaction platforms, and transaction counterparties). A message template can be configured for each message type, and different message templates can be distinguished using message template IDs. The message template may include at least one message field and field information corresponding to the at least one message field, including field information such as the section to which it belongs, message label, technical field name, page display title, interface input type, interface display column, check format, read-only flag, hidden flag, mutually exclusive fields, and associated mandatory fields. Taking the MT202 (General Financial Institution Transfer) message of SWIFT international settlement as an example, Figure 3 As shown, it shows multiple message fields of the message template of the MT202 message, as well as the segment to which each message field belongs, the message label, the technical field name (ie, the field for connecting to the outbound call interface of the SMSP system), the verification logic and other field information.
[0063] In actual applications, based on actual business scenarios, corresponding message number extraction rule templates can be configured for each message template. The message number extraction rule template configures different number extraction rule scripts for the number extraction rules of each message field in the message template, and uses the message number extraction rule template ID to distinguish different message number extraction rule templates. Among them, each message number extraction rule template corresponds to a message template, and each message template can correspond to one or more message number extraction rule templates, and the number extraction rules in the one or more message number extraction rule templates are not exactly the same. The specific number of corresponding message number extraction rule templates is not limited in the embodiment of the present invention. Specifically, the message template and its corresponding message number extraction rule template can be stored correspondingly, so that only one template configuration operation needs to be completed, and the required template can be selected as needed to automatically generate the message body later, without the need to manually fill in the message value.
[0064] Take the MT202 (General Financial Institution Transfer) message of SWIFT international settlement as an example. Figure 4 As shown in the figure, according to the counterparty and clearing purpose, multiple sets of message data collection rule templates can be configured for the message template of the MT202 message, and different data collection rule scripts are configured for different message data collection rule templates. Taking the general MT202-General data collection rule script as an example, its configuration is as follows Figure 5 As shown, Figure 5 The data retrieval rule script for each message field in the message template of the MT202 message is shown in FIG.
[0065] In actual applications, after configuring the message template and message data extraction rule template according to the actual business scenario, they can be displayed in the user interface. When a problem occurs and the value logic of the message domain needs to be adjusted, or the message protocol version upgrade requires adding value scenarios, the parameters of the message template and / or the message data extraction rule template can be modified through the interface to handle the problem in a timely manner without manually modifying the message. This can reduce the problem repair cycle while reducing the subsequent business operation risks and improve the timeliness of problem handling, thereby improving the intensive operation level of the entire operation system.
[0066] In a possible embodiment, the data acquisition rule script can be written using a preset message data acquisition rule script language, and the message data acquisition rule script language can adopt a custom syntax structure, and by combining JsonPath and apache Mvel open source expressions, design a variety of syntax structures, supporting functions and data source entities to complete the data acquisition logic of each message domain. Among them, the message data acquisition rule script language also supports function customization, and can be expanded according to actual business needs in the subsequent use process.
[0067] It should be noted that the above-mentioned method of using a preset message data acquisition rule script language to write a data acquisition rule script does not constitute a limitation on the embodiments of the present invention. In some possible embodiments, the data acquisition rule script can also be written using a script language in other prior arts, and the embodiments of the present invention do not impose any limitation on this.
[0068] In the embodiment of the present invention, the data retrieval rules of each message domain are defined by configuring the script language, so that developers can quickly configure and test according to business needs, reduce the amount of code development, improve development efficiency and reduce code maintenance costs. By configuring the message template and the message retrieval rule template, it is convenient for business personnel and personnel who need to perform logic verification, discover problems in advance, and avoid the risk of missing scenarios due to only testing and verification, or problems caused by technical understanding deviations of technicians.
[0069] In addition, due to the use of scripting language configuration, maintainability, readability and flexibility are greatly improved, and business logic adjustments can be completed without secondary development and application deployment, reducing system development costs. When outputting to the same industry, the data acquisition logic of the above message can be retained. Even if the data model is inconsistent, secondary configuration can be quickly performed in the output project, reducing project development costs, improving on-site development efficiency, and can be quickly applied to scenarios of message format conversion.
[0070] S230: Acquire business entity information corresponding to the target business through the data source collector.
[0071] In an embodiment of the present invention, the group message routing may include at least one entity information collector, and the at least one entity information collector may be called by the data source collector to obtain entity information required for generating the message body. The business entity information includes at least one or more of message registration information, transaction unified index information, transaction information, settlement cash flow information, counterparty information, counterparty clearing information, and own clearing information.
[0072] Specifically, obtaining the business entity information corresponding to the target business through the data source collector may include:
[0073] The at least one entity information collector is called respectively by the data source collector to obtain at least one business entity information corresponding to the target business.
[0074] In actual applications, after obtaining the group report route corresponding to the target business, the at least one entity information collector and the group report processor can be instantiated first, and then the data source collector can obtain different business entity information from different modules of the operation system by calling each entity information collector. By pre-configuring the corresponding entity information collector for the target business, the entity information required to generate the message corresponding to the target business can be quickly obtained, thereby further improving the efficiency of message generation.
[0075] In a possible embodiment, after obtaining at least one piece of business entity information corresponding to the target business, the obtained at least one piece of business entity information may be combined into group report data source information in JSON format for use in subsequent generation of a report body.
[0076] S240: Processing the data retrieval rule script of each message field respectively through the group message executor, obtaining the value of each message field from the business entity information; generating a message body corresponding to the target business based on the message template and the value of each message field.
[0077] In the embodiment of the present invention, a data retrieval script processing engine may be pre-set in the group message executor, and the data retrieval rule script of each message field is parsed by the data retrieval script processing engine to finally determine the value of each message field.
[0078] Specifically, the processing of the data acquisition rule scripts of each message field by the group message executor respectively, and obtaining the values of each message field from the business entity information may include:
[0079] Reading the data retrieval rule script of each message field in the message data retrieval rule template through the group message executor;
[0080] The preset data retrieval script processing engine is called by the group message executor to parse the data retrieval rule script of each message field respectively, and the value of each message field is obtained from the business entity information according to the parsing result.
[0081] Specifically, the group message executor can query the corresponding message template and message number retrieval rule template details according to the message template ID and message number retrieval rule template ID corresponding to the target business. For each message field in the message template, the corresponding number retrieval rule script can be read, and the number retrieval script processing engine can be called in turn for parsing, and the corresponding value can be obtained from the business entity information according to the parsing result.
[0082] In a specific embodiment, the data acquisition script processing engine may include a syntax checker and distributor, a syntax parser and a parsing result processor, and the syntax parser may include a constant / variable parser, a function parser, a judgment branch parser, a JsonPath parser, a loop body parser, an Mvel expression parser and a custom parser, etc. Among them, the syntax checker and distributor can read the statements of the data acquisition rule script of each message field line by line, perform syntax check, and distribute them to the corresponding syntax parser for parsing, and the parsing result processor can collect the parsing results of each syntax parser, and determine the value of each message field in combination with at least one business entity information obtained by the data source collector.
[0083] The embodiment of the present invention predefines a data acquisition script processing engine corresponding to the script language for generating data acquisition rule scripts, parses the data acquisition rule scripts of each message field during the message generation process, obtains corresponding values, and can automatically generate field values of the message without manual operation, thereby improving the efficiency of message generation and saving manpower and time costs.
[0084] In the embodiment of the present invention, the message group executor may combine the field information and the corresponding values corresponding to each message field in the message template to obtain the message body corresponding to the target service.
[0085] In a possible embodiment, after obtaining the message template and the message retrieval rule template corresponding to the target business, the message template and the message retrieval rule template can be merged to obtain the MessageAssembleBo group report retrieval rule, and then combined with at least one business entity information obtained by the data source collector or the group report data source information in JSON format obtained by merging the at least one business entity information, the value of each message field is determined by calling the retrieval script processing engine, and finally a group report result message body in JSONArray format is generated.
[0086] In a possible embodiment, in conjunction with the reference specification, Figure 6 , the method may further include:
[0087] S250: Obtaining the verification rule corresponding to the message template through the group message verifier; verifying the message body according to the verification rule to obtain a verification result.
[0088] Specifically, the group message processor in the group message routing may further include a group message checker. After generating the message body of the target service, the group message checker may check the generated message body according to a pre-configured check rule.
[0089] In actual applications, corresponding verification rules can be pre-configured for each message template based on actual business scenarios, and the message templates and their corresponding verification rules can be stored accordingly. After determining the message template corresponding to the target business, the corresponding verification rules can be determined.
[0090] Specifically, verifying the message body according to the verification rule to obtain a verification result may include:
[0091] According to the verification rules, the message body is checked for required items, format and related required items;
[0092] If the mandatory item check, format check and associated mandatory item check are all checked and passed, the check result is determined to be passed;
[0093] If at least one of the mandatory item check, format check, and associated mandatory item check fails to pass the check, the check result is determined to be a check failure.
[0094] In practical applications, the verification format, mandatory flag, and information of the associated mandatory fields corresponding to each message field in the message template can be obtained as verification parameters, and the values of each message field in the message body can be respectively subjected to mandatory verification, format verification, and associated mandatory verification according to the verification parameters and the verification rules corresponding to the message template to obtain corresponding verification results. If the mandatory verification, format verification, and associated mandatory verification corresponding to the values of all message fields in the message body are verified, the verification is passed; if the mandatory verification, format verification, or associated mandatory verification corresponding to the value of at least one message field in the message body is not verified, the verification fails.
[0095] S260: When the verification result is that the verification is passed, the message body is stored by the group report result processor.
[0096] Specifically, the group report processor in the group report routing may further include a group report result processor, and when the generated message body passes the inspection, the group report result processor may store the message body in the OUTMSGBDY_INF data table. In addition, the group report result processor may also update the message status corresponding to the target service, for example, from "pending group report" to "pending to be sent", for use in subsequent business processes.
[0097] In summary, according to the message generation method of an embodiment of the present invention, based on the message sending requirements of the actual business, the message data acquisition rule template is used to define the data acquisition rules of each message field in the message in a script language configuration manner, and the data acquisition rule script of each message field is processed through the corresponding group report routing to obtain the corresponding value, and the message body is automatically combined to generate the corresponding business message, so that the corresponding business message can be dynamically assembled according to the business requirements, without the need to manually fill in the numerical value, reducing the risk of misoperation, saving a lot of manpower, and improving the efficiency of message generation.
[0098] Reference Manual Attached Figure 7 , which shows the structure of a message generating device 700 provided by an embodiment of the present invention. Figure 7 As shown, the device 700 may include:
[0099] The group report route acquisition module 710 is used to acquire the group report route corresponding to the target service, and the group report route includes a data source collector and a group report executor;
[0100] The template acquisition module 720 is used to acquire the message template and the message data acquisition rule template corresponding to the target service, wherein the message template includes at least one message field, and the message data acquisition rule template includes data acquisition rule scripts for each message field in the message template;
[0101] An entity information acquisition module 730 is used to acquire business entity information corresponding to the target business through the data source collector;
[0102] The message generation module 740 is used to process the data extraction rule script of each message field respectively through the group message executor, obtain the value of each message field from the business entity information; and generate the message body of the target business based on the message template and the value of each message field.
[0103] In a possible embodiment, the group reporting route may further include at least one entity information collector;
[0104] The entity information acquisition module 730 is used to call the at least one entity information collector respectively through the data source collector, so as to obtain at least one business entity information corresponding to the target business.
[0105] In a possible embodiment, the group report routing may further include a group report checker and a group report result processor;
[0106] The apparatus 700 may further include:
[0107] A verification module, used to obtain the verification rule corresponding to the message template through the group message verifier; verify the message body according to the verification rule to obtain a verification result;
[0108] The storage module is used to store the message body through the group report result processor when the verification result is that the verification is passed.
[0109] It should be noted that the device provided in the above embodiment, when implementing its functions, only uses the division of the above functional modules as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device provided in the above embodiment and the corresponding method embodiment belong to the same concept, and the specific implementation process is detailed in the corresponding method embodiment, which will not be repeated here.
[0110] An embodiment of the present invention also provides an electronic device, which includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the message generation method provided in the above method embodiment.
[0111] The memory can be used to store software programs and modules. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, application programs required for functions, etc.; the data storage area can store data created according to the use of the device, etc. In addition, the memory can include a high-speed random access memory and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory can also include a memory controller to provide the processor with access to the memory.
[0112] In conjunction with the reference manual Figure 8, which is a block diagram of an electronic device 800 according to an embodiment of the present invention. The electronic device 800 may include one or more processors 802, a system control logic 808 connected to at least one of the processors 802, a system memory 804 connected to the system control logic 808, a non-volatile memory (NVM) 806 connected to the system control logic 808, and a network interface 810 connected to the system control logic 808.
[0113] The processor 802 may include one or more single-core or multi-core processors. The processor 802 may include any combination of general-purpose processors and special-purpose processors (e.g., graphics processors, application processors, baseband processors, etc.). In the embodiments of the present invention, the processor 802 may be configured to execute the following operations: Figure 2-Figure 6 One or more of the various embodiments shown.
[0114] In some embodiments, system control logic 808 may include any suitable interface controller to provide any suitable interface to at least one of processors 802 and / or any suitable device or component in communication with system control logic 808 .
[0115] In some embodiments, the system control logic 808 may include one or more memory controllers to provide an interface to the system memory 804. The system memory 804 may be used to load and store data and / or instructions. In some embodiments, the memory 804 of the device 800 may include any suitable volatile memory, such as a suitable dynamic random access memory (DRAM).
[0116] NVM / memory 806 may include one or more tangible, non-transitory computer-readable media for storing data and / or instructions. In some embodiments, NVM / memory 806 may include any suitable non-volatile memory such as flash memory and / or any suitable non-volatile storage device, such as at least one of a HDD (Hard Disk Drive), a CD (Compact Disc) drive, and a DVD (Digital Versatile Disc) drive.
[0117] NVM / storage 806 may include a portion of storage resources installed on a device of apparatus 800, or it may be accessible by the apparatus but not necessarily a portion of the apparatus. For example, NVM / storage 806 may be accessed over a network via network interface 810.
[0118] In particular, system memory 804 and NVM / storage 806 may include, respectively, a temporary copy and a permanent copy of instructions 820. Instructions 820 may include instructions that, when executed by at least one of processors 802, cause device 800 to perform the following operations: Figure 2-Figure 6 Instructions of the message generation method shown. In some embodiments, the instructions 820, hardware, firmware and / or software components thereof may be additionally / alternatively placed in the system control logic 808, the network interface 810 and / or the processor 802.
[0119] The network interface 810 may include a transceiver for providing a radio interface for the device 800 to communicate with any other suitable device (such as a front-end module, an antenna, etc.) through one or more networks. In some embodiments, the network interface 810 may be integrated with other components of the device 800. For example, the network interface 810 may be integrated with at least one of a communication module of the processor 802, a system memory 804, an NVM / storage 806, and a firmware device (not shown) having instructions. When at least one of the processors 802 executes the instructions, the device 800 implements Figure 2-Figure 6 One or more of the various embodiments shown.
[0120] The network interface 810 may further include any suitable hardware and / or firmware to provide a multiple-input multiple-output radio interface. For example, the network interface 810 may be a network adapter, a wireless network adapter, a telephone modem and / or a wireless modem.
[0121] In one embodiment, at least one of the processors 802 may be packaged together with logic for one or more controllers of the system control logic 808 to form a system in package (SiP). In one embodiment, at least one of the processors 802 may be integrated on the same die with logic for one or more controllers of the system control logic 808 to form a system on chip (SoC).
[0122] The device 800 may further include an input / output (I / O) device 812. The I / O device 812 may include a user interface to enable a user to interact with the device 800; the design of the peripheral component interface enables the peripheral components to interact with the device 800. In some embodiments, the device 800 further includes a sensor for determining at least one of an environmental condition and location information related to the device 800.
[0123] In some embodiments, the user interface may include, but is not limited to, a display (e.g., an LCD display, a touch screen display, etc.), a speaker, a microphone, one or more cameras (e.g., a still image camera and / or a video camera), a flashlight (e.g., an LED flash), and a keyboard.
[0124] In some embodiments, the peripheral component interface may include, but is not limited to, a non-volatile memory port, an audio jack, and a power interface.
[0125] In some embodiments, the sensors may include, but are not limited to, gyroscope sensors, accelerometers, proximity sensors, ambient light sensors, and positioning units. The positioning unit may also be part of or interact with the network interface 810 to communicate with components of a positioning network (e.g., global positioning system (GPS) satellites).
[0126] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 800. In other embodiments of the present invention, the electronic device 800 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0127] An embodiment of the present invention also provides a computer-readable storage medium, which can be set in an electronic device to store at least one instruction or at least one program related to implementing a message generation method. The at least one instruction or the at least one program is loaded and executed by the processor to implement the message generation method provided by the above method embodiment.
[0128] Optionally, in an embodiment of the present invention, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store program codes.
[0129] One embodiment of the present invention also provides a computer program product, which includes a computer program / instructions. When the computer program product runs on an electronic device, the computer program / instructions are loaded and executed by a processor to implement the steps of the message generation method provided in the above-mentioned various optional embodiments.
[0130] It should be noted that the sequence of the embodiments of the present invention described above is for description only and does not represent the advantages and disadvantages of the embodiments. The above describes specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0131] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0132] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0133] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A message generation method, characterized in that: include: Obtaining a group report route corresponding to a target service, wherein the group report route includes a data source collector and a group report executor; Obtaining a message template and a message data retrieval rule template corresponding to the target service, wherein the message template includes at least one message field, and the message data retrieval rule template includes data retrieval rule scripts for each message field in the message template; Acquire the business entity information corresponding to the target business through the data source collector; Reading the data retrieval rule script of each message field in the message data retrieval rule template through the group message executor; The group message executor calls a preset data retrieval script processing engine to parse the data retrieval rule scripts of each message field respectively, and obtains the value of each message field from the business entity information according to the parsing result; A message body corresponding to the target service is generated based on the message template and the values of each message field.
2. The method according to claim 1, characterized in that The obtaining of the group report route corresponding to the target service includes: Obtaining message registration information of the target service; A corresponding group message route is configured for the target service according to the message registration information.
3. The method according to claim 1, characterized in that The group report routing also includes at least one entity information collector; The acquiring of the business entity information corresponding to the target business through the data source collector includes: The at least one entity information collector is called respectively by the data source collector to obtain at least one business entity information corresponding to the target business.
4. The method according to claim 1, characterized in that: The group report routing also includes a group report verifier and a group report result processor; The method further comprises: Obtaining the verification rule corresponding to the message template through the group message verifier; verifying the message body according to the verification rule to obtain a verification result; When the verification result is that the verification is passed, the message body is stored by the group report result processor.
5. The method according to claim 4, characterized in that The checking of the message body according to the checking rule to obtain the checking result comprises: According to the verification rules, the message body is checked for required items, format and related required items; If the mandatory item check, format check and associated mandatory item check are all checked and passed, the check result is determined to be passed; If at least one of the mandatory item check, format check, and associated mandatory item check fails to pass the check, the check result is determined to be a check failure.
6. A message generating device, characterized in that: include: A group report route acquisition module, used to acquire a group report route corresponding to a target service, wherein the group report route includes a data source collector and a group report executor; A template acquisition module, used to acquire a message template and a message data acquisition rule template corresponding to the target service, wherein the message template includes at least one message field, and the message data acquisition rule template includes data acquisition rule scripts for each message field in the message template; An entity information acquisition module, used to acquire business entity information corresponding to the target business through the data source collector; A message generation module, used for reading the data retrieval rule script of each message field in the message data retrieval rule template through the group message executor; The group message executor calls a preset data retrieval script processing engine to parse the data retrieval rule scripts of each message field respectively, and obtains the value of each message field from the business entity information according to the parsing result; A message body corresponding to the target service is generated based on the message template and the values of each message field.
7. An electronic device, characterized in that: The electronic device includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the message generation method as described in any one of claims 1-5.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by the processor to implement the message generation method according to any one of claims 1 to 5.
9. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the steps of the message generation method described in any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Event response system, method, device, and storage medium
CN109040171A
Rule verification method and device
CN109857755A