CN114513552B - Data processing method, device, equipment and storage medium - Google Patents

Data processing method, device, equipment and storage medium Download PDF

Info

Publication number
CN114513552B
CN114513552B CN202210010090.7A CN202210010090A CN114513552B CN 114513552 B CN114513552 B CN 114513552B CN 202210010090 A CN202210010090 A CN 202210010090A CN 114513552 B CN114513552 B CN 114513552B
Authority
CN
China
Prior art keywords
message
message format
format
preset template
data
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.)
Active
Application number
CN202210010090.7A
Other languages
Chinese (zh)
Other versions
CN114513552A (en
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.)
CITIC Aibank Corp Ltd
Original Assignee
CITIC Aibank Corp 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 CITIC Aibank Corp Ltd filed Critical CITIC Aibank Corp Ltd
Priority to CN202210010090.7A priority Critical patent/CN114513552B/en
Publication of CN114513552A publication Critical patent/CN114513552A/en
Application granted granted Critical
Publication of CN114513552B publication Critical patent/CN114513552B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The disclosure provides a data processing method, a data processing device, electronic equipment and a storage medium. Acquiring a first message format and first message content corresponding to the first message format, which are included in the first message data, by responding to the received first message data; in response to detecting that the first message format comprises a format field corresponding to a first preset template message format, replacing the format field which is the same as the first preset template message format in the first message format with a first preset template reference identifier to obtain a first intermediate message format; performing message format conversion according to the first intermediate message format and the first preset template message format to obtain a second message format; determining second message data according to the second message format and the first message content; by referring to the template, the workload of converting the whole first message format is reduced, and the message conversion efficiency is improved.

Description

