Message comparison method and device, equipment, storage medium and product
By analyzing and applying preset message recording rules, automatically recording and comparing messages before and after system reconstruction, the problems of low manual comparison efficiency and low accuracy in the existing technology are solved, and efficient and accurate message comparison are achieved. right.
Patent Information
- Application Number
- CN202411077853.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-07
- Publication Date
- 2024-11-26
AI Technical Summary
The packet comparison after the existing system is reconstructed depends on manual execution, resulting in low efficiency, low accuracy and long time, and wasted a lot of labor costs.
By analyzing the preset message recording rules preconfigured by the user, obtain the fields to be recorded, and the original system and the reconstructed system are recorded and compared according to these fields to realize automated message comparison.
It improves the efficiency and accuracy of message comparison, reduces manual intervention, reduces labor costs, and achieves accurate backtracking of comparison results.
Smart Images

Figure CN119031054A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a message comparison method, device, equipment, storage medium and product. Background Art
[0002] In recent years, system upgrades such as product cloud migration and database localization have the characteristics of high transformation frequency, large transformation scope, and wide impact range. For the above-mentioned technical transformation, reconstruction, and migration projects, it is usually necessary to achieve unawareness of the business, peripheral systems, and external systems. Therefore, during the transformation process, the interactive messages between internal and external systems across system boundaries must be kept completely consistent.
[0003] However, the current message comparison work mainly relies on manual work by test executors. Manual comparison is time-consuming, inefficient, low in accuracy, and has high communication costs, wasting a lot of manpower costs. Summary of the invention
[0004] The main purpose of the present application is to provide a message comparison method, device, equipment, storage medium and product, aiming to solve the technical problems that the existing message comparison after system reconstruction relies on manual execution, which has low efficiency and low accuracy.
[0005] To achieve the above purpose, the present application proposes a message comparison method, the method comprising:
[0006] Parse the preset message recording rules pre-configured by the user to obtain the fields to be recorded;
[0007] Recording messages of the original system and the reconstructed system respectively according to the field to be recorded, to obtain messages before the system reconstruction and messages after the system reconstruction;
[0008] A message comparison is performed on the message before the system reconstruction and the message after the system reconstruction to obtain a message comparison result.
[0009] In one embodiment, the preset message recording rule includes a preset recording field list and a message recording configuration item;
[0010] The step of parsing the preset message recording rule pre-configured by the user to obtain the field to be recorded includes:
[0011] Identify the old and new system identifiers and transaction codes as necessary recording fields;
[0012] Parsing the message recording configuration item according to the preset recording field list to obtain the preset recording field;
[0013] The necessary recording field and the preset recording field are determined as fields to be recorded.
[0014] In one embodiment, the preset recording fields in the preset recording field list include new and old system identifiers, system name, transaction code, message type, request message body, and response message body, and the joint primary key of the preset recording field list is a combination of the new and old system identifiers and the transaction code;
[0015] The message recording configuration item includes a recording or not recording flag, and the number and order of the recording or not recording flags are consistent with the number and order of the preset recording fields in the preset recording field list.
[0016] In one embodiment, the step of parsing the preset message recording rule pre-configured by the user to obtain the field to be recorded includes:
[0017] Determine whether the current environment is a test environment;
[0018] If it is a test environment, determine whether the preset application-level message recording switch is turned on;
[0019] If the preset application-level message recording switch is turned on, the preset message recording rule pre-configured by the user is parsed to obtain the field to be recorded.
[0020] In one embodiment, the step of performing message comparison on the message before the system reconstruction and the message after the system reconstruction to obtain the message comparison result includes:
[0021] Read the message from the user input information and grab the primary key;
[0022] Reading the target message before system reconstruction and the target message after system reconstruction from the message before system reconstruction and the message after system reconstruction respectively according to the message capture primary key;
[0023] A message comparison is performed field by field on the target message before the system reconstruction and the target message after the system reconstruction to obtain a message comparison result.
[0024] In one embodiment, the step of performing field-by-field message comparison on the target message before the system reconstruction and the target message after the system reconstruction to obtain the message comparison result includes:
[0025] Determine whether there is a preset field ignore flag in the user input information;
[0026] If there is a preset field ignore flag, read the preset ignore field list from the user input information;
[0027] Performing field elimination processing on the target message before system reconstruction and the target message after system reconstruction according to the preset ignored field list to obtain the target message before system reconstruction and the target message after system reconstruction after elimination;
[0028] A message comparison is performed field by field on the target message before the system reconstruction after the elimination and the target message after the system reconstruction after the elimination to obtain a message comparison result.
[0029] In addition, to achieve the above purpose, the present application also proposes a message comparison device, the message comparison device comprising:
[0030] The recording rule parsing module is used to parse the preset message recording rules pre-configured by the user to obtain the fields to be recorded;
[0031] A message recording module, used to record messages of the original system and the reconstructed system respectively according to the fields to be recorded, so as to obtain messages before the system reconstruction and messages after the system reconstruction;
[0032] The message comparison module is used to compare the message before the system reconstruction with the message after the system reconstruction to obtain a message comparison result.
[0033] In addition, to achieve the above-mentioned purpose, the present application also proposes a message comparison device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the message comparison method described above.
[0034] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the message comparison method described above are implemented.
[0035] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the message comparison method described above are implemented.
[0036] The present application provides a message comparison method, which obtains the field to be recorded by parsing the preset message recording rules pre-configured by the user; records the messages of the original system and the reconstructed system respectively according to the field to be recorded, and obtains the message before the system reconstruction and the message after the system reconstruction; compares the message before the system reconstruction and the message after the system reconstruction to obtain the message comparison result. Since the present application obtains and parses the message recording rules pre-configured by the user through the device, records the message before the system reconstruction and the message after the system reconstruction respectively according to the field to be recorded, and then compares the messages before and after the system reconstruction, the automatic message comparison of the device is realized, and the manual testing of the executor is no longer required, and the results can be accurately traced back, which improves the efficiency and accuracy of the message comparison. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0038] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0039] Figure 1 A flowchart of the first embodiment of the message comparison method of the present application is provided;
[0040] Figure 2 This is a system architecture diagram of the message comparison method of this application;
[0041] Figure 3 A schematic diagram of the process of recording a message in the message comparison method of this application;
[0042] Figure 4 A flowchart of the second embodiment of the message comparison method of the present application is provided;
[0043] Figure 5 A flowchart of the third embodiment of the message comparison method of the present application is provided;
[0044] Figure 6 This is the user journey diagram in the message comparison method of this application;
[0045] Figure 7 A schematic diagram of the message comparison process in the message comparison method of this application;
[0046] Figure 8 This is a schematic diagram of the module structure of the message comparison device in the embodiment of the present application;
[0047] Fig. 9 A schematic diagram of the device structure of the hardware operating environment involved in the message comparison method in the embodiment of the present application.
[0048] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0049] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0050] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0051] The main solution of the embodiment of the present application is: to parse the preset message recording rules pre-configured by the user to obtain the fields to be recorded; to record messages for the original system and the reconstructed system respectively according to the fields to be recorded to obtain the messages before the system reconstruction and the messages after the system reconstruction; to compare the messages before the system reconstruction and the messages after the system reconstruction to obtain the message comparison results.
[0052] Since system upgrades such as product cloud migration and database localization have the characteristics of high transformation frequency, large transformation scope, and large impact range, the above-mentioned technical transformation, reconstruction, and migration projects usually need to be unaware of the business, peripheral systems, and external systems. Therefore, during the transformation process, the interactive messages across system boundaries between internal and external systems must be kept completely consistent. However, the current message comparison work mainly relies on manual work by test executors. Manual comparison is time-consuming, inefficient, low in accuracy, and high in communication costs, wasting a lot of manpower costs.
[0053] The present application provides a solution, which obtains the field to be recorded by parsing the preset message recording rules pre-configured by the user; records the messages of the original system and the reconstructed system respectively according to the field to be recorded, and obtains the message before the system reconstruction and the message after the system reconstruction; compares the message before the system reconstruction and the message after the system reconstruction to obtain the message comparison result. Since the present application obtains and parses the message recording rules pre-configured by the user through the device, and records the message before the system reconstruction and the message after the system reconstruction respectively according to the field to be recorded, and then compares the messages before and after the system reconstruction, the automatic message comparison of the device is realized, and the manual testing of the executor is no longer required, and the results can be accurately traced back, which improves the efficiency and accuracy of the message comparison.
[0054] It should be noted that the execution subject of the method of this embodiment can be a computing service device with message comparison, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc.; it can also be a message comparison device with the same or similar functions. This embodiment and the following embodiments will be described by taking the message comparison device as an example.
[0055] Based on this, the present application embodiment provides a message comparison method, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the message comparison method of the present application.
[0056] In this embodiment, the message comparison method includes steps S10 to S30:
[0057] Step S10, parsing the preset message recording rule pre-configured by the user to obtain the field to be recorded.
[0058] It can be understood that the present application provides a set of automated testing solutions for message comparison, which are provided to in-house test executors for use. The executors no longer need to manually obtain various types of interface messages one by one from each log platform. Instead, they can realize automatic full recording and comparison of messages through the message recording configuration, message capture rule formulation, and message comparison rule formulation of the automated testing solution.
[0059] It should be noted that in order to complete the message matching automation test solution, the system architecture in this application is divided into two parts: Framework A: Under the business system application framework, between subsystems and across system boundaries, for different message formats such as channel messages, internal messages, and out-of-line messages, after the original business function is completed, add the request message and response message tracking function. Framework B: For various messages recorded in the test environment, rely on Python underlying components and use Pycharm software to build Python business comparison automation components to realize message capture, comparison, and result output. Framework B can refer to Figure 2 .
[0060] It should be understood that the message recording function obtains the preset message recording rules pre-configured by the user, which describes the specified system, specified transaction type, specific fields, etc. that the user expects to record. Record the message according to the primary key, and store the recording result in the corresponding data table according to the primary key. The message recording process can be referred to Figure 3 , Figure 3 The flowchart of the message recording in the message comparison method of this application is shown in FIG. Among them, the primary key can be a field or a combination of fields used to uniquely identify a transaction message. Then, the preset message recording rules are parsed according to the primary key, so that the fields to be recorded that the user expects to use for message comparison can be obtained.
[0061] In a feasible implementation, step S10 may include steps S01 to S03:
[0062] Step S01, determining whether the current environment is a test environment.
[0063] It should be understood that considering that message recording should be performed in a test environment, and the production environment does not record customer information in violation of regulations, the recording function is not online. Therefore, you can first determine whether the current environment is a test environment.
[0064] Step S02: If it is a test environment, determine whether the preset application-level message recording switch is turned on.
[0065] It is understandable that an application-level message recording switch may be set in a test environment, and when a message comparison test is required, the switch may be turned on to record the message.
[0066] Step S03: if the preset application-level message recording switch is turned on, the preset message recording rule pre-configured by the user is parsed to obtain the field to be recorded.
[0067] It should be understood that in order to avoid wasting computing resources by acquiring and parsing message recording rules in a production environment or when the application-level message recording switch is not turned on, the timing of rule parsing can be set to when the preset application-level message recording switch is turned on, thereby avoiding waste of computing resources and optimizing system efficiency and performance.
[0068] In this implementation, it is determined whether the current environment is a test environment; if it is a test environment, it is determined whether the preset application-level message recording switch is turned on; if the preset application-level message recording switch is turned on, the preset message recording rules pre-configured by the user are parsed to obtain the field to be recorded. Since this implementation sets the application-level message recording switch in the test environment, when a message comparison test is required, the switch is turned on to record the message, thereby avoiding illegal recording of customer information in the production environment and improving the security and performance of the system.
[0069] Step S20, recording messages of the original system and the reconstructed system respectively according to the fields to be recorded, to obtain messages before system reconstruction and messages after system reconstruction.
[0070] It should be understood that the original system and the reconstructed system can be determined based on the fields to be recorded, and then the messages can be recorded according to the primary key based on the message recording function pre-embedded in the original system and the reconstructed system, and the recording results can be stored in the corresponding data table according to the primary key to obtain the messages before and after the system reconstruction.
[0071] Step S30, performing message comparison on the message before the system reconstruction and the message after the system reconstruction to obtain a message comparison result.
[0072] It should be understood that the process of message comparison can be to read the message before the system is reconstructed by the primary key, read the message after the system is reconstructed by the primary key, and then compare the message by field, and output the original message and the corresponding comparison result to the file after the comparison. The message comparison output result in this application includes two parts: the original message and the comparison result, in which the comparison result falls at the specific field level of the message, which is convenient for test execution personnel to efficiently and accurately perform message comparison in various technical transformation, reconstruction, and migration projects, and can accurately trace the results, greatly reducing the manpower cost invested by test personnel.
[0073] This embodiment provides a message comparison method, which parses the preset message recording rules pre-configured by the user to obtain the field to be recorded; records the messages of the original system and the reconstructed system respectively according to the field to be recorded to obtain the message before the system reconstruction and the message after the system reconstruction; compares the message before the system reconstruction and the message after the system reconstruction to obtain the message comparison result. Since this application obtains and parses the message recording rules pre-configured by the user through the device, records the message before the system reconstruction and the message after the system reconstruction respectively according to the field to be recorded, and then compares the messages before and after the system reconstruction, it realizes the automatic message comparison of the device, no longer needs the execution personnel to perform manual testing, and can accurately trace the results, thereby improving the efficiency and accuracy of the message comparison.
[0074] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can refer to the above introduction, and will not be repeated later. Figure 4 , step S10, the preset message recording rule includes a preset recording field list and a message recording configuration item; the message comparison method also includes steps S101 to S103:
[0075] Step S101, determining the new and old system identifiers and transaction codes as necessary recording fields.
[0076] It is understandable that the preset message recording rules pre-configured by the user may include a preset recording field list and a message recording configuration item. The field items in the preset recording field list may be configured by the tester as needed according to the actual test scenario. The message recording configuration item may be a string of codes corresponding to the preset recording field list, which is used to specify which fields in the preset recording field list need to be recorded.
[0077] It should be understood that when comparing messages between the old and new systems before and after reconstruction, the old and new system identifiers and transaction codes can be used as a joint primary key to uniquely identify a group of transaction messages. When the user configures the configuration item Record_flag in advance, there may be human omissions, and the old and new system identifiers or transaction codes may be omitted, which may easily cause the recorded messages to be unable to be compared. Therefore, in this embodiment, the old and new system identifiers and transaction codes are determined as necessary recording fields to ensure that these two fields are recorded.
[0078] Step S102: parsing the message recording configuration item according to the preset recording field list to obtain the preset recording field.
[0079] It should be understood that since the message recording configuration item can be used to specify which fields in the preset recording field list need to be recorded, the combination of the two can be used to parse and obtain the fields expected by the user, that is, the preset recording fields.
[0080] Step S103: determine the necessary recording field and the preset recording field as fields to be recorded.
[0081] It can be understood that the necessary recording fields and the preset recording fields are merged, and the obtained collection is determined as the field to be recorded.
[0082] In a feasible implementation manner, the preset recording fields in the preset recording field list include new and old system identifiers, system name, transaction code, message type, request message body and response message body, and the joint primary key of the preset recording field list is a combination of the new and old system identifiers and the transaction code; the message recording configuration item includes a whether to record identifier, and the number and order of the whether to record identifiers are consistent with the number and order of the preset recording fields in the preset recording field list.
[0083] In the specific implementation, the preset recording field list and message recording configuration items in this embodiment are illustrated in detail with examples. After obtaining the configuration item Record_flag, each system parses the specific configuration of Record_flag and implements it according to the parsed flag. Among them, the preset recording field list includes the old and new system identifiers, system name, transaction code, message type, request message body and response message body. The system identifier + transaction code is used as a joint primary key to uniquely identify a group of transaction messages, and other recording fields except the joint primary key are optional. Testers can select as needed according to the actual test scenario. The preset recording field list can be referred to as shown in Table 1 below.
[0084]
[0085] It is understandable that the message recording configuration item Record_flag includes a recording flag, and the number and order of the recording flags are consistent with the number and order of the preset recording fields in the preset recording field list. The configuration item Record_flag can be the field order provided in Table 1, with the fields that need to be recorded set to Y and the fields that do not need to be recorded set to N. For example, YYYYYY (indicates full field recording), YNYNYN (indicates recording only the system identifier, transaction code and request message). The message recording configuration item can refer to the following
[0086] As shown in Table 2.
[0087]
[0088] In this embodiment, the preset message recording rules include a preset recording field list and a message recording configuration item. The preset recording fields in the preset recording field list include the new and old system identifiers, system name, transaction code, message type, request message body, and response message body. The joint primary key of the preset recording field list is a combination of the new and old system identifiers and the transaction code. The new and old system identifiers and the transaction code are determined as necessary recording fields; the message recording configuration items are parsed according to the preset recording field list to obtain the preset recording fields; the necessary recording fields and the preset recording fields are determined as the fields to be recorded, so that customized message capture rules can be formulated for different systems, and testers are supported to automatically capture messages for different transactions of various systems.
[0089] Based on the first embodiment of the present application, in the third embodiment of the present application, the same or similar contents as those in the first embodiment can be referred to the above description, and will not be described in detail later. Figure 5 , step S30, the message comparison method further includes steps S301 to S303:
[0090] Step S301, read the message from the user input information to capture the primary key.
[0091] It should be noted that according to the above procedures and rules, you can refer to Figure 6 The specific user journey in this embodiment is explained. The user configures the Record_flag field in the configuration table according to the test requirements; initiates a channel in the transaction system and initiates a specific business transaction (at this time, the system background completes the message recording according to the configuration items); then uses the "message capture primary key (corresponding to the required value of Table 1 above)", "field ignore flag", and "ignore field list" as input parameters to trigger message comparison; finally, check the message comparison result file to complete the test scenario. Therefore, the system can read the message capture primary key from the user input information.
[0092] Step S302 : reading the target message before system reconstruction and the target message after system reconstruction from the message before system reconstruction and the message after system reconstruction respectively according to the message capture primary key.
[0093] It should be understood that, according to the message capture primary key, the target message before system reconstruction and the target message after system reconstruction are read from the message before system reconstruction and the message after system reconstruction respectively. For example, if the message capture primary key is the old and new system identifiers 1111 and the transaction code 0001, then the messages corresponding to the old and new system identifiers 1111 and the transaction code 0001 are read from the message before system reconstruction and the message after system reconstruction, and the target message before system reconstruction and the target message after system reconstruction can be obtained.
[0094] Step S303, performing a message comparison field by field on the target message before the system reconstruction and the target message after the system reconstruction to obtain a message comparison result.
[0095] It should be understood that by performing message comparison after reading the target message corresponding to the primary key, the message can be located as a message to be tested, thereby avoiding the problems of low efficiency and waste of cost resources caused by comparing all messages.
[0096] In a feasible implementation, step S303 may include steps S3031 to S3034:
[0097] Step S3031, determining whether there is a preset field ignore flag in the user input information.
[0098] It is worth noting that the message comparison rules in this embodiment also support ignoring some fields. Figure 7 The message comparison process is described. The user input information entered when the user triggers the message comparison in the above user journey is obtained, and a preset field ignore flag is found. The field ignore flag is used to indicate whether all fields are compared or some invalid fields are ignored. For example, the transaction time can be considered an invalid field.
[0099] Step S3032: If there is a preset field ignore flag, read the preset ignore field list from the user input information.
[0100] It should be understood that when there is a preset field ignore flag, it can be considered that the user has invalid fields that need to be eliminated, and the preset ignore field list will continue to be read from the user input information. The preset ignore field list may include information about the fields that need to be specifically eliminated, for example, it may be "System_name, system name, Code_type message type, etc."
[0101] Step S3033: performing field elimination processing on the target message before system reconstruction and the target message after system reconstruction according to the preset ignored field list to obtain the target message before system reconstruction and the target message after system reconstruction after elimination.
[0102] It should be understood that the target message before system reconstruction and the target message after system reconstruction can be processed by field elimination according to the preset ignored field list, for example, the "System_name, system name, Code_type message type, etc." fields are eliminated, so as to obtain the target message before system reconstruction and the target message after system reconstruction with smaller data volume, which can further improve the efficiency and accuracy of message comparison.
[0103] Step S3034, performing a field-by-field message comparison on the target message before the system reconstruction after the elimination and the target message after the system reconstruction after the elimination to obtain a message comparison result.
[0104] In this embodiment, by reading the message capture primary key, the preset field ignore flag and the preset ignore field list from the user input information, and reading the target message before system reconstruction and the target message after system reconstruction from the message before system reconstruction and the message after system reconstruction respectively according to the message capture primary key, and then performing field elimination processing on the target message according to the preset field ignore flag and the preset ignore field list, and finally performing message comparison based on the eliminated message, it is possible to accurately obtain the expected comparison message, improve the accuracy of the message comparison, reduce the amount of message data, and improve the comparison efficiency.
[0105] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the message comparison method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0106] This application also provides a message comparison device, please refer to Figure 8 , the message comparison device comprises:
[0107] The recording rule parsing module 10 is used to parse the preset message recording rules pre-configured by the user to obtain the fields to be recorded;
[0108] A message recording module 20, used to record messages of the original system and the reconstructed system respectively according to the fields to be recorded, so as to obtain messages before the system reconstruction and messages after the system reconstruction;
[0109] The message comparison module 30 is used to compare the message before the system reconstruction with the message after the system reconstruction to obtain a message comparison result.
[0110] The message comparison device provided by the present application adopts the message comparison method in the above embodiment to solve the technical problem. Compared with the prior art, the beneficial effects of the message comparison device provided by the present application are the same as the beneficial effects of the message comparison method provided by the above embodiment, and the other technical features in the message comparison device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0111] The present application provides a message comparison device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the message comparison method in the above-mentioned embodiment one.
[0112] Reference below Fig. 9, which shows a schematic diagram of the structure of a message comparison device suitable for implementing the embodiment of the present application. The message comparison device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig. 9 The message comparison device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0113] like Fig. 9 As shown, the message comparison device may include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. Various programs and data required for the operation of the message comparison device are also stored in RAM1004. The processing device 1001, ROM1002, and RAM1004 are connected to each other via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 1003 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 1009. The communication device 1009 can allow the message comparison device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a message comparison device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or have alternatively.
[0114] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0115] The message comparison device provided by the present application adopts the message comparison method in the above embodiment to solve the technical problem of message comparison. Compared with the prior art, the beneficial effects of the message comparison device provided by the present application are the same as the beneficial effects of the message comparison method provided by the above embodiment, and other technical features in the message comparison device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0116] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0117] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0118] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the message comparison method in the above-mentioned embodiment.
[0119] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0120] The computer-readable storage medium may be included in the message comparison device; or may exist independently without being assembled into the message comparison device.
[0121] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the message comparison device, the message comparison device: parses the preset message recording rules pre-configured by the user to obtain the fields to be recorded; records messages for the original system and the reconstructed system respectively according to the fields to be recorded to obtain the messages before the system reconstruction and the messages after the system reconstruction; performs message comparison on the messages before the system reconstruction and the messages after the system reconstruction to obtain the message comparison results.
[0122] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0123] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0124] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0125] The readable storage medium provided in the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned message comparison method, and can solve technical problems. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the present application are the same as the beneficial effects of the message comparison method provided in the above-mentioned embodiment, and will not be repeated here.
[0126] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned message comparison method when executed by a processor.
[0127] The computer program product provided by the present application can solve the technical problem. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the message comparison method provided by the above embodiment, which will not be described in detail here.
[0128] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A message comparison method, characterized in that: The method includes: Parse the preset message recording rules pre-configured by the user to obtain the fields to be recorded; Recording messages of the original system and the reconstructed system respectively according to the field to be recorded, to obtain messages before the system reconstruction and messages after the system reconstruction; A message comparison is performed on the message before the system reconstruction and the message after the system reconstruction to obtain a message comparison result.
2. The method according to claim 1, characterized in that The preset message recording rules include a preset recording field list and message recording configuration items; The step of parsing the preset message recording rule pre-configured by the user to obtain the field to be recorded includes: Identify the old and new system identifiers and transaction codes as necessary recording fields; Parsing the message recording configuration item according to the preset recording field list to obtain the preset recording field; The necessary recording field and the preset recording field are determined as fields to be recorded.
3. The method according to claim 2, characterized in that The preset recording fields in the preset recording field list include the new and old system identifiers, the system name, the transaction code, the message type, the request message body and the response message body, and the joint primary key of the preset recording field list is the combination of the new and old system identifiers and the transaction code; The message recording configuration item includes a recording or not recording flag, and the number and order of the recording or not recording flags are consistent with the number and order of the preset recording fields in the preset recording field list.
4. The method according to claim 1, characterized in that The step of parsing the preset message recording rule pre-configured by the user to obtain the field to be recorded includes: Determine whether the current environment is a test environment; If it is a test environment, determine whether the preset application-level message recording switch is turned on; If the preset application-level message recording switch is turned on, the preset message recording rule pre-configured by the user is parsed to obtain the field to be recorded.
5. The method according to claim 1, characterized in that The step of performing message comparison on the message before the system reconstruction and the message after the system reconstruction to obtain the message comparison result includes: Read the message from the user input information and grab the primary key; Reading the target message before system reconstruction and the target message after system reconstruction from the message before system reconstruction and the message after system reconstruction respectively according to the message capture primary key; A message comparison is performed field by field on the target message before the system reconstruction and the target message after the system reconstruction to obtain a message comparison result.
6. The method according to claim 5, characterized in that The step of performing field-by-field message comparison on the target message before the system reconstruction and the target message after the system reconstruction to obtain the message comparison result includes: Determine whether there is a preset field ignore flag in the user input information; If there is a preset field ignore flag, read the preset ignore field list from the user input information; Performing field elimination processing on the target message before system reconstruction and the target message after system reconstruction according to the preset ignored field list to obtain the target message before system reconstruction and the target message after system reconstruction after elimination; A message comparison is performed field by field on the target message before the system reconstruction after the elimination and the target message after the system reconstruction after the elimination to obtain a message comparison result.
7. A message comparison device, characterized in that: The message comparison device comprises: The recording rule parsing module is used to parse the preset message recording rules pre-configured by the user to obtain the fields to be recorded; A message recording module, used to record messages of the original system and the reconstructed system respectively according to the fields to be recorded, so as to obtain messages before the system reconstruction and messages after the system reconstruction; The message comparison module is used to compare the message before the system reconstruction with the message after the system reconstruction to obtain a message comparison result.
8. A message comparison device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the message comparison method according to any one of claims 1 to 6.
9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the message comparison method according to any one of claims 1 to 6 are implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the message comparison method according to any one of claims 1 to 6 are implemented.
