A file parsing and conversion method, device, equipment and readable storage medium
By parsing and converting business data into standard plaintext data in the blockchain network, the problem of communication barriers between different nodes is solved, achieving efficient data format conversion and network stability.
Patent Information
- Application Number
- CN202210725839.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-23
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2042-06-23
AI Technical Summary
In a blockchain network, differences in business data formats among multiple business nodes can prevent seamless communication, causing some nodes to go offline and ultimately paralyzing the entire network.
By parsing business data into plaintext, converting it into standard plaintext data using a standard business template, and then converting it into plaintext data that the recipient can recognize according to the recipient's template, the final business data that the recipient can recognize is generated. In the consensus process, only the consensus hash value is used to protect data privacy.
It enables seamless communication between nodes of different business systems, reduces adaptation difficulty and cost, and improves the stability and efficiency of the blockchain network.
Smart Images

Figure CN114936249B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of blockchain technology, and in particular to a file parsing and conversion method, device, equipment and readable storage medium. Background Art
[0002] Blockchain technology is built on a transmission network (also called a blockchain network). The distributed node devices in the transmission network (hereinafter referred to as nodes) run blockchain programs to generate block data based on preset consensus strategies, and use chain data structures to verify and store block data, ultimately realizing a data tamper-proof mechanism, providing a new, secure and reliable technical approach for business development.
[0003] In the existing blockchain network, there are differences in the business data formats between multiple business nodes. When nodes communicate with each other, the data format needs to be converted. In addition, since different nodes have different definitions of business types, the transaction details required to execute transactions are also different. How to enable business nodes of multiple different systems to communicate seamlessly in the blockchain network is an urgent problem to be solved. Summary of the invention
[0004] The purpose of the present invention is to provide a file parsing, conversion method, device, equipment and readable storage medium to improve the above-mentioned problem that multiple local nodes are disconnected due to various reasons, business communications cannot be performed normally, and the entire blockchain network is paralyzed.
[0005] In order to achieve the above objectives, the present application provides the following technical solutions:
[0006] On the one hand, an embodiment of the present application provides a file parsing and conversion method, which includes: in response to first business data sent by a business system, parsing the business data to obtain first plaintext data, wherein the first business data is a set of multiple message data generated by the business system; converting the first plaintext data into standard plaintext data, and converting the standard plaintext data into second plaintext data, wherein the second plaintext data is data in a plaintext format corresponding to a data recipient; converting the second plaintext data into second business data, and sending the second business data to the data recipient, wherein the second business data is message data that can be recognized by the business system of the data recipient.
[0007] Optionally, the parsing the service data to obtain the first plaintext data includes:
[0008] Receive first service data, the first service data including file header data and multiple message data, the file header data including data sender information, data receiver information, an identification template, a version number, and multiple first service types included in the file, each of the first service types including multiple sub-services;
[0009] Perform a parsing operation on each of the message data in turn to obtain the plaintext corresponding to each of the message data, wherein the parsing operation is to identify the version number to obtain the corresponding message character spacing method, and convert the message data into multiple detailed items according to the identification template and the message character spacing method, identify the corresponding sub-business in the multiple detailed items, find the template of the corresponding sub-business in the business template library, and organize the multiple detailed items according to the template to obtain the first plaintext data.
[0010] Optionally, before performing the parsing operation on each of the message data in sequence, the method further includes:
[0011] Check whether the data recipient information is valid in the blockchain network, and if the data recipient information is valid, check whether the business permissions of the data sender and the data recipient both include multiple first business types in the first business data, and if the business permissions of the data sender and the data recipient both include multiple first business types in the first business data, perform a parsing operation on each of the message data.
[0012] Optionally, converting the first plaintext data into standard plaintext data, and converting the standard plaintext data into second plaintext data, includes:
[0013] According to the service code in the first plaintext data, a corresponding standard service plaintext template is retrieved from the standard template library and recorded as a first standard service plaintext template;
[0014] Converting the multiple detailed items in the first plaintext data into the standard detailed items corresponding thereto in the first standard business plaintext template, thereby obtaining the standard plaintext data;
[0015] According to the standard business code in the standard plaintext data, a second plaintext template corresponding to the data recipient is retrieved from the counterparty template library, and each standard detail item in the standard plaintext data is converted into a detail item in the second plaintext template according to a mapping relationship between the second plaintext template and the first standard business plaintext template, thereby obtaining the second plaintext data;
[0016] The second plaintext data is message-converted to obtain the business data.
[0017] Optionally, before sending the second service data to the data recipient, the method further includes:
[0018] Calculate hash values of the first business data and the second business data respectively to obtain a first hash value and a second hash value, wherein the first hash value is a hash value corresponding to the first business data, and the second hash value is a hash value corresponding to the second business data;
[0019] Locally signing the first hash value and the second hash value, and sending the signed first hash value and the second hash value to a blockchain consensus node, so that the blockchain consensus node can reach a consensus on the first hash value and the second hash value in the blockchain network;
[0020] Receiving transaction data sent by the blockchain consensus node, wherein the transaction data includes a transaction recording the first hash value and the second hash value, which is recorded as first transaction data;
[0021] The first transaction data is executed so that the first hash value and the second hash value are recorded in a local blockchain public account book.
[0022] In a second aspect, the present application provides a file parsing and conversion device, the device comprising:
[0023] A first computing module, configured to respond to first business data sent by the business system and parse the business data to obtain first plaintext data, wherein the first business data is a set of multiple message data generated by the business system;
[0024] A first conversion module, used to convert the first plaintext data into standard plaintext data, and convert the standard plaintext data into second plaintext data, where the second plaintext data is data in a plaintext format corresponding to a data recipient;
[0025] The second conversion module is used to convert the second plaintext data into second business data, and send the second business data to a data recipient, where the second business data is message data that can be recognized by a business system of the data recipient.
[0026] In a third aspect, an embodiment of the present application provides a file parsing and conversion device, which includes a memory and a processor.
[0027] The memory is used to store computer programs; the processor is used to implement the steps of the above-mentioned file parsing and conversion method when executing the computer program.
[0028] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned file parsing and conversion method are implemented.
[0029] The beneficial effects of the present invention are:
[0030] The present invention converts the business data generated by the business system into human-readable plaintext data first, and then calls the standard template preset in the standard business library to convert the local plaintext data into the unified standard plaintext data of the blockchain network. The standard business plaintext data is then converted into the plaintext data corresponding to the data recipient, and the plaintext data corresponding to the data recipient is converted into a message to obtain the business data corresponding to the data recipient's node system, thereby completing the format conversion of the data sender's business data and the data recipient's business data, and realizing barrier-free communication of business data of multiple different business system nodes.
[0031] Secondly, in the present invention, standard plaintext templates are introduced to generate standard business data. A single business node only needs to complete the adaptation to the standard business to communicate with all business nodes in the blockchain network. Compared with adapting to each different business system node, the adaptation difficulty and cost are greatly reduced.
[0032] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or be understood by implementing the embodiments of the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0034] Figure 1 It is a flowchart of a file parsing and conversion method described in an embodiment of the present invention;
[0035] Figure 2 It is a structural schematic diagram of a file parsing and conversion device described in an embodiment of the present invention;
[0036] Figure 3 It is a schematic diagram of the structure of a file parsing and conversion device described in an embodiment of the present invention. DETAILED DESCRIPTION
[0037] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. The components of the embodiments of the present invention generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0038] It should be noted that similar reference numerals or letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings. At the same time, in the description of the present invention, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0039] The blockchain network described in this embodiment includes multiple business nodes, each business node corresponds to an upper-level business system. There are differences between the upper-level business systems, which makes it impossible to recognize the business data between the upper-level business systems. In addition, since the cost of unifying the data format of each existing upper-level business system is extremely high, the task of formatting the business data between the upper-level business systems falls on the blockchain nodes connected to the upper-level business systems.
[0040] Example 1
[0041] like Figure 1 As shown, this embodiment provides a file parsing and conversion method, which includes step S1, step S2, step S3 and step S4.
[0042] Step S1. The data sender service node responds to the first service data sent by the service system, parses the service data to obtain the first plaintext data, wherein the first service data is a set of multiple message data generated by the service system. For ease of understanding, the first plaintext data may be multiple detailed items that can be understood by humans, such as user name, ID number, transaction date, type of service to be handled, etc., and each message represents at least one business transaction;
[0043] The business data is parsed to obtain the first plaintext data, and the specific operation for the blockchain business node connected to the business system of the data sender is:
[0044] Step S11. The data sender service node receives first service data, wherein the first service data includes file header data and multiple message data, wherein the file header data includes data sender information, data receiver information, an identification template, a version number, and multiple first service types included in the file, each of which includes multiple sub-services;
[0045] For ease of understanding, for example, the header file records the sender information and receiver information of the first business data, which is used to find the IP address of the data receiver. Secondly, the header file also records the large business types involved in all messages in the file, which is used to verify the business rights or business qualifications of both parties to the business in advance. Only when both parties to the business have the authority will the system convert and transmit the business data. Otherwise, an alarm will be sent to the corresponding upper-level business system. When the business message records sub-businesses under the large business type or there are no sub-businesses under the large business, the business message will record the large business type.
[0046] Step S12. Perform a parsing operation on each of the message data in turn to obtain the plaintext corresponding to each of the message data, wherein the parsing operation is to identify the version number to obtain the corresponding message character spacing method, and convert the message data into multiple detailed items according to the identification template and the message character spacing method, identify the corresponding sub-business in the multiple detailed items, find the template of the corresponding sub-business in the business template library, and organize the multiple detailed items according to the template to obtain the first plaintext data.
[0047] For ease of understanding, for example, due to the update of the upper-level business system, the message format generated by the business system is different, and the main difference is the different spacing methods of the message characters. When identifying characters, it is necessary to judge the spacing method in advance according to the version of the message to prevent misidentification of characters. Secondly, the recognition template of the header file is used to identify the interception method of the message character segment or the interception method of the detail item. For example, the 2nd to 5th characters of the message represent the name, and the 7th to 9th characters represent the transaction or business type, where the name, transaction type, etc. are called detail items, and multiple detail items constitute a complete transaction. The multiple messages in the business data are parsed into multiple detail item groups to obtain the first plaintext data.
[0048] Optionally, in order to prevent the waste of computing power resources of the blockchain network system, it is necessary to perform preliminary detection on multiple basic aspects of the business data before performing the parsing operation on each of the message data, and perform the parsing operation after the detection is qualified, wherein the specific operation for the business node of the data sender can be:
[0049] Check whether the data recipient information is valid in the blockchain network. Specifically, check whether there is a corresponding authorized IP address. If the data recipient information is valid, check whether the business permissions of the data sender and the data recipient include multiple first business types in the first business data. If the business permissions of the data sender and the data recipient include multiple first business types in the first business data, perform the step of parsing each of the message data. In other words, the business data can only be transmitted on the blockchain network if both the recipient and the sender of the business data have the authority to conduct the business. Otherwise, the transmission of the business data is terminated, which further makes the data circulating on the chain more compliant and highly controllable.
[0050] Step S2. converting the first plaintext data into standard plaintext data, and converting the standard plaintext data into second plaintext data, wherein the second plaintext data is data in a plaintext format corresponding to the data recipient;
[0051] The blockchain network includes multiple business nodes, each of which corresponds to an upper-level business system. There are differences between the upper-level business systems, which results in the inability to recognize the business data between the upper-level business systems. Specifically, each business system names the same transaction differently, and the conditions required for handling the transaction are also different. Therefore, it is necessary to formulate a set of standard business plaintext templates to convert plaintext data of different formats. In this embodiment, the specific operations of the data sender business node can be:
[0052] According to the service code in the first plaintext data, a corresponding standard service plaintext template is retrieved from the standard template library and recorded as a first standard service plaintext template;
[0053] Step S21. Convert multiple detailed items in the first plaintext data into standard detailed items corresponding thereto in the first standard business plaintext template, thereby obtaining the standard plaintext data;
[0054] Step S22. According to the standard service code in the standard plaintext data, retrieve the second plaintext template corresponding to the data recipient in the counterparty template library, and convert each standard detail item in the standard plaintext data into a detail item in the second plaintext template according to the mapping relationship between the second plaintext template and the first standard service plaintext template, thereby obtaining the second plaintext data;
[0055] Step S23: Perform message conversion on the second plaintext data to obtain the business data.
[0056] Step S3: convert the second plaintext data into second business data, and send the second business data to the data recipient, where the second business data is message data that can be recognized by the business system of the data recipient.
[0057] Optionally, in this embodiment, before sending the second business data to the data recipient, the transmitted data needs to be archived to prevent the need for tracing the source later. Directly sending the business data to the blockchain network for consensus may result in the leakage of business transaction privacy. Secondly, the business data is large, and consensus on the data requires a large amount of blockchain network resources, which is time-consuming and laborious. Therefore, the hash value corresponding to the consensus business data in the blockchain network can be selected to ensure data privacy while reducing the network resources required for consensus. The specific operations are as follows:
[0058] Calculate hash values of the first business data and the second business data respectively to obtain a first hash value and a second hash value, wherein the first hash value is a hash value corresponding to the first business data, and the second hash value is a hash value corresponding to the second business data;
[0059] Locally signing the first hash value and the second hash value, and sending the signed first hash value and the second hash value to a blockchain consensus node, so that the blockchain consensus node can reach a consensus on the first hash value and the second hash value in the blockchain network;
[0060] Receiving transaction data sent by the blockchain consensus node, wherein the transaction data includes a transaction recording the first hash value and the second hash value, which is recorded as first transaction data;
[0061] The first transaction data is executed so that the first hash value and the second hash value are recorded in a local blockchain public account book.
[0062] Putting both the first hash value and the second hash value on the chain for consensus can record the transformation and transmission process of business data in a more comprehensive manner.
[0063] Example 2
[0064] like Figure 2 As shown, this embodiment provides a file parsing and conversion device, the device comprising:
[0065] A first calculation module 71 is used to respond to first business data sent by the business system and parse the business data to obtain first plaintext data, where the first business data is a set of multiple message data generated by the business system;
[0066] A first conversion module 72, configured to convert the first plaintext data into standard plaintext data, and convert the standard plaintext data into second plaintext data, wherein the second plaintext data is data in a plaintext format corresponding to a data receiving party;
[0067] The second conversion module 73 is used to convert the second plaintext data into second business data, and send the second business data to the data recipient. The second business data is message data that can be recognized by the business system of the data recipient.
[0068] Optionally, in some specific implementations, the first calculation module 71 includes:
[0069] A first receiving unit is used to receive first service data, wherein the first service data includes file header data and multiple message data, wherein the file header data includes data sender information, data receiver information, an identification template, a version number, and multiple first service types included in the file, each of the first service types includes multiple sub-services;
[0070] The first computing unit is used to perform a parsing operation on each of the message data in turn to obtain a plaintext corresponding to each of the message data, wherein the parsing operation is to identify the version number to obtain a corresponding message character spacing method, and convert the message data into multiple detailed items according to the identification template and the message character spacing method, identify the corresponding sub-business in the multiple detailed items, find the template of the corresponding sub-business in the business template library, and organize the multiple detailed items according to the template to obtain the first plaintext data.
[0071] Optionally, in some specific implementations, the first calculation module 71 further includes:
[0072] The first detection unit is used to detect whether the data recipient information is valid in the blockchain network before the first computing unit performs a parsing operation on each of the message data in turn, and if the data recipient information is valid, detect whether the business permissions of the data sender and the data recipient both include multiple first business types in the first business data, and if the business permissions of the data sender and the data recipient both include multiple first business types in the first business data, perform the step of performing a parsing operation on each of the message data.
[0073] Optionally, in some specific implementations, the first conversion module 72 includes:
[0074] The second calculation unit is used to retrieve a corresponding standard business plaintext template from a standard template library according to the business code in the first plaintext data, and record it as a first standard business plaintext template;
[0075] a third calculation unit, configured to convert the plurality of detail items in the first plaintext data into standard detail items corresponding thereto in the first standard business plaintext template, thereby obtaining the standard plaintext data;
[0076] a fourth calculation unit, configured to retrieve a second plaintext template corresponding to the data recipient from the counterparty template library according to the standard business code in the standard plaintext data, and convert each standard detail item in the standard plaintext data into a detail item in the second plaintext template according to a mapping relationship between the second plaintext template and the first standard business plaintext template, thereby obtaining the second plaintext data;
[0077] A message conversion unit is used to perform message conversion on the second plaintext data to obtain the business data.
[0078] Optionally, in some specific implementations, the file parsing and conversion device further includes a consensus module for performing on-chain consensus on the business data before the second conversion module sends the second business data to the data recipient, and the consensus module includes:
[0079] A fifth calculation unit, configured to respectively calculate hash values of the first business data and the second business data to obtain a first hash value and a second hash value, wherein the first hash value is a hash value corresponding to the first business data, and the second hash value is a hash value corresponding to the second business data;
[0080] A first sending unit, configured to locally sign the first hash value and the second hash value, and send the signed first hash value and the second hash value to a blockchain consensus node, so that the blockchain consensus node reaches consensus on the first hash value and the second hash value in a blockchain network;
[0081] A second receiving unit is used to receive transaction data sent by the blockchain consensus node, where the transaction data includes transactions recording the first hash value and the second hash value, which are recorded as first transaction data;
[0082] The first execution unit is used to execute the first transaction data so that the first hash value and the second hash value are recorded in a local blockchain public account book.
[0083] It should be noted that, regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment of the method, and will not be elaborated here.
[0084] Example 3
[0085] Corresponding to the above method embodiment, the embodiment of the present disclosure further provides a file parsing and conversion device. The file parsing and conversion device described below and the file parsing and conversion method described above can refer to each other.
[0086] Figure 3 FIG. 8 is a block diagram of a file parsing and conversion device 800 according to an exemplary embodiment. Figure 3 As shown, the electronic device 800 may include: a processor 801 and a memory 802. The electronic device 800 may also include one or more of a multimedia component 803, an input / output (I / O) interface 804, and a communication component 805.
[0087] The processor 801 is used to control the overall operation of the electronic device 800 to complete all or part of the steps in the above-mentioned file parsing and conversion method. The memory 402 is used to store various types of data to support the operation of the electronic device 800, and these data may include, for example, instructions for any application or method used to operate on the electronic device 800, and application-related data, such as contact data, sent and received messages, pictures, audio, video, etc. The memory 802 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random Access Memory, referred to as SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, referred to as EEPROM), erasable programmable read-only memory (Erasable Programmable Read-Only Memory, referred to as EPROM), programmable read-only memory (Programmable Read-Only Memory, referred to as PROM), read-only memory (Read-Only Memory, referred to as ROM), magnetic memory, flash memory, magnetic disk or optical disk. The multimedia component 803 may include a screen and an audio component. The screen may be, for example, a touch screen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone, which is used to receive external audio signals. The received audio signal may be further stored in the memory 802 or sent through the communication component 805. The audio component also includes at least one speaker for outputting audio signals. The I / O interface 804 provides an interface between the processor 801 and other interface modules, and the above-mentioned other interface modules may be keyboards, mice, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 805 is used for wired or wireless communication between the electronic device 800 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G or 4G, or a combination of one or more of them, so the corresponding communication component 805 may include: Wi-Fi module, Bluetooth module, NFC module.
[0088] In an exemplary embodiment, the electronic device 800 can be implemented by one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), controllers, microcontrollers, microprocessors or other electronic components to execute the above-mentioned file parsing and conversion methods.
[0089] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, and when the program instructions are executed by a processor, the steps of the above-mentioned file parsing and conversion method are implemented. For example, the computer-readable storage medium can be the above-mentioned memory 802 including program instructions, and the above-mentioned program instructions can be executed by the processor 801 of the electronic device 800 to complete the above-mentioned file parsing and conversion method.
[0090] Example 4
[0091] Corresponding to the above method embodiment, the embodiment of the present disclosure further provides a readable storage medium. The readable storage medium described below and the file parsing and conversion method described above can refer to each other.
[0092] A readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the file parsing and conversion method of the above method embodiment.
[0093] The readable storage medium may specifically be a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or other readable storage medium that can store program codes.
[0094] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A file parsing and conversion method, characterized in that: The method comprises: In response to first business data sent by the business system, parsing the business data to obtain first plaintext data, where the first business data is a set of multiple message data generated by the business system; parsing the business data to obtain the first plaintext data includes: Receive first service data, the first service data including file header data and multiple message data, the file header data including data sender information, data receiver information, an identification template, a version number, and multiple first service types included in the file, each of the first service types including multiple sub-services; Performing a parsing operation on each of the message data in turn to obtain a plain text corresponding to each of the message data, wherein the parsing operation is to identify a version number to obtain a corresponding message character spacing mode, and converting the message data into a plurality of detailed items according to an identification template and the message character spacing mode, identifying a corresponding sub-service in the plurality of detailed items, finding a template of the corresponding sub-service in a service template library, and arranging the plurality of detailed items according to the template to obtain the first plain text data; Before performing the parsing operation on each of the message data in sequence, the method further includes: Detecting whether the data recipient information is valid in the blockchain network, and if the data recipient information is valid, detecting whether the business permissions of the data sender and the data recipient both include multiple first business types in the first business data, and if the business permissions of the data sender and the data recipient both include multiple first business types in the first business data, executing the step of performing a parsing operation on each of the message data; Converting the first plaintext data into standard plaintext data, and converting the standard plaintext data into second plaintext data, wherein the second plaintext data is data in a plaintext format corresponding to the data recipient; The second plaintext data is converted into second business data, and the second business data is sent to a data receiver, where the second business data is message data that can be recognized by a business system of the data receiver.
2. The file parsing and conversion method according to claim 1, characterized in that: The converting the first plaintext data into standard plaintext data, and converting the standard plaintext data into second plaintext data, includes: According to the service code in the first plaintext data, a corresponding standard service plaintext template is retrieved from the standard template library and recorded as a first standard service plaintext template; Converting the multiple detailed items in the first plaintext data into the standard detailed items corresponding thereto in the first standard business plaintext template, thereby obtaining the standard plaintext data; According to the standard business code in the standard plaintext data, a second plaintext template corresponding to the data recipient is retrieved from the counterparty template library, and each standard detail item in the standard plaintext data is converted into a detail item in the second plaintext template according to a mapping relationship between the second plaintext template and the first standard business plaintext template, thereby obtaining the second plaintext data; The second plaintext data is message-converted to obtain the business data.
3. The file parsing and conversion method according to claim 1, characterized in that: Before sending the second service data to the data recipient, the method further includes: Calculate hash values of the first business data and the second business data respectively to obtain a first hash value and a second hash value, wherein the first hash value is a hash value corresponding to the first business data, and the second hash value is a hash value corresponding to the second business data; Locally signing the first hash value and the second hash value, and sending the signed first hash value and the second hash value to a blockchain consensus node, so that the blockchain consensus node can reach a consensus on the first hash value and the second hash value in the blockchain network; Receiving transaction data sent by the blockchain consensus node, wherein the transaction data includes a transaction recording the first hash value and the second hash value, which is recorded as first transaction data; The first transaction data is executed so that the first hash value and the second hash value are recorded in a local blockchain public account book.
4. A file parsing and conversion device, characterized in that: The device comprises: A first computing module is configured to, in response to first business data sent by a business system, parse the business data to obtain first plaintext data, where the first business data is a set of multiple message data generated by the business system; the parsing the business data to obtain the first plaintext data includes: Receive first service data, the first service data including file header data and multiple message data, the file header data including data sender information, data receiver information, an identification template, a version number, and multiple first service types included in the file, each of the first service types including multiple sub-services; Performing a parsing operation on each of the message data in turn to obtain a plain text corresponding to each of the message data, wherein the parsing operation is to identify a version number to obtain a corresponding message character spacing mode, and converting the message data into a plurality of detailed items according to an identification template and the message character spacing mode, identifying a corresponding sub-service in the plurality of detailed items, finding a template of the corresponding sub-service in a service template library, and arranging the plurality of detailed items according to the template to obtain the first plain text data; Before performing the parsing operation on each of the message data in sequence, the method further includes: Detecting whether the data recipient information is valid in the blockchain network, and if the data recipient information is valid, detecting whether the business permissions of the data sender and the data recipient both include multiple first business types in the first business data, and if the business permissions of the data sender and the data recipient both include multiple first business types in the first business data, executing the step of performing a parsing operation on each of the message data; A first conversion module, used to convert the first plaintext data into standard plaintext data, and convert the standard plaintext data into second plaintext data, where the second plaintext data is data in a plaintext format corresponding to a data recipient; The second conversion module is used to convert the second plaintext data into second business data, and send the second business data to a data recipient, where the second business data is message data that can be recognized by a business system of the data recipient.
5. An electronic device, characterized in that: include: The memory is used to store computer programs; The processor is used to implement the method steps described in any one of claims 1-3 when executing the program stored in the memory.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method steps described in any one of claims 1 to 3 are implemented.
