CN114936249A - File analysis and conversion method, device, equipment and readable storage medium - Google Patents

File analysis and conversion method, device, equipment and readable storage medium Download PDF

Info

Publication number
CN114936249A
CN114936249A CN202210725839.6A CN202210725839A CN114936249A CN 114936249 A CN114936249 A CN 114936249A CN 202210725839 A CN202210725839 A CN 202210725839A CN 114936249 A CN114936249 A CN 114936249A
Authority
CN
China
Prior art keywords
data
service
plaintext
standard
converting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210725839.6A
Other languages
Chinese (zh)
Inventor
任昌才
刘昱
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Quality Starker Technology Co Ltd
Original Assignee
Chengdu Quality Starker Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu Quality Starker Technology Co Ltd filed Critical Chengdu Quality Starker Technology Co Ltd
Priority to CN202210725839.6A priority Critical patent/CN114936249A/en
Publication of CN114936249A publication Critical patent/CN114936249A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/258Data format conversion from or to a database
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Computer And Data Communications (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention relates to the technical field of block chains, in particular to a file analyzing and converting method, a device, equipment and a readable storage medium, wherein the method comprises the following steps: responding to first service data sent by a service system, and analyzing the service data to obtain first plaintext data; converting the first plaintext data into standard plaintext data, and converting the standard plaintext data into second plaintext data; the method comprises the steps of analyzing service data generated by a service system into plaintext data, standardizing the plaintext data, then, performing message conversion on the plaintext data to obtain service data corresponding to a node system of a data receiving party, further, completing format conversion of the service data of the data sending party and the service data of the data receiving party, and realizing barrier-free communication of the service data of a plurality of different service system nodes.

Description

File analysis and conversion method, device, equipment and readable storage medium
Technical Field
The invention relates to the technical field of block chains, in particular to a file parsing method, a file parsing device, a file converting device and a readable storage medium.
Background
The block chain technology is built on a transmission network (also called as a block chain network), distributed node equipment (hereinafter referred to as nodes) in the transmission network generates block data by a preset consensus strategy through running a block chain program, and verifies and stores the block data by using a chain data structure, so that a data tamper-proof mechanism is finally realized, and a safe and reliable new technical idea is provided for business development.
In the existing block chain network, the service data formats of a plurality of service nodes are different, the data formats need to be converted when service communication is performed between the nodes, and different nodes define different service types, so that the transaction details required for executing transaction are different, and how to make the service nodes of a plurality of different systems perform service communication in the block chain network without obstacles is an urgent problem to be solved.
Disclosure of Invention
The invention aims to provide a file analyzing and converting method, a file analyzing and converting device and a readable storage medium, so as to solve the problem that a whole block chain network is broken down due to the fact that a plurality of local nodes are disconnected and service communication cannot be normally executed due to various reasons.
In order to achieve the above object, the embodiments of the present application provide the following technical solutions:
in one aspect, an embodiment of the present application provides a file parsing and converting method, where the method includes: responding to first service data sent by a service system, and analyzing the service data to obtain first plaintext data, wherein the first service data is a plurality of message data sets generated by the service 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 receiver; and converting the second plaintext data into second service data, and sending the second service data to a data receiving party, wherein the second service data is message data which can be identified by a service system of the data receiving party.
Optionally, the parsing the service data to obtain first plaintext data includes:
receiving first service data, wherein the first service data comprises file header data and a plurality of message data, the file header data comprises data sender information, data receiver information, an identification template, a version number and a plurality of first service types contained in a file, and each first service type comprises a plurality of sub-services;
and sequentially performing analysis operation on each message data to obtain a plaintext corresponding to each message data, wherein the analysis operation is to identify a version number to obtain a corresponding message character interval mode, convert the message data into a plurality of detailed items according to an identification template and the message character interval mode, identify corresponding sub-services in the plurality of detailed items, find a template of the corresponding sub-services in a service template library, and arrange the plurality of detailed items according to the template to obtain first plaintext data.
Optionally, before the analyzing operation is sequentially performed on each of the packet data, the method further includes:
detecting whether the information of the data receiving party is effective in the blockchain network, detecting whether the service permissions of the data sending party and the data receiving party both comprise a plurality of first service types in the first service data under the condition that the information of the data receiving party is effective, and executing the step of analyzing each message data under the condition that the service permissions of the data sending party and the data receiving party both comprise a plurality of first service types in the first service data.
Optionally, the converting the first plaintext data into standard plaintext data and converting the standard plaintext data into second plaintext data includes:
calling a corresponding standard service plaintext template from a standard template library according to the service code in the first plaintext data, and recording the standard service plaintext template as a first standard service plaintext template;
respectively converting a plurality of detail items in first plaintext data into standard detail items corresponding to the detail items in the first standard service plaintext template, and further obtaining the standard plaintext data;
calling a second plaintext template corresponding to a data receiver from a counterparty template base according to a standard service code in the standard plaintext data, and respectively converting each standard detail item in the standard plaintext data into a detail item in the second plaintext template according to a mapping relation between the second plaintext template and the first standard service plaintext template so as to obtain the second plaintext data;
and converting the second plaintext data to obtain the service data.
Optionally, before sending the second service data to a data receiver, the method further includes:
respectively calculating hash values of the first service data and the second service 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 service data, and the second hash value is a hash value corresponding to the second service data;
locally signing the first hash value and the second hash value, and sending the signed first hash value and second hash value to a blockchain consensus node so that the blockchain consensus node can agree the first hash value and the second hash value in a blockchain network;
receiving transaction data sent by the blockchain consensus node, wherein the transaction data comprise transactions recording the first hash value and the second hash value and are marked as first transaction data;
executing the first transaction data to cause the first hash value and the second hash value to be recorded in a local blockchain public ledger.
In a second aspect, the present application provides a file parsing and converting apparatus, where the apparatus includes:
the first computing module is used for responding to first service data sent by a service system, analyzing the service data to obtain first plaintext data, wherein the first service data are a plurality of message data sets generated by the service system;
the first conversion module is used for converting the first plaintext data into standard plaintext data and converting the standard plaintext data into second plaintext data, and the second plaintext data is data in a plaintext format corresponding to a data receiver;
and the second conversion module is used for converting the second plaintext data into second service data and sending the second service data to a data receiver, wherein the second service data is message data which can be identified by a service system of the data receiver.
In a third aspect, an embodiment of the present application provides a file parsing and converting device, where the device includes a memory and a processor.
The memory is used for storing a computer program; the processor is used for realizing the steps of the file analyzing and converting method when executing the computer program.
In a fourth aspect, an embodiment of the present application provides a readable storage medium, where a computer program is stored on the readable storage medium, and when the computer program is executed by a processor, the computer program implements the steps of the file parsing and converting method.
The invention has the beneficial effects that:
the method comprises the steps of converting service data generated by a service system into human-readable plaintext data, calling a standard template preset in a standard service library to convert local plaintext data into standard plaintext data unified by a block chain network, converting the standard service plaintext data into plaintext data corresponding to a data receiver, and performing message conversion on the plaintext data corresponding to the data receiver to obtain service data corresponding to a node system of the data receiver, thereby completing format conversion of the service data of the data sender and the service data of the data receiver and realizing barrier-free communication of the service data of a plurality of different service system nodes.
Secondly, standard service data are generated by introducing a standard plaintext template, and a single service node can carry out service communication with all service nodes in the block chain network only by completing adaptation with the standard service, so that adaptation difficulty and cost are greatly reduced compared with adaptation with each different service system node.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the embodiments of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
FIG. 1 is a schematic flow chart of a file parsing and converting method according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of a file parsing and converting apparatus according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a file parsing and converting device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, 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 with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that: like reference numbers or letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined or explained in subsequent figures. Meanwhile, in the description of the present invention, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
The block chain network described in this embodiment includes a plurality of service nodes, each service node corresponds to an upper layer service system, and there is a difference between the upper layer service systems, which results in that service data between the upper layer service systems cannot be identified, and because the modification cost for performing data format unification on each existing upper layer service system is very high, the task of performing format conversion on the service data between the upper layer service systems falls on the block chain node accessing the upper layer service system.
Example 1
As shown in fig. 1, the present embodiment provides a file parsing and converting method, which includes step S1, step S2, step S3, and step S4.
Step S1, a service node of a data sender responds to first service data sent by a service system and analyzes the service data to obtain first plaintext data, wherein the first service data are a plurality of message data sets generated by the service system, the first plaintext data can be a plurality of manually readable details such as user names, identity card numbers, transaction dates, service types to be handled and the like, and each message represents at least one service transaction;
the method comprises the following steps of analyzing the service data to obtain first plaintext data, and specifically operating a block chain service node butted by a service system of a data sender:
s11, a service node of a data sender receives first service data, wherein the first service data comprise file header data and a plurality of message data, the file header data comprise information of the data sender, information of a data receiver, an identification template, a version number and a plurality of first service types contained in a file, and each first service type comprises a plurality of sub-services;
for convenience of understanding, for example, the header file records sender information and receiver information of the first service data, which is used for finding an address IP of a data receiver, and the header file also records a large service type related to all messages in the file, which is used for checking service permissions or service qualifications of both service parties in advance, the system performs conversion transmission of the service data only when both service parties have the permissions, otherwise, an alarm is given to a corresponding upper-layer service system, and when a sub-service in the large service type is recorded in the service message or the large service does not exist in the large service, the service message records the large service type.
And S12, sequentially performing analysis operation on each message data to obtain a plaintext corresponding to each message data, wherein the analysis operation is to identify a version number to obtain a corresponding message character interval mode, convert the message data into a plurality of detailed items according to an identification template and the message character interval mode, identify corresponding sub-services in the plurality of detailed items, find templates of the corresponding sub-services in a service template library, and arrange the plurality of detailed items according to the templates to obtain first plaintext data.
For convenience of understanding, exemplarily, the formats of messages generated by the service systems are different due to updating of the upper-layer service systems, where the main difference is that the interval modes of the message characters are different, when recognizing the characters, the interval modes need to be determined in advance according to the versions of the messages to prevent erroneous recognition of the characters, then, the recognition template of the header file is used to identify the intercepting mode of the message character segments or the intercepting mode of the detail items, for example, the 2 nd to 5 th characters of the message represent names, the 7 th to 9 th characters represent transactions or service types, where the names, the transaction types, and the like are called the detail items, and a plurality of the detail items form a complete transaction, and a plurality of messages in the service data are all analyzed into a plurality of detail item groups, so as to obtain the first plaintext data.
Optionally, to prevent a waste of computational resources of the blockchain network system, a plurality of basic planes of the service data need to be preliminarily detected before performing the parsing operation on each packet data, and after the detection is qualified, the parsing operation is performed, where the specific operation on the service node of the data sender may be:
detecting whether the information of the data receiving party is effective in the blockchain network, specifically detecting whether a corresponding authorized IP address exists, and under the condition that the information of the data receiving party is effective, detecting whether the service permissions of the data sending party and the data receiving party both comprise a plurality of first service types in the first service data, and under the condition that the service permissions of the data sending party and the data receiving party both comprise a plurality of first service types in the first service data, executing a step of analyzing each message data, in other words, the receiving party and the sending party of the service data both have the permission to perform the service and can perform the transmission of the service data on the blockchain network, otherwise, terminating the transmission of the service data, and further enabling the data circulating on the chain to have higher supervision.
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 a data receiver;
the block chain network includes a plurality of service nodes, each service node corresponds to an upper layer service system, and there is a difference between the upper layer service systems, which results in that service data between the upper layer service systems cannot be identified, specifically, each service system names the same transaction differently, and conditions required for handling the transaction also differ, so that a set of standard service plaintext templates needs to be formulated to convert plaintext data of different formats, in this embodiment, the specific operation of the service node of the data sender may be:
calling a corresponding standard service plaintext template from a standard template library according to the service code in the first plaintext data, and recording the standard service plaintext template as a first standard service plaintext template;
step S21, converting the detail items in the first plaintext data into corresponding standard detail items in the first standard service plaintext template respectively to obtain the standard plaintext data;
s22, calling a second plaintext template corresponding to a data receiver from an opponent template base according to a standard service code in the standard plaintext data, and respectively converting each standard detail item in the standard plaintext data into a detail item in a second plaintext template according to a mapping relation between the second plaintext template and the first standard service plaintext template so as to obtain the second plaintext data;
and S23, converting the second plaintext data to obtain the service data.
And S3, converting the second plaintext data into second service data, and sending the second service data to a data receiver, wherein the second service data is message data which can be identified by a service system of the data receiver.
Optionally, in this embodiment, before sending the second service data to the data receiver, the transmitted data needs to be archived, so as to prevent a source tracing requirement in a later period, and the problem of privacy disclosure of service transaction exists when the service data is directly sent to the blockchain network for consensus, and then the service data is large, and the consensus on the data needs to occupy a large amount of network resources of the blockchain network, which is time-consuming and labor-consuming, so that a hash value corresponding to the consensus on the service data in the blockchain network can be selected, so that the network resources required for consensus are reduced while the data privacy is ensured, and the specific operation is as follows:
respectively calculating hash values of the first service data and the second service 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 service data, and the second hash value is a hash value corresponding to the second service data;
locally signing the first hash value and the second hash value, and sending the signed first hash value and second hash value to a blockchain consensus node so that the blockchain consensus node can agree the first hash value and the second hash value in a blockchain network;
receiving transaction data sent by the blockchain consensus node, wherein the transaction data comprise transactions recording the first hash value and the second hash value and are marked as first transaction data;
executing the first transaction data to cause the first hash value and the second hash value to be recorded in a local blockchain public ledger.
And performing uplink common identification on the first hash value and the second hash value to record the conversion transmission process of the service data more comprehensively.
Example 2
As shown in fig. 2, this embodiment provides a file parsing and converting apparatus, where the apparatus includes:
the first calculation module 71 is configured to, in response to first service data sent by a service system, parse the service data to obtain first plaintext data, where the first service data is a plurality of message data sets generated by the service system;
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, where the second plaintext data is data in a plaintext format corresponding to a data receiving party;
the second conversion module 73 is configured to convert the second plaintext data into second service data, and send the second service data to a data receiving party, where the second service data is message data that can be identified by a service system of the data receiving party.
Optionally, in some specific embodiments, the first calculating module 71 includes:
the first receiving unit is used for receiving first service data, the first service data comprises file header data and a plurality of message data, the file header data comprises data sending party information, data receiving party information, an identification template, a version number and a plurality of first service types contained in a file, and each first service type comprises a plurality of sub-services;
the first computing unit is configured to sequentially perform an analysis operation on each piece of message data to obtain a plaintext corresponding to each piece of message data, where the analysis operation is to identify a version number to obtain a corresponding message character interval mode, convert the message data into a plurality of details according to an identification template and the message character interval mode, identify a corresponding sub-service in the plurality of details, find a template of the corresponding sub-service in a service template library, and arrange the plurality of details according to the template to obtain first plaintext data.
Optionally, in some specific embodiments, the first calculating module 71 further includes:
the first detection unit is configured to detect whether the information of the data receiving party is valid in the blockchain network before the first calculation unit sequentially performs the parsing operation on each piece of packet data, detect whether the service permissions of the data sending party and the data receiving party both include multiple first service types in the first service data under the condition that the information of the data receiving party is valid, and perform the step of performing the parsing operation on each piece of packet data under the condition that the service permissions of the data sending party and the data receiving party both include multiple first service types in the first service data.
Optionally, in some specific embodiments, the first conversion module 72 includes:
the second calculation unit is used for calling a corresponding standard service plaintext template from the standard template library according to the service code in the first plaintext data, and recording the standard service plaintext template as a first standard service plaintext template;
a third calculating unit, configured to convert the multiple detail items in the first plaintext data into standard detail items corresponding to the multiple detail items in the first standard service plaintext template, respectively, so as to obtain the standard plaintext data;
a fourth calculating unit, configured to invoke a second plaintext template corresponding to a data receiver in an opponent template library according to a standard service code in the standard plaintext data, and convert each standard plaintext item in the standard plaintext data into a plaintext item in a second plaintext template according to a mapping relationship between the second plaintext template and the first standard service plaintext template, so as to obtain the second plaintext data;
and the message conversion unit is used for performing message conversion on the second plaintext data to obtain the service data.
Optionally, in some specific embodiments, the file parsing and converting apparatus further includes a consensus module for performing uplink consensus on the service data before the second conversion module sends the second service data to the data receiver, where the consensus module includes:
a fifth calculating unit, configured to calculate hash values of the first service data and the second service data, respectively, to obtain a first hash value and a second hash value, where the first hash value is a hash value corresponding to the first service data, and the second hash value is a hash value corresponding to the second service data;
a first sending unit, configured to perform local signature on the first hash value and the second hash value, and send the first hash value and the second hash value after signature to a blockchain consensus node, so that the blockchain consensus node can agree on the first hash value and the second hash value in a blockchain network;
a second receiving unit, configured to receive transaction data sent by the blockchain consensus node, where the transaction data includes a transaction that records the first hash value and the second hash value, and is marked as first transaction data;
a first execution unit configured to execute the first transaction data so that the first hash value and the second hash value are recorded in a local blockchain public ledger.
It should be noted that, regarding the apparatus in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated herein.
Example 3
Corresponding to the above method embodiment, the embodiment of the present disclosure further provides a file parsing and converting device, and a file parsing and converting device described below and a file parsing and converting method described above may be referred to correspondingly.
Fig. 3 is a block diagram illustrating a file parsing, conversion device 800 according to an example embodiment. As shown in fig. 3, the electronic device 800 may include: a processor 801, 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 communications component 805.
The processor 801 is configured to control the overall operation of the electronic device 800, so as to complete all or part of the steps in the file parsing and converting method. The memory 402 is used to store various types of data to support operation at the electronic device 800, such as instructions for any application or method operating on the electronic device 800 and application-related data, such as contact data, transmitted and received messages, pictures, audio, video, and so forth. The Memory 802 may be implemented by any type of volatile or non-volatile Memory device or 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 multimedia components 803 may include screen and audio components. Wherein the screen may be, for example, a touch screen and the audio component is used for outputting and/or inputting audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may further be stored in the memory 802 or transmitted through the communication component 805. The audio assembly 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, such as a keyboard, mouse, buttons, and the like. 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 that the corresponding communication component 805 may include: Wi-Fi module, bluetooth module, NFC module.
In an exemplary embodiment, the electronic Device 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for performing the file parsing and converting methods described above.
In another exemplary embodiment, a computer readable storage medium comprising program instructions which, when executed by a processor, implement the steps of the file parsing, converting method described above is also provided. For example, the computer readable storage medium may be the memory 802 including the program instructions, which are executable by the processor 801 of the electronic device 800 to perform the file parsing and converting method described above.
Example 4
Corresponding to the above method embodiment, the embodiment of the present disclosure further provides a readable storage medium, and a readable storage medium described below and a file parsing and converting method described above may be referred to correspondingly.
A readable storage medium, on which a computer program is stored, and when being executed by a processor, the computer program implements the steps of the file parsing and converting method of the above method embodiment.
The readable storage medium may be a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, an optical disk, or other various readable storage media capable of storing program codes.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (8)

1. A file parsing and converting method is characterized by comprising the following steps:
responding to first service data sent by a service system, analyzing the service data to obtain first plaintext data, wherein the first service data is a plurality of message data sets generated by the service 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 receiver;
and converting the second plaintext data into second service data, and sending the second service data to a data receiving party, wherein the second service data is message data which can be identified by a service system of the data receiving party.
2. The method according to claim 1, wherein the parsing the service data to obtain first plaintext data comprises:
receiving first service data, wherein the first service data comprises file header data and a plurality of message data, the file header data comprises data sender information, data receiver information, an identification template, a version number and a plurality of first service types contained in a file, and each first service type comprises a plurality of sub-services;
and sequentially performing analysis operation on each message data to obtain a plaintext corresponding to each message data, wherein the analysis operation is to identify a version number to obtain a corresponding message character interval mode, convert the message data into a plurality of detailed items according to an identification template and the message character interval mode, identify corresponding sub-services in the plurality of detailed items, find a template of the corresponding sub-services in a service template library, and arrange the plurality of detailed items according to the template to obtain first plaintext data.
3. The file parsing and converting method according to claim 2, wherein before the parsing operation is performed on each of the packet data in sequence, the method further comprises:
detecting whether the information of the data receiving party is effective in the blockchain network, detecting whether the service permissions of the data sending party and the data receiving party both comprise a plurality of first service types in the first service data under the condition that the information of the data receiving party is effective, and executing the step of analyzing each message data under the condition that the service permissions of the data sending party and the data receiving party both comprise a plurality of first service types in the first service data.
4. The method for parsing and converting a file according to claim 1, wherein said converting the first plaintext data into standard plaintext data and converting the standard plaintext data into second plaintext data comprises:
calling a corresponding standard service plaintext template from a standard template library according to the service code in the first plaintext data, and marking as a first standard service plaintext template;
respectively converting a plurality of detail items in first plaintext data into standard detail items corresponding to the detail items in the first standard service plaintext template, and further obtaining the standard plaintext data;
calling a second plaintext template corresponding to a data receiver from a counterparty template base according to a standard service code in the standard plaintext data, and respectively converting each standard detail item in the standard plaintext data into a detail item in the second plaintext template according to a mapping relation between the second plaintext template and the first standard service plaintext template so as to obtain the second plaintext data;
and converting the second plaintext data to obtain the service data.
5. The file parsing and converting method according to claim 1, wherein before sending the second service data to a data receiver, the method further comprises:
respectively calculating hash values of the first service data and the second service 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 service data, and the second hash value is a hash value corresponding to the second service data;
the first hash value and the second hash value are subjected to local signature, and the first hash value and the second hash value after signature are sent to a block chain common identification node, so that the block chain common identification node can commonly identify the first hash value and the second hash value in a block chain network;
receiving transaction data sent by the blockchain consensus node, wherein the transaction data comprises a transaction for recording the first hash value and the second hash value and is marked as first transaction data;
executing the first transaction data to cause the first hash value and the second hash value to be recorded in a local blockchain public ledger.
6. A file parsing and converting device, the device comprising:
the first computing module is used for responding to first service data sent by a service system, analyzing the service data to obtain first plaintext data, wherein the first service data are a plurality of message data sets generated by the service system;
the first conversion module is used for converting the first plaintext data into standard plaintext data and converting the standard plaintext data into second plaintext data, and the second plaintext data is data in a plaintext format corresponding to a data receiver;
and the second conversion module is used for converting the second plaintext data into second service data and sending the second service data to a data receiver, wherein the second service data is message data which can be identified by a service system of the data receiver.
7. An electronic device, comprising:
the memory is used for storing a computer program;
the processor, when executing the program stored in the memory, is adapted to perform the method steps of any of claims 1-5.
8. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method steps of any one of claims 1 to 5.
CN202210725839.6A 2022-06-23 2022-06-23 File analysis and conversion method, device, equipment and readable storage medium Pending CN114936249A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210725839.6A CN114936249A (en) 2022-06-23 2022-06-23 File analysis and conversion method, device, equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210725839.6A CN114936249A (en) 2022-06-23 2022-06-23 File analysis and conversion method, device, equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN114936249A true CN114936249A (en) 2022-08-23

Family

ID=82868126

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210725839.6A Pending CN114936249A (en) 2022-06-23 2022-06-23 File analysis and conversion method, device, equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN114936249A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117349301A (en) * 2023-10-10 2024-01-05 天翼数字生活科技有限公司 Mobile terminal application program data updating method, system and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117349301A (en) * 2023-10-10 2024-01-05 天翼数字生活科技有限公司 Mobile terminal application program data updating method, system and storage medium

Similar Documents

Publication Publication Date Title
CN112636957B (en) Early warning method and device based on log, server and storage medium
CN110908967B (en) Method, device, equipment and computer readable medium for storing log
CN111552633A (en) Interface abnormal call testing method and device, computer equipment and storage medium
CN111240940B (en) Real-time service monitoring method and device, electronic equipment and storage medium
CN110932918A (en) Log data acquisition method and device and storage medium
CN112631924A (en) Automatic testing method and device, computer equipment and storage medium
CN111931189A (en) API interface transfer risk detection method and device and API service system
CN111259382A (en) Malicious behavior identification method, device and system and storage medium
CN112328486A (en) Interface automation test method and device, computer equipment and storage medium
CN114936249A (en) File analysis and conversion method, device, equipment and readable storage medium
CN116069838A (en) Data processing method, device, computer equipment and storage medium
US20180069774A1 (en) Monitoring and reporting transmission and completeness of data upload from a source location to a destination location
CN111046393B (en) Vulnerability information uploading method and device, terminal equipment and storage medium
WO2023151397A1 (en) Application program deployment method and apparatus, device, and medium
CN113434217B (en) Vulnerability scanning method, vulnerability scanning device, computer equipment and medium
CN115858320A (en) Operation log recording method, apparatus, medium and product
CN113987574A (en) Block chain private transaction method, device, equipment and readable storage medium
CN114339628A (en) Method, device, storage medium and product for sending 5G rich media message
CN114978526B (en) Block chain data transmission method, device, equipment and readable storage medium
CN112702270B (en) Node calling method, system and storage medium based on event distribution mechanism
CN117473511B (en) Edge node vulnerability data processing method, device, equipment and storage medium
CN114844691B (en) Data processing method and device, electronic equipment and storage medium
CN112579553B (en) Method and apparatus for recording information
CN113570368B (en) Block chain mixed signature verification method and system
CN110865892A (en) Detection method and device for call interface, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination