CN116781256B - Compatible interaction method, device, equipment and storage medium of mechanism data - Google Patents

Compatible interaction method, device, equipment and storage medium of mechanism data

Info

Publication number
CN116781256B
CN116781256B CN202310652013.6A CN202310652013A CN116781256B CN 116781256 B CN116781256 B CN 116781256B CN 202310652013 A CN202310652013 A CN 202310652013A CN 116781256 B CN116781256 B CN 116781256B
Authority
CN
China
Prior art keywords
data
field
message
interactive
interaction
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
CN202310652013.6A
Other languages
Chinese (zh)
Other versions
CN116781256A (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.)
Shenzhen Dadaoyun Technology Co ltd
Original Assignee
Shenzhen Dadaoyun Technology Co ltd
Filing date
Publication date
Application filed by Shenzhen Dadaoyun Technology Co ltd filed Critical Shenzhen Dadaoyun Technology Co ltd
Priority to CN202310652013.6A priority Critical patent/CN116781256B/en
Publication of CN116781256A publication Critical patent/CN116781256A/en
Application granted granted Critical
Publication of CN116781256B publication Critical patent/CN116781256B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention relates to the field of data compatibility, and discloses a mechanism data compatible interaction method, device, equipment and storage medium. The method comprises the following steps: establishing communication connection with an external mechanism server, acquiring interaction data from the external mechanism server, and matching a mechanism code corresponding to the external mechanism server; based on preset message frame and the mechanism code, assembling message format data; according to a preset mapping algorithm, mapping and replacing the message format data by utilizing the interactive data to generate interactive message data; encrypting the interactive message data according to a preset encryption algorithm to generate encrypted message data; and sending the encrypted message data to the external mechanism server. The invention solves the technical problem of compatibility of data interaction between the current platforms.

Description

