A method, apparatus, device, and storage medium for generating test messages

By generating ISO20022 test packets, the lack of ISO20022 test packets in the existing technology has been solved, and efficient test packet generation and quality improvement has been achieved, meeting the complex business scenario needs of the financial industry.

CN116346662BActive Publication Date: 2025-07-04CHINA CITIC BANK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310324509.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-29
Publication Date
2025-07-04
Estimated Expiration
2043-03-29

AI Technical Summary

Technical Problem

The existing technology lacks a method to generate ISO20022 test packets, which cannot meet the complex and diverse business scenario needs of the financial industry, resulting in insufficient testing efficiency and quality.

Method used

By obtaining all feature labels and rules based on the message format standard file, comparing and deduplication and combining, ISO20022 test packets that comply with the specifications.

Benefits of technology

It improves the efficiency and quality of test packet generation, meets the testing needs of ISO20022 packets, and improves the testing effect of financial business systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116346662B_ABST
    Figure CN116346662B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method, apparatus, device, and storage medium for generating test messages. The method includes: obtaining all-element tags of different types of messages and all-element rules for each element tag according to a message format standard file; comparing and deduplicating the all-element rules between the same element tags of different types of messages to obtain all-element tags of the messages and target element rules for each element tag; combining the all-element tags to obtain a combination result; combining the target element rules according to the combination result to obtain a message body model; generating a test message body according to the message body model; and assembling a test message header for the test message body to generate a test message. The present disclosure can test a service system with compliant test messages, improving test efficiency and test quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of software testing, and in particular, to a method, device, equipment and storage medium for generating test messages. Background Art

[0002] In the investment, trading and other operations of financial institutions, the transaction information of each operation is transmitted through messages. Specifically, the sending party stores the transaction information in the message and transmits it to the receiving party through the message. When the receiving party parses the received message to determine the transaction information, specific transaction operations are performed. In the prior art, MT messages are used, but with the development and progress of technology, MT format messages cannot meet the requirements of complex and diverse business scenarios. According to the information released by the Society for Worldwide Interbank Financial Telecomm (SWIFT), it is expected to complete the conversion of MT messages to ISO20022 messages (Universal Financial Industry Message Scheme for Financial Services) by the end of 2025. It can be seen that ISO20022 messages will become the general messages in the financial industry. However, there is currently a lack of relevant technologies for generating ISO20022 test messages, which cannot meet the requirements of message testing.

[0003] Therefore, there is an urgent need for a test message generation method that can generate ISO20022 test messages, make up for the gaps in the prior art, test the business system with compliant test messages, and improve the test efficiency and quality. Summary of the Invention

[0004] The purpose of the embodiments of this article is to provide a method, device, equipment and storage medium for generating test messages, so as to test the business system with compliant test messages and improve the test efficiency and quality.

[0005] To achieve the above purpose, on the one hand, the embodiments of this article provide a method for generating test messages, including:

[0006] Obtain the full set of element tags of different types of messages and the full set of element rules for each element tag according to the message format standard file;

[0007] Compare and deduplicate the full set of element rules between the same element tags of different types of messages to obtain the full set of element tags of the message and the target element rules for each element tag;

[0008] Combine the full set of element tags to obtain a combination result;

[0009] Combine the target element rules according to the combination result to obtain a message body model;

[0010] Generate a test message body according to the described message body model;

[0011] Assemble a test message header for the test message body to generate a test message.

[0012] Preferably, the element rules of each element tag include: element attribute sub-rules, element data type sub-rules, and element customization sub-rules.

[0013] Preferably, the further steps of comparing and removing duplicates from the full set of element rules between the same element tags of different types of messages to obtain the full set of element tags of the message and the target element rules of each element tag include:

[0014] Determine whether any of the element rules between the same element tags of different types of messages are the same;

[0015] If so, only retain the element rule of this element tag in any one type of message after deduplication as the target element rule of this element tag;

[0016] If not, do not deduplicate, and use the element rule of this element tag in the different types of messages as the target element rule of this element tag.

[0017] Preferably, the further steps of combining the full set of element tags to obtain a combination result include:

[0018] Count the number of occurrences of the target element rules in each element tag;

[0019] Sort the full set of element tags according to the number of occurrences;

[0020] Determine the importance of each element tag according to the sorting result;

[0021] Select multiple element tags according to the importance of the element tags;