Data processing method, device, equipment and storage medium
Technical Field
The present disclosure relates to data processing technologies, and in particular, to a data processing method, apparatus, device, and storage medium.
Background
In the network data transmission process, the format of the message between the source node and the target node is usually different, so that the message conversion is usually required during the data transmission.
In the traditional message conversion, the message format of the message data needs to be completely converted, the conversion workload is large, and the message data conversion efficiency is low.
Disclosure of Invention
The embodiment of the disclosure provides a data processing method, a device, equipment and a storage medium.
In a first aspect, the present disclosure provides a data processing method, including:
responding to received first message data, and acquiring a first message format included in the first message data and first message content corresponding to the first message format;
in response to detecting that the first message format comprises a format field corresponding to a first preset template message format, replacing the format field which is the same as the first preset template message format in the first message format with a first preset template reference identifier to obtain a first intermediate message format;
performing message format conversion according to the first intermediate message format and the first preset template message format to obtain a second message format;
and determining second message data according to the second message format and the first message content.
In some alternative embodiments, the method further comprises:
acquiring a standard identification mark of the first message data in response to detecting that the first message format does not comprise a format field corresponding to the first preset template message format;
determining a second preset template message format according to the specification identification;
replacing the first message format with the second preset template message format;
performing message format conversion according to the second preset template message format to obtain a third message format;
and determining third message data according to the third message format and the first message content.
In some optional embodiments, the performing the message format conversion according to the first intermediate message format and the first preset template message format includes:
performing message format conversion on the first preset template message format to obtain a first converted template message format;
and replacing the first preset template reference identifier with the first converted template message format.
In some optional embodiments, before the replacing the first preset template reference identifier with the first converted template message format, the converting the message format according to the first intermediate message format and the first preset template message format further includes:
and converting format fields except for the first preset template reference identifier in the first intermediate message format.
In some optional embodiments, the determining second message data according to the second message format and the first message content includes:
and assigning a value to the second message format according to the first message content to obtain the second message data.
In some optional embodiments, the determining third message data according to the third message format and the first message content includes:
and assigning a value to the third message format according to the first message content to obtain the third message data.
In a second aspect, the present disclosure provides a data processing apparatus comprising:
the data acquisition unit is configured to respond to receiving first message data and acquire a first message format included in the first message data and first message content corresponding to the first message format;
the template processing unit is configured to replace a format field which is the same as a first preset template message format in the first message format with a first preset template reference identifier to obtain a first intermediate message format in response to detecting that the first message format comprises a format field corresponding to the first preset template message format;
the conversion unit is configured to perform message format conversion according to the first intermediate message format and the first preset template message format to obtain a second message format;
and the assignment unit is configured to determine second message data according to the second message format and the first message content.
In some alternative embodiments, the apparatus further comprises:
a specification acquisition unit configured to acquire a specification identification of the first message data in response to detecting that the first message format does not include a format field corresponding to the first preset template message format;
a standard processing unit configured to determine a second preset template message format according to the standard identification mark, and replace the first message format with the second preset template message format;
the conversion unit is further configured to perform message format conversion according to the second preset template message format to obtain a third message format;
the assignment unit is further configured to determine third message data according to the third message format and the first message content.
In some alternative embodiments, the conversion unit is further configured to:
performing message format conversion on the first preset template message format to obtain a first converted template message format;
and replacing the first preset template reference identifier with the first converted template message format.
In some alternative embodiments, the conversion unit is further configured to:
and converting format fields except for the first preset template reference identifier in the first intermediate message format.
In some alternative embodiments, the assignment unit is further configured to:
and assigning a value to the second message format according to the first message content to obtain the second message data.
In some alternative embodiments, the assignment unit is further configured to:
and assigning a value to the third message format according to the first message content to obtain the third message data.
In a third aspect, the present disclosure provides an electronic device comprising:
one or more processors;
storage means having stored thereon one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the method as described in any of the embodiments of the first aspect.
In a fourth aspect, the present disclosure provides a computer-readable storage medium having stored thereon a computer program, wherein the computer program, when executed by one or more processors, implements a method according to any of the embodiments of the first aspect.
The embodiment of the disclosure provides a data processing method, a device, an electronic device and a storage medium, wherein the method, the device, the electronic device and the storage medium are used for responding to received first message data and acquiring a first message format included in the first message data and first message content corresponding to the first message format; in response to detecting that the first message format comprises a format field corresponding to a first preset template message format, replacing the format field which is the same as the first preset template message format in the first message format with a first preset template reference identifier to obtain a first intermediate message format; performing message format conversion according to the first intermediate message format and the first preset template message format to obtain a second message format; determining second message data according to the second message format and the first message content; the format field which is the same as the first preset template message format in the first message format is replaced by the first preset template reference identifier through the reference template, the first preset template message format is converted during message format conversion, repeated conversion of the format field which is the same as the first preset template message format in the first message format is not needed, the workload of converting the whole first message format is reduced, and the message conversion efficiency is improved.
Drawings
The drawings illustrate generally, by way of example and not by way of limitation, various embodiments discussed herein.
FIG. 1 is an exemplary system architecture diagram to which an embodiment according to the present disclosure may be applied;
FIG. 2 is a flow diagram of one embodiment of a data processing method according to the present disclosure;
FIG. 3 is an exploded flow chart of one embodiment of step 204 in the data processing method shown in FIG. 2;
FIG. 4 is an exploded flow chart of one embodiment of step 204 of the data processing method of FIG. 2;
FIG. 5 is a schematic diagram of a structure of one embodiment of a data processing apparatus according to the present disclosure;
fig. 6 is a schematic diagram of a computer system suitable for use in implementing embodiments of the present disclosure.
Detailed Description
The present disclosure is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings.
It should be noted that, without conflict, the embodiments of the present disclosure and features of the embodiments may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
FIG. 1 illustrates an exemplary system architecture 100 in which embodiments of the data processing methods or data processing apparatus of the present disclosure may be applied.
As shown in fig. 1, a system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the server 105 via the network 104 using the terminal devices 101, 102, 103 to receive or send messages or the like. Various communication client applications, such as a message interaction application, a web browser application, a shopping class application, a search class application, an instant messaging tool, a mailbox client, social platform software, etc., may be installed on the terminal devices 101, 102, 103.
The terminal devices 101, 102, 103 may be hardware or software. When the terminal devices 101, 102, 103 are hardware, they may be various electronic devices having a display screen and supporting sound collection and/or video collection, including but not limited to smartphones, tablet computers, electronic book readers, MP3 players (Moving Picture Experts Group Audio Layer III, moving picture experts compression standard audio layer 3), MP4 (Moving Picture Experts Group Audio Layer IV, moving picture experts compression standard audio layer 4) players, laptop and desktop computers, and the like. When the terminal devices 101, 102, 103 are software, they can be installed in the above-listed electronic devices. Which may be implemented as multiple software or software modules (e.g., to provide distributed services), or as a single software or software module. The present invention is not particularly limited herein.
The server 105 may be a server providing various services, such as a background server providing support for the message interaction class applications displayed on the terminal devices 101, 102, 103. The background server may analyze the received first message data, and feedback the processing result (for example, the first message format included in the first message data and the first message content corresponding to the first message format, etc.) to the terminal device.
The server 105 may be hardware or software. When the server 105 is hardware, it may be implemented as a distributed server cluster formed by a plurality of servers, or as a single server. When server 105 is software, it may be implemented as a plurality of software or software modules (e.g., to provide distributed services), or as a single software or software module. The present invention is not particularly limited herein.
It should be noted that, in some cases, the data processing method provided by the present disclosure may be executed by the server 105, may be executed by the terminal devices 101, 102, 103, or may be executed by the server 105 and the terminal devices 101, 102, 103 together. Accordingly, the data processing apparatus may be provided in the server 105, may be provided in the terminal devices 101, 102, 103, or may be provided in part in the server 105 and in part in the terminal devices 101, 102, 103. And accordingly, the system architecture 100 may include only the server 105, or only the terminal devices 101, 102, 103, or may include the terminal devices 101, 102, 103, the network 104, and the server 105. The present disclosure is not limited in this regard.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to FIG. 2, a flow 200 of one embodiment of a data processing method according to the present disclosure is shown. The data processing method comprises the following steps:
step 201, in response to receiving the first message data, acquiring a first message format included in the first message data and a first message content corresponding to the first message format.
In the embodiment of the disclosure, the first packet data may be packet data sent by the source node to the target node. Here, the source node and the target node may include a request put and service side of a transmission protocol, for example, the first message data may be an incoming request and/or an outgoing request sent by the request put to the service side, or the first data may be an incoming response and/or an outgoing response sent by the request put to the service side.
Message data (message) is a data unit exchanged and transmitted in a network, i.e. a data block to be sent by a node at a time. In the embodiment of the disclosure, the message data may include a message format and a message content corresponding to the message format, where the message format is composed of format fields, and the message content corresponds to the format fields of the message format to compose the message data. For example, as shown in table 1, the "name, password and withdrawal amount" in the first column of table 1 correspond to the message format of table 1 and the format field of the message format, and the "Zhangsan, 123456 and 10000" in the second column of table 1 correspond to the message content of table 1, which together form the message data of table 1.
Name of name Zhangsan
Password code 123456
Withdrawal amount 10000
TABLE 1
The file formats of the current mainstream message format include JSON (JavaScript Object Notation, JS object profile) and XML (Extensible Markup Language ). In the present disclosure, the message format types may include an incoming request, an incoming response, an outgoing request, and an outgoing response.
The execution main body of the data processing method can analyze the first message data to obtain a first message format and first message content corresponding to the first message format after receiving the first message data sent to the target node by the source node.
Step 202, detecting whether the first message format includes a format field corresponding to the first preset template message format. If the detection result is yes, go to step 203; if the detection result is no, go to step 204.
The embodiment of the disclosure does not specifically limit a detection manner for detecting whether the first message format includes the format field corresponding to the first preset template message format. In some optional embodiments, the executing body compares the first preset template message format with the format field of the first message format, and determines whether the first message format includes the format field corresponding to the first preset template message format according to the comparison result.
In step 203, in response to detecting that the first message format includes a format field corresponding to the first preset template message format, the format field in the first message format that is the same as the first preset template message format is replaced by the first preset template reference identifier, so as to obtain a first intermediate message format.
In some alternative embodiments, the first message format includes at least two format fields that are identical to the first preset template message format, and correspondingly, the first intermediate message format includes at least two first preset template reference identifiers. It can be understood that, in the step 203, the format field in the first message format, which is the same as the first preset template message format, is extracted, and the first preset template reference identifier is reserved, so that simplification of the first message format is achieved, so as to reduce the workload of subsequent message format conversion.
Step 204, converting the message format according to the first intermediate message format and the first preset template message format to obtain a second message format.
Here, the second message format is a message format that the target node can receive, and correspondingly, the first message format is a message format sent by the source node.
In some alternative embodiments, the first intermediate message format is a full template reference, i.e., all format fields in the first intermediate message format are replaced with a first preset template reference identifier. Correspondingly, in some alternative embodiments, as shown in fig. 3, the message format conversion according to the first intermediate message format and the first preset template message format may include the following steps 301 and 302. Wherein:
step 301, performing message format conversion on the first preset template message format to obtain a first converted template message format.
In some optional embodiments, the first preset template message format is preset in the execution body of the data processing method, correspondingly, the message format conversion may be performed on the first preset template message format in advance to obtain a first converted message format, and the first converted message format is correspondingly stored in the execution body of the data processing method, so that the execution body of the data processing method only calls the first converted template message format corresponding to the first preset template message format when the message format is converted, and further reduces the conversion workload in the process of converting the message format.
Step 302, replacing the first preset template reference identifier with a first converted template message format.
It can be known that the second message format can be obtained by replacing the first preset template reference identifier with the first converted template message format.
In some alternative embodiments, the first intermediate message format is a partial template reference, i.e. the first intermediate message format includes a format field other than the first preset template reference identifier. Correspondingly, in some alternative embodiments, as shown in fig. 4, the message format conversion according to the first intermediate message format and the first preset template message format may include the following steps 401 to 403. Wherein:
step 401, performing message format conversion on the first preset template message format to obtain a first converted template message format.
Step 402, converting the format field except for the first preset template reference identifier in the first intermediate message format.
Step 403, replacing the first preset template reference identifier with the first converted template message format.
It can be known that the first preset template reference identifier is used as an identifier, no processing is required in the process of converting the message format, after the format fields except for the first preset template reference identifier in the first intermediate message format are converted into the message format, the first preset template reference identifier is replaced by the first converted template message format, and the second message format can be obtained.
It can be understood that in some practical application scenarios, in the first message data sent by the source node, according to the actual message generation process, format fields and contents that are not in the preset template may be generated, and for this part of the message format, the message format conversion is also required.
Step 205, determining the second message data according to the second message format and the first message content.
In some alternative embodiments, determining the second message data according to the second message format and the first message content may include: and assigning a value to the second message format according to the first message content to obtain second message data.
It can be understood that the format field in the second message format corresponds to the format field in the first message format, so that the second message format can be assigned according to the correspondence between the first message content and the first message format to obtain the second message data.
In step 206, in response to detecting that the first message format does not include a format field corresponding to the first preset template message format, a canonical identification of the first message data is obtained.
Here, the specification identification of the first message data is used to identify a preset second preset template message format. In the embodiment of the present disclosure, the form of the specification identification identifier is not specifically limited, and the specification identification identifier of the first packet data may be capable of representing the correspondence between the source node and the target node, for example, the specification identification identifier may be address information (for example, an IP address, a MAC address) of the source node and the target node, or may also be a device name, a device identification code, or the like of the source node.
In the embodiment of the disclosure, the specification identification mark represents that the source node and the target node meet preset specifications.
Step 207, determining a second preset template message format according to the specification identification.
In some alternative embodiments, the second preset template message format corresponding specification identification identifier may be pre-stored in the execution body of the data processing method. When the execution body of the data processing method executes the step 207, a pre-stored second preset template message format may be determined according to the specification identification.
Step 208, replacing the first message format with a second preset template message format.
In some optional embodiments, for the case that the first message format in the first message data sent by the source node to the target node does not match the first preset template message format, the first message format may be replaced according to a second preset template message format corresponding to a preset specification. In an embodiment of the present disclosure, the second preset template message format includes at least a portion of a format field in the first message format.
Step 209, performing message format conversion according to the second preset template message format to obtain a third message format.
In some optional embodiments, the second preset template message format is preset in the execution body of the data processing method, correspondingly, the first preset template message format may be converted into the third message format in advance, and the third message format is correspondingly stored in the execution body of the data processing method, so that the execution body of the data processing method only calls the third message format corresponding to the second preset template message format when the message format is converted, and further reduces the conversion workload in the process of converting the message format.
Here, the third message format is a message format that the target node can receive.
Step 210, determining third message data according to the third message format and the first message content.
In some alternative embodiments, determining the third message data according to the third message format and the first message content may include: and assigning a value to the third message format according to the first message content to obtain third message data.
It can be understood that the format field in the third message format corresponds to the format field of the second preset template message format, and the format field in the third message format corresponds to at least part of the format fields in the first message format, so that the third message format can be assigned according to the corresponding relationship between the first message content and the first message format, so as to obtain third message data.
With the continuous development of enterprises, the number of the abutted partners is increased, and meanwhile, the definition and description of service parameters are also greatly different from enterprise to enterprise and from service system to service system. The complexity, diversity and continuity of the service lead to the continuous increment of the number of interfaces, the increment of message fields of the interfaces, and the gradual increment of the management difficulty and workload of the interfaces. Furthermore, the operational risk due to interface management is also increasing. The financial service platform adopts the data processing method disclosed by the disclosure, and combines a set of configurable platform which is used for realizing the rapid access of a partner by arranging a bridge between interfaces as an execution main body of the data processing method.
Because of the numerous butt-joint partners, the interface parameters defined by each partner are not uniform, if the old interface adaptation mode is adopted, the service interface needs to be continuously developed and perfected, and when the interface parameters or the hierarchical structure are changed, the system is correspondingly modified, so that the expansibility is not strong. Therefore, by adopting the message template field mapping, the transformation of an intra-industry service system interface can be reduced, the relationship mapping is carried out through the incoming template field, the access of a partner can be responded quickly, and a large number of repeated development works are reduced.
The implementation mode can reduce the system development cost for the newly accessed partner system, and the service docking requirement can be realized only by foreground configuration.
According to the embodiment of the disclosure, through the template application, repeated definition configuration of fields is reduced, repeated message format conversion is not required to be performed on the format fields with the same message format as the first preset template, repeated configuration of the fields with the same scene is reduced, the probability of configuration errors is reduced, further, the workload of message data conversion is reduced, and the system efficiency of the message data conversion is improved.
With further reference to fig. 5, as an implementation of the above-described data processing method, an embodiment of the present disclosure provides a data processing apparatus 500, which corresponds to the method embodiment shown in fig. 2, and which is particularly applicable to various electronic devices.
As shown in fig. 5, the data processing apparatus 500 of the present embodiment may include: a data acquisition unit 501, a template processing unit 502, a conversion unit 503, and an assignment unit 504. The data obtaining unit 501 is configured to obtain, in response to receiving the first message data, a first message format included in the first message data and a first message content corresponding to the first message format; the template processing unit 502 is configured to replace a format field which is the same as the first preset template message format in the first message format with a first preset template reference identifier to obtain a first intermediate message format in response to detecting that the first message format includes a format field corresponding to the first preset template message format; a conversion unit 503 configured to perform message format conversion according to the first intermediate message format and the first preset template message format, to obtain a second message format; an assignment unit 504 is configured to determine the second message data based on the second message format and the first message content.
In some alternative embodiments, as shown in fig. 5, the data processing apparatus 500 further includes: a specification acquisition unit 505 and a specification processing unit 506. Wherein: a specification acquisition unit 505 configured to acquire a specification identification of the first message data in response to detecting that the first message format does not include a format field corresponding to the first preset template message format; a specification processing unit 506 configured to determine a second preset template message format according to the specification identification, and replace the first message format with the second preset template message format; the conversion unit 503 is further configured to perform message format conversion according to the second preset template message format, so as to obtain a third message format; the assigning unit 504 is further configured to determine third message data according to the third message format and the first message content.
In some alternative embodiments, the conversion unit 503 is further configured to:
performing message format conversion on a first preset template message format to obtain a first converted template message format;
and replacing the first preset template reference identifier with a first converted template message format.
In some alternative embodiments, the conversion unit 503 is further configured to:
and converting the format field except for the first preset template reference identifier in the first intermediate message format.
In some alternative embodiments, assignment unit 504 is further configured to:
and assigning a value to the second message format according to the first message content to obtain second message data.
In some alternative embodiments, assignment unit 504 is further configured to:
and assigning a value to the third message format according to the first message content to obtain third message data.
It should be noted that, the implementation details and technical effects of each unit in the data processing apparatus provided in the embodiments of the present disclosure may refer to the descriptions of other embodiments in the present disclosure, which are not described herein again.
Referring now to FIG. 6, there is illustrated a schematic diagram of a computer system 600 suitable for use with a server embodying embodiments of the present disclosure. The computer system 600 shown in fig. 6 is merely an example, and should not be construed as limiting the functionality and scope of use of embodiments of the present disclosure.
As shown in fig. 6, a computer system 600 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 601, which may perform various suitable actions and processes in accordance with programs stored in a Read Only Memory (ROM) 602 or loaded from a storage device 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the computer system 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
In general, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, etc.; an output device 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, magnetic tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the computer system 600 to communicate with other devices wirelessly or by wire to exchange data. While FIG. 6 illustrates a computer system 600 having various devices, it should be understood that not all illustrated devices are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via communication means 609, or from storage means 608, or from ROM 602. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing means 601.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to implement a data processing method as shown in the embodiment and alternative implementations thereof shown in fig. 2.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments described in the present disclosure may be implemented by means of software, or may be implemented by means of hardware. The name of the unit is not limited to the unit itself in some cases, for example, the data obtaining unit may also be described as "in response to receiving the first message data, obtain the first message format included in the first message data and the first message content corresponding to the first message format".
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in this disclosure is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or equivalents thereof without departing from the spirit of the disclosure. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).