Compatible interaction method, device, equipment and storage medium of mechanism data
Technical Field
The present invention relates to the field of data compatibility, and in particular, to a method, an apparatus, a device, and a storage medium for compatible interaction of mechanism data.
Background
At present, due to various limitations, a single main body is difficult to meet complex market demands, and only cooperation can win. For information technology companies, the most efficient way to deal with collaboration is to directly interface with the system. The programming languages, system configurations and the like used by each company have differences, but the disadvantage of independently butting one is not obvious, but if a plurality of cooperative institutions exist, a series of problems such as difficult maintenance, excessive redundant codes, large code quantity of the whole project and the like occur in each independent programming set, and the calling risk and the design risk of a system level are caused.
At present, large companies generally develop a set of open platforms correspondingly, and all cooperators cooperate according to own data rules. However, not all large companies have open platforms, nor do they require that the partner be docked according to their own rules. Therefore, a new technology is needed to solve the current problem of compatibility of data interaction between the current platforms.
Disclosure of Invention
The invention mainly aims to solve the technical problem of compatibility of data interaction between the current platforms.
The first aspect of the present invention provides a compatible interaction method for organization data, where the compatible interaction method for organization data includes:
establishing communication connection with an external mechanism server, acquiring interaction data from the external mechanism server, and matching a mechanism code corresponding to the external mechanism server;
based on preset message frame and the mechanism code, assembling message format data;
According to a preset mapping algorithm, mapping and replacing the message format data by utilizing the interactive data to generate interactive message data;
encrypting the interactive message data according to a preset encryption algorithm to generate encrypted message data;
and sending the encrypted message data to the external mechanism server.
Optionally, in a first implementation manner of the first aspect of the present invention, the assembling the message format data based on the preset message frame and the mechanism code includes:
Matching frames corresponding to the mechanism codes in a preset mechanism information database to obtain message frames;
And acquiring the project ID and service data corresponding to the project ID from the external mechanism server, filling the project ID and the service data into the message frame, and assembling message format data.
Optionally, in a second implementation manner of the first aspect of the present invention, the performing, according to a preset mapping algorithm, mapping replacement processing on the message format data by using the interaction data, and generating interaction message data includes:
Analyzing a field name, a field type corresponding to the field name and a transmission attribute value corresponding to the field name in the interactive data;
And carrying out replacement processing on the transmission attribute value based on the field type to generate a field in the interactive message data.
Optionally, in a third implementation manner of the first aspect of the present invention, the parsing a field name in the interaction data, a field type corresponding to the field name, and a transmission attribute value corresponding to the field name includes:
And circularly traversing each field in the interactive data to obtain a field name corresponding to each field, a field type corresponding to the field name and a transmission attribute value corresponding to the field name.
Optionally, in a fourth implementation manner of the first aspect of the present invention, the replacing the transmission attribute value based on the field type, and generating the field in the interactive packet data includes:
when the field type is not string type, recursively analyzing the next field in the interactive data;
When the field type is string type, carrying out matching processing on a preset configuration table based on the mechanism code and the field name to obtain a matching result;
judging whether the matching result is empty or not;
And if the matching result is not null, replacing the transmission attribute value in the interactive data with the mapping value matched by the configuration table.
Optionally, in a fifth implementation manner of the first aspect of the present invention, encrypting the interactive message data according to a preset encryption algorithm, and generating encrypted message data includes:
judging whether the encryption setting corresponding to the mechanism code is empty or not;
If the encryption setting is not null, carrying out encryption processing on the interactive message based on a preset md5 encryption algorithm to generate encrypted message data;
Judging whether signature setting corresponding to the mechanism code is empty or not;
and if the signature setting is not null, carrying out signature processing on the request header of the encrypted message data based on the default signature to obtain new encrypted message data.
Optionally, in a sixth implementation manner of the first aspect of the present invention, the sending the encrypted packet data to the external institution server includes:
And sending the encrypted message data to the external mechanism server based on the application/json request type.
A second aspect of the present invention provides a compatible interaction device for organization data, the compatible interaction device for organization data comprising:
the matching module is used for establishing communication connection with an external mechanism server, acquiring interaction data from the external mechanism server and matching a mechanism code corresponding to the external mechanism server;
the assembly module is used for assembling message format data based on a preset message frame and the mechanism codes;
The mapping replacement module is used for carrying out mapping replacement processing on the message format data by utilizing the interaction data according to a preset mapping algorithm to generate interaction message data;
the encryption module is used for carrying out encryption processing on the interactive message data according to a preset encryption algorithm to generate encrypted message data;
and the sending module is used for sending the encrypted message data to the external mechanism server.
A third aspect of the present invention provides a compatible interaction device for institutional data, comprising: a memory and at least one processor, the memory having instructions stored therein, the memory and the at least one processor being interconnected by a line; the at least one processor invokes the instructions in the memory to cause the compatible interaction device of the organization data to perform the compatible interaction method of the organization data described above.
A fourth aspect of the present invention provides a computer readable storage medium having instructions stored therein which, when run on a computer, cause the computer to perform the above-described compatible interaction method of institutional data.
In the embodiment of the invention, from the self, a set of processes are abstracted by applying the thought of a design mode, repeated codes of different cooperative mechanisms are simplified, the differences of different mechanisms are compatible, the data formats of the external mechanisms are different, the same set of codes can be used for compatibility, and the only possible processing is the encryption and decryption functions during mechanism interaction. The method can simplify codes, has clear and distinct project structure, and solves the technical problem of compatibility of data interaction between the current platforms.
Drawings
FIG. 1 is a schematic diagram of an embodiment of a compatible interaction method for organization data according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an embodiment of a compatible interaction device for organization data according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of another embodiment of a mechanism data compatible interaction device according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of an embodiment of a compatible interaction device for organization data in an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a compatible interaction method, device and equipment of mechanism data and a storage medium.
The terms "first," "second," "third," "fourth" and the like in the description and in the claims and in the above drawings, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments described herein may be implemented in other sequences than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed or inherent to such process, method, article, or apparatus.
For ease of understanding, a specific flow of an embodiment of the present invention is described below, referring to fig. 1, and an embodiment of a method for compatible interaction of mechanism data in an embodiment of the present invention includes:
101. Establishing communication connection with an external mechanism server, acquiring interaction data from the external mechanism server, and matching a mechanism code corresponding to the external mechanism server;
In this embodiment, the server of the present invention establishes a communication connection channel with an external structure server, and then obtains data to be interacted from the server of an external mechanism, where different servers of the external mechanism have different mechanism codes. For example: < MATCHMESSAGE CHANNELCODE = "96852", here 96852 is the organization code.
102. Based on preset message frame and the mechanism code, assembling message format data;
In this embodiment, the message frame has a first section with a collaboration mechanism code, and the second, third and fourth sections are correspondingly provided with different data assembly formats to meet the data formats required by all docking mechanisms, which are service public fields, and in different mechanisms, different meanings may be represented, for example, UMR represents not married in its own service concept, but the code of not married in the a collaboration mechanism is 10, and the code of not married in the B collaboration mechanism is 0, and the system directly reads the configured attribute through a shared mapping code, so that different mechanism differential mapping can be realized.
Further, at 102 the following steps may be performed:
1021. matching frames corresponding to the mechanism codes in a preset mechanism information database to obtain message frames;
1022. and acquiring the project ID and service data corresponding to the project ID from the external mechanism server, filling the project ID and the service data into the message frame, and assembling message format data.
In steps 1021-1022, the corresponding field type, and field name, and also attribute value, is taken by reflection techniques. Such as: the business model has a customer model item ID, wherein a customer name field is provided, the field type is String, the item field name is name, and the attribute value is a specific transmitted value, such as Zhang San, an identity card number and a certificate validity period, can be obtained through a reflection technology. And writing the business data (project field name, transmission specific value) corresponding to the project ID of the client model into the message frame to obtain the assembled message format data.
103. According to a preset mapping algorithm, mapping and replacing the message format data by utilizing the interactive data to generate interactive message data;
In this embodiment, whether there is configuration is checked in the configuration table through the field name and the mechanism code, if there is a field of the message format data in the configuration table, the mapping replacement processing is performed on the field, and each field in all the message format data is traversed to realize replacement, so as to generate interactive message data.
Further, at 103, the following steps may be performed:
1031. Analyzing a field name, a field type corresponding to the field name and a transmission attribute value corresponding to the field name in the interactive data;
1032. And carrying out replacement processing on the transmission attribute value based on the field type to generate a field in the interactive message data.
In step 1031-1032, field names in the interactive data are circularly traversed through the whole data model, corresponding analysis is carried out through the analyzed field types, three types are List type, object type, string type and the like, and the analyzed attribute values are specific transmitted values, such as Zhang three, identity card number, certificate validity period and the like. Based on the difference of field types, the method can execute replacement or skip to the next field for analysis, and traverse to complete the analysis of all the fields, and generate interactive message data, wherein the data format in the interactive message data is the content meeting the format and text requirements of an external institution server.
Further, at 1031, the following steps may be performed:
10311. And circularly traversing each field in the interactive data to obtain a field name corresponding to each field, a field type corresponding to the field name and a transmission attribute value corresponding to the field name.
In step 10311, the whole data model is traversed circularly, and based on the characteristics of the segment symbol or the field format identifier, the identification and judgment are performed segment by segment, so as to identify the field name of each field, the field type corresponding to the field name, and the service entity data corresponding to the field name, that is, the transmission attribute value.
Further, at 1032, the following steps may be performed:
10321. When the field type is not string type, recursively analyzing the next field in the interactive data;
10322. when the field type is string type, carrying out matching processing on a preset configuration table based on the mechanism code and the field name to obtain a matching result;
10323. judging whether the matching result is empty or not;
10324. and if the matching result is not null, replacing the transmission attribute value in the interactive data with the mapping value matched by the configuration table.
In 10321-10324, corresponding analysis is performed by analyzing the field types, wherein three types are List type, object type, string type, etc., and if the field types are List type, object type, recursive jump is used to the next field. If the field type is string type, matching processing is carried out in a preset configuration table, if the configuration exists, the current transmission attribute value is replaced by the searched configuration mapping value directly, if the configuration does not exist, the replacement is skipped, the original value is defaulted, and the configuration mapping of the next field is continued. After the mapping of the fields matches, the latest business object is returned to other invokers, wherein all configured field transmission attribute values have been replaced with configuration values.
104. Encrypting the interactive message data according to a preset encryption algorithm to generate encrypted message data;
In this embodiment, it is assumed that we want to encrypt a piece of plaintext data using the AES algorithm, ready the plaintext data to be encrypted, e.g. "Hello, world-! "this string". An appropriate key is selected, for example, "mysecretkey12345". The encrypted ciphertext data is generated using the AES algorithm with the plaintext data and the key as inputs. This step may be implemented using a common encryption library (e.g., openSSL, cryptopp). And sending the ciphertext data to a receiver, wherein the receiver can decrypt the ciphertext data by using the same key and the AES algorithm after receiving the ciphertext data, so as to obtain the original plaintext data.
Further, at 104, the following steps may be performed:
1041. judging whether the encryption setting corresponding to the mechanism code is empty or not;
1042. if the encryption setting is not null, carrying out encryption processing on the interactive message based on a preset md5 encryption algorithm to generate encrypted message data;
1043. judging whether signature setting corresponding to the mechanism code is empty or not;
1044. and if the signature setting is not null, carrying out signature processing on the request header of the encrypted message data based on the default signature to obtain new encrypted message data.
In the present embodiment, there are the following ways in judging the encryption setting:
1. Database query: and acquiring the encryption setting corresponding to the organization code by executing a query statement. Then, it is determined whether the value set by encryption in the query result is null.
2. API or function call: if the encryption settings are obtained through an API or function, then the corresponding API or function may be directly called and a determination may be made as to whether the encryption settings in the returned results are null.
3. Configuration file reading: if the encryption settings are stored in the configuration file, the corresponding configuration file may be read and the contents thereof parsed. Then, it is determined whether the value of the encryption setting is null.
4. And (5) caching and inquiring: if the encryption settings have been cached in memory, then the value in the cache may be queried directly and a determination may be made as to whether it is empty.
If the plaintext password input by the user is "mypassword", after the MD5 encryption processing, the obtained hash value is "34819d7beeabb9260a5c854bc85b3e44", and after the hash value is converted into the character string form, the encrypted password is obtained: "34819d7beeabb9260a5c854bc85b3e44". This value is then stored in a database as the user's password.
In the above procedure, the MD5 algorithm is used to encrypt the plaintext cipher into an irreversible hash value. Therefore, when the user password is stored, even if the database is acquired by an attacker, the plaintext password of the user cannot be restored, so that the security is improved. In practical development, a safer encryption algorithm such as SHA-256 can be selected according to the requirement.
Specifically, a Python encryption processing realization code for the interactive message based on a preset md5 encryption algorithm is provided:
import hashlib
def md5_encrypt(text):
”'
MD5 encryption of entered text
Param text to be encrypted
Return, result after encryption, expressed in hexadecimal string form
”'
Md5=hashlib.md5 () # creates MD5 object
Encryption processing is performed on text by md5.update (text.encode ('utf-8') #
Result=md5.hexdigest () # acquisition of encryption result
return result
Test example # test case
if__name__=='__main__':
plain_text='hello world'
encrypted_text=md5_encrypt(plain_text)
print('Plain Text:',plain_text)
print('Encrypted Text:',encrypted_text)
The program defines an md5_encrypt function for MD5 encrypting the input text and returning the encryption result.
Determining whether the signature setting corresponding to the organization code is empty may be implemented similarly to determining whether the encryption setting is empty.
Implementation mode for signing encrypted message data HTTP request header based on HMAC-SHA256 algorithm: a key is selected which will be used to calculate the Signature, a new field is set in the encrypted message data HTTP request header, e.g. "X-Signature", which will contain the Signature value, all request headers except X-Signature are ordered and concatenated into a single string. The HMAC-SHA256 hash value is computed using the key and the resulting string as input, encoded into a Base64 string, placed in the X-Signature field, and sent as an encrypted message data HTTP request with the X-Signature field.
105. And sending the encrypted message data to the external mechanism server.
In this embodiment, if the AES encryption method is used to encrypt the message data and send the encrypted message data to the external institution server, the key and the encryption mode (such as ECB, CBC, etc.) of the AES encryption algorithm are determined, and AES encryption is performed on the message data to be sent. The encrypted data is converted into a byte stream for transmission over the network, the address and port of the external agency server are determined, the encrypted data is sent to the external agency server using a secure transmission protocol, and the received data is decrypted at the receiving party using the same key and encryption scheme.
Further, at 105, the following steps may be performed:
1051. and sending the encrypted message data to the external mechanism server based on the application/json request type.
In step 1051, application/json is an Internet media type (MIME type) for specifying JSON (JavaScript Object Notation) -formatted data. In HTTP requests and responses, the Content-Type header field may be used to specify the media Type of the data being sent or received, based on which encrypted message data is sent to the external agency server.
In the embodiment of the invention, from the self, a set of processes are abstracted by applying the thought of a design mode, repeated codes of different cooperative mechanisms are simplified, the differences of different mechanisms are compatible, the data formats of the external mechanisms are different, the same set of codes can be used for compatibility, and the only possible processing is the encryption and decryption functions during mechanism interaction. The method can simplify codes, has clear and distinct project structure, and solves the technical problem of compatibility of data interaction between the current platforms.
The method for compatible interaction of the mechanism data in the embodiment of the present invention is described above, and the following describes a compatible interaction device of the mechanism data in the embodiment of the present invention, referring to fig. 2, an embodiment of the compatible interaction device of the mechanism data in the embodiment of the present invention includes:
the matching module 201 is configured to establish a communication connection with an external mechanism server, obtain interaction data from the external mechanism server, and match a mechanism code corresponding to the external mechanism server;
An assembling module 202, configured to assemble message format data based on a preset message frame and the mechanism code;
the mapping replacement module 203 is configured to perform mapping replacement processing on the message format data by using the interaction data according to a preset mapping algorithm, so as to generate interaction message data;
The encryption module 204 is configured to encrypt the interactive message data according to a preset encryption algorithm, and generate encrypted message data;
and the sending module 205 is configured to send the encrypted packet data to the external mechanism server.
In the embodiment of the invention, from the self, a set of processes are abstracted by applying the thought of a design mode, repeated codes of different cooperative mechanisms are simplified, the differences of different mechanisms are compatible, the data formats of the external mechanisms are different, the same set of codes can be used for compatibility, and the only possible processing is the encryption and decryption functions during mechanism interaction. The method can simplify codes, has clear and distinct project structure, and solves the technical problem of compatibility of data interaction between the current platforms.
Referring to fig. 3, another embodiment of the mechanism data compatible interaction device according to the present invention includes:
the matching module 201 is configured to establish a communication connection with an external mechanism server, obtain interaction data from the external mechanism server, and match a mechanism code corresponding to the external mechanism server;
An assembling module 202, configured to assemble message format data based on a preset message frame and the mechanism code;
the mapping replacement module 203 is configured to perform mapping replacement processing on the message format data by using the interaction data according to a preset mapping algorithm, so as to generate interaction message data;
The encryption module 204 is configured to encrypt the interactive message data according to a preset encryption algorithm, and generate encrypted message data;
and the sending module 205 is configured to send the encrypted packet data to the external mechanism server.
Wherein, the assembly module 202 is specifically configured to:
Matching frames corresponding to the mechanism codes in a preset mechanism information database to obtain message frames;
And acquiring the project ID and service data corresponding to the project ID from the external mechanism server, filling the project ID and the service data into the message frame, and assembling message format data.
Wherein the map replacement module 203 includes:
A parsing unit 2031, configured to parse a field name, a field type corresponding to the field name, and a transmission attribute value corresponding to the field name in the interaction data;
and a replacing unit 2032, configured to perform a replacing process on the transmission attribute value based on the field type, and generate a field in the interactive packet data.
Wherein, the parsing unit 2031 is specifically configured to:
And circularly traversing each field in the interactive data to obtain a field name corresponding to each field, a field type corresponding to the field name and a transmission attribute value corresponding to the field name.
Wherein, the replacing unit 2032 is specifically configured to:
when the field type is not string type, recursively analyzing the next field in the interactive data;
When the field type is string type, carrying out matching processing on a preset configuration table based on the mechanism code and the field name to obtain a matching result;
judging whether the matching result is empty or not;
And if the matching result is not null, replacing the transmission attribute value in the interactive data with the mapping value matched by the configuration table.
The encryption module 204 is specifically configured to:
judging whether the encryption setting corresponding to the mechanism code is empty or not;
If the encryption setting is not null, carrying out encryption processing on the interactive message based on a preset md5 encryption algorithm to generate encrypted message data;
Judging whether signature setting corresponding to the mechanism code is empty or not;
and if the signature setting is not null, carrying out signature processing on the request header of the encrypted message data based on the default signature to obtain new encrypted message data.
The sending module 205 is specifically configured to:
And sending the encrypted message data to the external mechanism server based on the application/json request type.
In the embodiment of the invention, from the self, a set of processes are abstracted by applying the thought of a design mode, repeated codes of different cooperative mechanisms are simplified, the differences of different mechanisms are compatible, the data formats of the external mechanisms are different, the same set of codes can be used for compatibility, and the only possible processing is the encryption and decryption functions during mechanism interaction. The method can simplify codes, has clear and distinct project structure, and solves the technical problem of compatibility of data interaction between the current platforms.
The above-mentioned fig. 2 and fig. 3 describe the compatible interaction device of the mechanism data in the embodiment of the present invention in detail from the point of view of the modularized functional entity, and the following describes the compatible interaction device of the mechanism data in the embodiment of the present invention in detail from the point of view of hardware processing.
Fig. 4 is a schematic structural diagram of a compatible interaction device with mechanism data, where the compatible interaction device with mechanism data 400 may vary widely according to configuration or performance, and may include one or more processors (central processing units, CPU) 410 (e.g., one or more processors) and memory 420, one or more storage mediums 430 (e.g., one or more mass storage devices) storing applications 433 or data 432, according to an embodiment of the present invention. Wherein memory 420 and storage medium 430 may be transitory or persistent storage. The program stored on the storage medium 430 may include one or more modules (not shown), each of which may include a series of instruction operations in the compatible interaction device 400 for organization data. Still further, the processor 410 may be configured to communicate with the storage medium 430 to execute a series of instruction operations in the storage medium 430 on the organization data compatible interactive device 400.
The institution data based compatible interaction device 400 may also include one or more power supplies 440, one or more wired or wireless network interfaces 450, one or more input output interfaces 460, and/or one or more operating systems 431, such as Windows Serve, mac OS X, unix, linux, free BSD, and the like. Those skilled in the art will appreciate that the organization data compatible interaction device architecture shown in FIG. 4 is not limiting of organization data based compatible interaction devices and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
The present invention also provides a computer readable storage medium, which may be a non-volatile computer readable storage medium, or a volatile computer readable storage medium, having stored therein instructions that, when executed on a computer, cause the computer to perform the steps of the compatible interaction method for mechanism data.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the system or apparatus and unit described above may refer to the corresponding process in the foregoing method embodiment, which is not repeated herein.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (8)

1. A method for compatible interaction of institutional data, comprising the steps of:
establishing communication connection with an external mechanism server, acquiring interaction data from the external mechanism server, and matching a mechanism code corresponding to the external mechanism server;
based on preset message frame and the mechanism code, assembling message format data;
According to a preset mapping algorithm, mapping and replacing the message format data by utilizing the interactive data to generate interactive message data;
encrypting the interactive message data according to a preset encryption algorithm to generate encrypted message data;
Sending the encrypted message data to the external mechanism server;
Wherein, according to a preset mapping algorithm, performing mapping replacement processing on the message format data by using the interaction data, and generating interaction message data includes:
Analyzing a field name, a field type corresponding to the field name and a transmission attribute value corresponding to the field name in the interactive data;
based on the field type, carrying out replacement processing on the transmission attribute value to generate a field in the interactive message data;
wherein, based on the field type, performing substitution processing on the transmission attribute value, and generating the field in the interactive message data includes:
when the field type is not string type, recursively analyzing the next field in the interactive data;
When the field type is string type, carrying out matching processing on a preset configuration table based on the mechanism code and the field name to obtain a matching result;
judging whether the matching result is empty or not;
And if the matching result is not null, replacing the transmission attribute value in the interactive data with the mapping value matched by the configuration table.
2. The method for compatible interaction of organization data according to claim 1, wherein assembling the message format data based on the preset message frame and the organization code comprises:
Matching frames corresponding to the mechanism codes in a preset mechanism information database to obtain message frames;
And acquiring the project ID and service data corresponding to the project ID from the external mechanism server, filling the project ID and the service data into the message frame, and assembling message format data.
3. The method for compatible interaction of organization data according to claim 1, wherein said parsing a field name in the interaction data, a field type corresponding to the field name, and a transmission attribute value corresponding to the field name comprises:
And circularly traversing each field in the interactive data to obtain a field name corresponding to each field, a field type corresponding to the field name and a transmission attribute value corresponding to the field name.
4. The method for compatible interaction of organization data according to claim 1, wherein the encrypting the interaction message data according to a preset encryption algorithm, generating encrypted message data comprises:
judging whether the encryption setting corresponding to the mechanism code is empty or not;
If the encryption setting is not null, carrying out encryption processing on the interactive message based on a preset md5 encryption algorithm to generate encrypted message data;
Judging whether signature setting corresponding to the mechanism code is empty or not;
and if the signature setting is not null, carrying out signature processing on the request header of the encrypted message data based on the default signature to obtain new encrypted message data.
5. The method for compatible interaction of organization data according to claim 1, wherein said sending the encrypted message data to the external organization server comprises:
And sending the encrypted message data to the external mechanism server based on the application/json request type.
6. A mechanism data compatible interaction device, wherein the mechanism data compatible interaction device comprises:
the matching module is used for establishing communication connection with an external mechanism server, acquiring interaction data from the external mechanism server and matching a mechanism code corresponding to the external mechanism server;
the assembly module is used for assembling message format data based on a preset message frame and the mechanism codes;
The mapping replacement module is used for carrying out mapping replacement processing on the message format data by utilizing the interaction data according to a preset mapping algorithm to generate interaction message data;
the encryption module is used for carrying out encryption processing on the interactive message data according to a preset encryption algorithm to generate encrypted message data;
The sending module is used for sending the encrypted message data to the external mechanism server;
the mapping substitution module is specifically configured to:
Analyzing a field name, a field type corresponding to the field name and a transmission attribute value corresponding to the field name in the interactive data;
based on the field type, carrying out replacement processing on the transmission attribute value to generate a field in the interactive message data;
Wherein, the mapping substitution module is further specifically configured to:
when the field type is not string type, recursively analyzing the next field in the interactive data;
When the field type is string type, carrying out matching processing on a preset configuration table based on the mechanism code and the field name to obtain a matching result;
judging whether the matching result is empty or not;
And if the matching result is not null, replacing the transmission attribute value in the interactive data with the mapping value matched by the configuration table.
7. A facility data compatible interaction device, the facility data compatible interaction device comprising: a memory and at least one processor, the memory having instructions stored therein, the memory and the at least one processor being interconnected by a line;
The at least one processor invoking the instructions in the memory to cause the compatible interaction device of the organization data to perform the compatible interaction method of organization data as in any of claims 1-5.
8. A computer readable storage medium having stored thereon a computer program, characterized in that the computer program, when executed by a processor, implements a compatible interaction method of institutional data according to any one of claims 1-5.
CN202310652013.6A 2023-06-02 Compatible interaction method, device, equipment and storage medium of mechanism data Active CN116781256B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310652013.6A CN116781256B (en) 2023-06-02 Compatible interaction method, device, equipment and storage medium of mechanism data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310652013.6A CN116781256B (en) 2023-06-02 Compatible interaction method, device, equipment and storage medium of mechanism data

Publications (2)

Publication Number Publication Date
CN116781256A CN116781256A (en) 2023-09-19
CN116781256B true CN116781256B (en) 2024-07-09

Family

ID=

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105791178A (en) * 2014-12-26 2016-07-20 阿里巴巴集团控股有限公司 Message assembly method and device
CN111182025A (en) * 2019-11-26 2020-05-19 腾讯科技(深圳)有限公司 Message processing method, device, server and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105791178A (en) * 2014-12-26 2016-07-20 阿里巴巴集团控股有限公司 Message assembly method and device
CN111182025A (en) * 2019-11-26 2020-05-19 腾讯科技(深圳)有限公司 Message processing method, device, server and storage medium

Similar Documents

Publication Publication Date Title
CN110199508B (en) Secure data distribution of sensitive data across content distribution networks
JP6844876B2 (en) Secure data acquisition of sensitive data over the network
US10496666B1 (en) Selective structure preserving obfuscation
US9646088B1 (en) Data collection and transmission
AU2003257896B2 (en) System and method for transmitting reduced information from a certificate to perform encryption operations
US20180176192A1 (en) Secure data egress for sensitive data across networks
US10057217B2 (en) System and method to secure sensitive content in a URI
US9311387B1 (en) Automatic parser generation
US10298401B1 (en) Network content search system and method
US10963593B1 (en) Secure data storage using multiple factors
US10615965B1 (en) Protected search index
CN114978637A (en) Message processing method and device
JP2015090993A (en) Encryption control device, encryption control method and program
CN116781256B (en) Compatible interaction method, device, equipment and storage medium of mechanism data
US11997216B2 (en) Systems and methods for maintaining secure, encrypted communications across distributed computer networks by linking cryptography-based digital repositories in order to perform blockchain operations in decentralized applications
CN107729345B (en) Website data processing method and device, website data processing platform and storage medium
US20230269085A1 (en) Systems and methods for using secure, encrypted communications across distributed computer networks to efficiently update cryptography-based digital repositories for performing blockchain operations in decentralized applications
CN108234393B (en) Method and device for optimizing data link layer message
CN116781256A (en) Compatible interaction method, device, equipment and storage medium of mechanism data
US20230306128A1 (en) Systems and methods for using secure, encrypted communications across distributed computer networks to provide variable resiliency when indexing blockchain states for performing blockchain operations in decentralized applications using cryptography-based digital repositories
CN115589316A (en) Data encryption transmission method and device, electronic equipment and storage medium
CN115941279A (en) Encryption and decryption method, system and equipment for user identification in data
CN111753018A (en) Electronic letter method, system and computer equipment
CN114666315B (en) HTTP request processing method and device of load balancing equipment
CN111565178B (en) Service information issuing method, device, server, client and storage medium

Legal Events

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