[0022] Combine the multiple element tags in any one or more ways of AND, OR, and NOT to obtain a combination result.

[0023] Preferably, the further steps of selecting multiple element tags according to the importance of the element tags include:

[0024] The importance of the element tag is proportional to the selection probability.

[0025] Preferably, the further steps of selecting multiple element tags according to the importance of the element tags include:

[0026] The selection probability of the element tag with the highest importance is 100%;

[0027] The selection probability of the element label with the lowest importance is greater than 0%.

[0028] Preferably, the combining the target element rules according to the combination result to obtain a message body model further includes:

[0029] Count the number of target element rules in each element label in the combination result;

[0030] Based on the counted number, use the cascade combination method to combine the target element rules of each element label in the combination result to obtain a message body model.

[0031] Preferably, the combining the target element rules according to the combination result to obtain a message body model further includes:

[0032] Based on the combination result, use the Cartesian product combination method to combine the target element rules of each element label in the combination result to obtain a message body model.

[0033] Preferably, it further includes:

[0034] Supplement the element historical sub-rules to the element rules of each element label.

[0035] On the other hand, the embodiments of the present invention provide a test message generation device, the device includes:

[0036] An element rule determination module, configured to obtain all element labels of different types of messages and all element rules of each element label according to a message format standard file;

[0037] A comparison and deduplication module, configured to compare and deduplicate all element rules between the same element labels of different types of messages to obtain all element labels of the message and the target element rules of each element label;

[0038] A combination module, configured to combine the all element labels to obtain a combination result;

[0039] A model determination module, configured to combine the target element rules according to the combination result to obtain a message body model;

[0040] A message body generation module, configured to generate a test message body according to the message body model;

[0041] A message generation module, configured to assemble a test message header for the test message body to generate a test message.

[0042] In another aspect, an embodiment of the present disclosure also provides a computer device, including a memory, a processor, and a computer program stored on the memory. When the computer program is run by the processor, it executes the instructions of any one of the above methods.

[0043] In another aspect, an embodiment of the present disclosure also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is run by the processor of a computer device, it executes the instructions of any one of the above methods.

[0044] As can be seen from the technical solutions provided by the embodiments of the present disclosure above, the full-scale element tags obtained from the message format standard file and the full-scale element rules of each element tag in the embodiments of the present disclosure are used to extract some element regulations in the message format standard file. Further, the element rules are compared and duplicates are removed. In this way, the duplicate element regulations are removed. After removing duplicates, the element tags are combined, and then the target element rules are combined based on the combination result. In this way, the message body model can be obtained, and a test message is further generated to fill the gaps in the prior art and improve the subsequent test efficiency and test quality.

[0045] To make the above and other purposes, features, and advantages of the present disclosure more obvious and understandable, the following specific preferred embodiments are given and described in detail in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] To more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the following briefly introduces the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present disclosure. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0047] Figure 1 Shows a schematic flowchart of a method for generating a test message provided by an embodiment of the present disclosure;

[0048] Figure 2 Shows a schematic flowchart of comparing and removing duplicates of the full-scale element rules between the same element tags of different types of messages provided by an embodiment of the present disclosure;

[0049] Figure 3 Shows a schematic flowchart of combining the full-scale element tags to obtain a combination result provided by an embodiment of the present disclosure;

[0050] Figure 4 Shows a schematic flowchart of combining the target element rules based on the combination result to obtain a message body model provided by an embodiment of the present disclosure;

[0051] Figure 5Shows a schematic diagram of the module structure of a test message generation device provided by the embodiments in this article;

[0052] Figure 6 Shows a schematic diagram of the structure of a computer device provided by the embodiments in this article.

[0053] Explanation of the attached drawing symbols:

[0054] 100, Element rule determination module;

[0055] 200, Comparison and duplicate removal module;

[0056] 300, Combination module;

[0057] 400, Model determination module;

[0058] 500, Message body generation module;

[0059] 600, Message generation module;

[0060] 602, Computer device;

[0061] 604, Processor;

[0062] 606, Memory;

[0063] 608, Driving mechanism;

[0064] 610, Input / output module;

[0065] 612, Input device;

[0066] 614, Output device;

[0067] 616, Presentation device;

[0068] 618, Graphical user interface;

[0069] 620, Network interface;

[0070] 622, Communication link;

[0071] 624, Communication bus. Detailed implementation manners