Claims (9)

1. A data processing method, comprising:
responding to received first message data, and acquiring a first message format included in the first message data and first message content corresponding to the first message format;
in response to detecting that the first message format comprises a format field corresponding to a first preset template message format, replacing the format field which is the same as the first preset template message format in the first message format with a first preset template reference identifier to obtain a first intermediate message format, wherein the format field represents a field name of the first message data;
performing message format conversion according to the first intermediate message format and the first preset template message format to obtain a second message format;
determining second message data according to the second message format and the first message content;
the message format conversion according to the first intermediate message format and the first preset template message format further includes:
and converting format fields except for the first preset template reference identifier in the first intermediate message format.
2. The method of claim 1, wherein the method further comprises:
acquiring a standard identification mark of the first message data in response to detecting that the first message format does not comprise a format field corresponding to the first preset template message format;
determining a second preset template message format according to the specification identification;
replacing the format field which is the same as the format field in the second preset template message format in the first message format with the second preset template message format;
performing message format conversion according to the second preset template message format to obtain a third message format;
and determining third message data according to the third message format and the first message content.
3. The method of claim 1, wherein the converting the message format according to the first intermediate message format and the first preset template message format comprises:
performing message format conversion on the first preset template message format to obtain a first converted template message format;
and replacing the first preset template reference identifier with the first converted template message format.
4. The method of claim 1, wherein the determining second message data according to the second message format and the first message content comprises:
and assigning a value to the second message format according to the first message content to obtain the second message data.
5. The method of claim 2, wherein the determining third message data according to the third message format and the first message content comprises:
and assigning a value to the third message format according to the first message content to obtain the third message data.
6. A data processing apparatus comprising:
the data acquisition unit is configured to respond to receiving first message data and acquire a first message format included in the first message data and first message content corresponding to the first message format;
the template processing unit is configured to replace a format field which is the same as a first preset template message format in the first message format with a first preset template reference identifier to obtain a first intermediate message format in response to detecting that the first message format comprises a format field corresponding to the first preset template message format, wherein the format field represents a field name of the first message data;
the conversion unit is configured to perform message format conversion according to the first intermediate message format and the first preset template message format to obtain a second message format;
an assignment unit configured to determine second message data according to the second message format and the first message content;
the conversion unit is further configured to:
and converting format fields except for the first preset template reference identifier in the first intermediate message format.
7. The apparatus of claim 6, wherein the apparatus further comprises:
a specification acquisition unit configured to acquire a specification identification of the first message data in response to detecting that the first message format does not include a format field corresponding to the first preset template message format;
a standard processing unit configured to determine a second preset template message format according to the standard identification mark, and replace a format field which is the same as the format field in the second preset template message format in the first message format with the second preset template message format;
the conversion unit is further configured to perform message format conversion according to the second preset template message format to obtain a third message format;
the assignment unit is further configured to determine third message data according to the third message format and the first message content.
8. An electronic device, comprising:
one or more processors;
storage means having stored thereon one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1-5.
9. A computer readable storage medium having stored thereon a computer program, wherein the computer program when executed by one or more processors implements the method of any of claims 1-5.
CN202210010090.7A 2022-01-06 2022-01-06 Data processing method, device, equipment and storage medium Active CN114513552B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210010090.7A CN114513552B (en) 2022-01-06 2022-01-06 Data processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210010090.7A CN114513552B (en) 2022-01-06 2022-01-06 Data processing method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114513552A CN114513552A (en) 2022-05-17
CN114513552B true CN114513552B (en) 2024-04-02

Family

ID=81549173

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210010090.7A Active CN114513552B (en) 2022-01-06 2022-01-06 Data processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114513552B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114942750B (en) * 2022-05-19 2024-09-17 北京金堤科技有限公司 Method and device for processing fields of external interface
CN117499504B (en) * 2023-12-29 2024-03-22 万联易达物流科技有限公司 Message format conversion method and system

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103093001A (en) * 2013-02-27 2013-05-08 人民搜索网络股份公司 Microblog data analysis method and device
CN103389991A (en) * 2012-05-09 2013-11-13 阿里巴巴集团控股有限公司 Data interaction method, data interaction device, data conversion method and data conversion device
CN104639507A (en) * 2013-11-13 2015-05-20 中国科学院声学研究所 Loading protocol packet data transmission method and system among heterogeneous networks
US9507762B1 (en) * 2015-11-19 2016-11-29 International Business Machines Corporation Converting portions of documents between structured and unstructured data formats to improve computing efficiency and schema flexibility
CN106815267A (en) * 2015-12-01 2017-06-09 中兴通讯股份有限公司 Date storage method and device
CN107256206A (en) * 2017-05-24 2017-10-17 北京京东尚科信息技术有限公司 The method and apparatus of character stream format conversion
CN110728122A (en) * 2019-10-12 2020-01-24 京东数字科技控股有限公司 Table generation method and device
CN112035480A (en) * 2020-08-31 2020-12-04 中国平安财产保险股份有限公司 Data table management method, device, equipment and storage medium
CN112104634A (en) * 2020-09-08 2020-12-18 中国电力科学研究院有限公司 Data message processing method, system, equipment and readable storage medium
CN112464619A (en) * 2021-01-25 2021-03-09 平安国际智慧城市科技股份有限公司 Big data processing method, device and equipment and computer readable storage medium
CN113836126A (en) * 2021-09-22 2021-12-24 上海妙一生物科技有限公司 Data cleaning method, device, equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2912579B1 (en) * 2012-10-23 2020-08-19 IP Reservoir, LLC Method and apparatus for accelerated format translation of data in a delimited data format

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103389991A (en) * 2012-05-09 2013-11-13 阿里巴巴集团控股有限公司 Data interaction method, data interaction device, data conversion method and data conversion device
CN103093001A (en) * 2013-02-27 2013-05-08 人民搜索网络股份公司 Microblog data analysis method and device
CN104639507A (en) * 2013-11-13 2015-05-20 中国科学院声学研究所 Loading protocol packet data transmission method and system among heterogeneous networks
US9507762B1 (en) * 2015-11-19 2016-11-29 International Business Machines Corporation Converting portions of documents between structured and unstructured data formats to improve computing efficiency and schema flexibility
CN106815267A (en) * 2015-12-01 2017-06-09 中兴通讯股份有限公司 Date storage method and device
CN107256206A (en) * 2017-05-24 2017-10-17 北京京东尚科信息技术有限公司 The method and apparatus of character stream format conversion
CN110728122A (en) * 2019-10-12 2020-01-24 京东数字科技控股有限公司 Table generation method and device
CN112035480A (en) * 2020-08-31 2020-12-04 中国平安财产保险股份有限公司 Data table management method, device, equipment and storage medium
CN112104634A (en) * 2020-09-08 2020-12-18 中国电力科学研究院有限公司 Data message processing method, system, equipment and readable storage medium
CN112464619A (en) * 2021-01-25 2021-03-09 平安国际智慧城市科技股份有限公司 Big data processing method, device and equipment and computer readable storage medium
CN113836126A (en) * 2021-09-22 2021-12-24 上海妙一生物科技有限公司 Data cleaning method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN114513552A (en) 2022-05-17

