Message processing method and device, electronic equipment and storage medium
Through the packet processing method of analyzing, modifying and reconstructing ISO 8583 transaction packets, the problem of low accuracy of message modification in the existing technology is solved, faster and more efficient message modification is achieved, and the development and testing efficiency of the financial transaction system is significantly improved.
Patent Information
- Application Number
- CN202411611744.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2025-02-25
AI Technical Summary
In the prior art, when modifying multiple field values in ISO 8583 transaction packets, manual scripting is relied on, which is time-consuming and error-prone, resulting in low accuracy of message modification.
Provide a message processing method, by analyzing the message to be parsed, generating a data structure, responding to modification operations, updating the field values in the data structure, and reconstructing the modified data structure to generate a target message.
The modification process of each field in the 8583 transaction packet has been simplified, the accuracy and efficiency of message modification have been improved, and the efficiency of financial transaction system development and testing has been significantly improved.
Smart Images

Figure CN119520452A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of message processing, and in particular to a message processing method, device, electronic device and storage medium. Background Art
[0002] Currently, ISO 8583 is an international standard that defines the format and structure of transaction information exchanged between financial institutions. This standard is widely used in bank card transaction processing systems. The protocol contains a large number of fields for carrying various transaction details. ISO 8583 ensures consistency and reliability in data exchange between different financial institutions. During the development and testing phase of banks, in order to simulate different transaction scenarios, the values of these fields need to be frequently modified.
[0003] In the prior art, when modifying the value of a field, it is usually necessary to manually write a script and manually modify the value of the field.
[0004] However, in the prior art, since traditional modification methods usually rely on manual script writing, especially when faced with complex multi-field modification requirements, manual script writing is not only time-consuming but also prone to errors, resulting in low accuracy of message modification. Summary of the invention
[0005] The embodiments of the present application provide a message processing method, device, electronic device and storage medium to achieve the effect of improving the accuracy of message modification.
[0006] In a first aspect, an embodiment of the present application provides a message processing method, including:
[0007] In response to an input operation, a message to be parsed is obtained; wherein the message to be parsed includes a plurality of fields;
[0008] Parsing the message to be parsed to obtain a data structure; wherein the data structure includes values of multiple parsed fields;
[0009] In response to the modification operation, obtaining the value of the field in the modified data structure;
[0010] The values of the fields in the modified data structure are reconstructed to generate a target message.
[0011] In a possible implementation manner, the message to be parsed is parsed to obtain a data structure, including:
[0012] Based on a preset parsing algorithm and a preset message format, the message to be parsed is parsed, multiple fields are identified, and a preset separator is inserted between each field;
[0013] According to the delimiter, the field information of each field is extracted; and the field information of each field and the field is stored in a data structure.
[0014] In a possible implementation manner, the field information includes a field identifier and a field value.
[0015] In a possible implementation, in response to the modification operation, obtaining the modified value of the field in the data structure includes:
[0016] Based on a preset modification algorithm, in response to a search operation for any identifier, determining in the data structure a field to be modified corresponding to the any identifier;
[0017] In response to a modification operation on the field to be modified, a modified value of the field in the data structure is obtained.
[0018] In a possible implementation manner, reconstructing the values of the fields in the modified data structure to generate a target message includes:
[0019] Based on a preset reconstruction algorithm, traverse all fields in the data structure;
[0020] According to the preset message format, the identifier and value of the field are reconstructed to generate a character string;
[0021] A preset separator is inserted between each field in the character string to generate a target message.
[0022] In a possible implementation manner, before reconstructing the values of the fields in the modified data structure to generate the target message, the method further includes:
[0023] Get the verification request;
[0024] Based on the preset message standard information and the verification request, the modified value is verified to generate verification result information; wherein the verification result information indicates whether the modified value complies with the message standard information.
[0025] In a possible implementation, the method further includes:
[0026] The target message is sent to a preset console, or a file to be debugged, through a preset command line interface.
[0027] In a second aspect, an embodiment of the present application provides a message processing device, including:
[0028] A first acquisition module, configured to acquire a message to be parsed in response to an input operation; wherein the message to be parsed includes a plurality of fields;
[0029] A parsing module, used for parsing the message to be parsed to obtain a data structure; wherein the data structure includes values of multiple parsed fields;
[0030] A modification module, used for obtaining the value of the field in the data structure after modification in response to the modification operation;
[0031] The reconstruction module is used to reconstruct the values of the fields in the modified data structure to generate a target message.
[0032] In a possible implementation, the parsing module is specifically used to:
[0033] Based on a preset parsing algorithm and a preset message format, the message to be parsed is parsed, multiple fields are identified, and a preset separator is inserted between each field;
[0034] According to the delimiter, the field information of each field is extracted; and the field information of each field and the field is stored in a data structure.
[0035] In a possible implementation manner, the field information includes a field identifier and a field value.
[0036] In a possible implementation manner, the modification module is specifically used to:
[0037] Based on a preset modification algorithm, in response to a search operation for any identifier, determining in the data structure a field to be modified corresponding to the any identifier;
[0038] In response to a modification operation on the field to be modified, a modified value of the field in the data structure is obtained.
[0039] In a possible implementation, the reconstruction module is specifically used to:
[0040] Based on a preset reconstruction algorithm, traverse all fields in the data structure;
[0041] According to the preset message format, the identifier and value of the field are reconstructed to generate a character string;
[0042] A preset separator is inserted between each field in the character string to generate a target message.
[0043] In a possible implementation, the device further includes:
[0044] A second acquisition module is used to obtain a verification request before reconstructing the value of the field in the modified data structure and generating a target message;
[0045] The verification module is used to verify the modified value based on the preset message standard information and the verification request, and generate verification result information; wherein the verification result information indicates whether the modified value conforms to the message standard information.
[0046] In a possible implementation manner, the device is further specifically used for:
[0047] The target message is sent to a preset console, or a file to be debugged, through a preset command line interface.
[0048] In a third aspect, an embodiment of the present application provides an electronic device, including: a memory, a processor;
[0049] The memory stores computer-executable instructions;
[0050] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the above first aspect and / or various possible implementations of the first aspect.
[0051] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the first aspect above and / or various possible implementations of the first aspect.
[0052] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the above first aspect and / or various possible implementation methods of the first aspect.
[0053] The message processing method, device, electronic device and storage medium provided in the embodiment of the present application obtain a message to be parsed in response to an input operation; wherein the message to be parsed includes multiple fields. The message to be parsed is parsed and processed to obtain a data structure; wherein the data structure includes the values of multiple parsed fields. In response to a modification operation, the values of the fields in the modified data structure are obtained. The values of the fields in the modified data structure are reconstructed to generate a target message. In this scheme, the message to be parsed is parsed, modified, and reconstructed to obtain a target message. Therefore, by simplifying the modification process of each field in the 8583 transaction message, developers and testers can modify, customize and debug the message more quickly and efficiently, thereby realizing convenient modification of the fields of the 8583 transaction message, significantly improving the efficiency of financial transaction system development and testing, and achieving the effect of improving the accuracy of message modification. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] 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.
[0055] Figure 1 A schematic diagram of a message processing method provided in an embodiment of the present application Figure 1 ;
[0056] Figure 2 Schematic diagram of another message processing method provided in the embodiment of the present application Figure 2 ;
[0057] Figure 3 A schematic diagram of the structure of a message processing device provided in an embodiment of the present application;
[0058] Figure 4 A schematic diagram of the structure of another message processing device provided in an embodiment of the present application;
[0059] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0060] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0061] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0062] Currently, ISO 8583 is an international standard that defines the format and structure of transaction information exchanged between financial institutions. This standard is widely used in bank card transaction processing systems. The protocol contains a large number of fields for carrying various transaction details. ISO 8583 ensures consistency and reliability in data exchange between different financial institutions. During the development and testing phase of banks, in order to simulate different transaction scenarios, the values of these fields need to be frequently modified.
[0063] In one example, when modifying the value of a field, it is usually necessary to manually write a script and manually modify the value of the field. However, in the prior art, since the traditional modification method usually relies on manual script writing, especially when facing complex multi-field modification requirements, manual script writing is not only time-consuming and error-prone, but also has many problems in complexity, compatibility, security and performance, resulting in low accuracy of message modification.
[0064] In combination with the above scenarios, it can be seen that in the prior art, there is a technical problem of low accuracy in message modification.
[0065] The message processing method provided in the present application solves the technical problem of low accuracy of message modification by parsing, modifying and reconstructing the message to be parsed to obtain the target message.
[0066] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0067] Figure 1 A schematic diagram of a message processing method provided in this application Figure 1 ,like Figure 1 As shown, the method includes:
[0068] S101. In response to an input operation, obtain a message to be parsed; wherein the message to be parsed includes multiple fields.
[0069] For example, the execution subject of this embodiment may be an electronic device, or a terminal device, or a message processing device or device, or other devices or equipment that can execute this embodiment, and this is not limited. In this embodiment, the execution subject is introduced as an electronic device.
[0070] First, the electronic device is provided with an operation interface, in which the user can input transaction information, wherein the transaction information refers to information including a transaction message. In response to the user's input operation, the transaction information is read, and the message to be parsed in the transaction information is read, wherein the message to be parsed includes multiple fields.
[0071] S102: parse the message to be parsed to obtain a data structure; wherein the data structure includes values of multiple parsed fields.
[0072] Exemplarily, the message to be parsed can be parsed according to a preset parsing algorithm to obtain multiple fields, a field set can be generated according to the multiple fields, and then a data structure can be generated according to the field set. Each field includes a field identifier and a value, that is, the data structure includes multiple parsed field identifiers and values.
[0073] S103. In response to the modification operation, obtain the value of the field in the modified data structure.
[0074] Exemplarily, on the operation interface, the user can query the corresponding field to be modified, and perform a modification operation on the field to be modified. In response to the modification operation, a preset modification algorithm is called to perform modification processing to obtain the value of the field in the modified data structure.
[0075] S204: Reconstruct the values of the fields in the modified data structure to generate a target message.
[0076] Exemplarily, based on a preset reconstruction algorithm, all fields in the storage structure are traversed, and the identifiers and values of the fields are reconstructed and reassembled into a string according to a preset message format; wherein the message format may be a format of the 8583 transaction message standard. Then, appropriate separators are added between each field in the string to form a complete target message.
[0077] The message processing method provided in the embodiment of the present application obtains a message to be parsed in response to an input operation; wherein the message to be parsed includes multiple fields. The message to be parsed is parsed and processed to obtain a data structure; wherein the data structure includes the values of multiple parsed fields. In response to a modification operation, the values of the fields in the modified data structure are obtained. The values of the fields in the modified data structure are reconstructed to generate a target message. In this scheme, the message to be parsed is parsed, modified, and reconstructed to obtain a target message. Therefore, by simplifying the modification process of each field in the 8583 transaction message, developers and testers can modify, customize and debug the message more quickly and efficiently, thereby realizing convenient modification of the fields of the 8583 transaction message, significantly improving the efficiency of financial transaction system development and testing, and achieving the effect of improving the accuracy of message modification.
[0078] Figure 2 A schematic diagram of a message processing method provided in this application Figure 2 ,like Figure 2 As shown, in this embodiment Figure 1 Based on the embodiment, a message processing method is described in detail, and the method includes:
[0079] S201. In response to an input operation, obtain a message to be parsed; wherein the message to be parsed includes multiple fields.
[0080] For example, this step can be referred to Figure 1 Step 101 in the above is not described in detail.
[0081] S202: Based on a preset parsing algorithm and a preset message format, the message to be parsed is parsed, multiple fields are identified, and a preset separator is inserted between each field.
[0082] Exemplarily, based on a preset parsing algorithm and a preset message format, the message to be parsed is parsed, multiple fields are identified, and a preset separator is inserted between each field to divide the message into multiple fields. For example, the separator is "|", etc., which is not limited. Among them, the message format can be the format of the 8583 transaction message standard, which is not limited.
[0083] S203, extracting field information of each field according to the separator; and storing each field and field information of the field into a data structure.
[0084] In one example, the field information includes an identifier of the field and a value of the field.
[0085] Exemplarily, the field information includes the identifier of the field and the value of the field. The electronic device can extract the identifier and value of the segmented field according to the separator, and store each field and the field information of the field in a data structure.
[0086] S204. In response to the modification operation, obtain the value of the field in the modified data structure.
[0087] In one example, S204 includes: based on a preset modification algorithm, in response to a search operation for any identifier, determining a field to be modified corresponding to any identifier in the data structure; in response to a modification operation for the field to be modified, obtaining the value of the field in the modified data structure.
[0088] Exemplarily, the operation interface of the electronic device may include buttons such as a query button, and the user may modify the value of a specified field through the query button. Specifically, first, according to the identification (ID) of the field to be modified, the field corresponding to the ID is searched in the storage structure. Then, the user modifies the value of the field to be modified corresponding to the ID to obtain the modified value, that is, the electronic device responds to the user's modification operation on the field to be modified, obtains the value of the field in the modified data structure, and then updates the value of the field.
[0089] Therefore, we first clarify the structure and key fields of the 8583 transaction message. Through a set of easy-to-use operation interfaces or tools, users can quickly locate the fields that need to be modified through simple clicks or inputs, and then quickly modify the field values, ensuring the accuracy of the fields and improving modification efficiency.
[0090] S205: Get a verification request.
[0091] Exemplarily, the operation interface also includes a verification button, and the user can click the button to perform a verification operation. In response to the user's verification operation, a verification request is obtained.
[0092] S206. Based on the preset message standard information and the verification request, the modified value is verified to generate verification result information; wherein the verification result information indicates whether the modified value complies with the message standard information.
[0093] Exemplarily, the modified value can be verified according to the preset message standard information, verification request, and verification value to generate verification result information. The verification result information indicates whether the modified value complies with the message standard information. If it is determined that the verification result information indicates that the modified value complies with the message standard information, it means that the modification is successful, and then the compliance with the message standard information can be ensured through verification. Among them, the message standard information can be 8583 transaction message standard information, etc., which is not limited to this; the verification value can be a custom value entered by the user, or it can be automatically generated, or it can be a preset value, which is not limited to this.
[0094] S207: Reconstruct the values of the fields in the modified data structure to generate a target message.
[0095] In one example, S207 includes: based on a preset reconstruction algorithm, traversing all fields in the data structure; reconstructing the identifier and value of the field according to a preset message format to generate a string; inserting a preset separator between each field in the string to generate a target message.
[0096] For example, the electronic device can traverse all fields in the storage structure based on a preset reconstruction algorithm, and reconstruct the identifiers and values of the fields according to a preset message format, and reassemble them into a string; wherein the message format can be a format of the 8583 transaction message standard. Then, an appropriate separator is added between each field in the string to form a complete target message.
[0097] S208. Send the target message to a preset console or a file to be debugged through a preset command line interface.
[0098] Exemplarily, a preset command line tool is deployed in the electronic device, and the target message can be sent to a preset console or a file to be debugged through the command line interface of the command line tool, so that it can be called in the script to quickly complete the message debugging. Furthermore, the electronic device uses the command line tool in the background for the above parsing, modification, and reconstruction processes.
[0099] The message processing method provided in the embodiment of the present application obtains a message to be parsed in response to an input operation; wherein the message to be parsed includes multiple fields. Based on a preset parsing algorithm and a preset message format, the message to be parsed is parsed, multiple fields are identified, and a preset separator is inserted between each field. According to the separator, the field information of each field is extracted; and the field information of each field and the field is stored in a data structure. In response to the modification operation, the value of the field in the modified data structure is obtained. A verification request is obtained. Based on the preset message standard information and the verification request, the modified value is verified and a verification result information is generated; wherein the verification result information indicates whether the modified value complies with the message standard information. The values of the fields in the modified data structure are reconstructed to generate a target message. The target message is sent to a preset console or a file to be debugged through a preset command line interface. Therefore, by simplifying the modification process of each field in the 8583 transaction message, developers and testers can modify, customize and debug the message more quickly and efficiently, and realize convenient modification of the fields of the 8583 transaction message, which significantly improves the efficiency of financial transaction system development and testing, and achieves the effect of improving the accuracy of message modification.
[0100] In one example, the present application also provides a message processing method, which mainly includes a data processing part and complex domain comparison and storage, including 5 modules: input module, parsing module, processing module, reconstruction module, and output module. The functions of each module are as follows:
[0101] 1. Input module:
[0102] Taking the 8583 transaction message as an example, the message to be parsed receives the input 8583 transaction message and the field information to be modified, passes the 8583 transaction message to the parsing module, and passes the field information to the processing module.
[0103] 2. Parsing module:
[0104] Receive the 8583 transaction message passed by the input module, parse the 8583 transaction message into a field set, and pass the field set to the processing module.
[0105] 3. Processing module:
[0106] Receive the field set passed by the parsing module. Receive the field information passed by the input module, modify the field value according to the field information, and pass the modified field set to the reconstruction module.
[0107] 4. Reconstruction module:
[0108] The modified field set passed by the receiving processing module is reassembled into a complete target message, and the reconstructed target message is passed to the output module.
[0109] 5. Output module:
[0110] Receive the target message transmitted by the reconstruction module. Output the target message to the preset console or the file to be debugged. It should be noted that the processing module can not only support the modification of the fields of simple 8583 transaction messages one by one, but also support batch processing of complex message data.
[0111] Figure 3 A schematic diagram of the structure of a message processing device provided in this application, such as Figure 3 As shown, the message processing device 30 provided in this embodiment includes:
[0112] The first acquisition module 31 is used to acquire the message to be parsed in response to the input operation; wherein the message to be parsed includes multiple fields;
[0113] The parsing module 32 is used to parse the message to be parsed to obtain a data structure; wherein the data structure includes values of multiple parsed fields;
[0114] A modification module 33, used for obtaining the value of the field in the modified data structure in response to the modification operation;
[0115] The reconstruction module 34 is used to reconstruct the values of the fields in the modified data structure to generate a target message.
[0116] Figure 4 A schematic diagram of the structure of another message processing device provided in an embodiment of the present application, Figure 3 Based on the embodiment shown, Figure 4 As shown, the parsing module 32 is specifically used for:
[0117] Based on a preset parsing algorithm and a preset message format, the message to be parsed is parsed, multiple fields are identified, and a preset separator is inserted between each field;
[0118] According to the separator, the field information of each field is extracted; and the field information of each field is stored in the data structure.
[0119] In a possible implementation, the field information includes an identifier of the field and a value of the field.
[0120] In a possible implementation, the modification module 33 is specifically configured to:
[0121] Based on a preset modification algorithm, in response to a search operation for any identifier, determining a field to be modified corresponding to any identifier in a data structure;
[0122] In response to a modification operation on a field to be modified, a value of the field in the modified data structure is obtained.
[0123] In a possible implementation, the reconstruction module 34 is specifically configured to:
[0124] Based on the preset reconstruction algorithm, traverse all fields in the data structure;
[0125] According to the preset message format, the identifier and value of the field are reconstructed to generate a character string;
[0126] Insert the preset separator between each field in the string to generate the target message.
[0127] In a possible implementation, the device further includes:
[0128] A second acquisition module 41 is used to obtain a verification request before reconstructing the value of the field in the modified data structure and generating a target message;
[0129] The verification module 42 is used to verify the modified value based on the preset message standard information and the verification request, and generate verification result information; wherein the verification result information indicates whether the modified value complies with the message standard information.
[0130] In a possible implementation, the device is further specifically used for:
[0131] Through the preset command line interface, the target message is sent to the preset console, or the file to be debugged.
[0132] The device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and this embodiment will not be described in detail here.
[0133] Figure 5 This is a schematic diagram of the structure of the electronic device provided in this application. Figure 5 As shown, the electronic device 50 provided in this embodiment includes: at least one processor 501 and a memory 502. Optionally, the device 50 also includes a communication component 503. The processor 501, the memory 502 and the communication component 503 are connected via a bus 504.
[0134] In a specific implementation process, at least one processor 501 executes the computer-executable instructions stored in the memory 502, so that at least one processor 501 executes the above method.
[0135] The specific implementation process of the processor 501 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.
[0136] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.
[0137] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-volatile Memory, NVM), such as at least one disk memory.
[0138] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.
[0139] The present application also provides a computer program product, including a computer program, which implements the above method when executed by a processor.
[0140] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above method is implemented.
[0141] The above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.
[0142] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.
[0143] The division of units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.
[0144] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0145] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0146] If the function 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 of the present invention, or the part that contributes to the prior art, or the 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, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0147] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0148] Finally, it should be noted that those skilled in the art will readily conceive of other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention, which follow the general principles of the present invention and include common knowledge or customary technical means in the art not disclosed by the present invention, are not limited to the precise structure described above and shown in the drawings, and may be modified and changed in various ways without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. A message processing method, characterized in that: include: In response to an input operation, a message to be parsed is obtained; wherein the message to be parsed includes a plurality of fields; Parsing the message to be parsed to obtain a data structure; wherein the data structure includes values of multiple parsed fields; In response to the modification operation, obtaining the value of the field in the modified data structure; The values of the fields in the modified data structure are reconstructed to generate a target message.
2. The method according to claim 1, characterized in that The message to be parsed is parsed to obtain a data structure, including: Based on a preset parsing algorithm and a preset message format, the message to be parsed is parsed, multiple fields are identified, and a preset separator is inserted between each field; According to the delimiter, the field information of each field is extracted; and the field information of each field and the field is stored in a data structure.
3. The method according to claim 2, characterized in that The field information includes a field identifier and a field value.
4. The method according to claim 3, characterized in that The step of obtaining the modified value of the field in the data structure in response to the modification operation includes: Based on a preset modification algorithm, in response to a search operation for any identifier, determining in the data structure a field to be modified corresponding to the any identifier; In response to a modification operation on the field to be modified, a modified value of the field in the data structure is obtained.
5. The method according to claim 4, characterized in that Reconstructing the values of the fields in the modified data structure to generate a target message includes: Based on a preset reconstruction algorithm, traverse all fields in the data structure; According to the preset message format, the identifier and value of the field are reconstructed to generate a character string; A preset separator is inserted between each field in the character string to generate a target message.
6. The method according to claim 1, characterized in that Before reconstructing the values of the fields in the modified data structure to generate the target message, the method further includes: Get the verification request; Based on the preset message standard information and the verification request, the modified value is verified to generate verification result information; wherein the verification result information indicates whether the modified value complies with the message standard information.
7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: The target message is sent to a preset console, or a file to be debugged, through a preset command line interface.
8. A message processing device, characterized in that: include: A first acquisition module, configured to acquire a message to be parsed in response to an input operation; wherein the message to be parsed includes a plurality of fields; A parsing module, used for parsing the message to be parsed to obtain a data structure; wherein the data structure includes values of multiple parsed fields; A modification module, used for obtaining the value of the field in the data structure after modification in response to the modification operation; The reconstruction module is used to reconstruct the values of the fields in the modified data structure to generate a target message.
9. An electronic device, characterized in that: include: Memory, processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.