[0072] Next, the technical solutions in the embodiments of this article will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of this article. Obviously, the described embodiments are only a part of the embodiments of this article, rather than all the embodiments. Based on the embodiments in this article, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of this article.

[0073] In the investment, trading and other operations of financial institutions, the transaction information of each operation is transmitted through messages. Specifically, the sender stores the transaction information in the message and transmits it to the receiver through the message. When the receiver parses the received message to determine the transaction information, specific transaction operations are then carried out. In the prior art, MT messages are adopted. However, with the development and progress of technology, MT format messages cannot meet the requirements of complex and diverse business scenarios. According to the information released by the Society for Worldwide Interbank Financial Telecomm (SWIFT), it is expected to complete the conversion of MT messages to ISO20022 messages (General Message Scheme for the Financial Services Industry) by the end of 2025. It can be seen that ISO20022 messages will become the general messages in the financial industry. However, there is currently a lack of relevant technologies for generating ISO20022 test messages, which cannot meet the requirements of message testing.

[0074] To solve the above problems, the embodiments of this article provide a method for generating test messages. Figure 1 It is a schematic flowchart of a method for generating test messages provided by the embodiments of this article. This specification provides the method operation steps as described in the embodiments or flowcharts. However, based on routine or non-creative labor, it may include more or fewer operation steps. The step order listed in the embodiments is only one way among the execution orders of numerous steps and does not represent the only execution order. When the actual system or device product executes, it can be executed in the order of the method shown in the embodiments or the drawings or executed in parallel.

[0075] It should be noted that the terms "first", "second", etc. in the specification, claims and above-mentioned drawings of this article are used to distinguish similar objects and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of this article described here can be implemented in an order other than those illustrated or described here. In addition, the terms "include" and "have" and any of their variations are intended to cover non-exclusive inclusion. For example, a process, method, device, product or equipment that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or are inherent to these processes, methods, products or equipment.

[0076] At present, the payment systems in many countries have adopted the ISO20022 message format standard. For example, the RMB payment system in China, such as the second-generation payment system of the People's Bank of China (CNAPS) and the Cross-border Interbank Payment System (CIPS). The upgrade of the message for foreign currency business can be more harmoniously connected with the existing payment system, realizing cross-system interconnection and information sharing. The content of the ISO20022 message is structured, mandatory, and rich. By optimizing the remittance information in more detail, it can improve the customer experience and provide more complete anti-money laundering screening data. It can improve payment processing efficiency, system scanning accuracy, and reconciliation automation, providing higher processing efficiency and accuracy. The ISO20022 standard is an international standard formulated by ISO for the information exchange business requirements of the financial industry. This standard provides a more advanced general message scheme, aiming to enhance the interoperability, openness, and scalability of financial messages. For the above reasons, there is an urgent need for a test message generation method that can generate ISO20022 test messages, fill the gaps in the existing technology, test the business system through compliant test messages, and improve the test efficiency and quality.

[0077] Referring to Figure 1 , this article provides a test message generation method, including:

[0078] S101: Obtain the full set of element tags for different types of messages and the full set of element rules for each element tag according to the message format standard file;

[0079] S102: Compare and deduplicate the full set of element rules between the same element tags of different types of messages to obtain the full set of element tags for the message and the target element rules for each element tag;

[0080] S103: Combine the full set of element tags to obtain a combination result;

[0081] S104: Combine the target element rules according to the combination result to obtain a message body model;

[0082] S105: Generate a test message body according to the message body model;

[0083] S106: Assemble a test message header for the test message body to generate a test message.

[0084] In this application, the message format standard file can be an ISO20022 international standard file. ISO20022 is an XML-based information standard. In the message format standard file, the information standards that different types of messages should have are described according to the message types. After processing the message format standard file, the full set of element tags for different types of messages is obtained. For example, the full set of element tags for type A messages is x, y, z, and the full set of element tags for type B messages is x, y. Generally, the element tags are English words or phrases combined in camel case. The element tags include, but are not limited to: message identification number, message element, message element sub-node, message element sub-node name, XML tag, SO20022 attribute, ISO20022 type, remarks, signed element, etc. For any type of message, it does not necessarily include all of the above element tags and may only include one or more of the above element tags.

[0085] Each element tag in the message format standard file has corresponding element rules. Therefore, when processing the message format standard file, the full set of element rules for the element tags also needs to be obtained. The element rules for each element tag include, but are not limited to: element attribute sub-rules, element data type sub-rules, and element customization sub-rules. Taking the element attribute sub-rules as an example, it may include the position, name, etc. of the element tag. Taking the element data type sub-rules as an example, it may include the data length, etc. Taking the element customization sub-rules as an example, it may include prohibited items, such as prohibiting Chinese characters.

