A data transmission method, apparatus, device, and storage medium
By using a data sharing platform and blockchain technology, automated data transmission between devices is achieved, solving the problem of low flexibility in data transmission between devices, improving transmission efficiency and security, and avoiding human intervention and data errors.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- AISINO CORPORATION
- Filing Date
- 2022-12-14
- Publication Date
- 2026-07-10
AI Technical Summary
Data transmission between devices is inflexible, relies on manual operation, poses a risk of data leakage, is inefficient, and is prone to incomplete or incorrect data.
Through the data sharing platform, automated data transmission is achieved between devices. Front-end and back-end service modules are used for data format conversion and hash processing, and blockchain technology is combined to ensure the security and integrity of data transmission.
It improves the flexibility and security of data transmission, avoids human intervention, reduces the risk of data leakage, and improves transmission efficiency and accuracy.
Smart Images

Figure CN116415277B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a data transmission method, apparatus, device and storage medium. Background Technology
[0002] With the continuous development of technology, more and more devices can interact with each other by transmitting data.
[0003] In some scenarios, due to differences in data format, naming conventions, accuracy, or security levels across different devices, barriers exist in data transmission between devices, making automated data transmission between devices impossible.
[0004] For example, in the political and legal context, different business departments, such as public security departments, procuratorial departments, judicial departments or court departments, have independent equipment, and data can only be exchanged within the internal network environment where the equipment is located, but these departments often need to collaborate to process data.
[0005] In related technologies, the method for data transmission between devices is to export data from one device, print the data file, then manually hand over the data file and enter the corresponding data into another device, thereby completing the data transmission between devices.
[0006] However, the data transmission process between devices in related technologies mainly relies on human operation, which poses a risk of data leakage. At the same time, the data export and data entry processes are not only inefficient, but also prone to incomplete exported data or incorrect entered data.
[0007] It is evident that data transmission flexibility is relatively low in related technologies. Summary of the Invention
[0008] This application provides a data transmission method, apparatus, computer device, and storage medium to address the problem of low flexibility in data transmission.
[0009] Firstly, a data transmission method is provided, including:
[0010] Upon receiving an interface request instruction from a first device, if the requesting object is determined to be a second device based on the interface request instruction, the interface request instruction is forwarded to the second device, so that the second device can determine and return the authorization result of the access permission of the target interface based on the received interface request instruction; wherein, the interface request instruction is used to indicate that the first device requests access permission of the target interface provided by the requesting object;
[0011] Forward the authorization result returned by the second device to the first device, and receive the data query instruction for the target data generated by the first device based on the authorization result;
[0012] Upon receiving the data query instruction, the target interface is invoked based on the data query instruction to obtain the target data from the second device and send the target data to the first device.
[0013] Optionally, receiving the data query instruction includes:
[0014] The system controls a first front-end service module associated with the first device to receive the data query instruction; wherein the first front-end service module is located in a first intranet environment where the first device is located.
[0015] The step of calling the target interface based on the data query instruction to obtain the target data from the second device includes:
[0016] The first front-end service module is controlled to convert the data query instruction into a format according to the interface information of the target interface, so as to obtain a converted query instruction;
[0017] The first front-end service module is controlled to perform hash processing on the conversion query instruction based on a preset hash encoding strategy to obtain an instruction digest;
[0018] The first front-end service module is controlled to package the conversion query instruction and the instruction digest to obtain the target instruction.
[0019] The first front-end service module is controlled to call the target interface based on the target instruction to obtain the target data from the second device.
[0020] Optionally, before controlling the first front-end service module to convert the data query instruction according to the interface information of the target interface to obtain the converted query instruction, the method further includes:
[0021] Receive an interface publishing instruction from the second device; wherein the interface publishing instruction is used to publish interface information of the target interface provided by the second device; the interface information includes at least one of the target interface's interface name, interface function, interface data rules, and interface calling rules;
[0022] Instructions are issued based on the interface, and interface information of the target interface provided by the second device is stored.
[0023] Optionally, controlling the first front-end service module to call the target interface based on the target instruction and obtain the target data from the second device includes:
[0024] The first front-end service module is controlled to send the target instruction to the first back-end service module associated with the first device; wherein the first back-end service module is located in the intranet environment of the data sharing platform.
[0025] The first post-service module is controlled to unpack the target instruction to obtain the instruction digest and the conversion query instruction.
[0026] The first post-service module is controlled to write the instruction digest into the first blockchain and store the conversion query instruction in the local storage module;
[0027] The second back-end service module associated with the second device reads the conversion query instruction from the local storage module; wherein, the second back-end service module is located in the intranet environment of the data sharing platform;
[0028] The second back-end service module is controlled to call the target interface based on the conversion query instruction to obtain the target data from the second device.
[0029] Optionally, controlling the second post-service module to call the target interface based on the conversion query instruction and obtain the target data from the second device includes:
[0030] The second back-end service module is controlled to read the instruction digest from the first blockchain;
[0031] When the second back-end service module determines that the instruction digest matches the received conversion query instruction, it sends the conversion query instruction to the second front-end service module associated with the second device; wherein the second front-end service module is located in the second intranet environment where the second device is located;
[0032] The second front-end service module is controlled to call the target interface based on the conversion query instruction to obtain the target data from the second device.
[0033] Optionally, controlling the second front-end service module to call the target interface based on the conversion query instruction and obtain the target data from the second device includes:
[0034] The second front-end service module is controlled to call the target interface based on the conversion query instruction to obtain initial data from the second device;
[0035] The second front-end service module is controlled to perform hash processing on the acquired initial data based on a preset hash encoding strategy to obtain a data digest;
[0036] The second front-end service module is controlled to package the initial data and the data digest to obtain the target data.
[0037] Optionally, the target data is obtained from the second device by controlling a second front-end service module associated with the second device, wherein the second front-end service module is located in the second intranet environment where the second device is located;
[0038] Sending the target data to the first device includes:
[0039] The second front-end service module is controlled to send the target data to the second back-end service module associated with the second device; wherein the second back-end service module is located in the intranet environment of the data sharing platform.
[0040] The second back-end service module is controlled to unpack the target data to obtain a data digest and initial data; wherein, the initial data is obtained from the second device based on a data query command, and the data digest is obtained by hashing the initial data;
[0041] The second post-service module is controlled to write the obtained data digest into the second blockchain and store the initial data in the local storage module in order to send the initial data to the first device.
[0042] Optionally, sending the initial data to the first device includes:
[0043] The control unit, which is associated with the first device, reads the initial data from the local storage module; wherein the first back-end service module is located in the intranet environment of the data sharing platform.
[0044] The first back-end service module is controlled to send the initial data to the first front-end service module associated with the first device; wherein the first front-end service module is located in the first intranet environment where the first device is located;
[0045] The first front-end service module is controlled to call the receiving interface provided by the first device and send the initial data to the first device.
[0046] Optionally, controlling the first front-end service module to call the receiving interface provided by the first device and send the initial data to the first device includes:
[0047] The first front-end service module is controlled to read the data digest from the second blockchain;
[0048] When it is determined that the data digest matches the obtained initial data, the first front-end service module is controlled to call the receiving interface provided by the first device to send the initial data to the first device.
[0049] Secondly, a data transmission device is provided, comprising:
[0050] First processing module: After receiving an interface request instruction from a first device, if the requesting object is determined to be a second device based on the interface request instruction, the module forwards the interface request instruction to the second device, so that the second device determines and returns the authorization result of the access permission of the target interface based on the received interface request instruction; wherein, the interface request instruction is used to indicate that the first device requests the access permission of the target interface provided by the requesting object;
[0051] The first processing module is further configured to: forward the authorization result returned by the second device to the first device, and receive a data query instruction for the target data generated by the first device based on the authorization result;
[0052] The second processing module is used to receive the data query instruction, call the target interface based on the data query instruction, obtain the target data from the second device, and send the target data to the first device.
[0053] Optionally, the second processing module is specifically used for:
[0054] The system controls a first front-end service module associated with the first device to receive the data query instruction; wherein the first front-end service module is located in a first intranet environment where the first device is located.
[0055] The first front-end service module is controlled to convert the data query instruction into a format according to the interface information of the target interface, so as to obtain a converted query instruction;
[0056] The first front-end service module is controlled to perform hash processing on the conversion query instruction based on a preset hash encoding strategy to obtain an instruction digest;
[0057] The first front-end service module is controlled to package the conversion query instruction and the instruction digest to obtain the target instruction.
[0058] The first front-end service module is controlled to call the target interface based on the target instruction to obtain the target data from the second device.
[0059] Optionally, the first processing module is further configured to:
[0060] Before controlling the first front-end service module to convert the data query instruction according to the interface information of the target interface and obtain the converted query instruction, an interface publishing instruction is received from the second device; wherein, the interface publishing instruction is used to publish the interface information of the target interface provided by the second device; the interface information includes at least one of the interface name, interface function, interface data rules and interface calling rules of the target interface;
[0061] Instructions are issued based on the interface, and interface information of the target interface provided by the second device is stored.
[0062] Optionally, the second processing module is specifically used for:
[0063] The first front-end service module is controlled to send the target instruction to the first back-end service module associated with the first device; wherein the first back-end service module is located in the intranet environment of the data sharing platform.
[0064] The first post-service module is controlled to unpack the target instruction to obtain the instruction digest and the conversion query instruction.
[0065] The first post-service module is controlled to write the instruction digest into the first blockchain and store the conversion query instruction in the local storage module;
[0066] The second back-end service module associated with the second device reads the conversion query instruction from the local storage module; wherein, the second back-end service module is located in the intranet environment of the data sharing platform;
[0067] The second back-end service module is controlled to call the target interface based on the conversion query instruction to obtain the target data from the second device.
[0068] Optionally, the second processing module is specifically used for:
[0069] The second back-end service module is controlled to read the instruction digest from the first blockchain;
[0070] When the second back-end service module determines that the instruction digest matches the received conversion query instruction, it sends the conversion query instruction to the second front-end service module associated with the second device; wherein the second front-end service module is located in the second intranet environment where the second device is located;
[0071] The second front-end service module is controlled to call the target interface based on the conversion query instruction to obtain the target data from the second device.
[0072] Optionally, the second processing module is specifically used for:
[0073] The second front-end service module is controlled to call the target interface based on the conversion query instruction to obtain initial data from the second device;
[0074] The second front-end service module is controlled to perform hash processing on the acquired initial data based on a preset hash encoding strategy to obtain a data digest;
[0075] The second front-end service module is controlled to package the initial data and the data digest to obtain the target data.
[0076] Optionally, the target data is obtained from the second device by controlling a second front-end service module associated with the second device, the second front-end service module being located in a second intranet environment where the second device is situated; the second processing module is specifically used for:
[0077] The second front-end service module is controlled to send the target data to the second back-end service module associated with the second device; wherein the second back-end service module is located in the intranet environment of the data sharing platform.
[0078] The second back-end service module is controlled to unpack the target data to obtain a data digest and initial data; wherein, the initial data is obtained from the second device based on a data query command, and the data digest is obtained by hashing the initial data;
[0079] The second post-service module is controlled to write the obtained data digest into the second blockchain and store the initial data in the local storage module in order to send the initial data to the first device.
[0080] Optionally, the second processing module is specifically used for:
[0081] The control unit, which is associated with the first device, reads the initial data from the local storage module; wherein the first back-end service module is located in the intranet environment of the data sharing platform.
[0082] The first back-end service module is controlled to send the initial data to the first front-end service module associated with the first device; wherein the first front-end service module is located in the first intranet environment where the first device is located;
[0083] The first front-end service module is controlled to call the receiving interface provided by the first device and send the initial data to the first device.
[0084] Optionally, the second processing module is specifically used for:
[0085] The first front-end service module is controlled to read the data digest from the second blockchain;
[0086] When it is determined that the data digest matches the obtained initial data, the first front-end service module is controlled to call the receiving interface provided by the first device to send the initial data to the first device.
[0087] Thirdly, a computer program product is provided, including a computer program that, when executed by a processor, implements the method described in the first aspect.
[0088] Fourthly, a computer device is provided, comprising:
[0089] Memory, used to store program instructions;
[0090] A processor is configured to invoke program instructions stored in the memory and execute the method described in the first aspect according to the obtained program instructions.
[0091] Fifthly, a computer-readable storage medium is provided, the computer-readable storage medium storing computer-executable instructions for causing a computer to perform the method as described in the first aspect.
[0092] In this embodiment, through a data sharing platform, a first device can apply to a second device for permission to use a target interface; the second device can then return an authorization result to the first device. Thus, based on the authorization result, the first device can send a data query command to the second device to query target data; the second device can then return the target data to the first device, completing the data transmission between the devices. The entire data transmission process requires no manual intervention; only devices that have obtained interface authorization can perform data queries and other processing through the interface, which to some extent avoids the risk of data leakage and improves the standardization of data transmission. Simultaneously, the absence of data export and data entry processes improves data transmission efficiency and also avoids situations such as incomplete exported data or incorrect entered data, providing flexibility in data transmission. Attached Figure Description
[0093] Figure 1 This is a schematic diagram illustrating an application scenario of the data transmission method provided in an embodiment of this application.
[0094] Figure 2 A schematic flowchart of a data transmission method provided in an embodiment of this application;
[0095] Figure 3A schematic diagram illustrating the principle of the data transmission method provided in this application embodiment;
[0096] Figure 4 A schematic diagram of the structure of a data transmission device provided in the embodiments of this application. Figure 1 ;
[0097] Figure 5 A schematic diagram of the structure of the data transmission device provided in the embodiments of this application. Figure 2 . Detailed Implementation
[0098] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0099] The application fields of the data transmission method provided in the embodiments of this application will be briefly introduced below.
[0100] With the continuous development of technology, more and more devices can interact with each other by transmitting data.
[0101] In some scenarios, due to differences in data format, naming conventions, accuracy, or security levels across different devices, barriers exist in data transmission between devices, making automated data transmission between devices impossible.
[0102] For example, in the political and legal context, different business departments, such as public security departments, procuratorial departments, judicial departments or court departments, have independent equipment, and data can only be exchanged within the internal network environment where the equipment is located, but these departments often need to collaborate to process data.
[0103] In related technologies, the method for data transmission between devices is to export data from one device, print the data file, then manually hand over the data file and enter the corresponding data into another device, thereby completing the data transmission between devices.
[0104] For example, in the context of law enforcement, the coordination between various departments of law enforcement relies on manual processes for exchanging legal documents, transferring case materials, exchanging prisoners and conducting interrogations, and entering case information.
[0105] However, the data transmission process between devices in related technologies mainly relies on human operation, which poses a risk of data leakage. At the same time, the data export and data entry processes are not only inefficient, but also prone to incomplete exported data or incorrect entered data.
[0106] For example, in the context of law enforcement, the fragmentation of case information among different departments makes it difficult to comprehensively grasp information about a case from investigation, prosecution, trial to execution. This hinders the full-process supervision and management of case handling quality and the in-depth analysis and assessment of cases. The inability to effectively integrate business or data among various law enforcement departments not only increases judicial costs but also significantly impacts case-handling efficiency and quality.
[0107] It is evident that data transmission flexibility is relatively low in related technologies.
[0108] To address the issue of low flexibility in data transmission, this application proposes a data transmission method. This method is applied to data sharing platforms; for example, in a political and legal context, the data sharing platform could be a political and legal big data collaborative service platform, etc., with no specific limitations.
[0109] After receiving an interface request instruction from the first device, if the requesting object is determined to be the second device based on the interface request instruction, the interface request instruction is forwarded to the second device so that the second device can determine and return the authorization result of the access permission of the target interface based on the received interface request instruction; wherein, the interface request instruction is used to indicate that the first device requests access permission of the target interface provided by the requesting object.
[0110] The system forwards the authorization result returned by the second device to the first device and receives a data query instruction for the target data generated by the first device based on the authorization result. After receiving the data query instruction, the system calls the target interface based on the data query instruction to obtain the target data from the second device and sends the target data back to the first device.
[0111] In this embodiment, through a data sharing platform, a first device can apply to a second device for permission to use a target interface; the second device can then return an authorization result to the first device. Thus, based on the authorization result, the first device can send a data query command to the second device to query target data; the second device can then return the target data to the first device, completing the data transmission between the devices. The entire data transmission process requires no manual intervention; only devices that have obtained interface authorization can perform data queries and other processing through the interface, which to some extent avoids the risk of data leakage and improves the standardization of data transmission. Simultaneously, the absence of data export and data entry processes improves data transmission efficiency and also avoids situations such as incomplete exported data or incorrect entered data, providing flexibility in data transmission.
[0112] The application scenarios of the data transmission method provided in this application are described below.
[0113] Please refer to Figure 1This is a schematic diagram illustrating an application scenario of the data transmission method provided in this application. The application scenario includes a client 101 and a server 102. The client 101 and the server 102 can communicate with each other. The communication method can be wired, such as through a network cable or serial cable; or wireless, such as through Bluetooth or Wi-Fi. No specific limitation is imposed.
[0114] Client 101 generally refers to devices such as first or second devices, including terminal devices, third-party applications accessible by the terminal devices, or web pages accessible by the terminal devices. Terminal devices include, but are not limited to, mobile phones, computers, smart medical devices, smart home appliances, vehicle terminals, or aircraft. Server 102 generally refers to devices such as data sharing platforms, including, for example, terminal devices or servers. Servers include, but are not limited to, cloud servers, local servers, or associated third-party servers. Both client 101 and server 102 can utilize cloud computing to reduce the consumption of local computing resources; similarly, they can also utilize cloud storage to reduce the consumption of local storage resources.
[0115] As one embodiment, the client 101 and the server 102 can be the same device, and there is no specific limitation. In this embodiment, the client 101 and the server 102 are described as different devices.
[0116] The following is based on Figure 1 From the perspective of a data sharing platform, this application provides a detailed description of the data transmission method provided in its embodiments. Please refer to... Figure 2 This is a flowchart illustrating a data transmission method provided in an embodiment of this application.
[0117] S201: After receiving the interface request instruction from the first device, if the request object is determined to be the second device based on the interface request instruction, the interface request instruction is forwarded to the second device.
[0118] When the first device needs to collaborate with the second device, the first device can send an interface request instruction to the data sharing platform. The data sharing platform receives the interface request instruction from the first device. The interface request instruction indicates that the first device is requesting access to the target interface provided by the requested object. The interface request instruction may carry the identification information of the first device, allowing the data sharing platform to determine that the source of the interface request instruction is the first device. The interface request instruction may also carry information such as the interface name or function of the target interface, used to indicate the request for access to the target interface. The target interface can be associated with the second device, thus allowing the first device to indicate its request for access to the target interface from the second device by including the interface name or function of the target interface in the interface request instruction; no specific restrictions apply.
[0119] After receiving an interface request instruction from the first device, the data sharing platform determines that the requesting object is the second device based on the interface request instruction. Then, it forwards the interface request instruction to the second device so that the second device can determine and return the authorization result of the access permission of the target interface based on the received interface request instruction.
[0120] After receiving the interface request instruction, the second device can determine that the source is the first device based on the interface request instruction. The second device can determine whether to authorize the first device to use the target interface according to a preset approval policy. The approval policy can be to determine whether the first device is in the device approval list stored in the second device; or it can be through offline approval, etc., without any specific restrictions.
[0121] Therefore, the second device can generate an authorization result for the first device regarding the use of the target interface. The authorization result can indicate that the first device is authorized to use the target interface, or it can indicate that the first device is not authorized to use the target interface. The authorization result can be in the form of a certificate, etc., and there are no specific restrictions.
[0122] S202, forward the authorization result returned by the second device to the first device, and receive the data query instruction for the target data generated by the first device based on the authorization result.
[0123] After receiving the authorization result returned by the second device to the first device, the data sharing platform can forward the authorization result returned by the second device to the first device. Thus, the first device can generate a data query command for the target data based on the authorization result.
[0124] When the first device determines that the authorization result can represent authorization for the first device to use the target interface, it can obtain the interface information of the target interface from the data sharing platform. Based on the interface information, it can generate a data query instruction for the target data. The interface information includes at least one of the following: the interface name, interface function, interface data rules, and interface call rules of the target interface. Alternatively, it can directly generate a data query instruction for the target data based on a preset data format. The data sharing platform then performs data format conversion, etc., according to the interface information of the target interface. There are no specific restrictions.
[0125] When the first device determines that the authorization result indicates that it is not authorized to use the target interface, it may choose not to obtain the target data from the second device, or reapply for the right to use the target interface from the second device through the data sharing platform, etc., without any specific restrictions.
[0126] As one example, the interface information of the interfaces provided by each device can be pre-stored in the data sharing platform. Thus, when a device obtains an authorization result representing authorization to use a certain interface, it can directly obtain the interface information from the data sharing platform to generate corresponding data query instructions, etc., according to the interface information.
[0127] The data sharing platform can pre-store interface information of the second interfaces provided by each device in one method: the second device actively sends an interface publishing command to the data sharing platform; the data sharing platform receives the interface publishing command from the second device, which is used to publish the interface information of the target interface provided by the second device; through the target interface, corresponding operations can be performed on the data in the second device. Based on the interface publishing command, the data sharing platform stores the interface information of the target interface provided by the second device.
[0128] S203: After receiving the data query instruction, the target interface is called based on the data query instruction to obtain the target data from the second device and send the target data to the first device.
[0129] After receiving a data query instruction, the data sharing platform can call the target interface based on the data query instruction to obtain the target data from the second device and send the target data to the first device, thereby realizing data transmission.
[0130] As one embodiment, the data sharing platform may include front-end service modules and back-end service modules associated with each device, as well as a local storage module, and may also be linked to a blockchain. For an example in a law enforcement scenario, please refer to [reference needed]. Figure 3 The equipment includes equipment from the public security department, the procuratorial department, the judicial department, and the court department.
[0131] The data sharing platform includes a first front-end service module and a first back-end service module for equipment association with the public security department; a second front-end service module and a second back-end service module for equipment association with the procuratorial department; a third front-end service module and a third back-end service module for equipment association with the judicial department; and a fourth front-end service module and a fourth back-end service module for equipment association with the court department.
[0132] The equipment of the public security department is located in the first intranet environment, the equipment of the procuratorial department is located in the second intranet environment, the equipment of the judicial department is located in the third intranet environment, the equipment of the court is located in the fourth intranet environment, and the data sharing platform is located in the platform's intranet environment. Thus, a security boundary is formed between the equipment of the public security department, the procuratorial department, the judicial department, and the court and the data sharing platform.
[0133] The following is based on Figure 3 The data transmission method provided in the embodiments of this application will be introduced.
[0134] When receiving the data query instruction, the data sharing platform can control the first front-end service module associated with the first device to receive the data query instruction. The first front-end service module is located in the first intranet environment where the first device is located.
[0135] When invoking the target interface based on a data query command to obtain target data from the second device, the data sharing platform can control the first front-end service module to convert the data query command according to the interface information of the target interface, obtaining a converted query command. The first front-end service module is then controlled to hash the converted query command based on a preset hash encoding strategy, obtaining a command digest. This digest can be used to determine whether the converted query command has been maliciously tampered with during transmission, ensuring data transmission security. The first front-end service module is then controlled to package the converted query command and the command digest to obtain the target command. Finally, the first front-end service module is controlled to invoke the target interface based on the target command to obtain the target data from the second device.
[0136] As one embodiment, when controlling the first front-end service module to call the target interface based on the target instruction to obtain target data from the second device, the data sharing platform can control the first front-end service module to send the target instruction to the first back-end service module associated with the first device. The first back-end service module is located within the platform's intranet environment. The first back-end service module unpacks the target instruction to obtain an instruction digest and a conversion query instruction. The first back-end service module writes the instruction digest into the first blockchain and stores the conversion query instruction in a local storage module.
[0137] Therefore, the data sharing platform can control the second back-end service module associated with the second device to read conversion query instructions from the local storage module. The second back-end service module is located within the intranet environment of the data sharing platform. The data sharing platform routes to the second back-end service module associated with the second device, controls the second back-end service module to call the target interface based on the conversion query instructions, and obtains the target data from the second device.
[0138] As one embodiment, when controlling the second back-end service module to call the target interface based on the conversion query instruction to obtain target data from the second device, the data sharing platform can control the second back-end service module to read the instruction digest from the first blockchain. When controlling the second back-end service module to determine that the instruction digest matches the received conversion query instruction, it sends the conversion query instruction to the second front-end service module associated with the second device, for example, by transferring it to the second front-end service module associated with the second device through a secure exchange platform. The second front-end service module is located in the second intranet environment where the second device resides. Controlling the second front-end service module to call the target interface based on the conversion query instruction to obtain target data from the second device.
[0139] This avoids malicious tampering of conversion query instructions during transmission. By writing the instruction digest into the first blockchain and matching the instruction digest with the conversion query instruction, the security of data transmission can be improved.
[0140] When matching instruction digests with transformation query instructions, the transformation query instruction can first be hashed based on a preset hash encoding strategy to obtain a hash code to be matched. Then, it is determined whether the obtained hash code to be matched is the same as the instruction digest. If they are the same, the instruction digest and transformation query instruction are considered a match; otherwise, they are considered a mismatch.
[0141] As one embodiment, when controlling the second front-end service module to call the target interface based on a conversion query command to obtain target data from the second device, the data sharing platform can control the second front-end service module to call the target interface based on the conversion query command to obtain initial data from the second device. The second front-end service module is then controlled to perform hash processing on the obtained initial data based on a preset hash encoding strategy to obtain a data digest. The data digest can be used to determine whether the initial data has been maliciously tampered with during transmission, thus ensuring the security of data transmission. Finally, the second front-end service module is controlled to package the initial data and the data digest to obtain the target data.
[0142] As one embodiment, if the target data is obtained from the second device through a second front-end service module associated with the second device, and the second front-end service module is located in a second intranet environment of the second device, then when sending the target data to the first device, the data sharing platform can control the second front-end service module to send the target data to a second back-end service module associated with the second device, located within the platform's intranet environment. The second back-end service module is controlled to unpack the target data, obtaining a data digest and initial data. The initial data is obtained from the second device based on a data query command, and the data digest is obtained by hashing the initial data. The second back-end service module is then controlled to write the obtained data digest into a second blockchain and store the initial data in a local storage module for sending the initial data to the first device.
[0143] As one embodiment, when sending initial data to the first device, the data sharing platform can route to a first back-end service module associated with the first device, and control this module to read the initial data from its local storage module. The first back-end service module resides within the platform's intranet environment. The platform then controls the first back-end service module to send the initial data to a first front-end service module associated with the first device, for example, by bridging the connection via a secure exchange platform. The first front-end service module resides within the first intranet environment of the first device. Finally, the platform controls the first front-end service module to call the receiving interface provided by the first device to send the initial data to the first device.
[0144] As one embodiment, when the first front-end service module calls the receiving interface provided by the first device to send the initial data to the first device, the data sharing platform can control the first front-end service module to read a data digest from the second blockchain. When it is determined that the data digest matches the obtained initial data, the platform controls the first front-end service module to call the receiving interface provided by the first device to send the initial data to the first device. The receiving interface provided by the first device can be one carried in the data query command when the first device sends the data query command; it can also be one that the first device has pre-published on the data sharing platform, etc., and there are no specific limitations.
[0145] This can prevent the target data from being maliciously tampered with during transmission. By writing the data digest into the second blockchain and matching the data digest with the initial data, the security of data transmission can be improved.
[0146] When matching the data digest with the initial data, the initial data can first be hashed based on a preset hash encoding strategy to obtain a hash code to be matched. Then, it is determined whether the obtained hash code to be matched is the same as the data digest. If they are the same, the data digest is determined to match the initial data; otherwise, the data digest is determined not to match the initial data.
[0147] In this embodiment of the application, through the data sharing platform, various devices, such as various political and legal collaborative business devices, can quickly publish and receive data, realize reliable collaboration and automated execution, and greatly improve data transmission efficiency, that is, improve the collaborative efficiency of political and legal collaborative business.
[0148] Based on the same inventive concept, embodiments of this application provide a data transmission device capable of realizing the functions corresponding to the aforementioned data transmission method. Please refer to... Figure 4 The device includes a first processing module 401 and a second processing module 402, wherein:
[0149] First processing module 401: After receiving an interface request instruction from a first device, if the requesting object is determined to be a second device based on the interface request instruction, it forwards the interface request instruction to the second device, so that the second device can determine and return the authorization result of the access permission of the target interface based on the received interface request instruction; wherein, the interface request instruction is used to indicate that the first device requests access permission of the target interface provided by the requesting object;
[0150] The first processing module 401 is further configured to: forward the authorization result returned by the second device to the first device, and receive the data query instruction for the target data generated by the first device based on the authorization result;
[0151] The second processing module 402 is used to receive a data query instruction, call the target interface based on the data query instruction, obtain the target data from the second device, and send the target data to the first device.
[0152] In one possible embodiment, the second processing module 402 is specifically used for:
[0153] The system controls the first front-end service module associated with the first device to receive data query commands; wherein the first front-end service module is located in the first intranet environment of the first device.
[0154] The first front-end service module is controlled to convert the data query command into a format according to the interface information of the target interface, and obtain the converted query command.
[0155] The first front-end service module is controlled to perform hash processing on the conversion query command based on a preset hash encoding strategy to obtain the command digest;
[0156] The first front-end service module is controlled to package and process the conversion query command and command summary to obtain the target command;
[0157] The first front-end service module is controlled to call the target interface based on the target command and obtain the target data from the second device.
[0158] In one possible embodiment, the first processing module 401 is further configured to:
[0159] Before the control of the first front-end service module converts the data query instruction according to the interface information of the target interface to obtain the converted query instruction, it receives an interface publishing instruction from the second device; wherein, the interface publishing instruction is used to publish the interface information of the target interface provided by the second device; the interface information includes at least one of the following: the interface name of the target interface, the interface function, the interface data rules, and the interface calling rules;
[0160] The system publishes instructions based on the interface and stores the interface information of the target interface provided by the second device.
[0161] In one possible embodiment, the second processing module 402 is specifically used for:
[0162] The first front-end service module is controlled to send target instructions to the first back-end service module associated with the first device; wherein the first back-end service module is located in the intranet environment of the platform where the data sharing platform is located.
[0163] The first back-end service module is controlled to unpack the target instruction and obtain the instruction summary and conversion query instruction;
[0164] The first back-end service module is controlled to write the instruction digest into the first blockchain and store the conversion query instruction in the local storage module;
[0165] The second post-service module associated with the second device reads the conversion query instruction from the local storage module; wherein, the second post-service module is located in the intranet environment of the data sharing platform;
[0166] The second back-end service module is controlled to call the target interface based on the conversion query command and obtain the target data from the second device.
[0167] In one possible embodiment, the second processing module 402 is specifically used for:
[0168] Control the second back-end service module to read instruction digests from the first blockchain;
[0169] When the control of the second back-end service module determines that the instruction digest matches the received conversion query instruction, it sends the conversion query instruction to the second front-end service module associated with the second device; wherein, the second front-end service module is located in the second intranet environment of the second device;
[0170] The second front-end service module is controlled to call the target interface based on the conversion query command and obtain the target data from the second device.
[0171] In one possible embodiment, the second processing module 402 is specifically used for:
[0172] The second front-end service module is controlled to call the target interface based on the conversion query command to obtain initial data from the second device;
[0173] The second front-end service module is controlled to perform hash processing on the acquired initial data based on a preset hash encoding strategy to obtain a data digest;
[0174] The second front-end service module is controlled to package and process the initial data and data summary to obtain the target data.
[0175] In one possible embodiment, the target data is obtained from the second device by controlling a second front-end service module associated with the second device, the second front-end service module being located in a second intranet environment; the second processing module 402 is specifically used for:
[0176] The second front-end service module is controlled to send target data to the second back-end service module associated with the second device; wherein the second back-end service module is located in the intranet environment of the data sharing platform.
[0177] The second back-end service module is controlled to unpack the target data to obtain a data digest and initial data. The initial data is obtained from the second device based on a data query command, and the data digest is obtained by hashing the initial data.
[0178] The second back-end service module is controlled to write the obtained data digest into the second blockchain and store the initial data in the local storage module in order to send the initial data to the first device.
[0179] In one possible embodiment, the second processing module 402 is specifically used for:
[0180] The control unit associated with the first device reads initial data from the local storage module; wherein, the first back-end service module is located in the intranet environment of the data sharing platform.
[0181] The first back-end service module is controlled to send initial data to the first front-end service module associated with the first device; wherein the first front-end service module is located in the first intranet environment of the first device;
[0182] The first front-end service module is controlled to call the receiving interface provided by the first device and send initial data to the first device.
[0183] In one possible embodiment, the second processing module 402 is specifically used for:
[0184] Control the first front-end service module to read data digests from the second blockchain;
[0185] When it is determined that the data digest matches the obtained initial data, the first front-end service module is controlled to call the receiving interface provided by the first device to send the initial data to the first device.
[0186] Please refer to Figure 5 The aforementioned data transmission device can run on a computer device 500. The current and previous versions of the data transmission program, as well as the application software corresponding to the data transmission program, can be installed on the computer device 500, which includes a processor 580 and a memory 520. In some embodiments, the computer device 500 may include a display unit 540, which includes a display panel 541 for displaying a user-interactive interface, etc.
[0187] In one possible embodiment, the display panel 541 may be configured in the form of a liquid crystal display (LCD) or an organic light-emitting diode (OLED).
[0188] The processor 580 is used to read a computer program and then execute the methods defined by the computer program. For example, the processor 580 reads a data storage program or file, thereby running the data storage program on the computer device 500 and displaying the corresponding interface on the display unit 540. The processor 580 may include one or more general-purpose processors, and may also include one or more DSPs (Digital Signal Processors) for performing related operations to implement the technical solutions provided in the embodiments of this application.
[0189] The memory 520 generally includes main memory and secondary storage. Main memory can be random access memory (RAM), read-only memory (ROM), and cache, etc. Secondary storage can be a hard disk, optical disk, USB flash drive, floppy disk, or tape drive, etc. The memory 520 is used to store computer programs and other data. The computer programs include applications corresponding to each client, and other data may include data generated after the operating system or applications are run, including system data (e.g., operating system configuration parameters) and user data. In this embodiment, program instructions are stored in the memory 520, and the processor 580 executes the program instructions in the memory 520 to implement any of the methods described in the preceding figures.
[0190] The aforementioned display unit 540 is used to receive input digital information, character information, or contact touch operations / non-contact gestures, and to generate signal inputs related to user settings and function control of the computer device 500. Specifically, in this embodiment, the display unit 540 may include a display panel 541. The display panel 541, for example, is a touch screen, which can collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or on the display panel 541), and drive corresponding connection devices according to a pre-set program.
[0191] In one possible embodiment, the display panel 541 may include two parts: a touch detection device and a touch controller. The touch detection device detects the player's touch position and the signal generated by the touch operation, and transmits the signal to the touch controller. The touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends it to the processor 580. It can also receive and execute commands from the processor 580.
[0192] The display panel 541 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the display unit 540, in some embodiments, the computer device 500 may also include an input unit 530. The input unit 530 may include an image input device 531 and other input devices 532, wherein the other input devices may include, but are not limited to, one or more of the following: a physical keyboard, function keys (such as volume control buttons, power buttons, etc.), a trackball, a mouse, and a joystick.
[0193] In addition to the above, the computer device 500 may also include a power supply 590 for powering other modules, an audio circuit 560, a near-field communication module 570, and an RF circuit 510. The computer device 500 may also include one or more sensors 550, such as an accelerometer, a light sensor, and a pressure sensor. The audio circuit 560 specifically includes a speaker 561 and a microphone 562, for example, the computer device 500 can use the microphone 562 to collect the user's voice and perform corresponding operations.
[0194] As one embodiment, the number of processors 580 can be one or more, and the processors 580 and the memory 520 can be coupled together or relatively independent.
[0195] As one example, Figure 5 The processor 580 in the system can be used to implement, for example Figure 4 The functions of the first processing module 401 and the second processing module 402 in the process.
[0196] As one example, Figure 5 The processor 580 in the document can be used to implement the functions of the server or terminal devices discussed above.
[0197] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0198] Alternatively, if the integrated units of this invention are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this invention, or the parts that contribute to the prior art, can be embodied in the form of software products, for example, through a computer program product. This computer program product is stored in a storage medium and includes several instructions to cause a computer device to execute all or part of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROM, RAM, magnetic disks, or optical disks.
[0199] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A data transmission method, characterized in that, Applications in data sharing platforms include: Upon receiving an interface request instruction from a first device, if the requesting object is determined to be a second device based on the interface request instruction, the interface request instruction is forwarded to the second device, so that the second device can determine and return the authorization result of the access permission of the target interface based on the received interface request instruction; wherein, the interface request instruction is used to indicate that the first device requests access permission of the target interface provided by the requesting object; Forward the authorization result returned by the second device to the first device, and receive the data query instruction for the target data generated by the first device based on the authorization result; The control unit, which is associated with the first device, receives the data query instruction and then controls the first front-end service module to convert the data query instruction according to the interface information of the target interface to obtain a converted query instruction. The first front-end service module is controlled to perform hash processing on the conversion query instruction based on a preset hash encoding strategy to obtain an instruction digest; The first front-end service module is controlled to package the conversion query instruction and the instruction digest to obtain the target instruction. The first front-end service module is controlled to call the target interface based on the target instruction to obtain the target data from the second device; wherein, the first front-end service module is located in the first intranet environment where the first device is located; The target data is sent to the first device.
2. The method according to claim 1, characterized in that, Before controlling the first front-end service module to perform format conversion on the data query instruction according to the interface information of the target interface to obtain the converted query instruction, the method further includes: Receive an interface publishing instruction from the second device; wherein the interface publishing instruction is used to publish interface information of the target interface provided by the second device; the interface information includes at least one of the target interface's interface name, interface function, interface data rules, and interface calling rules; Instructions are issued based on the interface, and interface information of the target interface provided by the second device is stored.
3. The method according to claim 1, characterized in that, The control of the first front-end service module, based on the target instruction, calls the target interface to obtain the target data from the second device, including: The first front-end service module is controlled to send the target instruction to the first back-end service module associated with the first device; wherein the first back-end service module is located in the intranet environment of the data sharing platform. The first post-service module is controlled to unpack the target instruction to obtain the instruction digest and the conversion query instruction. The first post-service module is controlled to write the instruction digest into the first blockchain and store the conversion query instruction in the local storage module; The second back-end service module associated with the second device reads the conversion query instruction from the local storage module; wherein, the second back-end service module is located in the intranet environment of the data sharing platform; The second back-end service module is controlled to call the target interface based on the conversion query instruction to obtain the target data from the second device.
4. The method according to claim 3, characterized in that, The control of the second post-service module, based on the conversion query instruction, calls the target interface to obtain the target data from the second device, including: The second back-end service module is controlled to read the instruction digest from the first blockchain; When the second back-end service module determines that the instruction digest matches the received conversion query instruction, it sends the conversion query instruction to the second front-end service module associated with the second device; wherein the second front-end service module is located in the second intranet environment where the second device is located; The second front-end service module is controlled to call the target interface based on the conversion query instruction to obtain the target data from the second device.
5. The method according to claim 4, characterized in that, The control of the second front-end service module, based on the conversion query instruction, calls the target interface to obtain the target data from the second device, including: The second front-end service module is controlled to call the target interface based on the conversion query instruction to obtain initial data from the second device; The second front-end service module is controlled to perform hash processing on the acquired initial data based on a preset hash encoding strategy to obtain a data digest; The second front-end service module is controlled to package the initial data and the data digest to obtain the target data.
6. The method according to any one of claims 1 to 5, characterized in that, The target data is obtained from the second device by controlling the second front-end service module associated with the second device, and the second front-end service module is located in the second intranet environment where the second device is located; Sending the target data to the first device includes: The second front-end service module is controlled to send the target data to the second back-end service module associated with the second device; wherein the second back-end service module is located in the intranet environment of the data sharing platform. The second back-end service module is controlled to unpack the target data to obtain a data digest and initial data; wherein, the initial data is obtained from the second device based on a data query command, and the data digest is obtained by hashing the initial data; The second post-service module is controlled to write the obtained data digest into the second blockchain and store the initial data in the local storage module in order to send the initial data to the first device.
7. The method according to claim 6, characterized in that, Sending the initial data to the first device includes: The control unit, which is associated with the first device, reads the initial data from the local storage module; wherein the first back-end service module is located in the intranet environment of the data sharing platform. The first back-end service module is controlled to send the initial data to the first front-end service module associated with the first device; wherein the first front-end service module is located in the first intranet environment where the first device is located; The first front-end service module is controlled to call the receiving interface provided by the first device and send the initial data to the first device.
8. The method according to claim 7, characterized in that, The control of the first front-end service module to call the receiving interface provided by the first device and send the initial data to the first device includes: The first front-end service module is controlled to read the data digest from the second blockchain; When it is determined that the data digest matches the obtained initial data, the first front-end service module is controlled to call the receiving interface provided by the first device to send the initial data to the first device.
9. A data transmission device, characterized in that, include: First processing module: After receiving an interface request instruction from a first device, if the requesting object is determined to be a second device based on the interface request instruction, the module forwards the interface request instruction to the second device, so that the second device determines and returns the authorization result of the access permission of the target interface based on the received interface request instruction; wherein, the interface request instruction is used to indicate that the first device requests the access permission of the target interface provided by the requesting object; The first processing module is further configured to: forward the authorization result returned by the second device to the first device, and receive a data query instruction for the target data generated by the first device based on the authorization result; The second processing module controls the first front-end service module associated with the first device. Upon receiving the data query instruction, the module controls the first front-end service module to convert the data query instruction according to the interface information of the target interface to obtain a converted query instruction; controls the first front-end service module to perform hash processing on the converted query instruction based on a preset hash encoding strategy to obtain an instruction digest; controls the first front-end service module to package the converted query instruction and the instruction digest to obtain a target instruction; and controls the first front-end service module to call the target interface based on the target instruction to obtain the target data from the second device. The first front-end service module is located in the first intranet environment where the first device is located. The module also sends the target data to the first device.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the method as described in any one of claims 1 to 8.
11. A computer device, characterized in that, include: Memory, used to store program instructions; A processor is configured to invoke program instructions stored in the memory and execute the method as described in any one of claims 1 to 8 according to the obtained program instructions.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions for causing a computer to perform the method as described in any one of claims 1 to 8.