Similar Documents

Publication Publication Date Title
CN111291103B (en) Interface data analysis method and device, electronic equipment and storage medium
CN114513552B (en) Data processing method, device, equipment and storage medium
CN111368519B (en) Method, device, equipment and storage medium for editing online form
CN111460129B (en) Method, device, electronic equipment and storage medium for generating identification
CN113076153B (en) Interface calling method and device
CN113313623A (en) Watermark information display method, watermark information display device, electronic equipment and computer readable medium
JP2021170319A (en) Method and device for acquiring information
CN112214708A (en) Page generation method and device, electronic equipment and computer readable medium
CN111274104B (en) Data processing method, device, electronic equipment and computer readable storage medium
CN116737662A (en) Method, device, electronic equipment and storage medium for processing business data
CN111626802A (en) Method and apparatus for processing information
CN115269645A (en) Information query method and device, electronic equipment and computer readable medium
CN111460020B (en) Method, device, electronic equipment and medium for resolving message
CN114691684A (en) Data display method, device and system
CN114070889A (en) Configuration method, traffic forwarding method, device, storage medium, and program product
CN111367592B (en) Information processing method and device
CN113486749A (en) Image data collection method, device, electronic equipment and computer readable medium
CN113407229A (en) Method and device for generating offline script
CN112311833B (en) Data updating method and device
CN114253520B (en) Interface code generation method and device
CN113448652A (en) Request processing method and device
CN114513548B (en) Directional call information processing method and device
CN114398098B (en) Application script execution method, device, electronic equipment and computer readable medium
CN116319322B (en) Power equipment node communication connection method, device, equipment and computer medium
CN111314457B (en) Method and device for setting virtual private cloud

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
GR01 Patent grant
GR01 Patent grant