[0086] For any element tag of any type of message, the full set of element rules for any element tag does not necessarily include all of the above element rules and may only include one or more of the above element rules. Taking type A messages as an example, the full set of element rules for the element tag x can be: set at the initial position, the data length is allowed to be at most 4 characters, and Chinese characters are prohibited. Taking type B messages as an example, the full set of element rules for the element tag x can be: set at the end position, the data length is allowed to be at most 4 characters.

[0087] Furthermore, it is necessary to integrate the same element tags of different types of messages to obtain the full set of element tags in units of messages. After integration, it can be clearly understood which element tags the message has in total. And integrate the element rules under the same element tag to obtain the target element rules for each element tag in units of element tags. After integration, it can be clearly understood which element rules there are in total under each element tag. After integration, it is convenient to extract different element tags and element rules for combination to generate a message body model.

[0088] However, there may be overlaps in the element rules between different types of messages for the same element label. For example, message type A and message type B are different types of messages, and the data type sub - rules in the element label "message identification number" for both are that a maximum of 4 characters are allowed. This is a case of overlap in the element rules between different types of messages for the same element label. In the face of this situation, comparison and duplicate removal are required to prevent duplication when generating test messages later. Specifically, referring to Figure 2 , compare and remove duplicates from all element rules between the same element labels of different types of messages to obtain all element labels of the message and the target element rules for each element label. This further includes:

[0089] S201: Determine whether any element rules between the same element labels of different types of messages are the same;

[0090] S202: If so, after duplicate removal, only retain the element rule of this element label for any one type of message as the target element rule for this element label;

[0091] S203: If not, do not remove duplicates, and use the element rule of this element label for the different types of messages as the target element rule for this element label.

[0092] Continuing with the above example, if the data type sub - rules in the message identification number are the same for message type A and message type B, then after duplicate removal, only retain the data type sub - rule in the message identification number for message type A or message type B, that is, a maximum of 4 characters, as the target element rule for the message identification number.

[0093] If the data type sub - rules in the message identification number are the same for message type A and message type B, and the data type sub - rule in the message identification number for message type C is different from that of message type A and message type B, which is a maximum of 10 characters, then during comparison and duplicate removal, only remove duplicates from the data type sub - rules in the message identification number for message type A and message type B, do not remove duplicates for the data type sub - rule in the message identification number for message type C, and use a maximum of 10 characters as the target element rule for the message identification number. Thus, the target element rules for the element type of message identification number include a maximum of 4 characters and a maximum of 10 characters.

[0094] After obtaining the full set of element tags of the message and the target element rules for each element tag, it is necessary to further generate a message body model to prepare for generating a test message body. For a test message body, it must have certain element tags, and there must be certain element rules under the element tags. In order to quickly and efficiently simulate complex business scenarios, when combining element tags and the element rules under the element tags, the importance of the element tags needs to be considered. The higher the importance of an element tag and the corresponding target element rules, the more likely they are to appear in the test message body.

[0095] Refer to Figure 3 , and further combine the full set of element tags to obtain a combination result, specifically:

[0096] S301: Count the number of target element rules in each element tag;

[0097] S302: Sort the full set of element tags according to the count number;

[0098] S303: Determine the importance of each element tag according to the sorting result;

[0099] S304: Select multiple element tags according to the importance of the element tags;

[0100] S305: Combine the multiple element tags in any one or more ways of AND, OR, and NOT to obtain a combination result.

[0101] Since the element tags included in different types of messages may be different, the full set of element rules for any element tag may also be different, and the element tags have undergone comparison and deduplication of element rules, so the number of target element rules in any element tag varies. However, for the target element rules in each element tag, the smaller the count number of the target element rules, it may mean that there is more deduplication of the target element rules in this element tag, that is, a large number of messages have the same element tag. Therefore, the higher the importance of the element tag corresponding to the smaller count number.

[0102] The full - scale element tags can be sorted according to the counting number. If it is in ascending order, the later the sorted element tag is, the higher its importance. If it is in descending order, the earlier the sorted element tag is, the higher its importance. Multiple element tags can be selected according to the importance of the element tags, but the importance of the element tags is proportional to the selection probability. The selection probability of the element tag with the highest importance is 100%, and the selection probability of the element tag with the lowest importance is greater than 0%. For the element tag with the highest importance, no matter how the message body model is combined, this element tag must be included. For the element tag with the lowest importance, at least one message body model should include this element tag, so that the message body model can be more practical and reasonable.

[0103] It should be noted that when combining element tags, the number of element tags is not limited. Multiple element tags can be combined in any one or more ways of AND, OR, and NOT. For example, element tag x AND y OR z, element tag x OR y NOT z, etc.

[0104] In the embodiments of this article, referring to Figure 4 , the combining the target element rules according to the combination result to obtain a message body model further includes:

[0105] S401: Count the number of target element rules in each element tag in the combination result;

[0106] S402: Based on the counting number, use the cascading combination method to combine the target element rules of each element tag in the combination result to obtain a message body model.

[0107] Or, the combining the target element rules according to the combination result to obtain a message body model further includes:

[0108] Based on the combination result, use the Cartesian product combination method to combine the target element rules of each element tag in the combination result to obtain a message body model.

[0109] Suppose the combined result is the element label x AND y OR z, where the importance of x is higher than y, and y is higher than z. The target element rules of x, y, and z can be combined using the cascade combination method or the Cartesian product combination method. The cascade combination method means that when generating the message body model by combining element labels, the one with the largest number of target element rules is used as the standard, and numbers are randomly selected from the element labels with fewer counts to completely cover the element labels with more counts. For example, there are 3 target element rules in element label x, namely x-1, x-2, and x-3, and there are 2 target element rules in element label y, namely y-1 and y-2. When the combined result is the element label x AND y, the message body models obtained by combining using the cascade combination method can be: x-1 combined with y-1 to obtain the first message body model, x-2 combined with y-2 to obtain the second message body model, and x-3 combined with y-1 to obtain the third message body model. In this way, the element label x with more counts can be completely covered, and the number of message body models can be reduced, improving the subsequent test efficiency.

[0110] The Cartesian product combination method is exhaustive coverage. For example, there are 3 target element rules in element label x, namely x-1, x-2, and x-3, and there are 2 target element rules in element label y, namely y-1 and y-2. When the combined result is the element label x AND y, the message body models obtained by combining using the Cartesian product combination method can be: x-1 combined with y-1 to obtain the first message body model, x-1 combined with y-2 to obtain the second message body model, x-2 combined with y-1 to obtain the third message body model, x-2 combined with y-2 to obtain the second message body model, x-3 combined with y-1 to obtain the second message body model, and x-3 combined with y-2 to obtain the second message body model. In this way, the element labels x and y can be completely covered, ensuring the accuracy of subsequent tests.

[0111] In addition, the embodiments of this article also include:

[0112] Supplement the element historical sub-rules to the element rules of each element label. In this way, the element rules of each element label include: element historical sub-rules, element attribute sub-rules, element data type sub-rules, and element customization sub-rules. The historical sub-rules are element rules accumulated in daily tests, which can be regulations on the number of decimal places of data. For example, when it comes to amount data, the US dollar allows decimal places and can support up to 2 decimal places at most; the Japanese yen does not allow decimal places, so the decimal places of 2 decimal places are fixed and filled with ".00".

[0113] Further, after obtaining the message body model, a test message body can be generated according to the message body model. The generated test message body must conform to the message body model. Since there are multiple message body models obtained by combination, each message body model can generate a test message body, that is, multiple test message bodies can be obtained. Then, data that meets the length requirements is added at the corresponding positions, the environment and general information are correctly configured, etc., to complete the generation of the test message header. Assembling the test message body and the test message header can generate a test message.

[0114] It should be noted that the generated test message body can include positive cases and negative cases. For example, in the test message body, the element rule of an element label requires a maximum of 4 characters. The corresponding positive cases include: 1, 12, 123, 1234, and the corresponding negative cases include: null and 12345.

[0115] The full set of element labels and the full set of element rules for each element label according to the ISO20022 message format standard file in the embodiments of this article are used to extract some element regulations in the message format standard file, and then the element rules are further compared and de-duplicated to remove the duplicate element regulations. After de-duplication, the element labels are combined, and then the target element rules are combined on the basis of the combination result, so that the message body model can be obtained, and further the ISO20022 test message can be generated to fill the gap in the prior art and improve the subsequent test efficiency and test quality.

