Data transmission method and device
By determining the transmission method according to the security level of the target data storage device during the data transmission process, and encrypting the data during the transmission process, the problem of data leakage in data transmission between systems is solved, and the security and efficiency of data transmission are improved.
Patent Information
- Application Number
- CN202010238419.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-03-30
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2040-03-30
AI Technical Summary
Existing data transmission methods between systems can easily lead to database data leakage and affect database security.
By obtaining the security level of the target data storage device during the data transmission process, determine the data transmission method, use preset transmission interfaces or direct database connection transmission to reduce the risk of data leakage, and encrypt data during the transmission process to improve security.
It effectively reduces the risk of data leakage, improves the security and efficiency of data transmission, and enhances the data sharing capabilities between different systems.
Smart Images

Figure CN113472715B
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of data processing technology, and in particular to a data transmission method and device. Background Art
[0002] With the widespread application of big data technology, the required information can be obtained by analyzing a large amount of data. Therefore, in order to improve the utilization rate and value of data, data needs to be shared between different systems, that is, one system can obtain the data of another system.
[0003] At present, the commonly used method of data transmission between systems is to achieve data transmission between systems through direct connection at the database level of the system. However, this method is prone to data leakage in the database, affecting the security of the database. Summary of the invention
[0004] The embodiments of the present invention provide a data transmission method and device to reduce the risk of data leakage during data transmission.
[0005] In a first aspect, an embodiment of the present invention provides a data transmission method, which is applied to a first data storage device, wherein the first data storage device includes a first database, and the first database is used to store data, including:
[0006] receiving first data sent by a second data storage device, the second data storage device comprising a second database of a first data service corresponding thereto, the first data being stored in the second database;
[0007] storing the first data in the first database;
[0008] At least part of the first data is sent to a third data storage device, the third data storage device includes a third database of a second data service corresponding thereto, and the at least part of the first data is used to be stored in the third database.
[0009] Optionally, sending at least part of the first data to a third data storage device includes:
[0010] Acquire the security level of the third data storage device;
[0011] Determining a data transmission mode according to the security level of the third data storage device;
[0012] At least part of the first data is sent to the third data storage device according to the data transmission mode.
[0013] Optionally, determining the data transmission mode according to the security level of the third data storage device includes:
[0014] If the security level of the third data storage device is higher than or equal to the first preset security level, determining that the data transmission method is transmission through a preset transmission interface;
[0015] If the security level of the third data storage device is lower than the first preset security level, the data transmission mode is determined to be transmission through a preset transmission interface or database direct connection transmission.
[0016] Optionally, the receiving the first data sent by the second data storage device includes:
[0017] Receiving the unencrypted first data sent by the second data storage device through direct database transmission or through a preset transmission interface; or
[0018] The encrypted first data sent by the second data storage device is received through the preset transmission interface.
[0019] Optionally, the method further includes:
[0020] Obtaining encryption configuration information of the first data;
[0021] When sending the at least partially encrypted first data to a third data storage device, the encryption configuration information is sent to the third data storage device.
[0022] Optionally, before sending at least part of the first data to the third data storage device, the method further includes:
[0023] receiving a data request sent by the third data storage device, wherein the data request includes identification information of the second data storage device and attribute information of the data requested to be obtained;
[0024] According to the data request, at least a portion of the first data corresponding to the attribute information received from the second data storage device is acquired.
[0025] Optionally, after receiving the first data sent by the second data storage device, the method further includes:
[0026] Recording the time when the first data is received and the identification information of the second data storage device;
[0027] After receiving the data request sent by the third data storage device, the method further includes:
[0028] The identification information of the third data storage device, the time when the data request is received, and the attribute information are recorded.
[0029] In a second aspect, an embodiment of the present invention provides a data transmission apparatus, which is applied to a first data storage device, wherein the first data storage device includes a first database, and the first database is used to store data, including:
[0030] A receiving module, configured to receive first data sent by a second data storage device, wherein the second data storage device includes a second database of a first data service corresponding thereto, and the first data is stored in the second database;
[0031] A storage module, used for storing the first data in the first database;
[0032] The sending module is used to send at least part of the first data to a third data storage device, the third data storage device includes a third database of the second data service corresponding thereto, and the at least part of the first data is used to be stored in the third database.
[0033] Optionally, when the sending module sends at least part of the first data to the third data storage device, it is specifically used to:
[0034] Acquire the security level of the third data storage device;
[0035] Determining a data transmission mode according to the security level of the third data storage device;
[0036] At least part of the first data is sent to the third data storage device according to the data transmission direction.
[0037] Optionally, when determining the data transmission mode according to the security level of the third data storage device, the sending module is specifically configured to:
[0038] If the security level of the third data storage device is higher than or equal to the first preset security level, determining that the data transmission method is transmission through a preset transmission interface;
[0039] If the security level of the third data storage device is lower than the first preset security level, the data transmission mode is determined to be transmission through a preset transmission interface or database direct connection transmission.
[0040] Optionally, when the receiving module receives the first data sent by the second data storage device, it is specifically used to:
[0041] Receiving the unencrypted first data sent by the second data storage device through direct database transmission or through a preset transmission interface; or
[0042] The encrypted first data sent by the second data storage device is received through the preset transmission interface.
[0043] Optionally, the device further includes: an acquisition module;
[0044] The acquisition module is used to acquire encryption configuration information of the first data;
[0045] The sending module is further configured to send the encryption configuration information to the third data storage device when sending at least part of the encrypted first data to the third data storage device.
[0046] Optionally, the receiving module is further used to receive a data request sent by the third data storage device before the sending module sends at least part of the first data to the third data storage device, where the data request includes identification information of the second data storage device and attribute information of the data requested for acquisition;
[0047] The acquisition module is further configured to acquire, according to the data request, at least a portion of the first data corresponding to the attribute information and received from the second data storage device.
[0048] Optionally, after receiving the first data sent by the second data storage device, the receiving module is further used to: record the time when the first data is received and the identification information of the second data storage device;
[0049] After receiving the data request sent by the third data storage device, the receiving module is further used to: record the identification information of the third data storage device, the time when the data request is received, and the attribute information.
[0050] In a third aspect, an embodiment of the present invention provides an electronic device, the electronic device comprising: at least one processor and a memory;
[0051] The memory stores computer-executable instructions; and the at least one processor executes the computer-executable instructions stored in the memory to perform the method described in any one of the first aspects of the embodiments of the present invention.
[0052] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having program instructions stored therein, wherein the program instructions, when executed by a processor, implement the method described in any one of the first aspects of the embodiments of the present invention.
[0053] In a fifth aspect, an embodiment of the present application provides a program product, which includes a computer program stored in a readable storage medium. At least one processor of an electronic device can read the computer program from the readable storage medium, and the at least one processor executes the computer program so that the electronic device implements the method described in any one of the first aspects of the embodiments of the present application.
[0054] The embodiment of the present invention provides a data transmission method and device, wherein a first data storage device receives first data sent by a second data storage device, the second data storage device includes a second database of a first data service corresponding to the first data storage device, and the first data is stored in the second database; the first data is saved in the first database; and at least part of the first data is sent to a third data storage device, the third data storage device includes a third database of a second data service corresponding to the first data storage device, and at least part of the first data is used to be stored in the third database. The data storage device corresponding to each data service performs data transmission with the first data storage device respectively, transmits the data to the first data storage device, and sends the data to other data storage devices through the first data storage device, so that data transmission can no longer be established one by one between the data storage devices corresponding to each data service, and the number of databases directly connected to the database of the data storage device is reduced, thereby reducing the risk of data leakage in the database, and through the first data storage device, the data of one data storage device can be transmitted to multiple other data storage devices, thereby improving the data transmission efficiency and sharing rate, thereby improving the data value. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0056] Figure 1 A schematic diagram of an application scenario of a data transmission method provided by an embodiment of the present invention;
[0057] Figure 2 A flowchart of a data transmission method provided by an embodiment of the present invention;
[0058] Figure 3 A flowchart of a data transmission method provided by another embodiment of the present invention;
[0059] Figure 4 A flowchart of a data transmission method provided by another embodiment of the present invention;
[0060] Figure 5 A flowchart of a data transmission method provided by another embodiment of the present invention;
[0061] Figure 6 A schematic diagram of the structure of a data transmission device provided by an embodiment of the present invention;
[0062] Figure 7 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention;
[0063] Figure 8 A block diagram of a device 20 for data transmission provided in one embodiment of the present invention. DETAILED DESCRIPTION
[0064] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0065] In the prior art, data between different systems are stored independently of each other. For example, the data of each system is stored in the data storage device corresponding to the system. The data storage device includes a database, which stores the data of the department. In addition, the data storage device can also manage the data stored in the database. One of the systems cannot directly read data from the database of the data storage device of another system. Therefore, when one of the systems needs to obtain data from another system, the following two methods are used. One is the application method, that is, by writing an application, deploying a data transmission interface on the called system, and obtaining the required data through the data transmission interface. The other is direct database docking, that is, using database tools or SQL to achieve data docking between database servers.
[0066] However, when using the application method, there are high development costs, each change in demand may lead to major adjustments to the program, and low communication efficiency. The length of the transmission content cannot be too long, and the network between the systems must be able to connect directly, otherwise the data transmission interface cannot be called. When using the method of direct database connection, some database tools only support data synchronization between databases of the same type, and do not support data synchronization between heterogeneous databases. In addition, there are data leakage security issues when connecting data.
[0067] Therefore, in order to solve at least one of the above problems, the embodiment of the present invention proposes the following inventive concept: establish an intermediate data storage device (i.e., a first data storage device), use the intermediate data storage device as a data "transfer station", and transfer the data of the data storage device corresponding to one system to the database of the data storage device corresponding to another system. This avoids data leakage in the database and improves the data sharing efficiency between different systems.
[0068] Figure 1 A schematic diagram of an application scenario of a data transmission method provided by an embodiment of the present invention is shown in FIG. Figure 1As shown, server 101 is used to manage data of a first data storage device, server 102 is used to manage data of a second data storage device, and server 103 is used to manage data of a third data storage device. Among them, server 101, server 102 and server 103 can be connected through a network, so as to realize data transmission between the second data storage device, the first data storage device and the third data storage device. Among them, the specific data transmission method can refer to the description of each embodiment of the present invention below.
[0069] Figure 2 This is a flow chart of a data transmission method provided by an embodiment of the present invention. The execution subject of the method of this embodiment is a server 101. The method of the embodiment of the present invention is applied to a first data storage device. The first data storage device includes a first database. The first database is used to store data. Figure 2 As shown, the method of this embodiment may include:
[0070] S201: Receive first data sent by a second data storage device.
[0071] The second data storage device includes a second database of the first data service corresponding thereto, and the first data is stored in the second database.
[0072] In this embodiment, for example, an enterprise may establish a data storage device for each department according to the business needs of different departments, and the data storage device includes a database, and the data of the department is stored in the database. In addition, the data storage device can also manage the data stored in the database.
[0073] The first data storage device can receive data sent by a data storage device of any business department. In the embodiment of the present invention, any data storage device that sends data to the first data storage device is called a second data storage device, and the data sent by the second data storage device to the first data storage device is called first data.
[0074] For example, the first data storage device may periodically request the second data storage device to obtain data, so that the second data storage device sends the requested data to the first data storage device according to the request of the first data storage device. Or, after receiving the data request from the third data storage device, the first data storage device requests the second data storage device to obtain data. Alternatively, the second data storage device actively sends pre-specified data to the first data storage device. The embodiments of the present invention are not limited to this.
[0075] S202: Save the first data in a first database.
[0076] In this embodiment, after receiving the first data sent by the second data storage device, the first data storage device stores the first data in the first database.
[0077] S203: Send at least part of the first data to a third data storage device.
[0078] The third data storage device includes a third database corresponding to the second data service, and at least part of the first data is used to be stored in the third database.
[0079] In this embodiment, the first data storage device sends at least part of the first data to the third data storage device according to the needs of the second data service corresponding to the third data storage device or the authority of the second service.
[0080] For example, the data service corresponding to the third data storage device is the service of the company's personnel department, and the data service corresponding to the second data storage device is the service of the company's financial department. The first data sent by the second data storage device to the first data storage device includes employee wages and other financial data of the company, and the third data storage device does not have the authority to obtain other financial data of the company. Therefore, the first data storage device sends the employee wages to the third data storage device.
[0081] Among them, after receiving the first data, for example, after receiving the data request sent by the third data storage device, the first data storage device sends the data requested by the third data storage device through the data request to the third data storage device. Specifically, the first data storage device receives data sent by different data storage devices in real time. Therefore, when the third data storage device requests data, it needs to send a data request, and the data request includes the identification information of the second data storage device and the attribute information of the requested data. The first data storage device determines the second data storage device according to the identification information of the second data storage device, obtains data corresponding to the attribute information from the data sent by the received second data storage device according to the attribute information of the requested data, and sends the data to the third data storage device.
[0082] Optionally, after the first data storage device receives the first data sent by the second data storage device, it records the time of receiving the first data and the identification information of the second data storage device, and corresponds the data to the data storage device, so that when the required data is sent to the third data storage device, the required data can be obtained quickly and accurately.
[0083] Furthermore, after receiving the data request from the third data storage device, the identification information of the third data storage device, the time when the data request is received, and the attribute information of the data to be acquired by the third data storage device are recorded.
[0084] The first data storage device can track and monitor the transmission of data to facilitate data transmission management by recording the time when the first data is received and the identification information of the second data storage device, the identification information of the third data storage device, the time when the data request is received, and the attribute information of the data to be obtained by the third data storage device.
[0085] In this embodiment, the first data storage device receives the first data sent by the second data storage device, the second data storage device includes a second database of the first data service corresponding to it, and the first data is stored in the second database; the first data is saved in the first database; and at least part of the first data is sent to the third data storage device, the third data storage device includes a third database of the second data service corresponding to it, and at least part of the first data is used to be stored in the third database. The data storage device corresponding to each data service performs data transmission with the first data storage device respectively, transmits the data to the first data storage device, and sends the data to other data storage devices through the first data storage device, so that data transmission can no longer be established one by one between the data storage devices corresponding to each data service, reducing the number of databases directly connected to the database of the data storage device, thereby reducing the risk of data leakage in the database, and through the first data storage device, the data of one data storage device can be transmitted to multiple other data storage devices, improving the data transmission efficiency and sharing rate, thereby improving the data value.
[0086] Figure 3 FIG. 1 is a flow chart of a data transmission method provided by another embodiment of the present invention. Figure 3 As shown, in Figure 2 Based on the embodiment shown, the method of this embodiment includes:
[0087] S301: Receive first data sent by a second data storage device.
[0088] S302: Save the first data in a first database.
[0089] In this embodiment, the specific implementation methods of S301 and S302 may refer to S201 and S202 respectively, and will not be repeated here.
[0090] S303: Obtain the security level of the third data storage device.
[0091] In this embodiment, since the data storage device corresponds to the data service, and the data security levels of different data services are different, for example, the confidentiality level of the data is different, or the importance of the data is different, so the security levels of different data storage devices are different. Therefore, during data transmission, it is necessary to match the data transmission mode according to the security level of the third data storage device.
[0092] The security level of the data in each data storage device is fixed. When the third data storage device sends a data request to the first data storage device, its security level can also be sent to the first data storage device, so that the first data storage device obtains the security level of the third data storage device. Alternatively, the security level of each data storage device is pre-stored in the first data storage device, and an association relationship is established between the security level and the identification information of the data storage device, and the security level of the data storage device is obtained through the identification information of the data storage device.
[0093] S304: Determine a data transmission mode according to the security level of the third data storage device.
[0094] In this embodiment, a first preset security level is pre-set in the first data storage device. Before sending data to the third data storage device, the security level of the third data storage device is compared with the first preset security level. If the security level of the third data storage device is higher than or equal to the first preset security level, the data transmission method is determined to be transmission through a preset transmission interface. If the security level of the third data storage device is lower than the first preset security level, the data transmission method is determined to be transmission through a preset transmission interface or database direct connection transmission. Among them, when transmitting through a database direct connection, incremental synchronization can be achieved by publish / subscribe, change data capture (CDC) incremental capture, ETL tools, etc. When using a preset transmission interface, it can be an interface of the first database of the first data storage device that is unidirectionally called by the third data storage device.
[0095] S305. Send at least part of the first data to a third data storage device according to a data transmission method.
[0096] In this embodiment, after the data transmission mode is determined, the data is sent to the third data storage device via the data transmission mode.
[0097] It should be noted that the data storage device with a higher security level and the first data storage device can be a one-way call, that is, the data storage device with a higher security level can actively send the first data to the first data storage device, or obtain the data from the first data storage device, while the first data storage device cannot call the data storage device, thereby improving the security of the data transmission process.
[0098] It should be noted that one implementation method of S303 can also be: obtaining the security level of the second data storage device and the security level of the third data storage device; accordingly, in S304, determining the data transmission method based on the security level of the second data storage device and the security level of the third data storage device.
[0099] In this embodiment, when the second data storage device sends the first data to the first data storage device, its security level can also be sent to the first data storage device, so that the first data storage device obtains the security level of the second data storage device. The security level of each data storage device is pre-stored in the first data storage device, and an association relationship is established between the security level and the identification information of the data storage device, and the security level of the data storage device is obtained through the identification information of the data storage device.
[0100] When the first data storage device sends data to the third data storage device, the security level of the second data storage device is compared with the security level of the third data storage device to determine the data transmission method. For example, if the security level of the second data storage device is higher than or equal to the security level of the third data storage device, the data transmission method is determined to be transmitted through a preset transmission interface; if the security level of the second data storage device is lower than the security level of the third data storage device, the data transmission method is determined to be transmitted through a preset transmission interface or directly connected to the database, thereby improving the security of the data transmission process.
[0101] In this embodiment, before sending at least part of the first data to the third data storage device, the data transmission mode is determined according to the security level of the second data storage device and the security level of the third data storage device by obtaining the security level of the second data storage device and the security level of the third data storage device. Thus, at least part of the first data is sent to the third data storage device according to the data transmission mode. Determining the data transmission mode according to the security level of the data storage device improves the security of data transmission and avoids data leakage.
[0102] Figure 4 FIG. 1 is a flow chart of a data transmission method provided by another embodiment of the present invention. Figure 4 As shown, in Figure 2 and / or Figure 3 Based on the embodiment shown, the method of this embodiment includes:
[0103] S401: Obtain encryption configuration information of first data.
[0104] In this embodiment, the administrator of the first data storage device can, for example, input configuration information through a human-computer interaction interface, wherein the configuration information can, for example, include: whether the data sent by the first data storage device is encrypted, information about the encrypted data, information about the encrypted field, and information about a preset transmission interface for the first data storage device to send encrypted data to the first data storage device.
[0105] S402: Receive unencrypted first data sent by the second data storage device through direct database transmission or through a preset transmission interface; or receive encrypted first data sent by the second data storage device through a preset transmission interface.
[0106] In this embodiment, when the first data sent by the second data storage device is ordinary data (that is, unencrypted data), the first data can be transferred to the first database of the first data storage device by directly connecting the first database of the first data storage device to the second database of the second data storage device. Alternatively, a preset transmission interface corresponding to the second data storage device is obtained through configuration information, and the first data is transferred to the first database of the first data storage device through the preset transmission interface.
[0107] When the first data sent by the second data storage device is encrypted data, a preset transmission interface corresponding to the second data storage device is obtained through configuration information, and the first data is transmitted to the first database of the first data storage device through the preset transmission interface.
[0108] It should be noted that, optionally, before sending the encrypted data, the second data storage device not only needs to encrypt the data, for example, using an asymmetric algorithm for encryption, but also can sign the data, for example, using a message digest algorithm (Message Digest Algorithm MD5, MD5) algorithm to sign the data.
[0109] S403: When sending at least a portion of the encrypted first data to the third data storage device, send encryption configuration information to the third data storage device.
[0110] In this embodiment, when the data sent to the third data storage device is encrypted data, the configuration information corresponding to the encrypted data needs to be sent to the third data storage device so that the third data storage device decrypts the data according to the configuration information to obtain the required data. When the data obtained by the third data storage device is the data encrypted and signed by the second data storage device, after the third data storage device obtains the encrypted required data, it performs decryption and signature processing on the obtained data according to the configuration information and the encryption algorithm to obtain the decrypted required data. Optionally, if the encrypted data is also signed, the third data storage device obtains the signed data according to the signature algorithm and compares the signed data with the data obtained from the first data storage device. If they are consistent, the data has not been tampered with; if they are inconsistent, it means that the data has been tampered with and is invalid data.
[0111] It should be noted that the encryption algorithm (or encryption key) is pre-stored in the second data storage device and the third data storage device, and the encryption algorithm is not stored in the first data storage device. Therefore, even if other data storage devices obtain the encrypted data, they cannot be decrypted, thereby improving data security.
[0112] In this embodiment, different data transmission modes are used to send data from the second data storage device to the first data storage device according to whether the data is encrypted data. Furthermore, when the data is encrypted data, configuration information corresponding to the encrypted data is sent to the third data storage device so that the third data storage device obtains the data according to the configuration information, thereby providing a transmission mode for encrypted data and improving the security of the encrypted data.
[0113] Figure 5 A flow chart of a data transmission method provided by another embodiment of the present invention. Figure 5 As shown, based on any of the above embodiments, the method of this embodiment includes:
[0114] S501. A first data storage device obtains configuration information, and stores the configuration information in a first database in the form of a configuration table.
[0115] S502. The second data storage device sends unencrypted first data to the first data storage device via database direct transmission or via a preset transmission interface; accordingly, the first data storage device receives the unencrypted first data.
[0116] S503, the second data storage device encrypts and signs the first data to be sent to the first data storage device, obtains the encrypted first data, and sends the encrypted first data to the first data storage device via a preset transmission interface; correspondingly, the first data storage device receives the encrypted first data.
[0117] It should be noted that the second data storage device in S502 and the second data storage device in S503 may be the same data storage device or different data storage devices.
[0118] S504: The first data storage device stores the received first data in the second database in the form of a data table.
[0119] In this embodiment, the first data may be unencrypted data or encrypted data. When storing the first data, it may be stored in units of data storage devices or in units of first data received each time, which is not limited in the embodiment of the present invention.
[0120] S505. The first data storage device sends at least part of the first data and configuration information corresponding to at least part of the first data to a third data storage device.
[0121] In this embodiment, the specific implementation of S505 may refer to S304 and will not be described in detail here.
[0122] It should be noted that the second data storage device records operation information, such as data import and data export operations, through an operation information record table.
[0123] S506. The third data storage device determines whether at least part of the received first data is encrypted data. If so, execute S507; if not, execute S509.
[0124] S507: The third data storage device decrypts at least part of the obtained first data, and signs the decrypted data according to the obtained configuration information.
[0125] S508, verify whether the signature is passed, if so, execute S509; if not, execute S510.
[0126] S509: Write the data into the business table.
[0127] S510, end.
[0128] It should be noted that the second data storage device is deployed in the source system, ie, the system providing data, and the third data storage device is deployed in the target system, ie, the system requiring data.
[0129] Figure 6 A schematic diagram of the structure of a data transmission device provided by an embodiment of the present invention is shown in FIG. Figure 6 As shown, the data transmission device of this embodiment may include: a receiving module 61, a storage module 62 and a sending module 63. Optionally, based on the above device, the data transmission device may further include: an acquisition module 64.
[0130] It should be noted that the data transmission device described in the embodiment of the present invention is applied to a first data storage device, and the first data storage device includes a first database, and the first database is used to store data.
[0131] A receiving module 61, configured to receive first data sent by a second data storage device, the second data storage device comprising a second database of a first data service corresponding thereto, the first data being stored in the second database;
[0132] A storage module 62, configured to store the first data in a first database;
[0133] The sending module 63 is used to send at least part of the first data to a third data storage device, the third data storage device includes a third database of the second data service corresponding thereto, and at least part of the first data is used to be stored in the third database.
[0134] Optionally, when the sending module 63 sends at least part of the first data to the third data storage device, it is specifically used to:
[0135] obtaining a security level of a third data storage device;
[0136] Determining a data transmission method according to a security level of the third data storage device;
[0137] At least part of the first data is sent to a third data storage device according to a data transmission direction.
[0138] Optionally, when determining the data transmission mode according to the security level of the third data storage device, the sending module 63 is specifically configured to:
[0139] If the security level of the third data storage device is higher than or equal to the first preset security level, determining that the data transmission method is transmission through a preset transmission interface;
[0140] If the security level of the third data storage device is lower than the first preset security level, the data transmission mode is determined to be transmission through a preset transmission interface or database direct connection transmission.
[0141] Optionally, when the receiving module 61 receives the first data sent by the second data storage device, it is specifically used to:
[0142] Receiving the unencrypted first data sent by the second data storage device through direct database transmission or through a preset transmission interface; or
[0143] The encrypted first data sent by the second data storage device is received through the preset transmission interface.
[0144] Optionally, an acquisition module 64 is used to acquire encryption configuration information of the first data;
[0145] The sending module 63 is further configured to send encryption configuration information to the third data storage device when sending at least part of the encrypted first data to the third data storage device.
[0146] Optionally, the receiving module 61 is further configured to receive a data request sent by the third data storage device before the sending module 63 sends at least part of the first data to the third data storage device, where the data request includes identification information of the second data storage device and attribute information of the requested data;
[0147] The acquisition module 64 is further configured to acquire at least a portion of the first data corresponding to the attribute information received from the second data storage device according to the data request.
[0148] Optionally, after receiving the first data sent by the second data storage device, the receiving module 61 is further used to: record the time when the first data is received and the identification information of the second data storage device;
[0149] After receiving the data request sent by the third data storage device, the receiving module 61 is further used to: record the identification information of the third data storage device, the time when the data request is received, and the attribute information.
[0150] The device of this embodiment can be used to execute the technical solution of any of the above-mentioned method embodiments. Its implementation principle and technical effects are similar and will not be repeated here.
[0151] Figure 7 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention is shown in FIG. Figure 7 As shown, the electronic device of this embodiment may include: at least one processor 71 and a memory 72. Figure 7 The electronic device shown is an example of a processor, wherein
[0152] The memory 72 is used to store programs. Specifically, the program may include program code, and the program code includes computer operation instructions. The memory 72 may include a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage.
[0153] The processor 71 is used to execute the computer-executable instructions stored in the memory 72 to implement the data transmission method shown in any of the above embodiments.
[0154] The processor 71 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.
[0155] Optionally, in a specific implementation, if the memory 72 and the processor 71 are implemented independently, the memory 72 and the processor 71 can be connected to each other through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc., but it does not mean that there is only one bus or one type of bus.
[0156] Optionally, in a specific implementation, if the memory 72 and the processor 71 are integrated on a chip, the memory 72 and the processor 71 can communicate with each other through an internal interface.
[0157] The electronic device described above in this embodiment can be used to execute the technical solutions in the above method embodiments. Its implementation principles and technical effects are similar and will not be repeated here.
[0158] Figure 8 The block diagram of the device 20 for data transmission provided by one embodiment of the present invention. For example, the device 20 can be provided as a server. Figure 8 The apparatus 20 includes a processing component 21, which further includes one or more processors, and a memory resource represented by a memory 22 for storing instructions executable by the processing component 21, such as an application. The application stored in the memory 22 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 21 is configured to execute instructions to perform the data transmission method shown in any of the above embodiments.
[0159] The device 20 may also include a power supply component 23 configured to perform power management of the device 20, a wired or wireless network interface 24 configured to connect the device 20 to a network, and an input / output (I / O) interface 25. The device 20 may operate based on an operating system stored in the memory 23, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™ or the like.
[0160] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0161] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A data transmission method, It is characterized in that Applied in a first data storage device, the first data storage device includes a first database, the first database is used to store data, the method includes: After sending a request to a second data storage device to obtain data, receiving first data sent by the second data storage device, or receiving pre-specified first data actively sent by the second data storage device, the second data storage device includes a second database of a first data service corresponding thereto, and the first data is stored in the second database; storing the first data in the first database; receiving a data request sent by a third data storage device; the data request includes a request to obtain attribute information of the data; Sending at least part of the first data corresponding to the attribute information to the third data storage device, the third data storage device comprising a third database of the second data service corresponding thereto, the at least part of the first data being used to be stored in the third database; The sending at least part of the first data to a third data storage device comprises: Acquire the security level of the third data storage device; If the security level of the third data storage device is higher than or equal to the first preset security level, determining that the data transmission method is transmission through a preset transmission interface; If the security level of the third data storage device is lower than the first preset security level, the data transmission mode is determined to be transmission through a preset transmission interface or database direct connection transmission.
2. The method according to claim 1, It is characterized in that The receiving first data sent by the second data storage device comprises: Receiving the unencrypted first data sent by the second data storage device through direct database transmission or through a preset transmission interface; or The encrypted first data sent by the second data storage device is received through the preset transmission interface.
3. The method according to claim 2, It is characterized in that The method further comprises: Obtaining encryption configuration information of the first data; When sending the at least partially encrypted first data to a third data storage device, the encryption configuration information is sent to the third data storage device.
4. The method according to claim 1, It is characterized in that Before sending at least part of the first data to the third data storage device, the method further includes: receiving a data request sent by the third data storage device, wherein the data request includes identification information of the second data storage device and attribute information of the data requested to be obtained; According to the data request, at least a portion of the first data corresponding to the attribute information received from the second data storage device is acquired.
5. The method according to claim 4, It is characterized in that After receiving the first data sent by the second data storage device, the method further includes: Recording the time when the first data is received and the identification information of the second data storage device; After receiving the data request sent by the third data storage device, the method further includes: The identification information of the third data storage device, the time when the data request is received, and the attribute information are recorded.
6. A data transmission device, It is characterized in that Applied in a first data storage device, the first data storage device includes a first database, the first database is used to store data, and the apparatus includes: A receiving module, configured to receive first data sent by the second data storage device based on a request of the first data storage device to obtain data, or to receive pre-specified first data actively sent by the second data storage device, wherein the second data storage device includes a second database of a first data service corresponding thereto, and the first data is stored in the second database; A storage module, used for storing the first data in the first database; The receiving module is further used to receive a data request sent by a third data storage device; the data request includes a request to obtain attribute information of the data; a sending module, configured to send at least part of the first data corresponding to the attribute information to the third data storage device, the third data storage device comprising a third database of the second data service corresponding thereto, the at least part of the first data being used to be stored in the third database; When the sending module sends at least part of the first data to the third data storage device, it is specifically used to: obtain the security level of the third data storage device; if the security level of the third data storage device is higher than or equal to the first preset security level, determine that the data transmission method is transmitted through a preset transmission interface; if the security level of the third data storage device is lower than the first preset security level, determine that the data transmission method is transmitted through a preset transmission interface or directly connected to the database.
7. An electronic device, It is characterized in that include: A memory and at least one processor, the memory is used to store program instructions, and the processor is used to call the program instructions in the memory to execute the data transmission method according to any one of claims 1 to 5.
8. A readable storage medium, It is characterized in that The readable storage medium stores a computer program; when the computer program is executed, the data transmission method according to any one of claims 1 to 5 is implemented.
9. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the data transmission method described in any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Data sharing method of communication terminal
CN101247316A
Data transmission method and terminal
CN104539439A
Data synchronization method and data synchronization device
CN107404540A
Data transmission method and apparatus, and mobile terminal
CN107426828A
Data copying system, method and device
CN108573162A