[0116] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. And the acquisition, storage, use, processing, etc. of the data in the technical solutions described in the embodiments of this application all comply with the relevant regulations of national laws and regulations.

[0117] Based on the above-mentioned test message generation method, the embodiments of this article also provide a test message generation device. The device can include a system (including a distributed system), software (application), module, component, server, client, etc. that use the method described in the embodiments of this article and are combined with the necessary implementation hardware. Based on the same innovative concept, the devices in one or more embodiments provided in the embodiments of this article are as described in the following embodiments. Since the implementation solutions of the device to solve problems are similar to the method, the implementation of the specific device in the embodiments of this article can refer to the implementation of the foregoing method, and the repeated parts will not be described again. As used below, the term "unit" or "module" can be a combination of software and / or hardware that can achieve a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.

[0118] Specifically, Figure 5 is a schematic diagram of the module structure of an embodiment of a test message generation device provided in an embodiment of this article. Referring to Figure 5 As shown, a test message generation device provided in an embodiment of this article includes: an element rule determination module 100, a comparison and deduplication module 200, a combination module 300, a model determination module 400, a message body generation module 500, and a message generation module 600.

[0119] The element rule determination module 100 is configured to obtain all-element tags of different types of messages and all-element rules of each element tag according to a message format standard file;

[0120] The comparison and deduplication module 200 is configured to compare and deduplicate all-element rules between the same element tags of different types of messages to obtain all-element tags of the message and target element rules of each element tag;

[0121] The combination module 300 is configured to combine the all-element tags to obtain a combination result;

[0122] The model determination module 400 is configured to combine the target element rules according to the combination result to obtain a message body model;

[0123] The message body generation module 500 is configured to generate a test message body according to the message body model;

[0124] The message generation module 600 is configured to assemble a test message header for the test message body to generate a test message.

[0125] Referring to Figure 6 As shown, based on the above-mentioned test message generation method, a computer device 602 is further provided in an embodiment of this article, where the above method runs on the computer device 602. The computer device 602 may include one or more processors 604, such as one or more central processing units (CPUs) or graphics processing units (GPUs), and each processing unit may implement one or more hardware threads. The computer device 602 may also include any memory 606, which is used to store any kind of information such as code, settings, data, etc. In a specific implementation, a computer program stored on the memory 606 and executable on the processor 604, when the computer program is run by the processor 604, may execute instructions according to the above method.

[0126] Non - restrictive. For example, the memory 606 can include any one or more combinations of the following: any type of RAM, any type of ROM, flash memory devices, hard disks, optical discs, etc. More generally, any memory can store information using any technology. Further, any memory can provide volatile or non - volatile retention of information. Further, any memory can represent a fixed or removable component of the computer device 602. In one case, when the processor 604 executes the associated instructions stored in any memory or combination of memories, the computer device 602 can perform any operation of the associated instructions. The computer device 602 also includes one or more drive mechanisms 608 for interacting with any memory, such as a hard disk drive mechanism, an optical disc drive mechanism, etc.

[0127] The computer device 602 can also include an input / output module 610 (I / O) for receiving various inputs (via the input device 612) and for providing various outputs (via the output device 614). One particular output mechanism can include a presentation device 616 and an associated graphical user interface 618 (GUI). In other embodiments, the input / output module 610 (I / O), the input device 612, and the output device 614 may not be included, and the computer device may only be a computer device in a network. The computer device 602 can also include one or more network interfaces 620 for exchanging data with other devices via one or more communication links 622. One or more communication buses 624 couple the components described above together.

[0128] The communication link 622 can be implemented in any way, for example, through a local area network, a wide area network (e.g., the Internet), a point - to - point connection, etc., or any combination thereof. The communication link 622 can include any combination of hard - wired links, wireless links, routers, gateway functions, name servers, etc., governed by any protocol or combination of protocols.

[0129] Corresponding to Figures 1 - 4 In the method, embodiments herein also provide a computer - readable storage medium having a computer program stored thereon, and when the computer program is run by a processor, it executes the steps of the above - mentioned method.

[0130] Embodiments herein also provide a computer - readable instruction, wherein when the processor executes the instruction, the program therein causes the processor to execute the method as Figures 1 to 4 shown.

[0131] It should be understood that in various embodiments herein, the magnitudes of the sequence numbers of the above - mentioned processes do not imply the order of execution. The order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments herein.

[0132] It should also be understood that in the embodiments herein, the term "and / or" is merely a description of the association relationship between associated objects, indicating that three relationships may exist. For example, A and / or B may represent three situations: A exists alone, A and B exist simultaneously, and B exists alone. Additionally, in this text, the character " / " generally indicates that the associated objects before and after are in an "or" relationship.

[0133] Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this text.

[0134] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.

[0135] In the several embodiments provided herein, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Additionally, the displayed or discussed couplings or direct couplings or communication connections to each other can be indirect couplings or communication connections through some interfaces, devices, or units, and can also be in electrical, mechanical, or other forms of connection.

[0136] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiments herein.

[0137] In addition, the functional units in the various embodiments herein can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.

[0138] When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution herein, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments herein. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs that can store program codes.

[0139] Specific embodiments are used in this article to elaborate on the principles and implementation manners herein. The description of the above embodiments is only used to help understand the method and its core idea herein; at the same time, for those of ordinary skill in the art, according to the idea herein, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to this article.

Claims

1. A method for generating test messages, characterized in that, Including: Obtain the full - scale element tags of different types of messages and the full - scale element rules for each element tag according to the message format standard file, where the message format standard file is the ISO20022 international standard file; Judge whether any of the element rules between the same element tags of different types of messages are the same; If so, after deduplication, only retain the element rule of this element tag of any one type of message as the target element rule of this element tag; If not, without deduplication, use the element rule of this element tag of the different types of messages as the target element rule of this element tag; Count the number of occurrences of the target element rules in each element tag; Sort the full - scale element tags according to the counted number; Determine the importance of each element tag according to the sorting result; Select multiple element tags according to the importance of the element tags; Combine the multiple element tags in any one or more ways of AND, OR, and NOT to obtain a combination result; Combine the target element rules according to the combination result to obtain a message body model; Generate a test message body according to the message body model; Assemble a test message header for the test message body to generate a test message.

2. The test message generation method according to claim 1, wherein The element rule of each element tag includes: an element attribute sub - rule, an element data type sub - rule, and an element customization sub - rule.

3. The test message generation method according to claim 1, wherein The step of selecting multiple element tags according to the importance of the element tags further includes: The importance of the element tag is proportional to the selection probability.

4. The test message generation method according to claim 1, wherein The step of selecting multiple element tags according to the importance of the element tags further includes: The selection probability of the element tag with the highest importance is 100%; The selection probability of the element tag with the lowest importance is greater than 0%.

5. The test message generation method according to claim 1, wherein The step of combining the target element rules according to the combination result to obtain a message body model further includes: Count the number of occurrences of the target element rules in each element tag in the combination result; Based on the counted number, use the cascade combination method to combine the target element rules of each element tag in the combination result to obtain a message body model.

6. The test message generation method according to claim 1, wherein The step of combining the target element rules according to the combination result to obtain a message body model further includes: Based on the combination result, use the Cartesian product combination method to combine the target element rules of each element tag in the combination result to obtain a message body model.

7. The test message generation method according to claim 1, wherein Also including: Supplement the element historical sub - rules to the element rules of each element tag.

8. A test message generation device, characterized in that, The device includes: An element rule determination module, configured to obtain the full - scale element tags of different types of messages and the full - scale element rules for each element tag according to the message format standard file, where the message format standard file is the ISO20022 international standard file; A comparison and deduplication module, configured to judge whether any of the element rules between the same element tags of different types of messages are the same; if so, after deduplication, only retain the element rule of this element tag of any one type of message as the target element rule of this element tag; if not, without deduplication, use the element rule of this element tag of the different types of messages as the target element rule of this element tag; A combination module for counting the number of target element rules in each element tag; sorting all element tags according to the counting number; determining the importance of each element tag according to the sorting result; selecting multiple element tags according to the importance of the element tag; combining the multiple element tags in any one or more ways of AND, OR, and NOT to obtain a combination result; A model determination module for combining the target element rules according to the combination result to obtain a message body model; A message body generation module for generating a test message body according to the message body model; A message generation module for assembling a test message header for the test message body to generate a test message.

9. A computer device, comprising a memory, a processor, and a computer program stored on the memory, characterized in that, When the computer program is run by the processor, it executes the instructions of the method according to any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is run by the processor of the computer device, it executes the instructions of the method according to any one of claims 1-7.

Citation Information

Patent Citations

  • Method and device for automatically generating parameters

    CN113157272A

  • Labeled message template generation method

    CN113486230A